diff options
| author | Comment <tim@gray.(none)> | 2013-09-23 11:51:28 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-09-23 11:51:28 +0100 |
| commit | 6e615b00dbb54f33b928e0de0695087709fbc073 (patch) | |
| tree | a852af1b89c007a05f84d36e8505913b34a08d45 /rotord/src/libavwrapper.cpp | |
| parent | 6fac9b5e406d7be3fbfd67cb5d21272727f6043a (diff) | |
MP4 fragmentation control API
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
| -rw-r--r-- | rotord/src/libavwrapper.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp index 5525c44..e439075 100644 --- a/rotord/src/libavwrapper.cpp +++ b/rotord/src/libavwrapper.cpp @@ -110,9 +110,11 @@ bool libav::audio_decoder::open(const std::string& filename){ } } -bool libav::exporter::setup(int w,int h, int bitRate, int frameRate, std::string container){ +bool libav::exporter::setup(int w,int h, int bitRate, int frameRate, std::string container, bool _fragmentation){ maybeInitFFMpegLib(); + + fragmentation=_fragmentation; this->w=w; this->h=h; @@ -212,7 +214,9 @@ bool libav::exporter::record(std::string filename){ //THIS DOES SEEM TO SET CONTAINER OPTS= AS MOOV_SIZE MAKES THE MOVIE BANJAXED //av_dict_set(&opts, "moov_size", "20000", 0); - av_dict_set(&opts, "movflags","frag_keyframe", 0); + if (fragmentation) { + av_dict_set(&opts, "movflags","frag_keyframe", 0); + } // Write the stream header, if any. // |
