Hi, I’m developing a Gstreamer plugin for video decoder. But when I try to create a complete pipeline by connecting
with ffmpegcolorscale plugin it throws a error by saying that… “pad returned caps ANY which are not
a real subset of its template caps video/x-raw-yuv, format=(fourcc){ YV12, I420,
Y42B }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(int)[ 1,
60 ]” Template for sink is like as static GstPadTemplate *src_templ (void) { static GstPadTemplate *templ = NULL; if (!templ) { GstCaps *caps; GstStructure *structure; GValue list = { 0 } ,fmt = { 0}; char *fmts[] = { "YV12", "I420",
"Y42B", NULL }; guint n; caps = gst_caps_new_simple
("video/x-raw-yuv", "format",
GST_TYPE_FOURCC, GST_MAKE_FOURCC
('I', '4', '2', '0'), "width",
GST_TYPE_INT_RANGE, 16, 4096, "height",
GST_TYPE_INT_RANGE, 16, 4096, "framerate",
GST_TYPE_INT_RANGE, 1, 60, NULL); structure = gst_caps_get_structure (caps, 0); g_value_init (&list, GST_TYPE_LIST); g_value_init (&fmt, GST_TYPE_FOURCC); for (n = 0; fmts[n] != NULL; n++) { gst_value_set_fourcc (&fmt, GST_STR_FOURCC
(fmts[n])); gst_value_list_append_value (&list,
&fmt); } gst_structure_set_value (structure,
"format", &list); g_value_unset (&list); g_value_unset (&fmt); templ = gst_pad_template_new ("src",
GST_PAD_SRC, GST_PAD_ALWAYS, caps); } return templ; } Please let me know where I am wrong. Regards Vikas
------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi Vikas ,
Can u tell me when you do gst-inspect ur-decoder-plugin , what caps u get at sink pad ?
On Tue, Dec 30, 2008 at 3:24 PM, Vikas Patel <[hidden email]> wrote:
-- Regards, Sudarshan Bisht ------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi sudarshan, I get this kind of
caps at sink pad Pad Templates: SINK template:
'sink' Availability:
Always Capabilities: video/mpeg
mpegversion: 4
systemstream: false
width: [ 16, 4096 ]
height: [ 16, 4096 ]
framerate: [ 1, 60 ] Regards Vikas From: sudarshan bisht
[mailto:[hidden email]] Hi Vikas ,
Can u tell me when you do gst-inspect ur-decoder-plugin , what caps u get at
sink pad ? On Tue, Dec 30, 2008 at 3:24 PM, Hi, I'm
developing a Gstreamer plugin for video decoder. But
when I try to create a complete pipeline by connecting with ffmpegcolorscale
plugin it throws a error by saying that… "pad returned caps ANY which are not a real subset of
its template caps video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B },
width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(int)[ 1, 60
]" Template
for sink is like as static
GstPadTemplate *src_templ (void) {
static GstPadTemplate *templ = NULL;
if (!templ)
{
GstCaps *caps;
GstStructure *structure;
GValue list = { 0 } ,fmt = { 0};
char *fmts[] = { "YV12", "I420", "Y42B", NULL };
guint n;
caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC,
GST_MAKE_FOURCC ('I', '4', '2', '0'),
"width", GST_TYPE_INT_RANGE, 16, 4096,
"height",
GST_TYPE_INT_RANGE, 16, 4096,
"framerate", GST_TYPE_INT_RANGE, 1, 60,
NULL);
structure = gst_caps_get_structure (caps, 0);
g_value_init (&list, GST_TYPE_LIST);
g_value_init (&fmt, GST_TYPE_FOURCC);
for (n = 0; fmts[n] != NULL; n++)
{
gst_value_set_fourcc (&fmt, GST_STR_FOURCC (fmts[n]));
gst_value_list_append_value (&list, &fmt);
}
gst_structure_set_value (structure, "format", &list);
g_value_unset (&list);
g_value_unset (&fmt);
templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
caps);
}
return templ; } Please
let me know where I am wrong. Regards Vikas
------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi vikas ,,
Sorry ,, I want to the caps know at src pad ,, and tell me the pipeline (elements) you are using .
On Tue, Dec 30, 2008 at 4:07 PM, Vikas Patel <[hidden email]> wrote:
-- Regards, Sudarshan Bisht ------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi, Pad templates are : Pad Templates: SINK template: 'sink' Availability: Always Capabilities: video/mpeg mpegversion: 4 systemstream: false width: [ 16, 4096 ] height: [ 16, 4096 ] framerate: [ 1, 60 ] SRC template: 'src' Availability: Always Capabilities: video/x-raw-yuv format: { YV12, I420,
Y42B } width: [ 16, 4096 ] height: [ 16, 4096 ] framerate: [ 1, 60 ] and Pipeline is: filesrc ! mpeg2dec ! ffmpegcolorscale !
videoscale ! imagesink Regards Vikas From: sudarshan bisht
[mailto:[hidden email]] Hi vikas ,,
Sorry ,, I want to the caps know at src pad ,, and tell me the
pipeline (elements) you are using . On Tue, Dec 30, 2008 at 4:07 PM, Hi sudarshan, I get this kind of caps at sink pad Pad Templates: SINK template: 'sink' Availability: Always Capabilities: video/mpeg
mpegversion: 4
systemstream: false
width: [ 16, 4096 ]
height: [ 16, 4096 ]
framerate: [ 1, 60 ] Regards Vikas From: sudarshan bisht [mailto:[hidden email]]
Hi Vikas
,
Can u tell me when you do gst-inspect ur-decoder-plugin , what caps u get at
sink pad ? On Tue,
Dec 30, 2008 at 3:24 PM, Hi, I'm
developing a Gstreamer plugin for video decoder. But
when I try to create a complete pipeline by connecting with ffmpegcolorscale
plugin it throws a error by saying that… "pad returned caps ANY which are not a real subset of
its template caps video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B },
width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(int)[ 1, 60
]" Template
for sink is like as static
GstPadTemplate *src_templ (void) {
static GstPadTemplate *templ = NULL;
if (!templ)
{
GstCaps *caps;
GstStructure *structure;
GValue list = { 0 } ,fmt = { 0};
char *fmts[] = { "YV12", "I420", "Y42B", NULL };
guint n;
caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC,
GST_MAKE_FOURCC ('I', '4', '2', '0'),
"width", GST_TYPE_INT_RANGE, 16, 4096,
"height",
GST_TYPE_INT_RANGE, 16, 4096,
"framerate", GST_TYPE_INT_RANGE, 1, 60,
NULL);
structure = gst_caps_get_structure (caps, 0);
g_value_init (&list, GST_TYPE_LIST);
g_value_init (&fmt, GST_TYPE_FOURCC);
for (n = 0; fmts[n] != NULL; n++)
{
gst_value_set_fourcc (&fmt, GST_STR_FOURCC (fmts[n]));
gst_value_list_append_value (&list, &fmt);
}
gst_structure_set_value (structure, "format", &list);
g_value_unset (&list);
g_value_unset (&fmt);
templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
caps);
}
return templ; } Please
let me know where I am wrong. Regards Vikas
------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi Vikas,
You can check gstmpeg2dec.c file in gst-plugins-ugly-0.10.9\ext\mpeg2dec , it will be same as your decoder plugin .
And instead of creating caps template dynamically , it is easy to create them statically .
On Tue, Dec 30, 2008 at 4:56 PM, Vikas Patel <[hidden email]> wrote:
-- Regards, Sudarshan Bisht ------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |