decodebin2 and plugins

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

decodebin2 and plugins

Steffen.Roeber

Hi,
I tried to create a decoder for our native avi files. But I cannot find an example of how to use it, so that decodebin2 does regconize it as a valid decoder plugin. Can anybody help me?

Hella Aglaia Mobile Vision GmbH
Steffen Roeber
Firmware & Tools
Treskowstr. 14, D-13089 Berlin
Amtsgericht Berlin-Charlottenburg HRB 66976 B
Geschäftsführer: Kay Talmi

Fon:  +49 30 200 04 29– 412
Fax:  +49 30 200 04 29– 109
Mail: [hidden email]
URL: www.aglaia-gmbh.de

URL: www.mobilevision.de

Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe sowie Vervielfältigung, Verwertung und Mitteilung seines Inhalts ist nur mit unserer ausdrücklichen Genehmigung gestattet. Alle Rechte vorbehalten, insbesondere für den Fall der Schutzrechtsanmeldung.
This document has to be treated confidentially. Its contents are not to be passed on, duplicated, exploited or disclosed without our express permission. All rights reserved, especially the right to apply for protective rights.

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

Re: decodebin2 and plugins

Sebastian Dröge-7
On Mon, 2011-09-05 at 13:16 +0200, [hidden email] wrote:
>
> Hi,
> I tried to create a decoder for our native avi files. But I cannot
> find an example of how to use it, so that decodebin2 does regconize it
> as a valid decoder plugin. Can anybody help me?

You have to give it a rank >= GST_RANK_MARGINAL and add "Decoder" to the
element factory classification. The decoder element with the highest
rank that accepts the stream's caps will be selected by decodebin2.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Antwort: Re: decodebin2 and plugins

Steffen.Roeber

Ok. I did the following:
static gboolean
examplefilter_init (GstExampleFilter * examplefilter)
{
  GST_DEBUG_CATEGORY_INIT (gst_example_filter_debug, "examplefilter", 0, "Template examplefilter");

  return gst_element_register (examplefilter, "examplefilter", GST_RANK_MARGINAL, GST_ELEMENT_FACTORY_TYPE_DECODER);
}

static void gst_example_filter_base_init (gpointer gclass)
{
  GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);

  gst_element_class_set_details_simple(element_class,
    "ExampleFilter",
    "Decoder/Video",
    "Description",
    "Steffen Roeber");

  gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&src_factory));
  gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sink_factory));
}

The _init() functions of my decoder are called. But the gst_example_filter_set_caps is not called. I always get a Your GStreamer installation is missing a plug-in. message.
Whcih function should be called at my Plugin at next? I found that the gst_riff_create_video_caps function returned 0, because it did not find my native fourcc code. How is the fourcc transmitted to my plugin and how should I check it?

Hella Aglaia Mobile Vision GmbH
Steffen Roeber
Firmware & Tools
Treskowstr. 14, D-13089 Berlin
Amtsgericht Berlin-Charlottenburg HRB 66976 B
Geschäftsführer: Kay Talmi

Fon:  +49 30 200 04 29– 412
Fax:  +49 30 200 04 29– 109
Mail: [hidden email]
URL: www.aglaia-gmbh.de

URL: www.mobilevision.de

Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe sowie Vervielfältigung, Verwertung und Mitteilung seines Inhalts ist nur mit unserer ausdrücklichen Genehmigung gestattet. Alle Rechte vorbehalten, insbesondere für den Fall der Schutzrechtsanmeldung.
This document has to be treated confidentially. Its contents are not to be passed on, duplicated, exploited or disclosed without our express permission. All rights reserved, especially the right to apply for protective rights.



Sebastian Dröge/

(
Gesendet von: gstreamer-devel-bounces+steffen.roeber=[hidden email]

05.09.2011 13:44

Bitte antworten an
Discussion of the development of and with GStreamer        <[hidden email]>

An
Discussion of the development of and with GStreamer <[hidden email]>
Kopie
Thema
Re: decodebin2 and plugins





On Mon, 2011-09-05 at 13:16 +0200, [hidden email] wrote:
>
> Hi,
> I tried to create a decoder for our native avi files. But I cannot
> find an example of how to use it, so that decodebin2 does regconize it
> as a valid decoder plugin. Can anybody help me?

You have to give it a rank >= GST_RANK_MARGINAL and add "Decoder" to the
element factory classification. The decoder element with the highest
rank that accepts the stream's caps will be selected by decodebin2.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (286 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Antwort: Re: decodebin2 and plugins

Sebastian Dröge-7
On Mon, 2011-09-05 at 15:44 +0200, [hidden email] wrote:

>
> Ok. I did the following:
> staticgboolean
> examplefilter_init (GstExampleFilter * examplefilter)
> {
>   GST_DEBUG_CATEGORY_INIT (gst_example_filter_debug,"examplefilter",
> 0, "Template examplefilter");
>
>   returngst_element_register (examplefilter, "examplefilter",
> GST_RANK_MARGINAL, GST_ELEMENT_FACTORY_TYPE_DECODER);
> }
Look at the docs of gst_element_register() and what the last parameter
should be. You must pass the GType of your new element here. Using
GST_ELEMENT_FACTORY_TYPE_DECODER will never work.

> staticvoidgst_example_filter_base_init (gpointer gclass)
> {
>   GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
>
>   gst_element_class_set_details_simple(element_class,
>     "ExampleFilter",
>     "Decoder/Video",
>     "Description",
>     "Steffen Roeber");

Looks good but better use
Codec/Decoder/Video
which is also used by all other video decoders.

> The _init() functions of my decoder are called. But the
> gst_example_filter_set_capsis not called. I always get a Your
> GStreamer installation is missing a plug-in.message.
> Whcih function should be called at my Plugin at next? I found that the
> gst_riff_create_video_capsfunction returned 0, because it did not find
> my native fourcc code. How is the fourcc transmitted to my plugin and
> how should I check it?

To have your element be used by decodebin2 it must have the caps of the
stream it should handle in the sinkpad template and you also need to use
this caps in the demuxer. In this case you have to add a mapping between
the fourcc and the caps to libgstriff.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment