+
+string
+FFmpegContent::identifier () const
+{
+ stringstream s;
+
+ s << VideoContent::identifier();
+
+ boost::mutex::scoped_lock lm (_mutex);
+
+ if (_subtitle_stream) {
+ s << "_" << _subtitle_stream->identifier ();
+ }
+
+ for (vector<Filter const *>::const_iterator i = _filters.begin(); i != _filters.end(); ++i) {
+ s << "_" << (*i)->id ();
+ }
+
+ return s.str ();
+}
+
+boost::filesystem::path
+FFmpegContent::audio_analysis_path () const
+{
+ shared_ptr<const Film> film = _film.lock ();
+ if (!film) {
+ return boost::filesystem::path ();
+ }
+
+ /* We need to include the stream ID in this path so that we get different
+ analyses for each stream.
+ */
+
+ boost::filesystem::path p = film->audio_analysis_dir ();
+ string name = digest ();
+ if (audio_stream ()) {
+ name += "_" + audio_stream()->identifier ();
+ }
+ p /= name;
+ return p;
+}