How to get the maximum and minimum value of width field from the caps

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to get the maximum and minimum value of width field from the caps

mahesh mane
hi,

I have used following code in my application. I want to get minimum and maximum values of width.
static void demux_handler (GstElement *Src, GstPad *new_pad, CustomData *Data)
{
 GstCaps *new_pad_caps = NULL;
new_pad_caps = gst_pad_query_caps (new_pad, NULL);
gchar *str=gst_caps_to_string (new_pad_caps);
GST_PRINT("caps %s\n",str);

}

after this output comes as
caps video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 2048 ], height=(int)[ 16, 2048 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

where width is like a array. If it has a only single value like width=(int)2048 then I am able to get the value of width by using
gst_structure_get_int (new_pad_struct, "width", &width);

But how to get minimum and maximum bounds of width separately when it has two values.

Thanks in Advance,
Mahesh