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

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: Rebase ToT Created 9 years 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Set the total size of the media file. 49 // Set the total size of the media file.
50 virtual void SetTotalBytes(int64 total_bytes) = 0; 50 virtual void SetTotalBytes(int64 total_bytes) = 0;
51 51
52 // Sets the total number of bytes that are buffered on the client and ready to 52 // Sets the total number of bytes that are buffered on the client and ready to
53 // be played. 53 // be played.
54 virtual void SetBufferedBytes(int64 buffered_bytes) = 0; 54 virtual void SetBufferedBytes(int64 buffered_bytes) = 0;
55 55
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.
60 virtual void SetStreaming(bool streaming) = 0;
61
62 // Notifies that this filter has ended, typically only called by filter graph 59 // Notifies that this filter has ended, typically only called by filter graph
63 // endpoints such as renderers. 60 // endpoints such as renderers.
64 virtual void NotifyEnded() = 0; 61 virtual void NotifyEnded() = 0;
65 62
66 // Sets the flag to indicate that our media is now loaded.
67 virtual void SetLoaded(bool loaded) = 0;
68
69 // Sets the flag to indicate current network activity. 63 // Sets the flag to indicate current network activity.
70 virtual void SetNetworkActivity(bool is_downloading_data) = 0; 64 virtual void SetNetworkActivity(bool is_downloading_data) = 0;
71 65
72 // Disable audio renderer by calling OnAudioRendererDisabled() on all 66 // Disable audio renderer by calling OnAudioRendererDisabled() on all
73 // filters. 67 // filters.
74 virtual void DisableAudioRenderer() = 0; 68 virtual void DisableAudioRenderer() = 0;
75 69
76 // Sets the byte offset at which the client is requesting the video. 70 // Sets the byte offset at which the client is requesting the video.
77 virtual void SetCurrentReadPosition(int64 offset) = 0; 71 virtual void SetCurrentReadPosition(int64 offset) = 0;
78 72
79 // Gets the byte offset at which the client is requesting the video. 73 // Gets the byte offset at which the client is requesting the video.
80 virtual int64 GetCurrentReadPosition() = 0; 74 virtual int64 GetCurrentReadPosition() = 0;
81 75
82 protected: 76 protected:
83 virtual ~FilterHost() {} 77 virtual ~FilterHost() {}
84 }; 78 };
85 79
86 } // namespace media 80 } // namespace media
87 81
88 #endif // MEDIA_BASE_FILTER_HOST_H_ 82 #endif // MEDIA_BASE_FILTER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698