diff options
author | Michael Smith <msmith@xiph.org> | 2008-09-24 17:21:41 +0000 |
---|---|---|
committer | Michael Smith <msmith@xiph.org> | 2008-09-24 17:21:41 +0000 |
commit | a51c4c16b25416ca55ddca56a14c89be63782a90 (patch) | |
tree | a954d27933478ef5c400881dc7c8f815f6884892 /sys/dshowdecwrapper/gstdshowfakesrc.cpp | |
parent | 5a97c0d534f49c7732b93deb24c5b05473dece68 (diff) | |
download | gst-plugins-bad-a51c4c16b25416ca55ddca56a14c89be63782a90.tar.gz gst-plugins-bad-a51c4c16b25416ca55ddca56a14c89be63782a90.tar.bz2 gst-plugins-bad-a51c4c16b25416ca55ddca56a14c89be63782a90.zip |
sys/dshowdecwrapper/: Prefer known-good filters, create directly by GUID if possible, fall back to creating highest-m...
Original commit message from CVS:
* sys/dshowdecwrapper/gstdshowaudiodec.cpp:
* sys/dshowdecwrapper/gstdshowaudiodec.h:
* sys/dshowdecwrapper/gstdshowfakesrc.cpp:
* sys/dshowdecwrapper/gstdshowutil.cpp:
* sys/dshowdecwrapper/gstdshowutil.h:
* sys/dshowdecwrapper/gstdshowvideodec.cpp:
* sys/dshowdecwrapper/gstdshowvideodec.h:
Prefer known-good filters, create directly by GUID if possible,
fall back to creating highest-merit filter otherwise.
Fixes playback with random dshow filters installed in some
cases.
Diffstat (limited to 'sys/dshowdecwrapper/gstdshowfakesrc.cpp')
-rw-r--r-- | sys/dshowdecwrapper/gstdshowfakesrc.cpp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/sys/dshowdecwrapper/gstdshowfakesrc.cpp b/sys/dshowdecwrapper/gstdshowfakesrc.cpp index 8095c36e..170e9ed8 100644 --- a/sys/dshowdecwrapper/gstdshowfakesrc.cpp +++ b/sys/dshowdecwrapper/gstdshowfakesrc.cpp @@ -46,14 +46,33 @@ HRESULT FakeOutputPin::GetMediaType(int iPosition, return VFW_S_NO_MORE_ITEMS; } +#if 0 +#define GUID_FORMAT "0x%.8x 0x%.4x 0x%.4x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x" +#define GUID_ARGS(g) g.Data1, g.Data2, g.Data3, \ + g.Data4[0], g.Data4[1], g.Data4[2], g.Data4[3], \ + g.Data4[4], g.Data4[5], g.Data4[6], g.Data4[7] + +static void printMediaType (AM_MEDIA_TYPE *mt) +{ + GST_DEBUG (":: majortype: "GUID_FORMAT, GUID_ARGS(mt->majortype)); + GST_DEBUG (":: subtype: "GUID_FORMAT, GUID_ARGS(mt->subtype)); + + GST_DEBUG (":: bFixedSizeSamples: %d", mt->bFixedSizeSamples); + GST_DEBUG (":: bTemporalCompression: %d", mt->bTemporalCompression); + GST_DEBUG (":: cbFormat: %d", mt->cbFormat); + GST_DEBUG (":: formattype: %x", mt->formattype); + GST_DEBUG (":: lSampleSize: %lu", mt->lSampleSize); + GST_DEBUG (":: pbFormat: %p", mt->pbFormat); +} +#endif HRESULT FakeOutputPin::CheckMediaType(const CMediaType *pmt) { - if (m_MediaType == *pmt) { - return S_OK; - } + if (m_MediaType == *pmt) { + return S_OK; + } - return S_FALSE; + return S_FALSE; } HRESULT FakeOutputPin::DecideBufferSize (IMemAllocator *pAlloc, |