summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-09-18 12:40:38 +0100
committerTim Redfern <tim@eclectronics.org>2013-09-18 12:40:38 +0100
commitef032276fc0e202b8c54dc6239bac418ffdc4c70 (patch)
tree04731fadcef035f039044e60fe0f77179c2bf59d /rotord
parent1df3fe73cfb5866c9843818b487373ee8004fd65 (diff)
trying avformat_write_header options in exporter
Diffstat (limited to 'rotord')
-rw-r--r--rotord/src/libavwrapper.cpp14
-rw-r--r--rotord/src/libavwrapper.h2
2 files changed, 14 insertions, 2 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp
index d09b7dc..d4f35ee 100644
--- a/rotord/src/libavwrapper.cpp
+++ b/rotord/src/libavwrapper.cpp
@@ -195,12 +195,22 @@ bool libav::exporter::record(std::string filename){
}
}
+ AVDictionary *opts = NULL; // "create" an empty dictionary
+
+
// Write the stream header, if any. //
- int ret = avformat_write_header(oc, NULL);
+ int ret = avformat_write_header(oc, &opts);
if (ret < 0) {
- //std::cerr <<"Error occurred when opening output file:" << av_err2str(ret) << std::endl;
+ std::cerr <<"Error occurred when opening output file:" <<endl; // av_err2str(ret) << std::endl;
return false;
}
+ //#include <libavformat/movenc.h>
+ //mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
+ /*ret = mov_write_moov_tag(oc, NULL,NULL);
+ if (ret < 0) {
+ std::cerr <<"Error occurred when writing moov atom " <<endl; // << av_err2str(ret) << std::endl;
+ return false;
+ }*/
if (frame)
frame->pts = 0;
diff --git a/rotord/src/libavwrapper.h b/rotord/src/libavwrapper.h
index 77832a7..989d045 100644
--- a/rotord/src/libavwrapper.h
+++ b/rotord/src/libavwrapper.h
@@ -14,6 +14,8 @@ extern "C" {
#include <libavutil/pixfmt.h>
#include <libavutil/opt.h>
#include <libswscale/swscale.h>
+ // ?????????
+//#include <libavformat/movenc.h>
}
#include <string>