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

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: addressed comments 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 26 matching lines...) Expand all
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.
46 // 46 //
47 // |natural_size_changed_cb| is executed when video natural size changes.
48 //
47 // |ended_cb| is executed when video rendering has reached the end of stream. 49 // |ended_cb| is executed when video rendering has reached the end of stream.
48 // 50 //
49 // |error_cb| is executed if an error was encountered after initialization. 51 // |error_cb| is executed if an error was encountered after initialization.
50 // 52 //
51 // |wall_clock_time_cb| is used to convert media timestamps into wallclock 53 // |wall_clock_time_cb| is used to convert media timestamps into wallclock
52 // timestamps. 54 // timestamps.
53 // 55 //
54 // |waiting_for_decryption_key_cb| is executed whenever the key needed to 56 // |waiting_for_decryption_key_cb| is executed whenever the key needed to
55 // decrypt the stream is not available. 57 // decrypt the stream is not available.
56 virtual void Initialize( 58 virtual void Initialize(
57 DemuxerStream* stream, 59 DemuxerStream* stream,
58 const PipelineStatusCB& init_cb, 60 const PipelineStatusCB& init_cb,
59 CdmContext* cdm_context, 61 CdmContext* cdm_context,
60 const StatisticsCB& statistics_cb, 62 const StatisticsCB& statistics_cb,
61 const BufferingStateCB& buffering_state_cb, 63 const BufferingStateCB& buffering_state_cb,
64 const NaturalSizeChangedCB& natural_size_changed_cb,
62 const base::Closure& ended_cb, 65 const base::Closure& ended_cb,
63 const PipelineStatusCB& error_cb, 66 const PipelineStatusCB& error_cb,
64 const TimeSource::WallClockTimeCB& wall_clock_time_cb, 67 const TimeSource::WallClockTimeCB& wall_clock_time_cb,
65 const base::Closure& waiting_for_decryption_key_cb) = 0; 68 const base::Closure& waiting_for_decryption_key_cb) = 0;
66 69
67 // Discards any video data and stops reading from |stream|, executing 70 // Discards any video data and stops reading from |stream|, executing
68 // |callback| when completed. 71 // |callback| when completed.
69 // 72 //
70 // Clients should expect |buffering_state_cb| to be called with 73 // Clients should expect |buffering_state_cb| to be called with
71 // BUFFERING_HAVE_NOTHING while flushing is in progress. 74 // BUFFERING_HAVE_NOTHING while flushing is in progress.
(...skipping 10 matching lines...) Expand all
82 // |time_progressing| will be false. 85 // |time_progressing| will be false.
83 virtual void OnTimeStateChanged(bool time_progressing) = 0; 86 virtual void OnTimeStateChanged(bool time_progressing) = 0;
84 87
85 private: 88 private:
86 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); 89 DISALLOW_COPY_AND_ASSIGN(VideoRenderer);
87 }; 90 };
88 91
89 } // namespace media 92 } // namespace media
90 93
91 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ 94 #endif // MEDIA_BASE_VIDEO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698