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

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

Issue 164403: Implemented end-of-stream callback for media::PipelineImpl. (Closed)
Patch Set: Baz Created 11 years, 4 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 | « media/base/filter_host.h ('k') | media/base/mock_filter_host.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-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 // Filters are connected in a strongly typed manner, with downstream filters 5 // Filters are connected in a strongly typed manner, with downstream filters
6 // always reading data from upstream filters. Upstream filters have no clue 6 // always reading data from upstream filters. Upstream filters have no clue
7 // who is actually reading from them, and return the results via callbacks. 7 // who is actually reading from them, and return the results via callbacks.
8 // 8 //
9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer 9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer
10 // DataSource <- Demuxer < 10 // DataSource <- Demuxer <
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 return FILTER_VIDEO_RENDERER; 307 return FILTER_VIDEO_RENDERER;
308 } 308 }
309 309
310 static const char* major_mime_type() { 310 static const char* major_mime_type() {
311 return mime_type::kMajorTypeVideo; 311 return mime_type::kMajorTypeVideo;
312 } 312 }
313 313
314 // Initialize a VideoRenderer with the given VideoDecoder, executing the 314 // Initialize a VideoRenderer with the given VideoDecoder, executing the
315 // callback upon completion. 315 // callback upon completion.
316 virtual void Initialize(VideoDecoder* decoder, FilterCallback* callback) = 0; 316 virtual void Initialize(VideoDecoder* decoder, FilterCallback* callback) = 0;
317
318 // Returns true if this filter has received and processed an end-of-stream
319 // buffer.
320 virtual bool HasEnded() = 0;
317 }; 321 };
318 322
319 323
320 class AudioRenderer : public MediaFilter { 324 class AudioRenderer : public MediaFilter {
321 public: 325 public:
322 static const FilterType filter_type() { 326 static const FilterType filter_type() {
323 return FILTER_AUDIO_RENDERER; 327 return FILTER_AUDIO_RENDERER;
324 } 328 }
325 329
326 static const char* major_mime_type() { 330 static const char* major_mime_type() {
327 return mime_type::kMajorTypeAudio; 331 return mime_type::kMajorTypeAudio;
328 } 332 }
329 333
330 // Initialize a AudioRenderer with the given AudioDecoder, executing the 334 // Initialize a AudioRenderer with the given AudioDecoder, executing the
331 // callback upon completion. 335 // callback upon completion.
332 virtual void Initialize(AudioDecoder* decoder, FilterCallback* callback) = 0; 336 virtual void Initialize(AudioDecoder* decoder, FilterCallback* callback) = 0;
333 337
338 // Returns true if this filter has received and processed an end-of-stream
339 // buffer.
340 virtual bool HasEnded() = 0;
341
334 // Sets the output volume. 342 // Sets the output volume.
335 virtual void SetVolume(float volume) = 0; 343 virtual void SetVolume(float volume) = 0;
336 }; 344 };
337 345
338 } // namespace media 346 } // namespace media
339 347
340 #endif // MEDIA_BASE_FILTERS_H_ 348 #endif // MEDIA_BASE_FILTERS_H_
OLDNEW
« no previous file with comments | « media/base/filter_host.h ('k') | media/base/mock_filter_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698