souphttpsrc: add log about last read pos for debugging 57/185657/2 accepted/tizen/unified/20180803.172608 submit/tizen/20180802.022345
authorEunhae Choi <eunhae1.choi@samsung.com>
Wed, 1 Aug 2018 10:02:02 +0000 (19:02 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Wed, 1 Aug 2018 10:32:53 +0000 (19:32 +0900)
Change-Id: I7540ec800f5939b786d5338b98ff1395324f7af4

ext/soup/gstsouphttpsrc.c
ext/soup/gstsouphttpsrc.h

index f6b8fb4..64d05fe 100644 (file)
@@ -505,6 +505,7 @@ gst_soup_http_src_init (GstSoupHTTPSrc * src)
 #ifdef TIZEN_FEATURE_SOUP_MODIFICATION
   src->dash_oldest_segment = NULL;
   src->dash_newest_segment = NULL;
+  src->received_total = 0;
 #endif
   proxy = g_getenv ("http_proxy");
   if (!gst_soup_http_src_set_proxy (src, proxy)) {
@@ -1854,6 +1855,9 @@ gst_soup_http_src_read_buffer (GstSoupHTTPSrc * src, GstBuffer ** outbuf)
     GST_BUFFER_OFFSET (*outbuf) = bsrc->segment.position;
     ret = GST_FLOW_OK;
     gst_soup_http_src_update_position (src, read_bytes);
+#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+    src->received_total += read_bytes;
+#endif
 
     /* Got some data, reset retry counter */
     src->retry_count = 0;
@@ -2011,6 +2015,13 @@ gst_soup_http_src_change_state (GstElement * element, GstStateChange transition)
   src = GST_SOUP_HTTP_SRC (element);
 
   switch (transition) {
+#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      GST_WARNING_OBJECT (src, "Last read pos"
+            ": %" G_GINT64_FORMAT ", received total : %" G_GINT64_FORMAT,
+            src->read_position, src->received_total);
+      break;
+#endif
     case GST_STATE_CHANGE_READY_TO_NULL:
       gst_soup_http_src_session_close (src);
       break;
index 881c25c..b6f0065 100644 (file)
@@ -117,6 +117,7 @@ struct _GstSoupHTTPSrc {
 #ifdef TIZEN_FEATURE_SOUP_MODIFICATION
   gchar *dash_oldest_segment;
   gchar *dash_newest_segment;
+  guint64 received_total;    /* temp: for debugging */
 #endif
 };