diff options
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
| -rw-r--r-- | rotord/src/libavwrapper.cpp | 11 |
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); |
