}
static void
-__mmplayer_stream_notify_cb(GstStreamCollection *collection,
- GstStream *stream, GParamSpec *pspec, gpointer data)
-{
- LOGD ("Got stream-notify from stream %s for %s (collection %p)\n",
- gst_stream_get_stream_id(stream), pspec->name, collection);
- if (g_str_equal(pspec->name, "caps")) {
- GstCaps *caps = gst_stream_get_caps(stream);
- MMPLAYER_LOG_GST_CAPS_TYPE(caps);
- gst_caps_unref(caps);
- }
-
-#ifdef __DEBUG__
- if (g_str_equal (pspec->name, "tags")) {
- GstTagList *tags = gst_stream_get_tags(stream);
- if (tags) {
- LOGD (" tags:\n");
- gst_tag_list_foreach(tags, __mmplayer_print_tag_foreach, GUINT_TO_POINTER(MMPLAYER_TAG_INDENT));
- gst_tag_list_unref(tags);
- }
- }
-#endif
-}
-
-static void
__mmplayer_gst_bus_msg_callback(GstMessage *msg, gpointer data)
{
mmplayer_t *player = (mmplayer_t *)(data);
gst_message_parse_stream_collection(msg, &collection);
if (collection) {
__mmplayer_dump_collection(collection);
- if (player->collection && player->stream_notify_id) {
- g_signal_handler_disconnect(player->collection, player->stream_notify_id);
- player->stream_notify_id = 0;
- }
- gst_object_replace((GstObject **)&player->collection, (GstObject *)collection);
- if (player->collection) {
- player->stream_notify_id = g_signal_connect(player->collection, "stream-notify",
- (GCallback)__mmplayer_stream_notify_cb, player);
- }
gst_object_unref(collection);
}
} break;
gst_object_unref(stream);
break;
}
- LOGD (" Stream #%d : %s\n", i, gst_stream_get_stream_id(stream));
+ LOGD(" Stream #%d : %s\n", i, gst_stream_get_stream_id(stream));
if (player->track[type].active_track_index == INVALID_TRACK_INDEX) {
int stream_index = INVALID_TRACK_INDEX;
if (_mmplayer_get_track_index(player, type, stream, &stream_index) == MM_ERROR_NONE) {
LOGE("failed to add selector to pipeline");
if (player->track[stream_type].block_id != 0)
- gst_pad_remove_probe (srcpad, player->track[stream_type].block_id);
+ gst_pad_remove_probe(srcpad, player->track[stream_type].block_id);
player->track[stream_type].block_id = 0;
if (player->track[stream_type].event_probe_id != 0)
- gst_pad_remove_probe (srcpad, player->track[stream_type].event_probe_id);
+ gst_pad_remove_probe(srcpad, player->track[stream_type].event_probe_id);
player->track[stream_type].event_probe_id = 0;
gst_object_unref(GST_OBJECT(srcpad));