Send seek events to all sink elements 70/300870/1 accepted/tizen/7.0/unified/20231106.173138
authorGilbok Lee <gilbok.lee@samsung.com>
Fri, 3 Nov 2023 02:53:09 +0000 (11:53 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Fri, 3 Nov 2023 05:44:01 +0000 (05:44 +0000)
- Didn't send seek event to subtitle sink due to below commit
  https://review.tizen.org/gerrit/#/c/platform/core/multimedia/trackrenderer/+/291511/
  So subtitle seek function doesn't work

Change-Id: I05e6afa8c4cb5edbb968a3c0285434a58dbc6f66

packaging/libtrackrenderer.spec
src/include_internal/trackrenderer/core/pipeline.hpp

index 746ac05..c48efb8 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libtrackrenderer
 Summary:    new multimedia streaming player trackrenderer
-Version:    0.0.47
+Version:    0.0.48
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index d5355cd..2812505 100644 (file)
@@ -438,11 +438,20 @@ class Pipeline : private boost::noncopyable {
   bool Seek(gdouble rate, GstFormat format, GstSeekFlags flags,
             GstSeekType start_type, gint64 start, GstSeekType stop_type,
             gint64 stop) {
-    GstElement* obj = mainbin_[static_cast<int>(T::kPipeline)];
-    if (!obj) return false;
-    if (!gst_element_seek(obj, rate, format, flags, start_type, start,
-                          stop_type, stop)) {
-      return false;
+    std::vector<T> sinkElements {
+      T::kSinkVideo,
+      T::kSinkAudio,
+      T::kSinkSubtitle,
+      T::kSinkCaption
+    };
+
+    for (const auto& element : sinkElements) {
+      GstElement* obj = mainbin_[static_cast<int>(element)];
+      if (!obj) continue;
+      if (!gst_element_seek(obj, rate, format, flags, start_type, start,
+                            stop_type, stop)) {
+        return false;
+      }
     }
     return true;
   }