aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpopcornmix <popcornmix@gmail.com>2015-03-31 17:31:47 +0100
committerRainer Hochecker <fernetmenta@online.de>2016-01-04 22:19:25 +0100
commitffedd77d755aaa9c9e529e2a73f28887b1557269 (patch)
treeabdd564c05e68ef23a5d735a42a86ed144e94b2e
parente670d700aa2b3f307331ebd94801ce12de9200c1 (diff)
mmalcodec: Add SetCodecControl function
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp10
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp
index ff730f574a..10d16f09c6 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp
@@ -126,6 +126,7 @@ CMMALVideo::CMMALVideo()
m_speed = DVD_PLAYSPEED_NORMAL;
m_fps = 0.0f;
m_num_decoded = 0;
+ m_codecControlFlags = 0;
}
CMMALVideo::~CMMALVideo()
@@ -867,7 +868,7 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
}
if (g_advancedSettings.CanLogComponent(LOGVIDEO))
- CLog::Log(LOGDEBUG, "%s::%s - ret(%x) pics(%d) inputs(%d) slept(%d) queued(%.2f) (%.2f:%.2f) full(%d)", CLASSNAME, __func__, ret, m_output_ready.size(), mmal_queue_length(m_dec_input_pool->queue), slept, queued*1e-6, m_demuxerPts*1e-6, m_decoderPts*1e-6, full);
+ CLog::Log(LOGDEBUG, "%s::%s - ret(%x) pics(%d) inputs(%d) slept(%d) queued(%.2f) (%.2f:%.2f) full(%d) flags(%x)", CLASSNAME, __func__, ret, m_output_ready.size(), mmal_queue_length(m_dec_input_pool->queue), slept, queued*1e-6, m_demuxerPts*1e-6, m_decoderPts*1e-6, full, m_codecControlFlags);
return ret;
}
@@ -931,6 +932,7 @@ void CMMALVideo::Reset(void)
}
m_decoderPts = DVD_NOPTS_VALUE;
m_demuxerPts = DVD_NOPTS_VALUE;
+ m_codecControlFlags = 0;
}
void CMMALVideo::SetSpeed(int iSpeed)
@@ -1041,3 +1043,9 @@ bool CMMALVideo::GetCodecStats(double &pts, int &droppedPics)
droppedPics= -1;
return false;
}
+
+void CMMALVideo::SetCodecControl(int flags)
+{
+ CSingleLock lock(m_sharedSection);
+ m_codecControlFlags = flags;
+}
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.h
index e183e41f49..e81f32793a 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.h
@@ -79,6 +79,7 @@ public:
virtual void SetDropState(bool bDrop);
virtual const char* GetName(void) { return m_pFormatName ? m_pFormatName:"mmal-xxx"; }
virtual bool GetCodecStats(double &pts, int &droppedPics);
+ virtual void SetCodecControl(int flags);
virtual void SetSpeed(int iSpeed);
// MMAL decoder callback routines.
@@ -121,6 +122,7 @@ protected:
double m_demuxerPts;
double m_decoderPts;
int m_speed;
+ int m_codecControlFlags;
CCriticalSection m_sharedSection;
MMAL_COMPONENT_T *m_dec;