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

Side by Side Diff: webrtc/video_decoder.h

Issue 1749103003: Replace scoped_ptr with unique_ptr in webrtc/common_video/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up6
Patch Set: Created 4 years, 9 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 | « webrtc/test/testsupport/metrics/video_metrics.cc ('k') | webrtc/video_encoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_VIDEO_DECODER_H_ 11 #ifndef WEBRTC_VIDEO_DECODER_H_
12 #define WEBRTC_VIDEO_DECODER_H_ 12 #define WEBRTC_VIDEO_DECODER_H_
13 13
14 #include <memory>
14 #include <string> 15 #include <string>
15 #include <vector> 16 #include <vector>
16 17
17 #include "webrtc/common_types.h" 18 #include "webrtc/common_types.h"
18 #include "webrtc/typedefs.h" 19 #include "webrtc/typedefs.h"
19 #include "webrtc/video_frame.h" 20 #include "webrtc/video_frame.h"
20 21
21 namespace webrtc { 22 namespace webrtc {
22 23
23 class RTPFragmentationHeader; 24 class RTPFragmentationHeader;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 110
110 private: 111 private:
111 bool InitFallbackDecoder(); 112 bool InitFallbackDecoder();
112 113
113 const DecoderType decoder_type_; 114 const DecoderType decoder_type_;
114 VideoDecoder* const decoder_; 115 VideoDecoder* const decoder_;
115 116
116 VideoCodec codec_settings_; 117 VideoCodec codec_settings_;
117 int32_t number_of_cores_; 118 int32_t number_of_cores_;
118 std::string fallback_implementation_name_; 119 std::string fallback_implementation_name_;
119 rtc::scoped_ptr<VideoDecoder> fallback_decoder_; 120 std::unique_ptr<VideoDecoder> fallback_decoder_;
120 DecodedImageCallback* callback_; 121 DecodedImageCallback* callback_;
121 }; 122 };
122 123
123 // Video decoder class to be used for unknown codecs. Doesn't support decoding 124 // Video decoder class to be used for unknown codecs. Doesn't support decoding
124 // but logs messages to LS_ERROR. 125 // but logs messages to LS_ERROR.
125 class NullVideoDecoder : public VideoDecoder { 126 class NullVideoDecoder : public VideoDecoder {
126 public: 127 public:
127 NullVideoDecoder(); 128 NullVideoDecoder();
128 129
129 int32_t InitDecode(const VideoCodec* codec_settings, 130 int32_t InitDecode(const VideoCodec* codec_settings,
130 int32_t number_of_cores) override; 131 int32_t number_of_cores) override;
131 132
132 int32_t Decode(const EncodedImage& input_image, 133 int32_t Decode(const EncodedImage& input_image,
133 bool missing_frames, 134 bool missing_frames,
134 const RTPFragmentationHeader* fragmentation, 135 const RTPFragmentationHeader* fragmentation,
135 const CodecSpecificInfo* codec_specific_info, 136 const CodecSpecificInfo* codec_specific_info,
136 int64_t render_time_ms) override; 137 int64_t render_time_ms) override;
137 138
138 int32_t RegisterDecodeCompleteCallback( 139 int32_t RegisterDecodeCompleteCallback(
139 DecodedImageCallback* callback) override; 140 DecodedImageCallback* callback) override;
140 141
141 int32_t Release() override; 142 int32_t Release() override;
142 143
143 const char* ImplementationName() const override; 144 const char* ImplementationName() const override;
144 }; 145 };
145 146
146 } // namespace webrtc 147 } // namespace webrtc
147 148
148 #endif // WEBRTC_VIDEO_DECODER_H_ 149 #endif // WEBRTC_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « webrtc/test/testsupport/metrics/video_metrics.cc ('k') | webrtc/video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698