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

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

Issue 18546: Implementation of Pipeline and FilterHost interfaces. This is a large change... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « media/base/factory.h ('k') | media/base/filter_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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
(...skipping 25 matching lines...) Expand all
36 // it is acceptable for filters to use the returned pointer until their 36 // it is acceptable for filters to use the returned pointer until their
37 // Stop method has been called. 37 // Stop method has been called.
38 virtual const PipelineStatus* GetPipelineStatus() const = 0; 38 virtual const PipelineStatus* GetPipelineStatus() const = 0;
39 39
40 // Registers a callback to receive global clock update notifications. The 40 // Registers a callback to receive global clock update notifications. The
41 // callback will be called repeatedly and filters do not need to re-register 41 // callback will be called repeatedly and filters do not need to re-register
42 // after each invocation of the callback. To remove the callback, filters 42 // after each invocation of the callback. To remove the callback, filters
43 // may call this method passing NULL for the callback argument. 43 // may call this method passing NULL for the callback argument.
44 // 44 //
45 // Callback arguments: 45 // Callback arguments:
46 // int64 the new pipeline time, in microseconds 46 // base::TimeDelta - the new pipeline time, in microseconds.
47 virtual void SetTimeUpdateCallback(Callback1<int64>::Type* callback) = 0; 47 virtual void SetTimeUpdateCallback(Callback1<base::TimeDelta>::Type* cb) = 0;
48 48
49 // Filters must call this method to indicate that their initialization is 49 // Filters must call this method to indicate that their initialization is
50 // complete. They may call this from within their Initialize() method or may 50 // complete. They may call this from within their Initialize() method or may
51 // choose call it after processing some data. 51 // choose call it after processing some data.
52 virtual void InitializationComplete() = 0; 52 virtual void InitializationComplete() = 0;
53 53
54 // Posts a task to be executed asynchronously on the pipeline's thread. 54 // Posts a task to be executed asynchronously on the pipeline's thread.
55 virtual void PostTask(Task* task) = 0; 55 virtual void PostTask(Task* task) = 0;
56 56
57 // Stops execution of the pipeline due to a fatal error. 57 // Stops execution of the pipeline due to a fatal error.
58 virtual void Error(PipelineError error) = 0; 58 virtual void Error(PipelineError error) = 0;
59 59
60 // Sets the current time. Any filters that have registered a callback through 60 // Sets the current time. Any filters that have registered a callback through
61 // the SetTimeUpdateCallback method will be notified of the change. 61 // the SetTimeUpdateCallback method will be notified of the change.
62 virtual void SetTime(int64 time) = 0; 62 virtual void SetTime(base::TimeDelta time) = 0;
63 63
64 // Get the duration of the media in microseconds. If the duration has not 64 // Get the duration of the media in microseconds. If the duration has not
65 // been determined yet, then returns 0. 65 // been determined yet, then returns 0.
66 virtual void SetDuration(int64 duration) = 0; 66 virtual void SetDuration(base::TimeDelta duration) = 0;
67 67
68 // Set the approximate amount of playable data buffered so far in micro- 68 // Set the approximate amount of playable data buffered so far in micro-
69 // seconds. 69 // seconds.
70 virtual void SetBufferedTime(int64 buffered_time) = 0; 70 virtual void SetBufferedTime(base::TimeDelta buffered_time) = 0;
71 71
72 // Set the total size of the media file. 72 // Set the total size of the media file.
73 virtual void SetTotalBytes(int64 total_bytes) = 0; 73 virtual void SetTotalBytes(int64 total_bytes) = 0;
74 74
75 // Sets the total number of bytes that are buffered on the client and ready to 75 // Sets the total number of bytes that are buffered on the client and ready to
76 // be played. 76 // be played.
77 virtual void SetBufferedBytes(int64 buffered_bytes) = 0; 77 virtual void SetBufferedBytes(int64 buffered_bytes) = 0;
78 78
79 // Sets the size of the video output in pixel units. 79 // Sets the size of the video output in pixel units.
80 virtual void SetVideoSize(size_t width, size_t height) = 0; 80 virtual void SetVideoSize(size_t width, size_t height) = 0;
81 81
82 protected: 82 protected:
83 virtual ~FilterHost() = 0; 83 virtual ~FilterHost() {}
84 }; 84 };
85 85
86 } // namespace media 86 } // namespace media
87 87
88 #endif // MEDIA_BASE_FILTER_HOST_H_ 88 #endif // MEDIA_BASE_FILTER_HOST_H_
OLDNEW
« no previous file with comments | « media/base/factory.h ('k') | media/base/filter_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698