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

Side by Side Diff: chromecast/media/cma/backend/video_pipeline_device.h

Issue 622853002: Chromecast: adds interfaces for hardware layer of CMA pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cma-decrypt-context
Patch Set: damien comments Created 6 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_
6 #define CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "chromecast/media/cma/backend/media_component_device.h"
11
12 namespace gfx {
13 class Size;
14 }
15
16 namespace media {
17 class VideoDecoderConfig;
18 }
19
20 namespace chromecast {
21 namespace media {
22 class DecoderBufferBase;
23
24 // VideoPipelineDevice -
25 //
26 // Notes:
27 // - Like a regular MediaComponentDevice, frames are possibly rendered only
28 // in the kRunning state.
29 // However, the first frame must be rendered regardless of the clock state:
30 // - no synchronization needed to display the first frame,
31 // - the clock rate has no impact on the presentation of the first frame.
32 //
33 class VideoPipelineDevice : public MediaComponentDevice {
34 public:
35 struct VideoClient {
36 VideoClient();
37 ~VideoClient();
38
39 // Invoked each time the natural size is updated.
40 base::Callback<void(const gfx::Size& natural_size)>
41 natural_size_changed_cb;
42 };
43
44 VideoPipelineDevice();
45 virtual ~VideoPipelineDevice();
46
47 // Registers |client| as the video specific event handler.
48 virtual void SetVideoClient(const VideoClient& client) = 0;
49
50 // Provide the video configuration.
51 // Must be called before switching from |kStateUninitialized| to |kStateIdle|.
52 // Afterwards, this can be invoked any time the configuration changes.
53 // Returns true if the configuration is a supported configuration.
54 virtual bool SetConfig(const ::media::VideoDecoderConfig& config) = 0;
55
56 private:
57 DISALLOW_COPY_AND_ASSIGN(VideoPipelineDevice);
58 };
59
60 } // namespace media
61 } // namespace chromecast
62
63 #endif // CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_
OLDNEW
« no previous file with comments | « chromecast/media/cma/backend/media_pipeline_device_params.cc ('k') | chromecast/media/cma/backend/video_pipeline_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698