How to force QT5 MediaPlayer to show Subtitles

sh.mashihai mashihai at china-ekai.cn
Mon Jun 8 18:07:50 PDT 2015


hi:
 I want to show DVD's subtitles, 

Here is my code:

 
 
    int flags = GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_TEXT;
 

    m_playbin = gst_element_factory_make("playbin2", NULL);
 
    g_object_set(G_OBJECT(m_playbin), "flags", flags, NULL);
 
    //GstElement *audioSink = gst_element_factory_make("autoaudiosink", "audiosink");
    //g_object_set(G_OBJECT(m_playbin), "audio-sink", m_audioSink, NULL);
 
    m_videoSinkWaylandSink = gst_element_factory_make("waylandsink", NULL);
    g_object_set(G_OBJECT(m_playbin), "video-sink", m_videoSinkWaylandSink, NULL);
 
    g_object_set(G_OBJECT(m_playbin), "uri", "dvd://", NULL);
 
    qtmedia_player_state_change( GST_STATE_READY , m_playbin , timeout);
    qtmedia_player_state_change( GST_STATE_PAUSED , m_playbin , timeout);
    qtmedia_player_state_change( GST_STATE_PLAYING , m_playbin , timeout);


Problem points:①blurred screen ②The subtitles are not shown

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-openmax/attachments/20150609/fb487f81/attachment.html>


More information about the gstreamer-openmax mailing list