Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: Ie1e478eca1cdfd99ccd3a3c8a07aefbfa27ccbdb
This commit is contained in:
@@ -174,7 +174,7 @@ public:
|
||||
GL_RGBA,
|
||||
CVPixelBufferGetWidth(m_buffer),
|
||||
CVPixelBufferGetHeight(m_buffer),
|
||||
GL_BGRA,
|
||||
GL_RGBA,
|
||||
GL_UNSIGNED_BYTE,
|
||||
0,
|
||||
&m_texture);
|
||||
@@ -240,18 +240,8 @@ private:
|
||||
|
||||
int width = CVPixelBufferGetWidth(imageBuffer);
|
||||
int height = CVPixelBufferGetHeight(imageBuffer);
|
||||
QVideoFrame::PixelFormat format;
|
||||
|
||||
#ifdef Q_OS_IOS
|
||||
bool useTexture = m_renderer->supportsTextures()
|
||||
&& CVPixelBufferGetPixelFormatType(imageBuffer) == kCVPixelFormatType_32BGRA;
|
||||
|
||||
if (useTexture)
|
||||
format = QVideoFrame::Format_BGRA32;
|
||||
else
|
||||
#endif
|
||||
format = AVFCameraViewfinderSettingsControl2::QtPixelFormatFromCVFormat(CVPixelBufferGetPixelFormatType(imageBuffer));
|
||||
|
||||
QVideoFrame::PixelFormat format =
|
||||
AVFCameraViewfinderSettingsControl2::QtPixelFormatFromCVFormat(CVPixelBufferGetPixelFormatType(imageBuffer));
|
||||
if (format == QVideoFrame::Format_Invalid)
|
||||
return;
|
||||
|
||||
|
||||
@@ -70,9 +70,15 @@ QMultimedia::SupportEstimate QGstreamerAudioDecoderServicePlugin::hasSupport(con
|
||||
|
||||
static bool isDecoderOrDemuxer(GstElementFactory *factory)
|
||||
{
|
||||
#if GST_CHECK_VERSION(0, 10, 31)
|
||||
return gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DEMUXER)
|
||||
|| gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DECODER
|
||||
| GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO);
|
||||
|| gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DECODER
|
||||
| GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO);
|
||||
#else
|
||||
return (factory
|
||||
&& (qstrcmp(factory->details.klass, "Codec/Decoder/Audio") == 0
|
||||
|| qstrcmp(factory->details.klass, "Codec/Demux") == 0));
|
||||
#endif
|
||||
}
|
||||
|
||||
void QGstreamerAudioDecoderServicePlugin::updateSupportedMimeTypes() const
|
||||
|
||||
@@ -77,9 +77,7 @@ static const QGstreamerMetaDataKeyLookup *qt_gstreamerMetaDataKeys()
|
||||
metadataKeys->insert(QMediaMetaData::AlbumTitle, GST_TAG_ALBUM);
|
||||
metadataKeys->insert(QMediaMetaData::AlbumArtist, GST_TAG_ARTIST);
|
||||
metadataKeys->insert(QMediaMetaData::ContributingArtist, GST_TAG_PERFORMER);
|
||||
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
||||
metadataKeys->insert(QMediaMetaData::Composer, GST_TAG_COMPOSER);
|
||||
#endif
|
||||
//metadataKeys->insert(QMediaMetaData::Conductor, 0);
|
||||
//metadataKeys->insert(QMediaMetaData::Lyrics, 0);
|
||||
//metadataKeys->insert(QMediaMetaData::Mood, 0);
|
||||
|
||||
@@ -113,8 +113,15 @@ QMultimedia::SupportEstimate QGstreamerCaptureServicePlugin::hasSupport(const QS
|
||||
|
||||
static bool isEncoderOrMuxer(GstElementFactory *factory)
|
||||
{
|
||||
#if GST_CHECK_VERSION(0, 10, 31)
|
||||
return gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_MUXER)
|
||||
|| gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_ENCODER);
|
||||
#else
|
||||
return (factory
|
||||
&& (qstrcmp(factory->details.klass, "Codec/Encoder/Audio") == 0
|
||||
|| qstrcmp(factory->details.klass, "Codec/Encoder/Video") == 0
|
||||
|| qstrcmp(factory->details.klass, "Codec/Muxer") == 0 ));
|
||||
#endif
|
||||
}
|
||||
|
||||
void QGstreamerCaptureServicePlugin::updateSupportedMimeTypes() const
|
||||
|
||||
@@ -628,12 +628,12 @@ bool QGstreamerCaptureSession::rebuildGraph(QGstreamerCaptureSession::PipelineMo
|
||||
}
|
||||
|
||||
dumpGraph( QString("rebuild_graph_%1_%2").arg(m_pipelineMode).arg(newMode) );
|
||||
#ifdef QT_GST_CAPTURE_DEBUG
|
||||
if (m_encodeBin) {
|
||||
QString fileName = QString("rebuild_graph_encode_%1_%2").arg(m_pipelineMode).arg(newMode);
|
||||
#if !(GST_DISABLE_GST_DEBUG) && (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
||||
_gst_debug_bin_to_dot_file(GST_BIN(m_encodeBin), GST_DEBUG_GRAPH_SHOW_ALL, fileName.toLatin1());
|
||||
#endif
|
||||
GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_encodeBin), GST_DEBUG_GRAPH_SHOW_ALL, fileName.toLatin1());
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ok) {
|
||||
addAudioBufferProbe();
|
||||
@@ -657,12 +657,12 @@ bool QGstreamerCaptureSession::rebuildGraph(QGstreamerCaptureSession::PipelineMo
|
||||
|
||||
void QGstreamerCaptureSession::dumpGraph(const QString &fileName)
|
||||
{
|
||||
#if !(GST_DISABLE_GST_DEBUG) && (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
||||
_gst_debug_bin_to_dot_file(GST_BIN(m_pipeline),
|
||||
GstDebugGraphDetails(/*GST_DEBUG_GRAPH_SHOW_ALL |*/ GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES),
|
||||
fileName.toLatin1());
|
||||
#ifdef QT_GST_CAPTURE_DEBUG
|
||||
GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_pipeline),
|
||||
GstDebugGraphDetails(/*GST_DEBUG_GRAPH_SHOW_ALL |*/ GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES),
|
||||
fileName.toLatin1());
|
||||
#else
|
||||
Q_UNUSED(fileName);
|
||||
Q_UNUSED(fileName)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -76,13 +76,10 @@ static const QGstreamerMetaDataKeyLookup *qt_gstreamerMetaDataKeys()
|
||||
|
||||
// Music
|
||||
metadataKeys->insert(GST_TAG_ALBUM, QMediaMetaData::AlbumTitle);
|
||||
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 25)
|
||||
#if GST_CHECK_VERSION(0, 10, 25)
|
||||
metadataKeys->insert(GST_TAG_ALBUM_ARTIST, QMediaMetaData::AlbumArtist);
|
||||
#endif
|
||||
metadataKeys->insert(GST_TAG_ARTIST, QMediaMetaData::ContributingArtist);
|
||||
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
||||
metadataKeys->insert(GST_TAG_COMPOSER, QMediaMetaData::Composer);
|
||||
#endif
|
||||
//metadataKeys->insert(0, QMediaMetaData::Conductor);
|
||||
//metadataKeys->insert(0, QMediaMetaData::Lyrics);
|
||||
//metadataKeys->insert(0, QMediaMetaData::Mood);
|
||||
|
||||
@@ -83,8 +83,15 @@ QMultimedia::SupportEstimate QGstreamerPlayerServicePlugin::hasSupport(const QSt
|
||||
|
||||
static bool isDecoderOrDemuxer(GstElementFactory *factory)
|
||||
{
|
||||
#if GST_CHECK_VERSION(0, 10 ,31)
|
||||
return gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DEMUXER)
|
||||
|| gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DECODER);
|
||||
#else
|
||||
return (factory
|
||||
&& (qstrcmp(factory->details.klass, "Codec/Decoder/Audio") == 0
|
||||
|| qstrcmp(factory->details.klass, "Codec/Decoder/Video") == 0
|
||||
|| qstrcmp(factory->details.klass, "Codec/Demux") == 0 ));
|
||||
#endif
|
||||
}
|
||||
|
||||
void QGstreamerPlayerServicePlugin::updateSupportedMimeTypes() const
|
||||
|
||||
@@ -388,7 +388,7 @@ QMediaTimeRange QGstreamerPlayerSession::availablePlaybackRanges() const
|
||||
if (duration() <= 0)
|
||||
return ranges;
|
||||
|
||||
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 31)
|
||||
#if GST_CHECK_VERSION(0, 10, 31)
|
||||
//GST_FORMAT_TIME would be more appropriate, but unfortunately it's not supported.
|
||||
//with GST_FORMAT_PERCENT media is treated as encoded with constant bitrate.
|
||||
GstQuery* query = gst_query_new_buffering(GST_FORMAT_PERCENT);
|
||||
@@ -1637,7 +1637,7 @@ void QGstreamerPlayerSession::updateMuted()
|
||||
}
|
||||
}
|
||||
|
||||
#if (GST_VERSION_MAJOR == 0) && ((GST_VERSION_MINOR < 10) || (GST_VERSION_MICRO < 33))
|
||||
#if !GST_CHECK_VERSION(0, 10, 33)
|
||||
static gboolean factory_can_src_any_caps (GstElementFactory *factory, const GstCaps *caps)
|
||||
{
|
||||
GList *templates;
|
||||
@@ -1653,7 +1653,7 @@ static gboolean factory_can_src_any_caps (GstElementFactory *factory, const GstC
|
||||
if (templ->direction == GST_PAD_SRC) {
|
||||
GstCaps *templcaps = gst_static_caps_get(&templ->static_caps);
|
||||
|
||||
if (gst_caps_can_intersect(caps, templcaps)) {
|
||||
if (qt_gst_caps_can_intersect(caps, templcaps)) {
|
||||
gst_caps_unref(templcaps);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1685,7 +1685,7 @@ GstAutoplugSelectResult QGstreamerPlayerSession::handleAutoplugSelect(GstBin *bi
|
||||
GstCaps *sinkCaps = gst_pad_get_caps(sinkPad);
|
||||
#endif
|
||||
|
||||
#if (GST_VERSION_MAJOR == 0) && ((GST_VERSION_MINOR < 10) || (GST_VERSION_MICRO < 33))
|
||||
#if !GST_CHECK_VERSION(0, 10, 33)
|
||||
if (!factory_can_src_any_caps(factory, sinkCaps))
|
||||
#else
|
||||
if (!gst_element_factory_can_src_any_caps(factory, sinkCaps))
|
||||
|
||||
Reference in New Issue
Block a user