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);
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: {
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: {
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) {