Best way to add a filter inside PlayBin2
Stefan Sauer
ensonic at hora-obscura.de
Fri Feb 10 06:50:51 PST 2012
On 02/09/2012 03:24 PM, Jacques Bride wrote:
> Hello Stefan
>
> just to confirm, I will adapt my filter element to be a source of of
> the OMAP4 video sink (pvrvideosink) and I can use it this ways if I
> understand well:
>
> gst-launch playbin2 uri="file:///myfile" video-sink="myfilter!pvrvideosink"
>
> Then to make it default for players like totem, I know I can set the
> priority of plugins with the method gst_plugin_feature_set_rank () but
> I don't really see how I can augment the rank of the combo
> "myfilter!pvrvideosink" such that it is used by default instead of
> pvrvideosink alone
In your myfilter plugin, you have the myfilter element. You add another
element there, let say myfiltersink, that is subclassing gstbin. It will
have a high rank (PRIMARY+X), classify itself as a videosink and plug
myfilter ! pvrvvideosink. Many bin elements (such as playbin, decodebin,
etc.) implement pipeline layout logic in the bin, but no actual data
processing.
Stefan
> Thanks
>
> 2012/2/9 Jacques Bride <jacques.bride at googlemail.com>:
>> I see, I understand
>> Thanks
>> Jacques
>>
>>
>> 2012/2/9 Stefan Sauer <ensonic at hora-obscura.de>:
>>> On 02/09/2012 10:49 AM, Jacques Bride wrote:
>>>> Hello Stefan
>>>>
>>>> Thanks for your reply. In other words, do you recommend that I create
>>>> a new video sink and kind of force PlayBin2 to use it instead of the
>>>> one used normally? The display on the OMAP4 pandaboard is handled by a
>>>> TI custom video sink called GstPVRVideoSink and not sure I can change
>>>> it to get same performance and platform support
>>> You don't replace the actual sink, you just tell apps to use your bin,
>>> which contains the effect + the actual sink.
>>>
>>> Stefan
>>>
>>>> Jacques
>>>>
>>>>> One way is to set a custom video sink, which is a bin containing your
>>>>> effect ! autovideosink. If you can't modify the apps, you will need to
>>>>> install that custom video sink bin and set the RANK to be e.g.
>>>>> PRIMARY+10 so that it is automatically chosen.
>>>> 2012/2/8 Stefan Sauer <ensonic at hora-obscura.de>:
>>>>> On 02/08/2012 06:27 PM, Jacques Bride wrote:
>>>>>> Hello
>>>>>>
>>>>>> I am developing a frame enhancement filter for the need of a video
>>>>>> control application. I am developing on a OMAP4 pandabaord on ubuntu
>>>>>> with the Texas Instruments hardware accelerated gstreamer pipeline
>>>>>> (1080PPfps decode), anyhow I think my question is rather general. I
>>>>>> am a beginner in gstreamer so please do not hesitate to redirect me to
>>>>>> the doc if my question is already answered somewhere.
>>>>>>
>>>>>> My project consists in a video filter that transforms the yuv decoded
>>>>>> frames before being displayed (for example a sepia filter to display
>>>>>> frames in sepia color).
>>>>>>
>>>>>> What is the best way to add my filter in the installed gstreamer
>>>>>> pipeline such that it becomes part of my video chain?
>>>>>>
>>>>>> Please see below more details:
>>>>>> - I wish to use the installed and omap4 optimized gstreamer/totem
>>>>>> pipeline to enable full video stream
>>>>>> decode and display with my filter on
>>>>> One way is to set a custom video sink, which is a bin containing your
>>>>> effect ! autovideosink. If you can't modify the apps, you will need to
>>>>> install that custom video sink bin and set the RANK to be e.g.
>>>>> PRIMARY+10 so that it is automatically chosen.
>>>>>
>>>>> Stefan
>>>>>
>>>>>> .
>>>>>> - I created a gstreamer plugin/element for my filter with the
>>>>>> gst-template framework, but how to make it part of GstPlayBin2?
>>>>>> - I looked at the pipeline graph of totem and gst-launch: they both
>>>>>> use the playbin2 module, and I would like to add my filter in-between
>>>>>> GstURIDecodeBin and GstPlaySink (input from src0 and output to
>>>>>> video_raw_sink through gstinputselector). Is is possible to add and
>>>>>> link a new element here without breaking the full bin? It is not
>>>>>> either on the input or the output of playbin2 so I do not really
>>>>>> understand how to just create a playbin2 element in my application and
>>>>>> delicately insert a new element inside...
>>>>>> - do I have to modify the source code of PlayBin2, add my filter,
>>>>>> recompile and install it on my board to have my added features
>>>>>> naturally enabled when I play videos? Or is it possible to tell
>>>>>> existing gst-launch and totem applications to add a user filter plugin
>>>>>> in the installed video processing?
>>>>>>
>>>>>> Thanks for your help
>>>>>> Jacques
>>>>>> _______________________________________________
>>>>>> gstreamer-devel mailing list
>>>>>> gstreamer-devel at lists.freedesktop.org
>>>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>>> _______________________________________________
>>>>> gstreamer-devel mailing list
>>>>> gstreamer-devel at lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> 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