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

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

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test for streaming case to DownloadRateMonitor Created 9 years, 1 month 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 definitions). Filters 10 // types of filters (see media/base/filters.h for filter definitions). Filters
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Sets the natural size of the video output in pixel units. 56 // Sets the natural size of the video output in pixel units.
57 virtual void SetNaturalVideoSize(const gfx::Size& size) = 0; 57 virtual void SetNaturalVideoSize(const gfx::Size& size) = 0;
58 58
59 // Sets the flag to indicate that we are doing streaming. 59 // Sets the flag to indicate that we are doing streaming.
60 virtual void SetStreaming(bool streaming) = 0; 60 virtual void SetStreaming(bool streaming) = 0;
61 61
62 // Notifies that this filter has ended, typically only called by filter graph 62 // Notifies that this filter has ended, typically only called by filter graph
63 // endpoints such as renderers. 63 // endpoints such as renderers.
64 virtual void NotifyEnded() = 0; 64 virtual void NotifyEnded() = 0;
65 65
66 // Sets the flag to indicate that our media is now loaded. 66 // Sets the flag to indicate the source of the media is local, such as a
67 virtual void SetLoaded(bool loaded) = 0; 67 // local file on disk.
68 // NOTE: The "FromFilter" is unfortunate; it is needed so as not to conflict
69 // with the SetLocalSource method in the Pipeline interface.
70 virtual void SetLocalSourceFromFilter(bool local_source) = 0;
68 71
69 // Sets the flag to indicate current network activity. 72 // Sets the flag to indicate current network activity.
70 virtual void SetNetworkActivity(bool is_downloading_data) = 0; 73 virtual void SetNetworkActivity(bool is_downloading_data) = 0;
71 74
72 // Disable audio renderer by calling OnAudioRendererDisabled() on all 75 // Disable audio renderer by calling OnAudioRendererDisabled() on all
73 // filters. 76 // filters.
74 virtual void DisableAudioRenderer() = 0; 77 virtual void DisableAudioRenderer() = 0;
75 78
76 // Sets the byte offset at which the client is requesting the video. 79 // Sets the byte offset at which the client is requesting the video.
77 virtual void SetCurrentReadPosition(int64 offset) = 0; 80 virtual void SetCurrentReadPosition(int64 offset) = 0;
78 81
79 // Gets the byte offset at which the client is requesting the video. 82 // Gets the byte offset at which the client is requesting the video.
80 virtual int64 GetCurrentReadPosition() = 0; 83 virtual int64 GetCurrentReadPosition() = 0;
81 84
82 protected: 85 protected:
83 virtual ~FilterHost() {} 86 virtual ~FilterHost() {}
84 }; 87 };
85 88
86 } // namespace media 89 } // namespace media
87 90
88 #endif // MEDIA_BASE_FILTER_HOST_H_ 91 #endif // MEDIA_BASE_FILTER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698