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 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Fri, 2016-07-29 at 14:47 +0530, Vijay Vikram wrote:
Hi, > 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 (snip) > > 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? Make sure your decoder element also includes Audio/Decoder in the element classification meta string passed to gst_element_class_set_static_metadata(). Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |