Rtsp: Set start position to Range general-header for PLAY, RESUME and seek for Player 11/270011/3 tizen_gst_1.19.2
authorHyunil <hyunil46.park@samsung.com>
Mon, 24 Jan 2022 06:37:54 +0000 (15:37 +0900)
committerHyunil <hyunil46.park@samsung.com>
Tue, 25 Jan 2022 01:05:17 +0000 (10:05 +0900)
Change-Id: Iec86b75ce50981eb843d306cfffe52b498df9506
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
gst/rtsp/gstrtspsrc.c

index 3e54c7d..49b0e55 100644 (file)
@@ -8887,11 +8887,22 @@ gen_range_header (GstRTSPSrc * src, GstSegment * segment)
     g_date_time_unref (datetime);
     g_date_time_unref (prime_epoch);
   } else {
+
+#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
+  if (src->start_position != 0 && segment->position == 0) {
+    segment->position = src->start_position;
+    src->start_position = 0;
+  }
+#endif
     range.unit = GST_RTSP_RANGE_NPT;
 
     if (src->range && src->range->min.type == GST_RTSP_TIME_NOW) {
       range.min.type = GST_RTSP_TIME_NOW;
     } else {
+#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
+      if (segment->position != 0)
+        begin_seconds = (gdouble) segment->position / GST_SECOND;
+#endif
       range.min.type = GST_RTSP_TIME_SECONDS;
       range.min.seconds = begin_seconds;
     }