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

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

Issue 2101015: Change MediaFilter::Stop() to accept a callback so that Stop() is asynchronous. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Revert filter changes. Going to make that another patch. Created 10 years, 6 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 | « no previous file | media/base/filters.h » ('j') | media/base/pipeline_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // FilterHost describes an interface for individual filters to access and 5 // FilterHost describes an interface for individual filters to access and
6 // modify global playback information. Every filter is given a filter host 6 // modify global playback information. Every filter is given a filter host
7 // reference as part of initialization. 7 // reference as part of initialization.
8 // 8 //
9 // This interface is intentionally verbose to cover the needs for the different 9 // This interface is intentionally verbose to cover the needs for the different
10 // types of filters (see media/base/filters.h for filter definitionss). Filters 10 // types of filters (see media/base/filters.h for filter definitionss). Filters
11 // typically use parts of the interface that are relevant to their function. 11 // typically use parts of the interface that are relevant to their function.
12 // For example, an audio renderer filter typically calls SetTime as it feeds 12 // For example, an audio renderer filter typically calls SetTime as it feeds
13 // data to the audio hardware. A video renderer filter typically calls GetTime 13 // data to the audio hardware. A video renderer filter typically calls GetTime
14 // to synchronize video with audio. An audio and video decoder would typically 14 // to synchronize video with audio. An audio and video decoder would typically
15 // have no need to call either SetTime or GetTime. 15 // have no need to call either SetTime or GetTime.
16 16
17 #ifndef MEDIA_BASE_FILTER_HOST_H_ 17 #ifndef MEDIA_BASE_FILTER_HOST_H_
18 #define MEDIA_BASE_FILTER_HOST_H_ 18 #define MEDIA_BASE_FILTER_HOST_H_
19 19
20 #include "base/task.h" 20 #include "base/task.h"
21 #include "media/base/filters.h" 21 #include "media/base/filters.h"
22 #include "media/base/pipeline.h" 22 #include "media/base/pipeline.h"
23 23
24 namespace media { 24 namespace media {
25 25
26 class FilterHost { 26 class FilterHost {
27 public: 27 public:
28 // Stops execution of the pipeline due to a fatal error. Do not call this 28 // Stops execution of the pipeline due to a fatal error. Do not call this
29 // method with PIPELINE_OK or PIPELINE_STOPPING (used internally by pipeline). 29 // method with PIPELINE_OK.
30 virtual void SetError(PipelineError error) = 0; 30 virtual void SetError(PipelineError error) = 0;
31 31
32 // Gets the current time in microseconds. 32 // Gets the current time in microseconds.
33 virtual base::TimeDelta GetTime() const = 0; 33 virtual base::TimeDelta GetTime() const = 0;
34 34
35 // Gets the duration in microseconds. 35 // Gets the duration in microseconds.
36 virtual base::TimeDelta GetDuration() const = 0; 36 virtual base::TimeDelta GetDuration() const = 0;
37 37
38 // Updates the current time. Other filters should poll to examine the updated 38 // Updates the current time. Other filters should poll to examine the updated
39 // time. 39 // time.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Gets the byte offset at which the client is requesting the video. 80 // Gets the byte offset at which the client is requesting the video.
81 virtual int64 GetCurrentReadPosition() = 0; 81 virtual int64 GetCurrentReadPosition() = 0;
82 82
83 protected: 83 protected:
84 virtual ~FilterHost() {} 84 virtual ~FilterHost() {}
85 }; 85 };
86 86
87 } // namespace media 87 } // namespace media
88 88
89 #endif // MEDIA_BASE_FILTER_HOST_H_ 89 #endif // MEDIA_BASE_FILTER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/filters.h » ('j') | media/base/pipeline_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698