Question about dynamical changing video size

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

Question about dynamical changing video size

bboyavatar
Hello everyone,
    I struggled with the problem for a period of time, and I know a lot of people had the same question as I do. I made up a pipeline to play a video, and I set a timer in the  program. When the timer is timeout, I change the video size through the capsfilter after videoscale element. Then I read the caps of the xvimagesink's sinkpad, and the result shows the videosize do changed. But the video size on the screen does not change at all. I doubt if there is something wrong with the xvimagesink, should it be refreshed anyway? The code is attached in the end.hello.c I hope someone could help me ,thanks very much!
Reply | Threaded
Open this post in threaded view
|

Re: Question about dynamical changing video size

Tim-Philipp Müller-2
On Fri, 2012-08-24 at 00:10 -0700, bboyavatar wrote:

Hi,

>     I struggled with the problem for a period of time, and I know a lot of
> people had the same question as I do. I made up a pipeline to play a video,
> and I set a timer in the  program. When the timer is timeout, I change the
> video size through the capsfilter after videoscale element. Then I read the
> caps of the xvimagesink's sinkpad, and the result shows the videosize do
> changed. But the video size on the screen does not change at all. I doubt if
> there is something wrong with the xvimagesink, should it be refreshed
> anyway? The code is attached in the end.
> http://gstreamer-devel.966125.n4.nabble.com/file/n4656057/hello.c hello.c  I
> hope someone could help me ,thanks very much!

xvimagesink will scale the input video to whatever size your output
window is, so changing the input caps won't have any effect on the
window size, it will just lead to videoscale doing some scaling as well
before xvimagesink gets to it. (If I understood your situation
correctly, I didn't look at the code).

Cheers
 -Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question about dynamical changing video size

bboyavatar
The sinkpad of xvimagesink's caps change indicates that the downstream negotiation was successful, so the operation on the videoscale was successful too. The output window was created by xvimagesink itself. Do you mean that the window size is not controlled by the input of the xvimagesink? Then how to change the window size?