how to override the subtitleoverlay bin in playbin2
bcxa sz
bcxa.sz at gmail.com
Fri Oct 7 03:24:29 PDT 2011
On Wed, Oct 5, 2011 at 10:26 AM, Mart Raudsepp <leio at gentoo.org> wrote:
> Hello,
>
> On T, 2011-10-04 at 10:38 +0800, bcxa sz wrote:
>> Hi Developers,
>>
>> I have developed own text overlay element to match my embedded system.
>> And also due to some reason (S/W and H/W architecture), I can not
>> insert the ffmpegcolorspace (pre-colorspace) after my video decoder
>> element.
>>
>> And I found that the gstreamer native subtitleoverlay bin is hard
>> coded to use gstreamer native text overlay element and insert
>> pre-colorspace converter. And playsink bin in playbin2 is also hard
>> coded to use gstreamer native subtitleoverlay bin.
>>
>> So I WANT TO KNOW whether it is possible to override the gstreamer
>> native subtitleoverlay bin in playbin2 with my own developed
>> subtitleoverlay bin which can use my own textoverlay element.
>
> You could try setting the playbin2 text-sink property to your custom
> subtitling element.
>
Sorry to reply you so later. The issue to use the text-sink, it will
not have subtitle rendering because the text-sink will not have video
width and height information since video decoder is in another video
chain.
Current my workaround is to force video decoder element to set
'text-sink' element property (or send event) to let overlay element
know the video information. Quite ugly way but for me no other choice.
> The native-video flag on playbin2 (flags property) can be used to signal
> it that the video is assumed to be in the native format, and therefore
> no colorspace converter is to be plugged after the video decoder or
> elsewhere. This would also prevent the builtin textoverlay to be used,
> as it includes colorspace converting elements.
>
Use native-video flag, the subtitle will not work as you said. This is
not what I expected.
>
> We have some vague plans to redesign subtitle handling to be more
> efficient and more fitting, including being more straightforward to
> handle for such use cases as yours. The discussions for more concrete
> plans are yet to take place as far as I know, but hey, maybe this is a
> start :)
> So writing down your experiences with all this with your use case and
> hardware requirements in mind might be quite useful here.
>
>
> Best,
> Mart Raudsepp
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
More information about the gstreamer-devel
mailing list