GCond subtitle_info_cond;
GMutex subtitle_info_mutex;
- /* stream collection */
- GstStreamCollection *collection;
- guint stream_notify_id;
-
mmplayer_track_t track[MM_PLAYER_TRACK_TYPE_MAX];
guint internal_text_idx;
}
}
-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)
{
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;