Not able to register a new caps

Vijay Vikram vikram.kvijay at gmail.com
Fri Jul 29 09:17:10 UTC 2016


Hello All,
I am facing some problem in adding a new caps to typefind.

Rather than jumping into the problem diractly, I must start with my
understanding of the framework first.
Taking an example of ac3 audio(audio/x-ac3) only files playback with
playbin2 from local disk, I believe that typefinding would be required.
Typefind gets some buffer and tries to analyze the data and when it finds
two consecutive ac3 frames, typefind suggests caps with some probability
set. So for ac3 audio only, typefind would try to execute ac3_type_find()
which is function registered when the following code executes,

  TYPE_FIND_REGISTER (plugin, "audio/x-ac3", GST_RANK_PRIMARY,
ac3_type_find,
      "ac3,eac3", AC3_CAPS, NULL, NULL);

ac3_type_find() fn gets the buffer and tries to find two consecutive ac3
frames and then sugegsts. Based on the suggestion, typefinder would attach
ac3parse plugin.

Hope my understading is right till here?

Now my issue is while I try to add another caps(suppose audio/x-abcd). I
have registered this new type as below

  TYPE_FIND_REGISTER (plugin, "audio/x-abcd", GST_RANK_PRIMARY,
abcd_type_find,
      "abcd", ABCD_CAPS, NULL, NULL);

And my handler code looks like

static GstStaticCaps abcd_caps = GST_STATIC_CAPS ("audio/x-abcd");

#define ABCD_CAPS (gst_static_caps_get(&abcd_caps))

static void
abcd_type_find (GstTypeFind * tf, gpointer unused)
{
-
-
-
-
}

I have a plugin which has sink pad with caps set as "audio/x-abcd" and is
ranked primary.

Audio file with this type is not called still. Am I missing some more code
changes in some other modules?

Sorry if I or my question is sounding very naive, but I would appreciate
you can help me solve this issue problem.

Regards,
Vikram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160729/d92e5367/attachment-0001.html>


More information about the gstreamer-devel mailing list