diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-25 01:07:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-25 01:07:35 +0100 |
| commit | 996b0c06e23bcb6b300d7b8799df94993692e07d (patch) | |
| tree | 615ff0c372dac97321489e3cb7f316cb4cb9eeec /src/lib/ffmpeg_content.cc | |
| parent | 4f03da3aa12525cb8389ddefee629f5d0b2ac0aa (diff) | |
| parent | 907735ee6ca162583c7c9d20f5603a6db83a149f (diff) | |
Merge master and multifarious hackery.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index ad7af07d8..55139ca56 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -25,6 +25,7 @@ #include "compose.hpp" #include "job.h" #include "util.h" +#include "filter.h" #include "log.h" #include "i18n.h" @@ -41,6 +42,7 @@ int const FFmpegContentProperty::SUBTITLE_STREAMS = 100; int const FFmpegContentProperty::SUBTITLE_STREAM = 101; int const FFmpegContentProperty::AUDIO_STREAMS = 102; int const FFmpegContentProperty::AUDIO_STREAM = 103; +int const FFmpegContentProperty::FILTERS = 104; FFmpegContent::FFmpegContent (shared_ptr<const Film> f, boost::filesystem::path p) : Content (f, p) @@ -70,6 +72,11 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> f, shared_ptr<const cxml::N _audio_stream = _audio_streams.back (); } } + + c = node->node_children ("Filter"); + for (list<shared_ptr<cxml::Node> >::iterator i = c.begin(); i != c.end(); ++i) { + _filters.push_back (Filter::from_id ((*i)->content ())); + } } FFmpegContent::FFmpegContent (FFmpegContent const & o) @@ -109,6 +116,10 @@ FFmpegContent::as_xml (xmlpp::Node* node) const } (*i)->as_xml (t); } + + for (vector<Filter const *>::const_iterator i = _filters.begin(); i != _filters.end(); ++i) { + node->add_child("Filter")->add_child_text ((*i)->id ()); + } } void @@ -335,3 +346,14 @@ FFmpegContent::audio_mapping () const return _audio_stream->mapping; } +void +FFmpegContent::set_filters (vector<Filter const *> const & filters) +{ + { + boost::mutex::scoped_lock lm (_mutex); + _filters = filters; + } + + signal_changed (FFmpegContentProperty::FILTERS); +} + |
