summaryrefslogtreecommitdiff
path: root/rotord/src/libavwrapper.cpp
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-11-05 22:33:22 +0000
committerComment <tim@gray.(none)>2013-11-05 22:33:22 +0000
commit18a77356a424511e7ae1865d1554d20b4b5c51fb (patch)
tree15209fc88f1b8fd4fe2ced01ac804772c8f0a43b /rotord/src/libavwrapper.cpp
parent9462492cae4d94157538f353d67f2f6daaa45259 (diff)
clean up compiler warnings
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
-rw-r--r--rotord/src/libavwrapper.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp
index 3276b16..c4d267a 100644
--- a/rotord/src/libavwrapper.cpp
+++ b/rotord/src/libavwrapper.cpp
@@ -1,7 +1,6 @@
#include "libavwrapper.h"
-extern Poco::Mutex mutex; //application wide mutex
-static Poco::Mutex mutex;
+Poco::Mutex mutex;
#include <stdexcept>
#include <iostream>
@@ -10,6 +9,9 @@ static Poco::Mutex mutex;
using namespace std;
using namespace Poco;
+static bool b_is_one_time_inited=false;
+static int sws_flags = SWS_BICUBIC;
+
void libav::maybeInitFFMpegLib()
{
if (b_is_one_time_inited)
@@ -42,7 +44,7 @@ bool libav::video_decoder::open(const std::string& filename){
Poco::StringTokenizer tokens(filename,".");
string idxfile="";
if (tokens.count()>1){
- for (int i=0;i<tokens.count()-1;i++){
+ for (uint32_t i=0;i<tokens.count()-1;i++){
idxfile+=tokens[i];
idxfile+=".";
}
@@ -92,8 +94,6 @@ bool libav::video_decoder::open(const std::string& filename){
std::cerr<<"ffmpegsource: "<<err.Buffer<<std::endl;
return false;
}
- int framenumber = 0; /* valid until next call to FFMS_GetFrame* on the same video object */
-
//std::cerr<<"ffmpegsource: successfully opened "<<filename<<std::endl;
loaded=true;
@@ -330,7 +330,7 @@ bool libav::exporter::encodeFrame(unsigned char *pixels,AVPacket *audio){
return true;
}
-bool libav::exporter::encodeFrame(unsigned char *pixels,bool keyframe=false){
+bool libav::exporter::encodeFrame(unsigned char *pixels,bool keyframe){
video_pts = (double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;
write_video_frame(oc, video_st, pixels,keyframe);
frame->pts += av_rescale_q(1, video_st->codec->time_base, video_st->time_base);
@@ -621,7 +621,7 @@ bool libav::exporter::open_video(AVFormatContext *oc, AVCodec *codec, AVStream *
}
- void libav::exporter::write_video_frame(AVFormatContext *oc, AVStream *st, uint8_t *pixels, bool keyframe=false)
+ void libav::exporter::write_video_frame(AVFormatContext *oc, AVStream *st, uint8_t *pixels, bool keyframe)
{
int ret;