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

Side by Side Diff: media/base/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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_H_ 5 #ifndef MEDIA_BASE_RENDERER_H_
6 #define MEDIA_BASE_RENDERER_H_ 6 #define MEDIA_BASE_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 18 matching lines...) Expand all
29 // Initializes the Renderer with |demuxer_stream_provider|, executing 29 // Initializes the Renderer with |demuxer_stream_provider|, executing
30 // |init_cb| upon completion. If initialization fails, only |init_cb| (not 30 // |init_cb| upon completion. If initialization fails, only |init_cb| (not
31 // |error_cb|) should be called. |demuxer_stream_provider| must be valid for 31 // |error_cb|) should be called. |demuxer_stream_provider| must be valid for
32 // the lifetime of the Renderer object. |init_cb| must only be run after this 32 // the lifetime of the Renderer object. |init_cb| must only be run after this
33 // method has returned. Firing |init_cb| may result in the immediate 33 // method has returned. Firing |init_cb| may result in the immediate
34 // destruction of the caller, so it must be run only prior to returning. 34 // destruction of the caller, so it must be run only prior to returning.
35 // 35 //
36 // Permanent callbacks: 36 // Permanent callbacks:
37 // - |statistics_cb|: Executed periodically with rendering statistics. 37 // - |statistics_cb|: Executed periodically with rendering statistics.
38 // - |buffering_state_cb|: Executed when buffering state is changed. 38 // - |buffering_state_cb|: Executed when buffering state is changed.
39 // - |natural_size_changed_cb|: Executed when video natural size is changed.
39 // - |ended_cb|: Executed when rendering has reached the end of stream. 40 // - |ended_cb|: Executed when rendering has reached the end of stream.
40 // - |error_cb|: Executed if any error was encountered after initialization. 41 // - |error_cb|: Executed if any error was encountered after initialization.
41 // - |waiting_for_decryption_key_cb|: Executed whenever the key needed to 42 // - |waiting_for_decryption_key_cb|: Executed whenever the key needed to
42 // decrypt the stream is not available. 43 // decrypt the stream is not available.
43 virtual void Initialize( 44 virtual void Initialize(
44 DemuxerStreamProvider* demuxer_stream_provider, 45 DemuxerStreamProvider* demuxer_stream_provider,
45 const PipelineStatusCB& init_cb, 46 const PipelineStatusCB& init_cb,
46 const StatisticsCB& statistics_cb, 47 const StatisticsCB& statistics_cb,
47 const BufferingStateCB& buffering_state_cb, 48 const BufferingStateCB& buffering_state_cb,
49 const NaturalSizeChangedCB& natural_size_changed_cb,
48 const base::Closure& ended_cb, 50 const base::Closure& ended_cb,
49 const PipelineStatusCB& error_cb, 51 const PipelineStatusCB& error_cb,
50 const base::Closure& waiting_for_decryption_key_cb) = 0; 52 const base::Closure& waiting_for_decryption_key_cb) = 0;
51 53
52 // Associates the |cdm_context| with this Renderer for decryption (and 54 // Associates the |cdm_context| with this Renderer for decryption (and
53 // decoding) of media data, then fires |cdm_attached_cb| with the result. 55 // decoding) of media data, then fires |cdm_attached_cb| with the result.
54 virtual void SetCdm(CdmContext* cdm_context, 56 virtual void SetCdm(CdmContext* cdm_context,
55 const CdmAttachedCB& cdm_attached_cb) = 0; 57 const CdmAttachedCB& cdm_attached_cb) = 0;
56 58
57 // The following functions must be called after Initialize(). 59 // The following functions must be called after Initialize().
(...skipping 19 matching lines...) Expand all
77 // Returns whether |this| renders video. 79 // Returns whether |this| renders video.
78 virtual bool HasVideo() = 0; 80 virtual bool HasVideo() = 0;
79 81
80 private: 82 private:
81 DISALLOW_COPY_AND_ASSIGN(Renderer); 83 DISALLOW_COPY_AND_ASSIGN(Renderer);
82 }; 84 };
83 85
84 } // namespace media 86 } // namespace media
85 87
86 #endif // MEDIA_BASE_RENDERER_H_ 88 #endif // MEDIA_BASE_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698