From 252224c0263c3b1d125ea221a78547fe051ee0e2 Mon Sep 17 00:00:00 2001 From: Comment Date: Tue, 1 Oct 2013 03:35:50 +0100 Subject: very painful debugging --- rotord/src/libavwrapper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'rotord/src/libavwrapper.cpp') 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 "<