diff options
Diffstat (limited to 'sys/dshowsrcwrapper/gstdshowfakesink.cpp')
-rwxr-xr-x | sys/dshowsrcwrapper/gstdshowfakesink.cpp | 71 |
1 files changed, 7 insertions, 64 deletions
diff --git a/sys/dshowsrcwrapper/gstdshowfakesink.cpp b/sys/dshowsrcwrapper/gstdshowfakesink.cpp index afc0a5ef..6c0c74dc 100755 --- a/sys/dshowsrcwrapper/gstdshowfakesink.cpp +++ b/sys/dshowsrcwrapper/gstdshowfakesink.cpp @@ -21,87 +21,30 @@ #include "gstdshowfakesink.h" - -CDshowFakeSink::CDshowFakeSink() - : m_hres(S_OK), CBaseRenderer(CLSID_DshowFakeSink, "DshowFakeSink", NULL, &m_hres) -{ - m_callback = NULL; -} - -CDshowFakeSink::~CDshowFakeSink() -{ - -} - -//Object creation. -CUnknown* WINAPI CDshowFakeSink::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr) -{ - CDshowFakeSink *pNewObject = new CDshowFakeSink(); - g_print ("CDshowFakeSink::CreateInstance\n"); - if (pNewObject == NULL) { - *pHr = E_OUTOFMEMORY; - } - return pNewObject; -} - -STDMETHODIMP CDshowFakeSink::QueryInterface(REFIID riid, void **ppvObject) -{ - if (riid == IID_IGstDshowInterface) { - *ppvObject = (IGstDshowInterface*) this; - AddRef(); - return S_OK; - } - else - return CBaseRenderer::QueryInterface (riid, ppvObject); -} - -ULONG STDMETHODCALLTYPE CDshowFakeSink::AddRef() -{ - return CBaseRenderer::AddRef(); -} - -ULONG STDMETHODCALLTYPE CDshowFakeSink::Release() +CDshowFakeSink::CDshowFakeSink() : + m_hres(S_OK), + m_callback(NULL), + m_data(NULL), + CBaseRenderer(CLSID_DshowFakeSink, "DshowFakeSink", NULL, &m_hres) { - return CBaseRenderer::Release(); } - STDMETHODIMP CDshowFakeSink::gst_set_media_type (AM_MEDIA_TYPE *pmt) { m_MediaType.Set (*pmt); return S_OK; } -STDMETHODIMP CDshowFakeSink::gst_set_buffer_callback (push_buffer_func push, byte *data) +STDMETHODIMP CDshowFakeSink::gst_set_buffer_callback (push_buffer_func push, gpointer data) { m_callback = push; m_data = data; return S_OK; } -STDMETHODIMP CDshowFakeSink::gst_push_buffer (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount) -{ - return E_NOTIMPL; -} - -STDMETHODIMP CDshowFakeSink::gst_flush () -{ - return E_NOTIMPL; -} - -STDMETHODIMP CDshowFakeSink::gst_set_sample_size(unsigned int size) -{ - return E_NOTIMPL; -} - HRESULT CDshowFakeSink::CheckMediaType(const CMediaType *pmt) { - VIDEOINFOHEADER *p1; - VIDEOINFOHEADER *p2; - if(pmt != NULL) - { - p1 = (VIDEOINFOHEADER *)pmt->Format(); - p2 = (VIDEOINFOHEADER *)m_MediaType.Format(); + if (pmt != NULL) { if (*pmt == m_MediaType) return S_OK; } |