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

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

Issue 10796074: Move VideoRenderer out of Filter heirarchy. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // FilterHost describes an interface for individual filters to access and
6 // modify global playback information. Every filter is given a filter host
7 // reference as part of initialization.
8 //
9 // This interface is intentionally verbose to cover the needs for the different
10 // types of filters (see media/base/filters.h for filter definitions). Filters
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
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
15 // have no need to call either SetTime or GetTime.
16
17 #ifndef MEDIA_BASE_FILTER_HOST_H_
18 #define MEDIA_BASE_FILTER_HOST_H_
19
20 #include "base/time.h"
21 #include "media/base/media_export.h"
22 #include "media/base/pipeline_status.h"
23 #include "ui/gfx/size.h"
24
25 namespace media {
26
27 class MEDIA_EXPORT FilterHost {
28 public:
29 // Stops execution of the pipeline due to a fatal error. Do not call this
30 // method with PIPELINE_OK.
31 virtual void SetError(PipelineStatus error) = 0;
32
33 // Gets the current time.
34 virtual base::TimeDelta GetTime() const = 0;
35
36 // Gets the duration.
37 virtual base::TimeDelta GetDuration() const = 0;
38
39 // Sets the natural size of the video output in pixel units.
40 virtual void SetNaturalVideoSize(const gfx::Size& size) = 0;
41
42 // Notifies that this filter has ended, typically only called by filter graph
43 // endpoints such as renderers.
44 virtual void NotifyEnded() = 0;
45
46 protected:
47 virtual ~FilterHost() {}
48 };
49
50 } // namespace media
51
52 #endif // MEDIA_BASE_FILTER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698