Caps of element
Zmad
mats.lindestam at gmail.com
Tue Nov 7 14:47:18 UTC 2017
Hi,
Sorry for not answering earlier. I never got you answer back. Do I have to
be a subscriber to receive answers to my private-mail? It was a fluke that I
stumbled on nabble and found your answer. Anyway.
When I run a matroska file through a pipeline using a matroskademux I would
like to be able to find out the "media type" e.g. "image/jpeg",
"video/x-h264", etc.. for the video-stream in the matroskademux.
I have found a way to do what i want. I look at the caps for the
matroskademux source-pad. Here is an example of what I do:
static void find_media_type (GstMatroskaDemux * demux, char *media_type) {
GstMatroskaTrackContext *context = g_ptr_array_index (demux->common.src,
0);
if (context != NULL) {
GstStructure *caps_struct = gst_caps_get_structure (context->caps, 0);
if (caps_struct != NULL) {
char *media_type = gst_structure_get_name (caps_struct)
}
}
}
Maybe there is a better way. Maybe I should get it when I get a cap_event?
BR
/Mats
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list