diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2007-12-01 13:00:02 +0300 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2007-12-01 13:00:02 +0300 |
commit | 4c0b56b5f808d477202ddfca7bf3821bfced4ede (patch) | |
tree | b0a1eefc0f667c0b53fe9d2a9d39ab58cd06c65a /src/filters/transform/mpcvideodec/VideoDecOutputPin.cpp | |
parent | 68057cd646764fc6673d80f42a5b5f283b4b339d (diff) |
ffmpeg updates, warning removal, adpcm support for flv splitter, fixes on ffmpeg video decoder
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@337 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/mpcvideodec/VideoDecOutputPin.cpp')
-rw-r--r-- | src/filters/transform/mpcvideodec/VideoDecOutputPin.cpp | 72 |
1 files changed, 71 insertions, 1 deletions
diff --git a/src/filters/transform/mpcvideodec/VideoDecOutputPin.cpp b/src/filters/transform/mpcvideodec/VideoDecOutputPin.cpp index 1a8cc377f..3f72d4195 100644 --- a/src/filters/transform/mpcvideodec/VideoDecOutputPin.cpp +++ b/src/filters/transform/mpcvideodec/VideoDecOutputPin.cpp @@ -119,4 +119,74 @@ HRESULT CVideoDecOutputPin::DecideAllocator(IMemInputPin *pPin, IMemAllocator ** else
return __super::DecideAllocator(pPin, ppAlloc);
}
-*/
\ No newline at end of file +*/
+
+
+HRESULT CVideoDecOutputPin::Deliver(IMediaSample* pMediaSample)
+{
+ if (!m_pVideoDecFilter->UseDXVA2())
+ {
+ if(!m_pOutputQueue) return NOERROR;
+ pMediaSample->AddRef();
+ return m_pOutputQueue->Receive(pMediaSample);
+ }
+ else
+ return __super::Deliver (pMediaSample);
+}
+
+
+HRESULT CVideoDecOutputPin::Active()
+{
+ CAutoLock cAutoLock(m_pLock);
+
+ // TODO
+
+ if(m_Connected && !m_pOutputQueue)
+ {
+ HRESULT hr = NOERROR;
+
+ m_pOutputQueue.Attach(new COutputQueue(m_Connected, &hr));
+ if(!m_pOutputQueue) hr = E_OUTOFMEMORY;
+
+ if(FAILED(hr))
+ {
+ m_pOutputQueue.Free();
+ return hr;
+ }
+ }
+
+ return __super::Active();
+}
+
+HRESULT CVideoDecOutputPin::Inactive()
+{
+ CAutoLock cAutoLock(m_pLock);
+ m_pOutputQueue.Free();
+ return __super::Inactive();
+}
+
+
+#define CallQueue(call) \
+ if(!m_pOutputQueue) return NOERROR; \
+ m_pOutputQueue->##call; \
+ return NOERROR; \
+
+HRESULT CVideoDecOutputPin::DeliverEndOfStream()
+{
+ CallQueue(EOS());
+}
+
+HRESULT CVideoDecOutputPin::DeliverBeginFlush()
+{
+ CallQueue(BeginFlush());
+}
+
+HRESULT CVideoDecOutputPin::DeliverEndFlush()
+{
+ CallQueue(EndFlush());
+}
+
+HRESULT CVideoDecOutputPin::DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
+{
+ CallQueue(NewSegment(tStart, tStop, dRate));
+}
\ No newline at end of file |