Getting size size with playbin2

Nikos Chantziaras realnc at gmail.com
Tue Jun 11 15:26:24 PDT 2013


On 12/06/13 01:05, Brendan Long wrote:
> On 06/11/2013 04:01 PM, Nikos Chantziaras wrote:
>> However, why am I receiving a paused state message over a dozen times
>> when starting playback? Shouldn't the state change to paused just once
>> when the pipeline is ready to play?
> You're probably seeing state changes from all of the elements inside of
> playbin. You can filter it out by checking GST_MESSAGE_SOURCE(message)
> and comparing it to your playbin element:
>
> GstElement* playbin = (something);
> if (GST_MESSAGE_SRC(message) == playbin)

Indeed.  Thank you very much.

For the purposes of resizing the window where video gets rendered in 
order to get an unscaled 1:1 display, I suppose the right caps object to 
get is the one returned by gst_pad_get_negotiated_caps(), right?  And 
use gst_video_get_size() and use the width and height as the new size of 
the window.  Or does pixel aspect ratio play a role here?  (I did set 
"force-aspect-ratio" to true on the video sink.)


More information about the gstreamer-devel mailing list