break;
case GST_RESOURCE_ERROR_NOT_FOUND:
case GST_RESOURCE_ERROR_OPEN_READ:
- if (MMPLAYER_IS_HTTP_STREAMING(player) || MMPLAYER_IS_HTTP_LIVE_STREAMING(player)
- || MMPLAYER_IS_RTSP_STREAMING(player)) {
+ if (MMPLAYER_IS_STREAMING(player)) {
trans_err = MM_ERROR_PLAYER_STREAMING_CONNECTION_FAIL;
break;
}
case GST_RESOURCE_ERROR_READ:
- if (MMPLAYER_IS_HTTP_STREAMING(player) || MMPLAYER_IS_HTTP_LIVE_STREAMING(player)
- || MMPLAYER_IS_RTSP_STREAMING(player)) {
+ if (MMPLAYER_IS_STREAMING(player)) {
trans_err = MM_ERROR_PLAYER_STREAMING_FAIL;
break;
- } else if (message != NULL && message->src != NULL) {
+ }
+
+ if (message != NULL && message->src != NULL) {
storage_state_e storage_state = STORAGE_STATE_UNMOUNTABLE;
mmplayer_path_type_e path_type = MMPLAYER_PATH_MAX;
if (gst_tag_list_get_date_time(tag_list, gsttag, &datetime)) {\
if (datetime != NULL) {\
string = g_strdup_printf("%d", gst_date_time_get_year(datetime));\
+ if (string == NULL) {\
+ LOGD("failed to get year from tag");\
+ gst_date_time_unref(datetime);\
+ break;\
+ } \
mm_player_set_attribute((MMHandleType)player, NULL,\
playertag, string, strlen(string), NULL); \
SECURE_LOGD("metainfo year : %s", string);\
}
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) {
ch_element = NULL;
g_value_reset(&item);
}
+ g_value_unset(&item);
gst_iterator_free(iter);
MMPLAYER_FLEAVE();