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

Side by Side Diff: media/formats/mp4/hevc.h

Issue 1874413003: Convert media/formats to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_FORMATS_MP4_HEVC_H_ 5 #ifndef MEDIA_FORMATS_MP4_HEVC_H_
6 #define MEDIA_FORMATS_MP4_HEVC_H_ 6 #define MEDIA_FORMATS_MP4_HEVC_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/memory/scoped_ptr.h"
14 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
15 #include "media/formats/mp4/bitstream_converter.h" 15 #include "media/formats/mp4/bitstream_converter.h"
16 #include "media/formats/mp4/box_definitions.h" 16 #include "media/formats/mp4/box_definitions.h"
17 17
18 namespace media { 18 namespace media {
19 19
20 struct SubsampleEntry; 20 struct SubsampleEntry;
21 21
22 namespace mp4 { 22 namespace mp4 {
23 23
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 static bool IsValidAnnexB(const std::vector<uint8_t>& buffer, 86 static bool IsValidAnnexB(const std::vector<uint8_t>& buffer,
87 const std::vector<SubsampleEntry>& subsamples); 87 const std::vector<SubsampleEntry>& subsamples);
88 static bool IsValidAnnexB(const uint8_t* buffer, 88 static bool IsValidAnnexB(const uint8_t* buffer,
89 size_t size, 89 size_t size,
90 const std::vector<SubsampleEntry>& subsamples); 90 const std::vector<SubsampleEntry>& subsamples);
91 }; 91 };
92 92
93 class HEVCBitstreamConverter : public BitstreamConverter { 93 class HEVCBitstreamConverter : public BitstreamConverter {
94 public: 94 public:
95 explicit HEVCBitstreamConverter( 95 explicit HEVCBitstreamConverter(
96 scoped_ptr<HEVCDecoderConfigurationRecord> hevc_config); 96 std::unique_ptr<HEVCDecoderConfigurationRecord> hevc_config);
97 97
98 // BitstreamConverter interface 98 // BitstreamConverter interface
99 bool ConvertFrame(std::vector<uint8_t>* frame_buf, 99 bool ConvertFrame(std::vector<uint8_t>* frame_buf,
100 bool is_keyframe, 100 bool is_keyframe,
101 std::vector<SubsampleEntry>* subsamples) const override; 101 std::vector<SubsampleEntry>* subsamples) const override;
102 102
103 private: 103 private:
104 ~HEVCBitstreamConverter() override; 104 ~HEVCBitstreamConverter() override;
105 scoped_ptr<HEVCDecoderConfigurationRecord> hevc_config_; 105 std::unique_ptr<HEVCDecoderConfigurationRecord> hevc_config_;
106 }; 106 };
107 107
108 } // namespace mp4 108 } // namespace mp4
109 } // namespace media 109 } // namespace media
110 110
111 #endif // MEDIA_FORMATS_MP4_HEVC_H_ 111 #endif // MEDIA_FORMATS_MP4_HEVC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698