Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove ffmpegcolorspace and videoscale

videoscale isn't supporting NV12, so it causes an unnecessary conversion
to NV12 or YV12.  Technically, I think we can leave ffmpegcolorspace,
but the better solution is to fix videoscale to support NV12.
  • Loading branch information...
commit fafa4b567bc8e1fe03b6a313e5bffb16ead4489c 1 parent fc62acc
Rob Clark authored
View
18 plugins/multimedia/gstreamer/mediaplayer/qgstreamerplayersession.cpp
@@ -130,12 +130,10 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
gst_object_ref(GST_OBJECT(m_videoOutputBin));
m_videoIdentity = gst_element_factory_make("identity", "identity-vo");
- m_colorSpace = gst_element_factory_make("ffmpegcolorspace", "ffmpegcolorspace-vo");
- m_videoScale = gst_element_factory_make("videoscale","videoscale-vo");
m_nullVideoSink = gst_element_factory_make("fakesink", NULL);
gst_object_ref(GST_OBJECT(m_nullVideoSink));
- gst_bin_add_many(GST_BIN(m_videoOutputBin), m_videoIdentity, m_colorSpace, m_videoScale, m_nullVideoSink, NULL);
- gst_element_link_many(m_videoIdentity, m_colorSpace, m_videoScale, m_nullVideoSink, NULL);
+ gst_bin_add_many(GST_BIN(m_videoOutputBin), m_videoIdentity, m_nullVideoSink, NULL);
+ gst_element_link_many(m_videoIdentity, m_nullVideoSink, NULL);
//add an event probe before video output to save and repost segment events
{
@@ -403,14 +401,14 @@ void QGstreamerPlayerSession::setVideoRenderer(QObject *videoOutput)
m_pendingVideoSink = 0;
gst_element_set_state(m_videoSink, GST_STATE_NULL);
gst_element_set_state(m_playbin, GST_STATE_NULL);
- gst_element_unlink(m_videoScale, m_videoSink);
+ gst_element_unlink(m_videoIdentity, m_videoSink);
gst_bin_remove(GST_BIN(m_videoOutputBin), m_videoSink);
m_videoSink = videoSink;
gst_bin_add(GST_BIN(m_videoOutputBin), m_videoSink);
- gst_element_link(m_videoScale, m_videoSink);
+ gst_element_link(m_videoIdentity, m_videoSink);
switch (m_pendingState) {
case QMediaPlayer::PausedState:
@@ -495,11 +493,9 @@ void QGstreamerPlayerSession::finishVideoOutputChange()
return;
}
- gst_element_set_state(m_colorSpace, GST_STATE_NULL);
- gst_element_set_state(m_videoScale, GST_STATE_NULL);
gst_element_set_state(m_videoSink, GST_STATE_NULL);
- gst_element_unlink(m_videoScale, m_videoSink);
+ gst_element_unlink(m_videoIdentity, m_videoSink);
gst_bin_remove(GST_BIN(m_videoOutputBin), m_videoSink);
@@ -507,7 +503,7 @@ void QGstreamerPlayerSession::finishVideoOutputChange()
m_pendingVideoSink = 0;
gst_bin_add(GST_BIN(m_videoOutputBin), m_videoSink);
- if (!gst_element_link(m_videoScale, m_videoSink))
+ if (!gst_element_link(m_videoIdentity, m_videoSink))
qWarning() << "Linking video output element failed";
GstState state;
@@ -524,8 +520,6 @@ void QGstreamerPlayerSession::finishVideoOutputChange()
break;
}
- gst_element_set_state(m_colorSpace, state);
- gst_element_set_state(m_videoScale, state);
gst_element_set_state(m_videoSink, state);
//don't have to wait here, it will unblock eventually
View
2  plugins/multimedia/gstreamer/mediaplayer/qgstreamerplayersession.h
@@ -150,8 +150,6 @@ private slots:
GstElement* m_videoOutputBin;
GstElement* m_videoIdentity;
- GstElement* m_colorSpace;
- GstElement* m_videoScale;
GstElement* m_videoSink;
GstElement* m_pendingVideoSink;
GstElement* m_nullVideoSink;
Please sign in to comment.
Something went wrong with that request. Please try again.