// get info about the stream GList* streaminfo; g_object_get(G_OBJECT(playbin), "stream-info", &streaminfo, NULL); for( ; streaminfo != NULL; streaminfo = streaminfo->next) { GObject* info = (GObject*) streaminfo->data; typedef enum { GST_STREAM_TYPE_UNKNOWN = 0, GST_STREAM_TYPE_AUDIO = 1, GST_STREAM_TYPE_VIDEO = 2, GST_STREAM_TYPE_TEXT = 3, } GstStreamType; int type; g_object_get(info, "type", &type, NULL); switch(type) { case GST_STREAM_TYPE_AUDIO: { break; } // video case GST_STREAM_TYPE_VIDEO: { break; } } char* decoder; char* codec; g_object_get(info, "decoder", &decoder, "codec", &codec, NULL); if(decoder == NULL && codec == NULL) { std::cout << "error while getting stream-info" << std::endl; return 1; } std::cout << "decoder: " << decoder << std::endl; std::cout << "codec: " << codec << std::endl; } g_list_free(streaminfo);