src->content_size = 0;
src->have_body = FALSE;
+#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+ if (src->dash_oldest_segment) {
+ g_free (src->dash_oldest_segment);
+ src->dash_oldest_segment = NULL;
+ }
+ if (src->dash_newest_segment) {
+ g_free (src->dash_newest_segment);
+ src->dash_newest_segment = NULL;
+ }
+#endif
src->ret = GST_FLOW_OK;
gst_caps_replace (&src->src_caps, NULL);
src->tls_database = DEFAULT_TLS_DATABASE;
src->max_retries = DEFAULT_RETRIES;
src->method = DEFAULT_SOUP_METHOD;
+#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+ src->dash_oldest_segment = NULL;
+ src->dash_newest_segment = NULL;
+#endif
proxy = g_getenv ("http_proxy");
if (!gst_soup_http_src_set_proxy (src, proxy)) {
GST_WARNING_OBJECT (src,
soup_message_headers_remove (src->msg->request_headers, "Range");
-/*[prasenjit.c]This changes are needed to enable Seekable Contents from server.
-We have observed that , for few specific networks ( VODAFONE ) , without theabove headers ,
-Youtube is sending non-seekable contents to the Client.
-*/
+/* This changes are needed to enable Seekable Contents from server.
+ We have observed that , for few specific networks ( VODAFONE ) , without theabove headers ,
+ Youtube is sending non-seekable contents to the Client. */
#ifndef TIZEN_FEATURE_SOUP_MODIFICATION
if (offset || stop_offset != -1)
#endif
g_mutex_lock (&src->mutex);
if (src->session) {
#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
-//[prasenjit.c] When Playback is ongoing and Browser is moved to background ( Pressing Menu or Home Key ), The Session gets destroyed.
-// But the cookie_jar property remains unfreed. This results in garbage pointer and causes crash.
-// Removing the cookie_jar feature during close session of browser to handle the issue.
+/* When Playback is ongoing and Browser is moved to background ( Pressing Menu or Home Key ), The Session gets destroyed.
+ But the cookie_jar property remains unfreed. This results in garbage pointer and causes crash.
+ Removing the cookie_jar feature during close session of browser to handle the issue. */
GST_DEBUG_OBJECT (src, "Removing Cookie Jar instance");
soup_session_remove_feature_by_type(src->session, SOUP_TYPE_COOKIE_JAR);
src->cookie_jar = NULL;
GST_INFO_OBJECT (src, "request url [%s], posted cookies [%s] msg and returned = %d", tmp->location, val, bret);
}
}
+ else if (g_ascii_strcasecmp (name, "Dash-Oldest-Segment") == 0)
+ {
+ if (val)
+ {
+ GstSoupHTTPSrc * tmp = src;
+ tmp->dash_oldest_segment = g_strdup (val);
+ GST_INFO_OBJECT (src, "Dash-Oldest-Segment set as %s ", tmp->dash_oldest_segment);
+ }
+ }
+ else if (g_ascii_strcasecmp (name, "Dash-Newest-Segment") == 0)
+ {
+ if (val)
+ {
+ GstSoupHTTPSrc * tmp = src;
+ tmp->dash_newest_segment = g_strdup (val);
+ GST_INFO_OBJECT (src, "Dash-Newest-Segment set as %s ", tmp->dash_newest_segment);
+ }
+ }
}
#endif
}
#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
-/*[prasenjit.c]This changes are needed to enable Seekable Contents from server.
-We have observed that , for few specific networks ( VODAFONE ) , without theabove headers ,
-Youtube is sending non-seekable contents to the Client.
-*/
+/* This changes are needed to enable Seekable Contents from server.
+ We have observed that , for few specific networks ( VODAFONE ) , without theabove headers ,
+ Youtube is sending non-seekable contents to the Client. */
soup_message_headers_append (src->msg->request_headers, "Accept-Ranges","bytes");
if (src->cookie_jar) {
GST_DEBUG_OBJECT (src, "start(\"%s\")", src->location);
+#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+ if (src->dash_oldest_segment) {
+ g_free (src->dash_oldest_segment);
+ src->dash_oldest_segment = NULL;
+ }
+ if (src->dash_newest_segment) {
+ g_free (src->dash_newest_segment);
+ src->dash_newest_segment = NULL;
+ }
+#endif
return gst_soup_http_src_session_open (src);
}
GCond request_finished_cond;
GstEvent *http_headers_event;
+#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+ gchar *dash_oldest_segment;
+ gchar *dash_newest_segment;
+#endif
};
struct _GstSoupHTTPSrcClass {
streams = g_slist_next (streams)) {
GstRtpBinStream *stream = (GstRtpBinStream *) streams->data;
#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
- GstPad *temp_pad_src = NULL;
- GstCaps *temp_caps_src = NULL;
- GstStructure *caps_structure;
- const gchar *caps_str_media = NULL;
- temp_pad_src = gst_element_get_static_pad (stream->buffer, "src");
- temp_caps_src = gst_pad_get_current_caps(temp_pad_src);
- GST_DEBUG_OBJECT (bin, "stream %p percent %d : temp_caps_src=%"GST_PTR_FORMAT, stream,stream->percent,temp_caps_src);
- if (temp_caps_src)
- {
- caps_structure = gst_caps_get_structure (temp_caps_src, 0);
- caps_str_media = gst_structure_get_string (caps_structure, "media");
- if (caps_str_media != NULL)
- {
- if ((strcmp(caps_str_media,"video") != 0)&&(strcmp(caps_str_media,"audio") != 0))
- {
- GST_DEBUG_OBJECT (bin, "Non Audio/Video Stream.. ignoring the same !!");
- gst_caps_unref( temp_caps_src );
- gst_object_unref( temp_pad_src );
- continue;
- }
- else if(stream->percent >= 100)
- {
- /*[shweta.agg] Most of the time buffering icon displays in rtsp playback.
- Optimizing the buffering updation code. Whenever any stream percentage
- reaches 100 do not post buffering messages.*/
- if(stream->prev_percent < 100)
- {
- buffering_flag = TRUE;
- }
- else
- {
- update_buffering_status = FALSE;
- }
- }
- }
- gst_caps_unref( temp_caps_src );
- }
- gst_object_unref( temp_pad_src );
+ GstPad *temp_pad_src = NULL;
+ GstCaps *temp_caps_src = NULL;
+ GstStructure *caps_structure;
+ const gchar *caps_str_media = NULL;
+ temp_pad_src = gst_element_get_static_pad (stream->buffer, "src");
+ temp_caps_src = gst_pad_get_current_caps(temp_pad_src);
+ GST_DEBUG_OBJECT (bin, "stream %p percent %d : temp_caps_src=%"GST_PTR_FORMAT, stream,stream->percent,temp_caps_src);
+ if (temp_caps_src)
+ {
+ caps_structure = gst_caps_get_structure (temp_caps_src, 0);
+ caps_str_media = gst_structure_get_string (caps_structure, "media");
+ if (caps_str_media != NULL)
+ {
+ if ((strcmp(caps_str_media,"video") != 0)&&(strcmp(caps_str_media,"audio") != 0))
+ {
+ GST_DEBUG_OBJECT (bin, "Non Audio/Video Stream.. ignoring the same !!");
+ gst_caps_unref( temp_caps_src );
+ gst_object_unref( temp_pad_src );
+ continue;
+ }
+ else if(stream->percent >= 100)
+ {
+ /* Most of the time buffering icon displays in rtsp playback.
+ Optimizing the buffering updation code. Whenever any stream percentage
+ reaches 100 do not post buffering messages.*/
+ if(stream->prev_percent < 100)
+ {
+ buffering_flag = TRUE;
+ }
+ else
+ {
+ update_buffering_status = FALSE;
+ }
+ }
+ }
+ gst_caps_unref( temp_caps_src );
+ }
+ gst_object_unref( temp_pad_src );
#else
GST_DEBUG_OBJECT (bin, "stream %p percent %d", stream,
stream->percent);
if (min_percent > stream->percent)
min_percent = stream->percent;
#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
- /* Updating prev stream percentage */
- stream->prev_percent = stream->percent;
+ /* Updating prev stream percentage */
+ stream->prev_percent = stream->percent;
#endif
}
} else {
case CMD_OPEN:
GST_ELEMENT_PROGRESS (src, ERROR, "open", ("Open failed"));
#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
-/*[shweta.agg] Ending conditional wait for pause when open fails.*/
+/* Ending conditional wait for pause when open fails.*/
g_mutex_lock(&(src)->pause_lock);
g_cond_signal (&(src)->open_end);
g_mutex_unlock(&(src)->pause_lock);
segment->start = seconds;
#ifndef TIZEN_FEATURE_RTSP_MODIFICATION
/*
-[prasenjit.c] The range-min points to the start of the segment , not the current position.
+The range-min points to the start of the segment , not the current position.
After getting the current position from MSL during normal pause/resume or during seek , we should not
update the segment->position again with the rtp header npt timestamp.
*/
src->state = GST_RTSP_STATE_INIT;
#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
- //[prasenjit.c] Check for the support for the Media codecs
+ /* Check for the support for the Media codecs */
if ((!src->is_audio_codec_supported)&&(!src->is_video_codec_supported))
{
GST_ERROR_OBJECT (src, "UnSupported Media Type !!!! \n");
else
{
/*
-[prasenjit.c] Updating position with the MSL current position as gst_rtspsrc_get_position() does not return correct position.
+ Updating position with the MSL current position as gst_rtspsrc_get_position() does not return correct position.
*/
GST_DEBUG_OBJECT (src, " During normal pause-resume , segment->position=%" GST_TIME_FORMAT",src->start_position=%"GST_TIME_FORMAT,
GST_TIME_ARGS (segment->position),GST_TIME_ARGS (src->start_position));
}
/*
-[prasenjit.c] Sending the npt range request for each play request for updating the segment position properly.
+ Sending the npt range request for each play request for updating the segment position properly.
*/
hval = gen_range_header (src, segment);
gst_rtsp_message_take_header (&request, GST_RTSP_HDR_RANGE, hval);