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

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

Issue 10915003: Remove Pipeline::has_{audio,video}_ members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/pipeline.cc » ('j') | media/base/pipeline.cc » ('J')
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 #ifndef MEDIA_BASE_PIPELINE_H_ 5 #ifndef MEDIA_BASE_PIPELINE_H_
6 #define MEDIA_BASE_PIPELINE_H_ 6 #define MEDIA_BASE_PIPELINE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // method was called. 207 // method was called.
208 bool DidLoadingProgress() const; 208 bool DidLoadingProgress() const;
209 209
210 // Gets the current pipeline statistics. 210 // Gets the current pipeline statistics.
211 PipelineStatistics GetStatistics() const; 211 PipelineStatistics GetStatistics() const;
212 212
213 void SetClockForTesting(Clock* clock); 213 void SetClockForTesting(Clock* clock);
214 void SetErrorForTesting(PipelineStatus status); 214 void SetErrorForTesting(PipelineStatus status);
215 215
216 private: 216 private:
217 friend class PipelineTest;
217 FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges); 218 FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges);
218 FRIEND_TEST_ALL_PREFIXES(PipelineTest, DisableAudioRenderer); 219 FRIEND_TEST_ALL_PREFIXES(PipelineTest, DisableAudioRenderer);
219 FRIEND_TEST_ALL_PREFIXES(PipelineTest, DisableAudioRendererDuringInit); 220 FRIEND_TEST_ALL_PREFIXES(PipelineTest, DisableAudioRendererDuringInit);
220 FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback); 221 FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback);
221 FRIEND_TEST_ALL_PREFIXES(PipelineTest, AudioStreamShorterThanVideo); 222 FRIEND_TEST_ALL_PREFIXES(PipelineTest, AudioStreamShorterThanVideo);
222 friend class MediaLog; 223 friend class MediaLog;
223 224
224 // Only allow ourselves to be deleted by reference counting. 225 // Only allow ourselves to be deleted by reference counting.
225 friend class base::RefCountedThreadSafe<Pipeline>; 226 friend class base::RefCountedThreadSafe<Pipeline>;
226 virtual ~Pipeline(); 227 virtual ~Pipeline();
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 // for an update of the clock greater than or equal to the elapsed time to 472 // for an update of the clock greater than or equal to the elapsed time to
472 // start the clock. 473 // start the clock.
473 bool waiting_for_clock_update_; 474 bool waiting_for_clock_update_;
474 475
475 // Status of the pipeline. Initialized to PIPELINE_OK which indicates that 476 // Status of the pipeline. Initialized to PIPELINE_OK which indicates that
476 // the pipeline is operating correctly. Any other value indicates that the 477 // the pipeline is operating correctly. Any other value indicates that the
477 // pipeline is stopped or is stopping. Clients can call the Stop() method to 478 // pipeline is stopped or is stopping. Clients can call the Stop() method to
478 // reset the pipeline state, and restore this to PIPELINE_OK. 479 // reset the pipeline state, and restore this to PIPELINE_OK.
479 PipelineStatus status_; 480 PipelineStatus status_;
480 481
481 // Whether the media contains rendered audio and video streams.
482 // TODO(fischman,scherkus): replace these with checks for
483 // {audio,video}_decoder_ once extraction of {Audio,Video}Decoder from the
484 // Filter heirarchy is done.
485 bool has_audio_;
486 bool has_video_;
487
488 // The following data members are only accessed by tasks posted to 482 // The following data members are only accessed by tasks posted to
489 // |message_loop_|. 483 // |message_loop_|.
490 484
491 // Member that tracks the current state. 485 // Member that tracks the current state.
492 State state_; 486 State state_;
493 487
494 // For kSeeking we need to remember where we're seeking between filter 488 // For kSeeking we need to remember where we're seeking between filter
495 // replies. 489 // replies.
496 base::TimeDelta seek_timestamp_; 490 base::TimeDelta seek_timestamp_;
497 491
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 base::Time creation_time_; 533 base::Time creation_time_;
540 534
541 scoped_ptr<SerialRunner> pending_callbacks_; 535 scoped_ptr<SerialRunner> pending_callbacks_;
542 536
543 DISALLOW_COPY_AND_ASSIGN(Pipeline); 537 DISALLOW_COPY_AND_ASSIGN(Pipeline);
544 }; 538 };
545 539
546 } // namespace media 540 } // namespace media
547 541
548 #endif // MEDIA_BASE_PIPELINE_H_ 542 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/pipeline.cc » ('j') | media/base/pipeline.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698