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

Side by Side Diff: media/video/video_decode_accelerator.h

Issue 1639963002: AndroidVideoDecodeAccelerator can now render to a SurfaceView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 4 years, 10 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 | « content/common/gpu/media/avda_codec_image.cc ('k') | no next file » | 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) 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_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // A failure occurred at the browser layer or one of its dependencies. 75 // A failure occurred at the browser layer or one of its dependencies.
76 // Examples of such failures include GPU hardware failures, GPU driver 76 // Examples of such failures include GPU hardware failures, GPU driver
77 // failures, GPU library failures, browser programming errors, and so on. 77 // failures, GPU library failures, browser programming errors, and so on.
78 PLATFORM_FAILURE, 78 PLATFORM_FAILURE,
79 // Largest used enum. This should be adjusted when new errors are added. 79 // Largest used enum. This should be adjusted when new errors are added.
80 LARGEST_ERROR_ENUM, 80 LARGEST_ERROR_ENUM,
81 }; 81 };
82 82
83 // Config structure contains parameters required for the VDA initialization. 83 // Config structure contains parameters required for the VDA initialization.
84 struct MEDIA_EXPORT Config { 84 struct MEDIA_EXPORT Config {
85 enum { kNoSurfaceID = -1 };
86
85 Config() = default; 87 Config() = default;
86 Config(VideoCodecProfile profile); 88 Config(VideoCodecProfile profile);
87 Config(const VideoDecoderConfig& video_decoder_config); 89 Config(const VideoDecoderConfig& video_decoder_config);
88 90
89 std::string AsHumanReadableString() const; 91 std::string AsHumanReadableString() const;
90 92
91 // |profile| combines the information about the codec and its profile. 93 // |profile| combines the information about the codec and its profile.
92 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; 94 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN;
93 95
94 // The flag indicating whether the stream is encrypted. 96 // The flag indicating whether the stream is encrypted.
95 bool is_encrypted = false; 97 bool is_encrypted = false;
98
99 // An optional graphics surface that the VDA should render to. For setting
100 // an output SurfaceView on Android. It's only valid when not equal to
101 // |kNoSurfaceID|.
102 int surface_id = kNoSurfaceID;
96 }; 103 };
97 104
98 // Interface for collaborating with picture interface to provide memory for 105 // Interface for collaborating with picture interface to provide memory for
99 // output picture and blitting them. These callbacks will not be made unless 106 // output picture and blitting them. These callbacks will not be made unless
100 // Initialize() has returned successfully. 107 // Initialize() has returned successfully.
101 // This interface is extended by the various layers that relay messages back 108 // This interface is extended by the various layers that relay messages back
102 // to the plugin, through the PPP_VideoDecoder_Dev interface the plugin 109 // to the plugin, through the PPP_VideoDecoder_Dev interface the plugin
103 // implements. 110 // implements.
104 class MEDIA_EXPORT Client { 111 class MEDIA_EXPORT Client {
105 public: 112 public:
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator> 245 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator>
239 // uses "Destroy()" instead of trying to use the destructor. 246 // uses "Destroy()" instead of trying to use the destructor.
240 template <> 247 template <>
241 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { 248 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> {
242 void operator()(media::VideoDecodeAccelerator* vda) const; 249 void operator()(media::VideoDecodeAccelerator* vda) const;
243 }; 250 };
244 251
245 } // namespace std 252 } // namespace std
246 253
247 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 254 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « content/common/gpu/media/avda_codec_image.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698