dynamically change video resolution

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

dynamically change video resolution

mingqian Han
Hi all,
    Currently I am working with TI Davinci processor, and I build a gstreamer pipeline for video streaming as follows:
    v4l2src->capsfilter->tee->queue->resizer->h264encoder->rtph264pay->udpsink
                                               ->queue->resizer->mjpegencoder->filesink
    It is just a brief outline, and it works ok.

    Now I want to change the resolution from D1->CIF on the fly, currently, I do the following:
    1. get the src pad of queue
    2. block the pad
    3. change the properties of resizer and the encoder.
    4. unblock the pad
 
    but after that, the pipeline stops working. I am new to gstreamer, and wonder if anyone could give me some suggestion.

regards,

Rafael


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dynamically change video resolution

HaroldJRoth
When you say 'pipeline stops working', have you tried querying the pipeline state?  

Just a guess, but you may need to put it back into the PLAYING state.
Reply | Threaded
Open this post in threaded view
|

Re: dynamically change video resolution

Marco Ballesio
In reply to this post by mingqian Han
Hi,

2010/12/1 mingqian Han <[hidden email]>:

> Hi all,
>     Currently I am working with TI Davinci processor, and I build a
> gstreamer pipeline for video streaming as follows:
>
> v4l2src->capsfilter->tee->queue->resizer->h264encoder->rtph264pay->udpsink
>
> ->queue->resizer->mjpegencoder->filesink
>     It is just a brief outline, and it works ok.
>
>     Now I want to change the resolution from D1->CIF on the fly, currently,
> I do the following:
>     1. get the src pad of queue
>     2. block the pad
>     3. change the properties of resizer and the encoder.
>     4. unblock the pad
>
>     but after that, the pipeline stops working. I am new to gstreamer, and
> wonder if anyone could give me some suggestion.

running the pipeline under GDB and getting a stack trace after the
deadlock occurs will give us some more hints.

Alternatively (in case you don't have gdb running on the device) you can:

1) execute "ulimit -c unlimited" on your device.
2) send a SIGABRT after the deadlock occurs and
3) get the backtrace from the core with the GDB provided in the BSP
(e.g. "gdb /path/to/executable core").

Hope this helps.

Regards

>
> regards,
>
> Rafael
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dynamically change video resolution

Andrey Nechypurenko-2
In reply to this post by mingqian Han
Hi,

>     Now I want to change the resolution from D1->CIF on the fly, currently,
> I do the following:
>     1. get the src pad of queue
>     2. block the pad
>     3. change the properties of resizer and the encoder.
>     4. unblock the pad

In my project I was doing something similar. You can take a look at
the function which adjust caps for the scaler element here:
http://www.gitorious.org/veter/veter/blobs/master/src/vehicle/VideoSenderThread.cpp#line264
It assumes that there are scaler element named "qos-scaler" followed
by caps filter named "qos-caps" .

HTH,
Andrey.

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel