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

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

Issue 1873513003: Add video-rendering to mojo media pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor cleanup Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef MEDIA_BASE_VIDEO_RENDERER_H_ 5 #ifndef MEDIA_BASE_VIDEO_RENDERER_H_
6 #define MEDIA_BASE_VIDEO_RENDERER_H_ 6 #define MEDIA_BASE_VIDEO_RENDERER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 24 matching lines...) Expand all
35 // completion. If initialization fails, only |init_cb| (not |error_cb|) will 35 // completion. If initialization fails, only |init_cb| (not |error_cb|) will
36 // be called. 36 // be called.
37 // 37 //
38 // |cdm_context| can be used to handle encrypted streams. May be null if the 38 // |cdm_context| can be used to handle encrypted streams. May be null if the
39 // stream is not encrypted. 39 // stream is not encrypted.
40 // 40 //
41 // |statistics_cb| is executed periodically with video rendering stats, such 41 // |statistics_cb| is executed periodically with video rendering stats, such
42 // as dropped frames. 42 // as dropped frames.
43 // 43 //
44 // |buffering_state_cb| is executed when video rendering has either run out of 44 // |buffering_state_cb| is executed when video rendering has either run out of
45 // data or has enough data to continue playback. 45 // data or has enough data to continue playback.
xhwang 2016/04/12 19:40:37 ditto about comment
alokp 2016/04/19 00:16:07 Done.
46 // 46 //
47 // |ended_cb| is executed when video rendering has reached the end of stream. 47 // |ended_cb| is executed when video rendering has reached the end of stream.
48 // 48 //
49 // |error_cb| is executed if an error was encountered after initialization. 49 // |error_cb| is executed if an error was encountered after initialization.
50 // 50 //
51 // |wall_clock_time_cb| is used to convert media timestamps into wallclock 51 // |wall_clock_time_cb| is used to convert media timestamps into wallclock
52 // timestamps. 52 // timestamps.
53 // 53 //
54 // |waiting_for_decryption_key_cb| is executed whenever the key needed to 54 // |waiting_for_decryption_key_cb| is executed whenever the key needed to
55 // decrypt the stream is not available. 55 // decrypt the stream is not available.
56 virtual void Initialize( 56 virtual void Initialize(
57 DemuxerStream* stream, 57 DemuxerStream* stream,
58 const PipelineStatusCB& init_cb, 58 const PipelineStatusCB& init_cb,
59 CdmContext* cdm_context, 59 CdmContext* cdm_context,
60 const StatisticsCB& statistics_cb, 60 const StatisticsCB& statistics_cb,
61 const BufferingStateCB& buffering_state_cb, 61 const BufferingStateCB& buffering_state_cb,
62 const NaturalSizeChangedCB& natural_size_changed_cb,
62 const base::Closure& ended_cb, 63 const base::Closure& ended_cb,
63 const PipelineStatusCB& error_cb, 64 const PipelineStatusCB& error_cb,
64 const TimeSource::WallClockTimeCB& wall_clock_time_cb, 65 const TimeSource::WallClockTimeCB& wall_clock_time_cb,
65 const base::Closure& waiting_for_decryption_key_cb) = 0; 66 const base::Closure& waiting_for_decryption_key_cb) = 0;
66 67
67 // Discards any video data and stops reading from |stream|, executing 68 // Discards any video data and stops reading from |stream|, executing
68 // |callback| when completed. 69 // |callback| when completed.
69 // 70 //
70 // Clients should expect |buffering_state_cb| to be called with 71 // Clients should expect |buffering_state_cb| to be called with
71 // BUFFERING_HAVE_NOTHING while flushing is in progress. 72 // BUFFERING_HAVE_NOTHING while flushing is in progress.
(...skipping 10 matching lines...) Expand all
82 // |time_progressing| will be false. 83 // |time_progressing| will be false.
83 virtual void OnTimeStateChanged(bool time_progressing) = 0; 84 virtual void OnTimeStateChanged(bool time_progressing) = 0;
84 85
85 private: 86 private:
86 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); 87 DISALLOW_COPY_AND_ASSIGN(VideoRenderer);
87 }; 88 };
88 89
89 } // namespace media 90 } // namespace media
90 91
91 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ 92 #endif // MEDIA_BASE_VIDEO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698