summaryrefslogtreecommitdiff
path: root/rotord/src/libavwrapper.cpp
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-10-01 03:35:50 +0100
committerComment <tim@gray.(none)>2013-10-01 03:35:50 +0100
commit252224c0263c3b1d125ea221a78547fe051ee0e2 (patch)
tree86b830f4ea9f19259e73ab7a2b4490000376c886 /rotord/src/libavwrapper.cpp
parentff7a13400bbf193d109e03efc4f7c60f064cbed1 (diff)
very painful debugging
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
-rw-r--r--rotord/src/libavwrapper.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp
index e439075..dee8d47 100644
--- a/rotord/src/libavwrapper.cpp
+++ b/rotord/src/libavwrapper.cpp
@@ -136,8 +136,13 @@ bool libav::exporter::setup(int w,int h, int bitRate, int frameRate, std::string
bool libav::exporter::record(std::string filename){
+ printf("exporter 1 - using filename '%s'.\n",filename.c_str());
+
// allocate the output media context //
avformat_alloc_output_context2(&oc, NULL, NULL, filename.c_str());
+
+ rintf("exporter 2.\n");
+
if (!oc) {
printf("Could not deduce output format from file extension: using MPEG.\n");
avformat_alloc_output_context2(&oc, NULL, "mpeg", filename.c_str());
@@ -147,6 +152,8 @@ bool libav::exporter::record(std::string filename){
}
fmt = oc->oformat;
+ rintf("exporter 3.\n");
+
// Add the audio and video streams using the default format codecs
// * and initialize the codecs. //
video_st = NULL;
@@ -162,6 +169,8 @@ bool libav::exporter::record(std::string filename){
audio_st = add_stream(oc, &audio_codec, fmt->audio_codec);
}
+ rintf("exporter 4.\n");
+
//set initial video params
video_st->codec->width=w;
video_st->codec->height=h;
@@ -196,6 +205,8 @@ bool libav::exporter::record(std::string filename){
std::cerr << "opened audio codec with "<<audioframesize<<" frame size and "<<audiostep<<" seconds per frame"<<std::endl;
}
+ rintf("exporter 5.\n");
+
av_dump_format(oc, 0, filename.c_str(), 1);