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

Side by Side Diff: media/base/pipeline.cc

Issue 819203002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 unified diff | Download patch
« no previous file with comments | « media/base/mac/avfoundation_glue.mm ('k') | media/cast/test/cast_benchmarks.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/pipeline.h" 5 #include "media/base/pipeline.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 if ((duration_ - media_time).InMilliseconds() > 250) 678 if ((duration_ - media_time).InMilliseconds() > 250)
679 SetDuration(media_time); 679 SetDuration(media_time);
680 680
681 DCHECK_EQ(status_, PIPELINE_OK); 681 DCHECK_EQ(status_, PIPELINE_OK);
682 ended_cb_.Run(); 682 ended_cb_.Run();
683 } 683 }
684 684
685 scoped_ptr<TextRenderer> Pipeline::CreateTextRenderer() { 685 scoped_ptr<TextRenderer> Pipeline::CreateTextRenderer() {
686 DCHECK(task_runner_->BelongsToCurrentThread()); 686 DCHECK(task_runner_->BelongsToCurrentThread());
687 687
688 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 688 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
689 if (!cmd_line->HasSwitch(switches::kEnableInbandTextTracks)) 689 if (!cmd_line->HasSwitch(switches::kEnableInbandTextTracks))
690 return scoped_ptr<media::TextRenderer>(); 690 return scoped_ptr<media::TextRenderer>();
691 691
692 return scoped_ptr<media::TextRenderer>(new media::TextRenderer( 692 return scoped_ptr<media::TextRenderer>(new media::TextRenderer(
693 task_runner_, 693 task_runner_,
694 base::Bind(&Pipeline::OnAddTextTrack, weak_factory_.GetWeakPtr()))); 694 base::Bind(&Pipeline::OnAddTextTrack, weak_factory_.GetWeakPtr())));
695 } 695 }
696 696
697 void Pipeline::AddTextStreamTask(DemuxerStream* text_stream, 697 void Pipeline::AddTextStreamTask(DemuxerStream* text_stream,
698 const TextTrackConfig& config) { 698 const TextTrackConfig& config) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 metadata_cb_.Run(metadata); 758 metadata_cb_.Run(metadata);
759 } 759 }
760 760
761 void Pipeline::BufferingStateChanged(BufferingState new_buffering_state) { 761 void Pipeline::BufferingStateChanged(BufferingState new_buffering_state) {
762 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") "; 762 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") ";
763 DCHECK(task_runner_->BelongsToCurrentThread()); 763 DCHECK(task_runner_->BelongsToCurrentThread());
764 buffering_state_cb_.Run(new_buffering_state); 764 buffering_state_cb_.Run(new_buffering_state);
765 } 765 }
766 766
767 } // namespace media 767 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mac/avfoundation_glue.mm ('k') | media/cast/test/cast_benchmarks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698