static int __mmplayer_gst_create_audio_sink_bin(mmplayer_t *player);
static int __mmplayer_gst_create_text_sink_bin(mmplayer_t *player);
-static void __mmplayer_gst_decode_no_more_pads(GstElement *elem, gpointer data);
static void __mmplayer_gst_create_sinkbin(GstElement *decodebin, GstPad *pad, gpointer data);
-static void __mmplayer_gst_decode_unknown_type(GstElement *elem, GstPad *pad, GstCaps *caps, gpointer data);
-static gboolean __mmplayer_gst_decode_autoplug_continue(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer data);
-static void __mmplayer_gst_decode_pad_removed(GstElement *elem, GstPad *new_pad, gpointer data);
-static void __mmplayer_gst_decode_drained(GstElement *bin, gpointer data);
-static void __mmplayer_pipeline_complete(GstElement *decodebin, gpointer data);
static gboolean __mmplayer_is_midi_type(gchar *str_caps);
static gboolean __mmplayer_is_only_mp3_type(gchar *str_caps);
-static void __mmplayer_set_audio_attrs(mmplayer_t *player, GstCaps *caps);
+static void __mmplayer_set_audio_attrs(mmplayer_t *player, GstCaps *caps);
static gboolean __mmplayer_update_subtitle(GstElement *object, GstBuffer *buffer, GstPad *pad, gpointer data);
static void __mmplayer_release_misc(mmplayer_t *player);
LOGD("surface type : %d", stype);
- if (MMPLAYER_IS_MS_BUFF_SRC(player)) {
+ if (MMPLAYER_IS_MS_BUFF_SRC(player) || MMPLAYER_USE_URIDECODEBIN3(player)) {
__mmplayer_gst_create_sinkbin(elem, pad, player);
goto DONE;
}
gint samplerate = 0;
gint channels = 0;
- if (MMPLAYER_IS_MS_BUFF_SRC(player) || player->build_audio_offload) {
+ if (MMPLAYER_IS_MS_BUFF_SRC(player) || MMPLAYER_USE_URIDECODEBIN3(player) || player->build_audio_offload) {
if (player->build_audio_offload)
player->no_more_pad = TRUE; /* remove state holder */
__mmplayer_gst_create_sinkbin(elem, pad, player);
}
if (player->num_dynamic_pad == 0) /* FIXME: num_dynamic_pad is only for rtsp? */
- __mmplayer_pipeline_complete(NULL, player);
+ _mmplayer_pipeline_complete(NULL, player);
return TRUE;
}
return TRUE;
}
-static void
-__mmplayer_gst_decode_no_more_pads(GstElement *elem, gpointer data)
+void
+_mmplayer_gst_decode_no_more_pads(GstElement *elem, gpointer data)
{
mmplayer_t *player = NULL;
GstElement *video_selector = NULL;
LOGD("no more pads: %d, stream count dec : %d(num of dynamic pad)", player->no_more_pad, player->num_dynamic_pad);
if ((player->no_more_pad) && (player->num_dynamic_pad == 0))
- __mmplayer_pipeline_complete(NULL, player);
+ _mmplayer_pipeline_complete(NULL, player);
ERROR:
MMPLAYER_RETURN_IF_FAIL(player && player->pipeline && player->pipeline->mainbin);
player->no_more_pad = TRUE;
- __mmplayer_pipeline_complete(NULL, player);
+ _mmplayer_pipeline_complete(NULL, player);
MMPLAYER_FLEAVE();
return;
return;
}
- if (!_mmplayer_gst_create_decoder(player, pad, caps)) {
- gboolean async = FALSE;
- LOGE("failed to autoplug %s", player->type);
+ if (!player->pipeline->mainbin[MMPLAYER_M_AUTOPLUG].gst) {
+ if (!_mmplayer_gst_create_decoder(player, pad, caps)) {
+ gboolean async = FALSE;
+ LOGE("failed to autoplug %s", player->type);
- mm_attrs_get_int_by_name(player->attrs, "profile_prepare_async", &async);
-
- if (async && player->msg_posted == FALSE)
- __mmplayer_handle_missed_plugin(player);
+ mm_attrs_get_int_by_name(player->attrs, "profile_prepare_async", &async);
+ if (async && player->msg_posted == FALSE)
+ __mmplayer_handle_missed_plugin(player);
+ }
}
gst_object_unref(GST_OBJECT(pad));
-
MMPLAYER_FLEAVE();
-
return;
}
/* no-more-pad pad handling signal */
_mmplayer_add_signal_connection(player, G_OBJECT(decodebin), MM_PLAYER_SIGNAL_TYPE_AUTOPLUG, "no-more-pads",
- G_CALLBACK(__mmplayer_gst_decode_no_more_pads), (gpointer)player);
+ G_CALLBACK(_mmplayer_gst_decode_no_more_pads), (gpointer)player);
_mmplayer_add_signal_connection(player, G_OBJECT(decodebin), MM_PLAYER_SIGNAL_TYPE_AUTOPLUG, "pad-removed",
- G_CALLBACK(__mmplayer_gst_decode_pad_removed), (gpointer)player);
+ G_CALLBACK(_mmplayer_gst_decode_pad_removed), (gpointer)player);
/* This signal is emitted when a pad for which there is no further possible
decoding is added to the decodebin.*/
_mmplayer_add_signal_connection(player, G_OBJECT(decodebin), MM_PLAYER_SIGNAL_TYPE_AUTOPLUG, "unknown-type",
- G_CALLBACK(__mmplayer_gst_decode_unknown_type), (gpointer)player);
+ G_CALLBACK(_mmplayer_gst_decode_unknown_type), (gpointer)player);
/* This signal is emitted whenever decodebin finds a new stream. It is emitted
before looking for any elements that can handle that stream.*/
_mmplayer_add_signal_connection(player, G_OBJECT(decodebin), MM_PLAYER_SIGNAL_TYPE_AUTOPLUG, "autoplug-continue",
- G_CALLBACK(__mmplayer_gst_decode_autoplug_continue), (gpointer)player);
+ G_CALLBACK(_mmplayer_gst_decode_autoplug_continue), (gpointer)player);
if (player->need_video_dec_sorting || player->need_audio_dec_sorting)
_mmplayer_add_signal_connection(player, G_OBJECT(decodebin), MM_PLAYER_SIGNAL_TYPE_AUTOPLUG, "autoplug-sort",
/* This signal is emitted once decodebin has finished decoding all the data.*/
_mmplayer_add_signal_connection(player, G_OBJECT(decodebin), MM_PLAYER_SIGNAL_TYPE_AUTOPLUG, "drained",
- G_CALLBACK(__mmplayer_gst_decode_drained), (gpointer)player);
+ G_CALLBACK(_mmplayer_gst_decode_drained), (gpointer)player);
/* This signal is emitted when a element is added to the bin.*/
_mmplayer_add_signal_connection(player, G_OBJECT(decodebin), MM_PLAYER_SIGNAL_TYPE_AUTOPLUG, "element-added",
return MM_ERROR_NONE;
}
-static void
-__mmplayer_pipeline_complete(GstElement *decodebin, gpointer data)
+void
+_mmplayer_pipeline_complete(GstElement *decodebin, gpointer data)
{
mmplayer_t *player = (mmplayer_t *)data;
/* remove fakesink. */
if (!_mmplayer_gst_remove_fakesink(player,
&player->pipeline->mainbin[MMPLAYER_M_SRC_FAKESINK])) {
- /* NOTE : __mmplayer_pipeline_complete() can be called several time. because
+ /* NOTE : _mmplayer_pipeline_complete() can be called several time. because
* signaling mechanism(pad-added, no-more-pad, new-decoded-pad) from various
* source element are not same. To overcome this situation, this function will called
* several places and several times. Therefore, this is not an error case.
return MM_ERROR_NONE;
}
-static void
-__mmplayer_gst_decode_unknown_type(GstElement *elem, GstPad *pad,
+void
+_mmplayer_gst_decode_unknown_type(GstElement *elem, GstPad *pad,
GstCaps *caps, gpointer data)
{
mmplayer_t *player = (mmplayer_t *)data;
__mmplayer_check_not_supported_codec(player, klass, mime);
}
-static gboolean
-__mmplayer_gst_decode_autoplug_continue(GstElement *bin, GstPad *pad,
- GstCaps *caps, gpointer data)
+gboolean
+_mmplayer_gst_decode_autoplug_continue(GstElement *bin, GstPad *pad,
+ GstCaps *caps, gpointer data)
{
mmplayer_t *player = (mmplayer_t *)data;
const char *mime = NULL;
return result;
}
-static void
-__mmplayer_gst_decode_pad_removed(GstElement *elem, GstPad *new_pad,
+void
+_mmplayer_gst_decode_pad_removed(GstElement *elem, GstPad *new_pad,
gpointer data)
{
//mmplayer_t *player = (mmplayer_t *)data;
gst_caps_unref(caps);
}
-static void
-__mmplayer_gst_decode_drained(GstElement *bin, gpointer data)
+void
+_mmplayer_gst_decode_drained(GstElement *bin, gpointer data)
{
mmplayer_t *player = (mmplayer_t *)data;
GstIterator *iter = NULL;
MMPLAYER_FENTER();
MMPLAYER_RETURN_IF_FAIL(player);
- LOGD("__mmplayer_gst_decode_drained");
+ LOGD("got drained signal");
if (!MMPLAYER_CMD_TRYLOCK(player)) {
LOGW("Fail to get cmd lock");