Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Unified Diff: media/base/pipeline_impl.cc

Issue 2158923004: Convert media constants to constexpr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/pipeline_impl.cc
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index f5732214362203da0e45410dd7c6ffdbab0c1abf..acd6b073eb421a0531badc3d15f341984ea7d952 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -93,8 +93,8 @@ class PipelineImpl::RendererWrapper : public DemuxerHost,
PipelineStatistics statistics;
// The media timestamp to return while the pipeline is suspended.
- // Otherwise set to kNoTimestamp().
- base::TimeDelta suspend_timestamp = kNoTimestamp();
+ // Otherwise set to kNoTimestamp.
+ base::TimeDelta suspend_timestamp = kNoTimestamp;
};
// DemuxerHost implementaion.
@@ -298,7 +298,7 @@ void PipelineImpl::RendererWrapper::Suspend() {
{
base::AutoLock auto_lock(shared_state_lock_);
shared_state_.suspend_timestamp = shared_state_.renderer->GetMediaTime();
- DCHECK(shared_state_.suspend_timestamp != kNoTimestamp());
+ DCHECK(shared_state_.suspend_timestamp != kNoTimestamp);
}
// Queue the asynchronous actions required to stop playback. (Matches setup in
@@ -385,7 +385,7 @@ base::TimeDelta PipelineImpl::RendererWrapper::GetMediaTime() const {
DCHECK(main_task_runner_->BelongsToCurrentThread());
base::AutoLock auto_lock(shared_state_lock_);
- if (shared_state_.suspend_timestamp != kNoTimestamp())
+ if (shared_state_.suspend_timestamp != kNoTimestamp)
return shared_state_.suspend_timestamp;
return shared_state_.renderer ? shared_state_.renderer->GetMediaTime()
: base::TimeDelta();
@@ -831,7 +831,7 @@ void PipelineImpl::RendererWrapper::StateTransitionTask(PipelineStatus status) {
shared_state_.renderer->StartPlayingFrom(start_timestamp_);
{
base::AutoLock auto_lock(shared_state_lock_);
- shared_state_.suspend_timestamp = kNoTimestamp();
+ shared_state_.suspend_timestamp = kNoTimestamp;
}
if (text_renderer_)

Powered by Google App Engine
This is Rietveld 408576698