Unset sink flag in subtitle sink 11/291511/4
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 18 Apr 2023 01:31:25 +0000 (10:31 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Tue, 18 Apr 2023 06:03:40 +0000 (15:03 +0900)
- If there is no subtitle data and the EOS event sent,
  the EOS is immediately received on the subtitle sink.
  After that, when FlushDownStream_() is called(due to a call to SetPlaybackRate()),
  the EOS is reset on the subtitle sink.
  Therefore, if the EOS is received from another sink, the pipeline doesn't post EOS

[Version] 0.1.20
[Issue Type] Fix bugs

Change-Id: I8b4de9a652b2027f17218851274c2ee6d7dc8e9d

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

index af66eb063845b6c3b1f9c8b5e83a37cbaa601110..1ce4d65e2e2e767d5e56b47883565f1bae6d60d2 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libtrackrenderer
 Summary:    new multimedia streaming player trackrenderer
-Version:    0.0.19
+Version:    0.0.20
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index ec9166c3c396b6c13dff293b4bf667a989dbd9f5..7e9619def3c54990bca44ea210ca962013e531b2 100644 (file)
@@ -110,6 +110,15 @@ class Pipeline : private boost::noncopyable {
       TRACKRENDERER_ERROR("Fail to create element [%s]", name);
       return false;
     }
+
+    /* In some cases, the subtitle EOS is reset due to FlushDownStream_()
+       There is an problem where the pipeline does not post EOS,
+       because not all sink element have reached EOS */
+    if (nickname && strstr(nickname, "subtitle_sink")) {
+      TRACKRENDERER_DEBUG("Unset GST_ELEMENT_FLAG_SINK in subtitle_sink");
+      GST_OBJECT_FLAG_UNSET(obj, GST_ELEMENT_FLAG_SINK);
+    }
+
     return Set_(element, obj);
   }