diff options
author | Johannes Mueller <github@johannes-mueller.org> | 2015-04-12 14:26:39 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-04-21 18:15:29 +0200 |
commit | acd1ee1989549ecd48ee896a3e1d2158c92d6609 (patch) | |
tree | fccdd4a4c9ecec915be36d00e7b129009fbffaa2 /libs/ardour/export_format_specification.cc | |
parent | 9241f581883ddcdd51560c56c83c6afa6dc3815a (diff) |
Added support for exporting mp4 chapter marks
The mp4 file format supports chapter marks using the so called
mp4chaps format to enable chapter wise navigation in an mp4 file. The
format is like
hh:mm:ss.sss Chapter Title
This commit adds the ability to export those kind of chapter marks
along with TOC and CUE marks. The filename extension for the chapter
mark file is "chapters.txt". The format specification description is
"MP4ch".
Diffstat (limited to 'libs/ardour/export_format_specification.cc')
-rw-r--r-- | libs/ardour/export_format_specification.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libs/ardour/export_format_specification.cc b/libs/ardour/export_format_specification.cc index 9a972da0bf..7e41b209a4 100644 --- a/libs/ardour/export_format_specification.cc +++ b/libs/ardour/export_format_specification.cc @@ -170,6 +170,7 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s) , _normalize_target (1.0) , _with_toc (false) , _with_cue (false) + , _with_mp4chaps (false) , _soundcloud_upload (false) , _command ("") { @@ -248,6 +249,7 @@ ExportFormatSpecification::get_state () root->add_property ("id", _id.to_s()); root->add_property ("with-cue", _with_cue ? "true" : "false"); root->add_property ("with-toc", _with_toc ? "true" : "false"); + root->add_property ("with-mp4chaps", _with_mp4chaps ? "true" : "false"); root->add_property ("command", _command); node = root->add_child ("Encoding"); @@ -319,14 +321,19 @@ ExportFormatSpecification::set_state (const XMLNode & root) } else { _with_cue = false; } - + if ((prop = root.property ("with-toc"))) { _with_toc = string_is_affirmative (prop->value()); } else { _with_toc = false; } - - + + if ((prop = root.property ("with-mp4chaps"))) { + _with_mp4chaps = string_is_affirmative (prop->value()); + } else { + _with_mp4chaps = false; + } + if ((prop = root.property ("command"))) { _command = prop->value(); } else { @@ -602,6 +609,10 @@ ExportFormatSpecification::description (bool include_name) components.push_back ("CUE"); } + if (_with_mp4chaps) { + components.push_back ("MP4ch"); + } + if (!_command.empty()) { components.push_back ("+"); } |