[gst-devel] dynamic change element's parameter
Stefan Kost
ensonic at hora-obscura.de
Tue Sep 14 11:25:41 CEST 2010
On 14.09.2010 10:48, Chandler Li wrote:
> I have read the mail Nicola and Stefan given, and that really inspired
> me a lot.
> Thank you!
> In the first, I try to replace some elements and encounter some
> problem, the following I will show my target first.
> Because I want to stream webcam frame on the internet,
> and dynamically change the frame size without stopping the pipeline.
>
> According to my experience, if the v4l2src element opens webcam
> device, it only captures one size at one time.
> if I want to change the size of webcam, I need to restart it.
>
v4l2src does not support changing the resolution on the fly. This is a
v4l2 interface limitation right now - one needs to stop streaming, set
new format and restart streaming. So your observation is correct.
> So I try another architecture of gstreamer,
>
> v4l2src -> capsfilter1 -> videoscale -> capsfilter2 ->
> ffmpegcolorspace -> .... (to internet)
>
> videoscale links two filters, the first filter (capsfilter1)
> negotiates with v4l2src in a static frame size,
> I want to change the size I assigned in the second filter (capsfilter2) ,
>
> BUT I get an error message after I change the capsfilter2 to the new filter,
>
> videoscale can't link to new capsfilter,
>
that should work. Can you paste a few lines of the code here. You should
create new caps and just set the new format on capsfilter2.
Stefan
> I don't know what's happened? does anyone know that?
> Thank you!
>
> Best regards,
> Chandler Lee.
>
> 2010/9/14 Stefan Kost <ensonic at hora-obscura.de>:
>
>> Am 12.09.2010 09:01, schrieb Chandler Li:
>>
>>> Hi all,
>>> I'm new to use gstreamer,
>>> and I have a problem don't know how to solve for a long time,
>>>
>>> Is there possible to dynamic change the parameter in elements or pads?
>>>
>> gobject parameters -> g_object_set or use GstController
>>
>>
>>
>>> For example,
>>> In a playing state streaming,
>>> could I dynamic change the size of video without stop the streaming?
>>>
>> yes you can. if you resize the video window for xvimagesink the video adjusts if
>> it can. So if you run gst-launch videotestsrc ! xvimagesink, the videotest is
>> sending videoframes in the native resolution instead of xvimagesink scaling them.
>>
>> Stefan
>>
>>
>>> hopes that's not a stupid question,
>>> and very hopefully for your reply,
>>> Thank you
>>>
>>> Chandler Lee
>>>
>>> ------------------------------------------------------------------------------
>>> Start uncovering the many advantages of virtual appliances
>>> and start using them to simplify application deployment and
>>> accelerate your shift to cloud computing
>>> http://p.sf.net/sfu/novell-sfdev2dev
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>
>>
>>
More information about the gstreamer-devel
mailing list