Need suggestion reg: Codec_data field missing while extracting caps structure.

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

Need suggestion reg: Codec_data field missing while extracting caps structure.

Manmohan Singh
Hi,

I am facing one issue regarding flv file where codec_data is needed to decide it's profile but codec_data field is missing while extract by our self GstStructure but when stream directy played on target found codec_data is present. 

Out put from code is :(Field codec_data missing)
Caps = gst_pad_get_caps(Pad);
CapsStructure = gst_caps_get_structure(Caps, 0);

Pad is received as function parameter for padadded function that is callback via:  g_signal_connect(PipelineElements->Demuxer, "padadd", G_CALLBACK (&PadAdded), UserData);

CapsStructure is video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)512, height=(int)288, framerate=(fraction)11720000/781199; 
CapsStructure is audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)44100, channels=(int)2;

Direct output from target: (Field Codec_data preset)
gst-launch filesrc location=flv_video.flv ! decodebin ! alsasink -v

GstFlvDemux:flvdemux0.GstPad:video: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)512, height=(int)288, framerate=(fraction)11720000/781199, codec_data=(buffer)01640033ffe1001b67640033ac2cc2808025b0110000030001000003001e8f18318a8001000468eebcb0
GstFlvDemux:flvdemux0.GstPad:audio: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800


It means codec_data is available but not able to get by our own code when needed. Kindly suggest solution.

Thanks in advance.

Regards,
Manmohan




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