static void __mmplayer_gst_rtp_no_more_pads(GstElement *element, gpointer data);
static void __mmplayer_gst_rtp_dynamic_pad(GstElement *element, GstPad *pad, gpointer data);
-static gboolean __mmplayer_get_stream_service_type(mm_player_t* player);
+static MMStreamingType __mmplayer_get_stream_service_type(mm_player_t* player);
static gboolean __mmplayer_update_subtitle(GstElement* object, GstBuffer *buffer, GstPad *pad, gpointer data);
static void __mmplayer_release_misc(mm_player_t* player);
static void __mmplayer_release_misc_post(mm_player_t* player);
GstStructure* p = NULL;
MMHandleType attrs = 0;
gchar *path = NULL;
- gint stream_service_type = STREAMING_SERVICE_NONE;
+ MMStreamingType stream_service_type = STREAMING_SERVICE_NONE;
struct stat sb;
MMPLAYER_FENTER();
/* try to get streaming service type */
stream_service_type = __mmplayer_get_stream_service_type(player);
- mm_attrs_set_int_by_name(attrs, "streaming_type", stream_service_type);
+ if (stream_service_type < STREAMING_SERVICE_NONE)
+ mm_attrs_set_int_by_name(attrs, "streaming_type", stream_service_type);
/* check duration is OK */
if (dur_nsec == 0 && !MMPLAYER_IS_LIVE_STREAMING(player)) {
return TRUE;
}
-static gboolean __mmplayer_get_stream_service_type(mm_player_t* player)
+static MMStreamingType __mmplayer_get_stream_service_type(mm_player_t* player)
{
- gint streaming_type = STREAMING_SERVICE_NONE;
+ MMStreamingType streaming_type = STREAMING_SERVICE_NONE;
MMPLAYER_FENTER();
player->pipeline &&
player->pipeline->mainbin &&
player->pipeline->mainbin[MMPLAYER_M_SRC].gst,
- FALSE);
+ STREAMING_SERVICE_NONE);
/* streaming service type if streaming */
if (!MMPLAYER_IS_STREAMING(player))
if (!gst_element_query_duration(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst, GST_FORMAT_TIME, &dur_nsec)) {
/* For RTSP Streaming , duration is not returned in READY state. So seek to the previous position does not work properly.
* Added a patch to postpone the actual seek when state changes to PLAY. Sending a fake SEEK_COMPLETED event to finish the current request. */
- if ((MMPLAYER_IS_RTSP_STREAMING(player)) && (__mmplayer_get_stream_service_type(player) != STREAMING_SERVICE_LIVE)) {
+ if ((MMPLAYER_IS_RTSP_STREAMING(player)) && (__mmplayer_get_stream_service_type(player) == STREAMING_SERVICE_VOD)) {
player->pending_seek.is_pending = TRUE;
player->pending_seek.format = format;
player->pending_seek.pos = position;
This causes problem is position calculation during normal pause resume scenarios also.
Currently during seek , we are sending the current position to rtspsrc module for position saving for later use. */
if ((MMPLAYER_IS_RTSP_STREAMING(player)) &&
- (__mmplayer_get_stream_service_type(player) != STREAMING_SERVICE_LIVE)) {
+ (__mmplayer_get_stream_service_type(player) == STREAMING_SERVICE_VOD)) {
if (!gst_element_query_position(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst, GST_FORMAT_TIME, &pos_nsec))
LOGW("getting current position failed in seek\n");
This causes problem is position calculation during normal pause resume scenarios also.
Currently during pause , we are sending the current position to rtspsrc module for position saving. */
if ((MMPLAYER_IS_RTSP_STREAMING(player)) &&
- (__mmplayer_get_stream_service_type(player) != STREAMING_SERVICE_LIVE)) {
+ (__mmplayer_get_stream_service_type(player) == STREAMING_SERVICE_VOD)) {
g_object_set(player->pipeline->mainbin[MMPLAYER_M_SRC].gst, "resume-position", player->last_position, NULL);
}
}
&player->video_decoder_resource)
!= MM_RESOURCE_MANAGER_ERROR_NONE) {
LOGE("could not mark video_decoder resource for acquire");
+ ret = MM_ERROR_PLAYER_INTERNAL;
goto DONE;
}
} else {