Set the 'kind' to 'subtitles' for DASH TTML. 97/317897/2
authorMark Toller <mark.toller@samsung.com>
Fri, 20 Sep 2024 09:12:57 +0000 (10:12 +0100)
committerMark Toller <mark.toller@samsung.com>
Fri, 20 Sep 2024 09:19:46 +0000 (10:19 +0100)
Remove the EWK_BRINGUP #defs.

Change-Id: I0104536e135ad7c63d2051f6c906ec0871a51d4c

tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 02445e6..fcc02af
@@ -1990,9 +1990,9 @@ void MediaPlayerBridgeCapiTV::SetDecoderReleased(
 
 void MediaPlayerBridgeCapiTV::Initialize(VideoRendererSink* sink) {
   int ret = player_open_subtitle_cb(player_, OnSubtitleDataCallback, this);
-  if (ret != PLAYER_ERROR_NONE)
+  if (ret != PLAYER_ERROR_NONE) {
     LOG(ERROR) << "player_open_subtitle_cb failed";
-
+  }
 
   player_set_drm_error_cb(player_, DrmErrorCb, this);
   MediaPlayerBridgeCapi::Initialize(sink);
@@ -2287,12 +2287,10 @@ void MediaPlayerBridgeCapiTV::OnOtherEvent(int event_type, void* event_data) {
       char* url = static_cast<char*>(event_data);
       std::string mrsUrl(url ? url : "");
       LOG_ID(INFO, player_id_) << "mrsUrl:" << mrsUrl;
-#if !defined(EWK_BRINGUP)
       task_runner_->PostTask(
           FROM_HERE,
           base::BindOnce(&MediaPlayerBridgeCapiTV::HandleMrsUrlChange,
                          weak_factory_.GetWeakPtr(), mrsUrl));
-#endif
       break;
     }
     case PLAYER_MSG_STREAM_EVENT_PERIOAD_ID_CHANGED: {
@@ -2300,12 +2298,10 @@ void MediaPlayerBridgeCapiTV::OnOtherEvent(int event_type, void* event_data) {
       char* id = static_cast<char*>(event_data);
       std::string periodId(id ? id : "");
       LOG_ID(INFO, player_id_) << "periodId:" << periodId;
-#if !defined(EWK_BRINGUP)
       task_runner_->PostTask(
           FROM_HERE,
           base::BindOnce(&MediaPlayerBridgeCapiTV::HandlePeriodIdChange,
                          weak_factory_.GetWeakPtr(), periodId));
-#endif
       break;
     }
     case PLAYER_MSG_STREAM_EVENT_REMOVE_TRACK: {
@@ -2903,6 +2899,12 @@ void MediaPlayerBridgeCapiTV::UpdateTextTrackInfo() {
       id = text_track_info[i].adaptationset_id;
 
     std::string kindStr("");
+    if (stream_type_ == DASH_STREAM) {
+      // This should be based on the 'Role' from the AdaptationSet in the MPD,
+      // which should reflect the 'value' if it is 'subtitles' or 'captions'.
+      // If it's neither of those values, it should default to 'subtitles'.
+      kindStr = "subtitles";
+    }
 #if TIZEN_VERSION_AT_LEAST(6, 0, 0)
     // subtitling_type: 8bit, maybe unvisible char
     if (stream_type_ == TS_STREAM) {