Results 1 to 1 of 1

Thread: qt5 gstreamer subtitle (closed caption) display

  1. #1
    Join Date
    Dec 2010
    Posts
    44
    Thanks
    9
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default qt5 gstreamer subtitle (closed caption) display

    Hi,

    I developed a large application in Qt 4.8.4 on linux mint 14 which simply put displays a playlist of videos. Now I am trying to port it to Qt 5.2. All works well except for the subtitle (closed captioning) display.

    In Qt 4.8.4 I used the phonon player with phonon backend phonon_gstreamer.so. The subtitles used to be placed in a file video.srt (for video.mp4) in the same directory.

    In qt5.2 built with GStreamer-0.10, the subitles (closed captions) are just not displayed when the video is played.

    I went over the code of both Qt5.2 gstreamer plugin and qt 4.8.4 gstreamer plugin and found very little difference.

    Both of them seem to set the flag GST_PLAY_TEXT (0x00000004).
    Both of them seem to set the flag GST_PLAY_FLAG_NATIVE_VIDEO (0x00000040)
    Both of them seem to use playbin2

    Neither of them seem to set the property "suburi" on playbin2

    In Qt5.2, I changed the plugin code to,
    1. set the "suburi" on playbin2 to point to the subtitles file video.srt
    and
    2. Made it to ignore (unset) the flag GST_PLAY_FLAG_NATIVE_VIDEO
    (both in the file qgstreamerplayersession.cpp )

    Then the subtitles showed up correctly.

    I want to know what is causing this change in behavior of the plugin?
    Is it a bug in Qt5.2?
    How should I work around it? Should I set the "suburi" property on playbin2 in the plugin?
    If that is so then it is very difficult. As it is a plugin, I need to build a whole mechanism to pass the subtitle(closed caption) filename to the plugin so that I can set the suburi property on playbin2. Thank you. Any help is appreciated.

    Sky
    Last edited by sky; 6th May 2014 at 13:03.

Similar Threads

  1. Caption in QMenu
    By Lykurg in forum Newbie
    Replies: 4
    Last Post: 16th April 2014, 23:41
  2. QTableWidget- how to set caption
    By GG2013 in forum Newbie
    Replies: 3
    Last Post: 24th June 2013, 03:05
  3. Qt Assistant how to add a help caption within the code?
    By Naytheet in forum Qt Tools
    Replies: 0
    Last Post: 16th February 2013, 15:10
  4. window decoration cannot show caption
    By qtopiahooo in forum Qt Programming
    Replies: 1
    Last Post: 31st January 2007, 09:17
  5. Using kwm window caption bar color
    By OldJohnB in forum Qt Programming
    Replies: 7
    Last Post: 9th February 2006, 05:00

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.