From 440ba17594d17736a56cac0d89be97fb63577989 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 16 Sep 2013 14:31:04 +0100 Subject: ffmpegsource audio loading --- rotord/src/libavwrapper.cpp | 66 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 14 deletions(-) (limited to 'rotord/src/libavwrapper.cpp') diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp index 717667c..1fe0e5a 100644 --- a/rotord/src/libavwrapper.cpp +++ b/rotord/src/libavwrapper.cpp @@ -557,45 +557,45 @@ bool libav::decoder::avtry(int result, const std::string& msg) { return true; } - void libav::ffms2_decoder::cleanup(){ + void libav::video_decoder::cleanup(){ if (loaded) { mutex.lock(); - FFMS_DestroyVideoSource(videosource); + FFMS_DestroyVideoSource(source); mutex.unlock(); loaded=false; } } -bool libav::ffms2_decoder::open(const std::string& filename){ +bool libav::video_decoder::open(const std::string& filename){ mutex.lock(); loaded=false; - FFMS_Index *index = FFMS_MakeIndex(filename.c_str(), 0, 0, NULL, NULL, FFMS_IEH_IGNORE, NULL, NULL, &errinfo); + FFMS_Index *index = FFMS_MakeIndex(filename.c_str(), 0, 0, NULL, NULL, FFMS_IEH_IGNORE, NULL, NULL, &err); if (index == NULL) { - std::cerr<<"ffmpegsource: "<EncodedWidth; h=propframe->EncodedHeight; //propframe->EncodedPixelFormat; - if (FFMS_SetOutputFormatV2(videosource, pixfmts, propframe->EncodedWidth, propframe->EncodedHeight, FFMS_RESIZER_BICUBIC, &errinfo)) { - std::cerr<<"ffmpegsource: "<EncodedWidth, propframe->EncodedHeight, FFMS_RESIZER_BICUBIC, &err)) { + std::cerr<<"ffmpegsource: "<