| Index: media/base/android/legacy_media_source_player.cc
|
| diff --git a/media/base/android/media_source_player.cc b/media/base/android/legacy_media_source_player.cc
|
| similarity index 85%
|
| copy from media/base/android/media_source_player.cc
|
| copy to media/base/android/legacy_media_source_player.cc
|
| index 52ea7db11af5e240a43ecd86a598cb99d6320db6..dc6f8fbee0a85ccce076e8e98ce38c04eff4e4ab 100644
|
| --- a/media/base/android/media_source_player.cc
|
| +++ b/media/base/android/legacy_media_source_player.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "media/base/android/media_source_player.h"
|
| +#include "media/base/android/legacy_media_source_player.h"
|
|
|
| #include <limits>
|
|
|
| @@ -22,7 +22,7 @@
|
|
|
| namespace media {
|
|
|
| -MediaSourcePlayer::MediaSourcePlayer(
|
| +LegacyMediaSourcePlayer::LegacyMediaSourcePlayer(
|
| int player_id,
|
| MediaPlayerManager* manager,
|
| const RequestMediaResourcesCB& request_media_resources_cb,
|
| @@ -50,21 +50,21 @@ MediaSourcePlayer::MediaSourcePlayer(
|
| base::Bind(&DemuxerAndroid::RequestDemuxerData,
|
| base::Unretained(demuxer_.get()),
|
| DemuxerStream::AUDIO),
|
| - base::Bind(&MediaSourcePlayer::OnDemuxerConfigsChanged,
|
| + base::Bind(&LegacyMediaSourcePlayer::OnDemuxerConfigsChanged,
|
| weak_factory_.GetWeakPtr())));
|
| video_decoder_job_.reset(new VideoDecoderJob(
|
| base::Bind(&DemuxerAndroid::RequestDemuxerData,
|
| base::Unretained(demuxer_.get()),
|
| DemuxerStream::VIDEO),
|
| base::Bind(request_media_resources_cb_, player_id),
|
| - base::Bind(&MediaSourcePlayer::OnDemuxerConfigsChanged,
|
| + base::Bind(&LegacyMediaSourcePlayer::OnDemuxerConfigsChanged,
|
| weak_factory_.GetWeakPtr())));
|
| demuxer_->Initialize(this);
|
| interpolator_.SetUpperBound(base::TimeDelta());
|
| weak_this_ = weak_factory_.GetWeakPtr();
|
| }
|
|
|
| -MediaSourcePlayer::~MediaSourcePlayer() {
|
| +LegacyMediaSourcePlayer::~LegacyMediaSourcePlayer() {
|
| Release();
|
| DCHECK_EQ(!drm_bridge_, !cdm_registration_id_);
|
| if (drm_bridge_) {
|
| @@ -73,7 +73,7 @@ MediaSourcePlayer::~MediaSourcePlayer() {
|
| }
|
| }
|
|
|
| -void MediaSourcePlayer::SetVideoSurface(gfx::ScopedJavaSurface surface) {
|
| +void LegacyMediaSourcePlayer::SetVideoSurface(gfx::ScopedJavaSurface surface) {
|
| DVLOG(1) << __FUNCTION__;
|
| if (!video_decoder_job_->SetVideoSurface(surface.Pass()))
|
| return;
|
| @@ -81,7 +81,7 @@ void MediaSourcePlayer::SetVideoSurface(gfx::ScopedJavaSurface surface) {
|
| RetryDecoderCreation(false, true);
|
| }
|
|
|
| -void MediaSourcePlayer::ScheduleSeekEventAndStopDecoding(
|
| +void LegacyMediaSourcePlayer::ScheduleSeekEventAndStopDecoding(
|
| base::TimeDelta seek_time) {
|
| DVLOG(1) << __FUNCTION__ << "(" << seek_time.InSecondsF() << ")";
|
| DCHECK(!IsEventPending(SEEK_EVENT_PENDING));
|
| @@ -99,7 +99,7 @@ void MediaSourcePlayer::ScheduleSeekEventAndStopDecoding(
|
| ProcessPendingEvents();
|
| }
|
|
|
| -void MediaSourcePlayer::BrowserSeekToCurrentTime() {
|
| +void LegacyMediaSourcePlayer::BrowserSeekToCurrentTime() {
|
| DVLOG(1) << __FUNCTION__;
|
|
|
| DCHECK(!IsEventPending(SEEK_EVENT_PENDING));
|
| @@ -107,7 +107,7 @@ void MediaSourcePlayer::BrowserSeekToCurrentTime() {
|
| ScheduleSeekEventAndStopDecoding(GetCurrentTime());
|
| }
|
|
|
| -bool MediaSourcePlayer::Seekable() {
|
| +bool LegacyMediaSourcePlayer::Seekable() {
|
| // If the duration TimeDelta, converted to milliseconds from microseconds,
|
| // is >= 2^31, then the media is assumed to be unbounded and unseekable.
|
| // 2^31 is the bound due to java player using 32-bit integer for time
|
| @@ -116,7 +116,7 @@ bool MediaSourcePlayer::Seekable() {
|
| base::TimeDelta::FromMilliseconds(std::numeric_limits<int32>::max());
|
| }
|
|
|
| -void MediaSourcePlayer::Start() {
|
| +void LegacyMediaSourcePlayer::Start() {
|
| DVLOG(1) << __FUNCTION__;
|
|
|
| playing_ = true;
|
| @@ -124,7 +124,7 @@ void MediaSourcePlayer::Start() {
|
| StartInternal();
|
| }
|
|
|
| -void MediaSourcePlayer::Pause(bool is_media_related_action) {
|
| +void LegacyMediaSourcePlayer::Pause(bool is_media_related_action) {
|
| DVLOG(1) << __FUNCTION__;
|
|
|
| // Since decoder jobs have their own thread, decoding is not fully paused
|
| @@ -136,19 +136,19 @@ void MediaSourcePlayer::Pause(bool is_media_related_action) {
|
| start_time_ticks_ = base::TimeTicks();
|
| }
|
|
|
| -bool MediaSourcePlayer::IsPlaying() {
|
| +bool LegacyMediaSourcePlayer::IsPlaying() {
|
| return playing_;
|
| }
|
|
|
| -int MediaSourcePlayer::GetVideoWidth() {
|
| +int LegacyMediaSourcePlayer::GetVideoWidth() {
|
| return video_decoder_job_->output_width();
|
| }
|
|
|
| -int MediaSourcePlayer::GetVideoHeight() {
|
| +int LegacyMediaSourcePlayer::GetVideoHeight() {
|
| return video_decoder_job_->output_height();
|
| }
|
|
|
| -void MediaSourcePlayer::SeekTo(base::TimeDelta timestamp) {
|
| +void LegacyMediaSourcePlayer::SeekTo(base::TimeDelta timestamp) {
|
| DVLOG(1) << __FUNCTION__ << "(" << timestamp.InSecondsF() << ")";
|
|
|
| if (IsEventPending(SEEK_EVENT_PENDING)) {
|
| @@ -167,15 +167,15 @@ void MediaSourcePlayer::SeekTo(base::TimeDelta timestamp) {
|
| ScheduleSeekEventAndStopDecoding(timestamp);
|
| }
|
|
|
| -base::TimeDelta MediaSourcePlayer::GetCurrentTime() {
|
| +base::TimeDelta LegacyMediaSourcePlayer::GetCurrentTime() {
|
| return std::min(interpolator_.GetInterpolatedTime(), duration_);
|
| }
|
|
|
| -base::TimeDelta MediaSourcePlayer::GetDuration() {
|
| +base::TimeDelta LegacyMediaSourcePlayer::GetDuration() {
|
| return duration_;
|
| }
|
|
|
| -void MediaSourcePlayer::Release() {
|
| +void LegacyMediaSourcePlayer::Release() {
|
| DVLOG(1) << __FUNCTION__;
|
|
|
| audio_decoder_job_->ReleaseDecoderResources();
|
| @@ -190,27 +190,27 @@ void MediaSourcePlayer::Release() {
|
| DetachListener();
|
| }
|
|
|
| -void MediaSourcePlayer::SetVolume(double volume) {
|
| +void LegacyMediaSourcePlayer::SetVolume(double volume) {
|
| audio_decoder_job_->SetVolume(volume);
|
| }
|
|
|
| -bool MediaSourcePlayer::CanPause() {
|
| +bool LegacyMediaSourcePlayer::CanPause() {
|
| return Seekable();
|
| }
|
|
|
| -bool MediaSourcePlayer::CanSeekForward() {
|
| +bool LegacyMediaSourcePlayer::CanSeekForward() {
|
| return Seekable();
|
| }
|
|
|
| -bool MediaSourcePlayer::CanSeekBackward() {
|
| +bool LegacyMediaSourcePlayer::CanSeekBackward() {
|
| return Seekable();
|
| }
|
|
|
| -bool MediaSourcePlayer::IsPlayerReady() {
|
| +bool LegacyMediaSourcePlayer::IsPlayerReady() {
|
| return audio_decoder_job_ || video_decoder_job_;
|
| }
|
|
|
| -void MediaSourcePlayer::StartInternal() {
|
| +void LegacyMediaSourcePlayer::StartInternal() {
|
| DVLOG(1) << __FUNCTION__;
|
| // If there are pending events, wait for them finish.
|
| if (pending_event_ != NO_EVENT_PENDING)
|
| @@ -227,7 +227,7 @@ void MediaSourcePlayer::StartInternal() {
|
| ProcessPendingEvents();
|
| }
|
|
|
| -void MediaSourcePlayer::OnDemuxerConfigsAvailable(
|
| +void LegacyMediaSourcePlayer::OnDemuxerConfigsAvailable(
|
| const DemuxerConfigs& configs) {
|
| DVLOG(1) << __FUNCTION__;
|
| DCHECK(!HasAudio() && !HasVideo());
|
| @@ -239,7 +239,7 @@ void MediaSourcePlayer::OnDemuxerConfigsAvailable(
|
| OnDemuxerConfigsChanged();
|
| }
|
|
|
| -void MediaSourcePlayer::OnDemuxerDataAvailable(const DemuxerData& data) {
|
| +void LegacyMediaSourcePlayer::OnDemuxerDataAvailable(const DemuxerData& data) {
|
| DVLOG(1) << __FUNCTION__ << "(" << data.type << ")";
|
| DCHECK_LT(0u, data.access_units.size());
|
| CHECK_GE(1u, data.demuxer_configs.size());
|
| @@ -250,11 +250,12 @@ void MediaSourcePlayer::OnDemuxerDataAvailable(const DemuxerData& data) {
|
| video_decoder_job_->OnDataReceived(data);
|
| }
|
|
|
| -void MediaSourcePlayer::OnDemuxerDurationChanged(base::TimeDelta duration) {
|
| +void LegacyMediaSourcePlayer::OnDemuxerDurationChanged(
|
| + base::TimeDelta duration) {
|
| duration_ = duration;
|
| }
|
|
|
| -void MediaSourcePlayer::OnMediaCryptoReady() {
|
| +void LegacyMediaSourcePlayer::OnMediaCryptoReady() {
|
| DCHECK(!drm_bridge_->GetMediaCrypto().is_null());
|
| drm_bridge_->SetMediaCryptoReadyCB(base::Closure());
|
|
|
| @@ -262,7 +263,7 @@ void MediaSourcePlayer::OnMediaCryptoReady() {
|
| RetryDecoderCreation(true, true);
|
| }
|
|
|
| -void MediaSourcePlayer::SetCdm(BrowserCdm* cdm) {
|
| +void LegacyMediaSourcePlayer::SetCdm(BrowserCdm* cdm) {
|
| // Currently we don't support DRM change during the middle of playback, even
|
| // if the player is paused.
|
| // TODO(qinmin): support DRM change after playback has started.
|
| @@ -281,15 +282,15 @@ void MediaSourcePlayer::SetCdm(BrowserCdm* cdm) {
|
| drm_bridge_ = static_cast<MediaDrmBridge*>(cdm);
|
|
|
| cdm_registration_id_ = drm_bridge_->RegisterPlayer(
|
| - base::Bind(&MediaSourcePlayer::OnKeyAdded, weak_this_),
|
| - base::Bind(&MediaSourcePlayer::OnCdmUnset, weak_this_));
|
| + base::Bind(&LegacyMediaSourcePlayer::OnKeyAdded, weak_this_),
|
| + base::Bind(&LegacyMediaSourcePlayer::OnCdmUnset, weak_this_));
|
|
|
| audio_decoder_job_->SetDrmBridge(drm_bridge_);
|
| video_decoder_job_->SetDrmBridge(drm_bridge_);
|
|
|
| if (drm_bridge_->GetMediaCrypto().is_null()) {
|
| drm_bridge_->SetMediaCryptoReadyCB(
|
| - base::Bind(&MediaSourcePlayer::OnMediaCryptoReady, weak_this_));
|
| + base::Bind(&LegacyMediaSourcePlayer::OnMediaCryptoReady, weak_this_));
|
| return;
|
| }
|
|
|
| @@ -297,7 +298,7 @@ void MediaSourcePlayer::SetCdm(BrowserCdm* cdm) {
|
| RetryDecoderCreation(true, true);
|
| }
|
|
|
| -void MediaSourcePlayer::OnDemuxerSeekDone(
|
| +void LegacyMediaSourcePlayer::OnDemuxerSeekDone(
|
| base::TimeDelta actual_browser_seek_time) {
|
| DVLOG(1) << __FUNCTION__;
|
|
|
| @@ -348,7 +349,7 @@ void MediaSourcePlayer::OnDemuxerSeekDone(
|
| ProcessPendingEvents();
|
| }
|
|
|
| -void MediaSourcePlayer::UpdateTimestamps(
|
| +void LegacyMediaSourcePlayer::UpdateTimestamps(
|
| base::TimeDelta current_presentation_timestamp,
|
| base::TimeDelta max_presentation_timestamp) {
|
| interpolator_.SetBounds(current_presentation_timestamp,
|
| @@ -358,7 +359,7 @@ void MediaSourcePlayer::UpdateTimestamps(
|
| base::TimeTicks::Now());
|
| }
|
|
|
| -void MediaSourcePlayer::ProcessPendingEvents() {
|
| +void LegacyMediaSourcePlayer::ProcessPendingEvents() {
|
| DVLOG(1) << __FUNCTION__ << " : 0x" << std::hex << pending_event_;
|
| // Wait for all the decoding jobs to finish before processing pending tasks.
|
| if (video_decoder_job_->is_decoding()) {
|
| @@ -405,7 +406,8 @@ void MediaSourcePlayer::ProcessPendingEvents() {
|
|
|
| SetPendingEvent(PREFETCH_DONE_EVENT_PENDING);
|
| base::Closure barrier = BarrierClosure(
|
| - count, base::Bind(&MediaSourcePlayer::OnPrefetchDone, weak_this_));
|
| + count,
|
| + base::Bind(&LegacyMediaSourcePlayer::OnPrefetchDone, weak_this_));
|
|
|
| if (!AudioFinished())
|
| audio_decoder_job_->Prefetch(barrier);
|
| @@ -424,7 +426,7 @@ void MediaSourcePlayer::ProcessPendingEvents() {
|
| StartInternal();
|
| }
|
|
|
| -void MediaSourcePlayer::MediaDecoderCallback(
|
| +void LegacyMediaSourcePlayer::MediaDecoderCallback(
|
| bool is_audio, MediaCodecStatus status,
|
| base::TimeDelta current_presentation_timestamp,
|
| base::TimeDelta max_presentation_timestamp) {
|
| @@ -433,13 +435,13 @@ void MediaSourcePlayer::MediaDecoderCallback(
|
| // TODO(xhwang): Drop IntToString() when http://crbug.com/303899 is fixed.
|
| if (is_audio) {
|
| TRACE_EVENT_ASYNC_END1("media",
|
| - "MediaSourcePlayer::DecodeMoreAudio",
|
| + "LegacyMediaSourcePlayer::DecodeMoreAudio",
|
| audio_decoder_job_.get(),
|
| "MediaCodecStatus",
|
| base::IntToString(status));
|
| } else {
|
| TRACE_EVENT_ASYNC_END1("media",
|
| - "MediaSourcePlayer::DecodeMoreVideo",
|
| + "LegacyMediaSourcePlayer::DecodeMoreVideo",
|
| video_decoder_job_.get(),
|
| "MediaCodecStatus",
|
| base::IntToString(status));
|
| @@ -568,13 +570,13 @@ void MediaSourcePlayer::MediaDecoderCallback(
|
| DecodeMoreVideo();
|
| }
|
|
|
| -bool MediaSourcePlayer::IsPrerollFinished(bool is_audio) const {
|
| +bool LegacyMediaSourcePlayer::IsPrerollFinished(bool is_audio) const {
|
| if (is_audio)
|
| return !HasAudio() || !audio_decoder_job_->prerolling();
|
| return !HasVideo() || !video_decoder_job_->prerolling();
|
| }
|
|
|
| -void MediaSourcePlayer::DecodeMoreAudio() {
|
| +void LegacyMediaSourcePlayer::DecodeMoreAudio() {
|
| DVLOG(1) << __FUNCTION__;
|
| DCHECK(!audio_decoder_job_->is_decoding());
|
| DCHECK(!AudioFinished());
|
| @@ -582,11 +584,13 @@ void MediaSourcePlayer::DecodeMoreAudio() {
|
| MediaDecoderJob::MediaDecoderJobStatus status = audio_decoder_job_->Decode(
|
| start_time_ticks_,
|
| start_presentation_timestamp_,
|
| - base::Bind(&MediaSourcePlayer::MediaDecoderCallback, weak_this_, true));
|
| + base::Bind(&LegacyMediaSourcePlayer::MediaDecoderCallback,
|
| + weak_this_, true));
|
|
|
| switch (status) {
|
| case MediaDecoderJob::STATUS_SUCCESS:
|
| - TRACE_EVENT_ASYNC_BEGIN0("media", "MediaSourcePlayer::DecodeMoreAudio",
|
| + TRACE_EVENT_ASYNC_BEGIN0("media",
|
| + "LegacyMediaSourcePlayer::DecodeMoreAudio",
|
| audio_decoder_job_.get());
|
| break;
|
| case MediaDecoderJob::STATUS_KEY_FRAME_REQUIRED:
|
| @@ -600,7 +604,7 @@ void MediaSourcePlayer::DecodeMoreAudio() {
|
| }
|
| }
|
|
|
| -void MediaSourcePlayer::DecodeMoreVideo() {
|
| +void LegacyMediaSourcePlayer::DecodeMoreVideo() {
|
| DVLOG(1) << __FUNCTION__;
|
| DCHECK(!video_decoder_job_->is_decoding());
|
| DCHECK(!VideoFinished());
|
| @@ -608,12 +612,13 @@ void MediaSourcePlayer::DecodeMoreVideo() {
|
| MediaDecoderJob::MediaDecoderJobStatus status = video_decoder_job_->Decode(
|
| start_time_ticks_,
|
| start_presentation_timestamp_,
|
| - base::Bind(&MediaSourcePlayer::MediaDecoderCallback, weak_this_,
|
| + base::Bind(&LegacyMediaSourcePlayer::MediaDecoderCallback, weak_this_,
|
| false));
|
|
|
| switch (status) {
|
| case MediaDecoderJob::STATUS_SUCCESS:
|
| - TRACE_EVENT_ASYNC_BEGIN0("media", "MediaSourcePlayer::DecodeMoreVideo",
|
| + TRACE_EVENT_ASYNC_BEGIN0("media",
|
| + "LegacyMediaSourcePlayer::DecodeMoreVideo",
|
| video_decoder_job_.get());
|
| break;
|
| case MediaDecoderJob::STATUS_KEY_FRAME_REQUIRED:
|
| @@ -627,7 +632,7 @@ void MediaSourcePlayer::DecodeMoreVideo() {
|
| }
|
| }
|
|
|
| -void MediaSourcePlayer::PlaybackCompleted(bool is_audio) {
|
| +void LegacyMediaSourcePlayer::PlaybackCompleted(bool is_audio) {
|
| DVLOG(1) << __FUNCTION__ << "(" << is_audio << ")";
|
|
|
| if (AudioFinished() && VideoFinished()) {
|
| @@ -637,30 +642,30 @@ void MediaSourcePlayer::PlaybackCompleted(bool is_audio) {
|
| }
|
| }
|
|
|
| -void MediaSourcePlayer::ClearDecodingData() {
|
| +void LegacyMediaSourcePlayer::ClearDecodingData() {
|
| DVLOG(1) << __FUNCTION__;
|
| audio_decoder_job_->Flush();
|
| video_decoder_job_->Flush();
|
| start_time_ticks_ = base::TimeTicks();
|
| }
|
|
|
| -bool MediaSourcePlayer::HasVideo() const {
|
| +bool LegacyMediaSourcePlayer::HasVideo() const {
|
| return video_decoder_job_->HasStream();
|
| }
|
|
|
| -bool MediaSourcePlayer::HasAudio() const {
|
| +bool LegacyMediaSourcePlayer::HasAudio() const {
|
| return audio_decoder_job_->HasStream();
|
| }
|
|
|
| -bool MediaSourcePlayer::AudioFinished() {
|
| +bool LegacyMediaSourcePlayer::AudioFinished() {
|
| return audio_decoder_job_->OutputEOSReached() || !HasAudio();
|
| }
|
|
|
| -bool MediaSourcePlayer::VideoFinished() {
|
| +bool LegacyMediaSourcePlayer::VideoFinished() {
|
| return video_decoder_job_->OutputEOSReached() || !HasVideo();
|
| }
|
|
|
| -void MediaSourcePlayer::OnDecoderStarved() {
|
| +void LegacyMediaSourcePlayer::OnDecoderStarved() {
|
| DVLOG(1) << __FUNCTION__;
|
|
|
| if (HasAudio()) {
|
| @@ -674,7 +679,7 @@ void MediaSourcePlayer::OnDecoderStarved() {
|
| ProcessPendingEvents();
|
| }
|
|
|
| -void MediaSourcePlayer::StartStarvationCallback(
|
| +void LegacyMediaSourcePlayer::StartStarvationCallback(
|
| base::TimeDelta current_presentation_timestamp,
|
| base::TimeDelta max_presentation_timestamp) {
|
| // 20ms was chosen because it is the typical size of a compressed audio frame.
|
| @@ -701,12 +706,12 @@ void MediaSourcePlayer::StartStarvationCallback(
|
| timeout = std::max(timeout, kMinStarvationTimeout);
|
|
|
| decoder_starvation_callback_.Reset(
|
| - base::Bind(&MediaSourcePlayer::OnDecoderStarved, weak_this_));
|
| + base::Bind(&LegacyMediaSourcePlayer::OnDecoderStarved, weak_this_));
|
| base::MessageLoop::current()->PostDelayedTask(
|
| FROM_HERE, decoder_starvation_callback_.callback(), timeout);
|
| }
|
|
|
| -void MediaSourcePlayer::OnPrefetchDone() {
|
| +void LegacyMediaSourcePlayer::OnPrefetchDone() {
|
| DVLOG(1) << __FUNCTION__;
|
| DCHECK(!audio_decoder_job_->is_decoding());
|
| DCHECK(!video_decoder_job_->is_decoding());
|
| @@ -743,12 +748,12 @@ void MediaSourcePlayer::OnPrefetchDone() {
|
| DecodeMoreVideo();
|
| }
|
|
|
| -void MediaSourcePlayer::OnDemuxerConfigsChanged() {
|
| +void LegacyMediaSourcePlayer::OnDemuxerConfigsChanged() {
|
| manager()->OnMediaMetadataChanged(
|
| player_id(), duration_, GetVideoWidth(), GetVideoHeight(), true);
|
| }
|
|
|
| -const char* MediaSourcePlayer::GetEventName(PendingEventFlags event) {
|
| +const char* LegacyMediaSourcePlayer::GetEventName(PendingEventFlags event) {
|
| // Please keep this in sync with PendingEventFlags.
|
| static const char* kPendingEventNames[] = {
|
| "PREFETCH_DONE",
|
| @@ -766,11 +771,11 @@ const char* MediaSourcePlayer::GetEventName(PendingEventFlags event) {
|
| return "UNKNOWN";
|
| }
|
|
|
| -bool MediaSourcePlayer::IsEventPending(PendingEventFlags event) const {
|
| +bool LegacyMediaSourcePlayer::IsEventPending(PendingEventFlags event) const {
|
| return pending_event_ & event;
|
| }
|
|
|
| -void MediaSourcePlayer::SetPendingEvent(PendingEventFlags event) {
|
| +void LegacyMediaSourcePlayer::SetPendingEvent(PendingEventFlags event) {
|
| DVLOG(1) << __FUNCTION__ << "(" << GetEventName(event) << ")";
|
| DCHECK_NE(event, NO_EVENT_PENDING);
|
| DCHECK(!IsEventPending(event));
|
| @@ -778,7 +783,7 @@ void MediaSourcePlayer::SetPendingEvent(PendingEventFlags event) {
|
| pending_event_ |= event;
|
| }
|
|
|
| -void MediaSourcePlayer::ClearPendingEvent(PendingEventFlags event) {
|
| +void LegacyMediaSourcePlayer::ClearPendingEvent(PendingEventFlags event) {
|
| DVLOG(1) << __FUNCTION__ << "(" << GetEventName(event) << ")";
|
| DCHECK_NE(event, NO_EVENT_PENDING);
|
| DCHECK(IsEventPending(event)) << GetEventName(event);
|
| @@ -786,7 +791,7 @@ void MediaSourcePlayer::ClearPendingEvent(PendingEventFlags event) {
|
| pending_event_ &= ~event;
|
| }
|
|
|
| -void MediaSourcePlayer::RetryDecoderCreation(bool audio, bool video) {
|
| +void LegacyMediaSourcePlayer::RetryDecoderCreation(bool audio, bool video) {
|
| if (audio)
|
| is_waiting_for_audio_decoder_ = false;
|
| if (video)
|
| @@ -795,7 +800,7 @@ void MediaSourcePlayer::RetryDecoderCreation(bool audio, bool video) {
|
| ProcessPendingEvents();
|
| }
|
|
|
| -void MediaSourcePlayer::OnKeyAdded() {
|
| +void LegacyMediaSourcePlayer::OnKeyAdded() {
|
| DVLOG(1) << __FUNCTION__;
|
|
|
| if (is_waiting_for_key_) {
|
| @@ -812,7 +817,7 @@ void MediaSourcePlayer::OnKeyAdded() {
|
| }
|
| }
|
|
|
| -void MediaSourcePlayer::ResumePlaybackAfterKeyAdded() {
|
| +void LegacyMediaSourcePlayer::ResumePlaybackAfterKeyAdded() {
|
| DVLOG(1) << __FUNCTION__;
|
| DCHECK(is_waiting_for_key_ || key_added_while_decode_pending_);
|
|
|
| @@ -825,7 +830,7 @@ void MediaSourcePlayer::ResumePlaybackAfterKeyAdded() {
|
| StartInternal();
|
| }
|
|
|
| -void MediaSourcePlayer::OnCdmUnset() {
|
| +void LegacyMediaSourcePlayer::OnCdmUnset() {
|
| DVLOG(1) << __FUNCTION__;
|
| DCHECK(drm_bridge_);
|
| // TODO(xhwang): Currently this is only called during teardown. Support full
|
|
|