<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 6 May 2014 06:29, sky2 <span dir="ltr"><<a href="mailto:skyqute@gmail.com" target="_blank">skyqute@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Everybody,<br>
<br>
I developed a large application in Qt 4.8.4 on linux mint 14 which simply<br>
put displays a playlist of videos. Now I am trying to port it to Qt 5.2. All<br>
works well except for the subtitle (closed captioning) display.<br>
<br>
In Qt 4.8.4 I used the phonon player with phonon backend<br>
phonon_gstreamer.so. The subtitles used to be placed in a file video.srt<br>
(for video.mp4) in the same directory.<br>
<br>
In qt5.2 built with GStreamer-0.10, the subitles (closed captions) are just<br>
not displayed when the video is played.<br>
<br>
I went over the code of both Qt5.3 gstreamer plugin and qt 4.8.4 gstreamer<br>
plugin and found very little difference.<br>
<br>
Both of them seem to set the flag GST_PLAY_TEXT (0x00000004).<br>
<br>
Both of them seem to set the flag GST_PLAY_FLAG_NATIVE_VIDEO (0x00000040)<br>
<br>
Both of them seem to use playbin2<br>
<br>
Neither of them seem to set the property "suburi" on playbin2<br>
<br></blockquote><div><br></div><div>The only situation where you don't need to set suburi is when the subtitles are encoded in the same file. Like in a matroska container.</div><div><br></div><div>If that isn't the case, playbin2 needs to know where the subtitle file is.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In Qt5.2, I changed the plugin code to, 1. set the "suburi" on playbin2 to<br>
point to the subtitles file video.srt and 2. Made it to ignore (unset) the<br>
flag GST_PLAY_FLAG_NATIVE_VIDEO (both in the file<br>
qgstreamerplayersession.cpp )<br>
<br>
Then the subtitle started being shown correctly.<br></blockquote><div><br></div><div>The flag to only allow native video format should be 0 by default, and you should keep it that way in your case.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I want to know what is causing this change in behavior of the plugin? Is it<br>
a bug in Qt5.2? How should I work around it? Should I set the "suburi"<br>
property on playbin2 in the plugin?<br></blockquote><div><br></div><div>I doubt the problem is in QT since the subtitles are mixed inside GStreamer and displayed in the same sink.</div><div><br></div><div>Can you leave the FLAG_NATIVE_VIDEO as it is by default, check and let me know?</div>
<div><br></div><div>Luis</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
If that is so then it is very difficult. As it is a plugin, I need to build<br>
a whole mechanism to pass the subtitle(closed caption) filename to the<br>
plugin so that I can set the suburi property on playbin2. Thank you. Any<br>
help is appreciated.<br>
<br>
Sky<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/qt5-2-gstreamer-subtitle-display-tp4666762.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/qt5-2-gstreamer-subtitle-display-tp4666762.html</a><br>
Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div></div>