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

Side by Side Diff: media/formats/mp4/avc.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 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_FORMATS_MP4_AVC_H_ 5 #ifndef MEDIA_FORMATS_MP4_AVC_H_
6 #define MEDIA_FORMATS_MP4_AVC_H_ 6 #define MEDIA_FORMATS_MP4_AVC_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 16
17 namespace media { 17 namespace media {
18 18
19 struct SubsampleEntry; 19 struct SubsampleEntry;
20 20
21 namespace mp4 { 21 namespace mp4 {
22 22
23 struct AVCDecoderConfigurationRecord; 23 struct AVCDecoderConfigurationRecord;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const uint8_t* ptr); 62 const uint8_t* ptr);
63 }; 63 };
64 64
65 // AVCBitstreamConverter converts AVC/H.264 bitstream from MP4 container format 65 // AVCBitstreamConverter converts AVC/H.264 bitstream from MP4 container format
66 // with embedded NALU lengths into AnnexB bitstream format (described in ISO/IEC 66 // with embedded NALU lengths into AnnexB bitstream format (described in ISO/IEC
67 // 14496-10) with 4-byte start codes. It also knows how to handle CENC-encrypted 67 // 14496-10) with 4-byte start codes. It also knows how to handle CENC-encrypted
68 // streams and adjusts subsample data for those streams while converting. 68 // streams and adjusts subsample data for those streams while converting.
69 class AVCBitstreamConverter : public BitstreamConverter { 69 class AVCBitstreamConverter : public BitstreamConverter {
70 public: 70 public:
71 explicit AVCBitstreamConverter( 71 explicit AVCBitstreamConverter(
72 scoped_ptr<AVCDecoderConfigurationRecord> avc_config); 72 std::unique_ptr<AVCDecoderConfigurationRecord> avc_config);
73 73
74 // BitstreamConverter interface 74 // BitstreamConverter interface
75 bool ConvertFrame(std::vector<uint8_t>* frame_buf, 75 bool ConvertFrame(std::vector<uint8_t>* frame_buf,
76 bool is_keyframe, 76 bool is_keyframe,
77 std::vector<SubsampleEntry>* subsamples) const override; 77 std::vector<SubsampleEntry>* subsamples) const override;
78 78
79 private: 79 private:
80 ~AVCBitstreamConverter() override; 80 ~AVCBitstreamConverter() override;
81 scoped_ptr<AVCDecoderConfigurationRecord> avc_config_; 81 std::unique_ptr<AVCDecoderConfigurationRecord> avc_config_;
82 }; 82 };
83 83
84 } // namespace mp4 84 } // namespace mp4
85 } // namespace media 85 } // namespace media
86 86
87 #endif // MEDIA_FORMATS_MP4_AVC_H_ 87 #endif // MEDIA_FORMATS_MP4_AVC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698