diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2011-05-16 16:02:58 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2011-05-16 16:02:58 (GMT) |
commit | df73b1a324cbdadae9e4128879fdaa65dd7d2a77 (patch) | |
tree | c22cbd0a21ed38a72b133b1f4692fbe063a827b4 | |
parent | e29ef45e404dbe888c0848eb28317a10b2aff768 (diff) | |
download | Qt-df73b1a324cbdadae9e4128879fdaa65dd7d2a77.zip Qt-df73b1a324cbdadae9e4128879fdaa65dd7d2a77.tar.gz Qt-df73b1a324cbdadae9e4128879fdaa65dd7d2a77.tar.bz2 |
Fix a problem where the video would'nt show on some containers
The problem was linked to the detection of a video stream in the graph.
Only the decoders were tested but the demuxer can directly provide the
video stream.
Reviewed-By: TrustMe
Task-Number: QTBUG-19348
-rw-r--r-- | src/3rdparty/phonon/ds9/mediagraph.cpp | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/3rdparty/phonon/ds9/mediagraph.cpp b/src/3rdparty/phonon/ds9/mediagraph.cpp index 3e7a68b..153cd7e 100644 --- a/src/3rdparty/phonon/ds9/mediagraph.cpp +++ b/src/3rdparty/phonon/ds9/mediagraph.cpp @@ -781,6 +781,23 @@ namespace Phonon } } + const QList<OutputPin> demuxOutputs = BackendNode::pins(m_demux, PINDIR_OUTPUT); + for (int i = 0; i < demuxOutputs.count(); ++i) { + //...and the output must be decoded + QAMMediaType type; + hr = demuxOutputs.at(i)->ConnectionMediaType(&type); + if (FAILED(hr)) { + continue; + } + + if (type.majortype == MEDIATYPE_Video) { + m_hasVideo = true; + } else if (type.majortype == MEDIATYPE_Audio) { + m_hasAudio = true; + } + } + + for (int i = 0; i < m_decoders.count(); ++i) { QList<Filter> chain = getFilterChain(m_demux, m_decoders.at(i)); for (int i = 0; i < chain.count(); ++i) { @@ -806,14 +823,11 @@ namespace Phonon } //we need to do something smart to detect if the streams are unencoded - if (m_demux) { - const QList<OutputPin> outputs = BackendNode::pins(m_demux, PINDIR_OUTPUT); - for (int i = 0; i < outputs.count(); ++i) { - const OutputPin &out = outputs.at(i); - InputPin pin; - if (out->ConnectedTo(pin.pparam()) == HRESULT(VFW_E_NOT_CONNECTED)) { - m_decoderPins += out; //unconnected outputs can be decoded outputs - } + for (int i = 0; i < demuxOutputs.count(); ++i) { + const OutputPin &out = demuxOutputs.at(i); + InputPin pin; + if (out->ConnectedTo(pin.pparam()) == HRESULT(VFW_E_NOT_CONNECTED)) { + m_decoderPins += out; //unconnected outputs can be decoded outputs } } |