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

Side by Side Diff: media/filters/ffmpeg_h265_to_annex_b_bitstream_converter.h

Issue 1904213003: Convert //media/filters from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove include 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_FILTERS_FFMPEG_H265_TO_ANNEX_B_BITSTREAM_CONVERTER_H_ 5 #ifndef MEDIA_FILTERS_FFMPEG_H265_TO_ANNEX_B_BITSTREAM_CONVERTER_H_
6 #define MEDIA_FILTERS_FFMPEG_H265_TO_ANNEX_B_BITSTREAM_CONVERTER_H_ 6 #define MEDIA_FILTERS_FFMPEG_H265_TO_ANNEX_B_BITSTREAM_CONVERTER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/media_export.h" 11 #include "media/base/media_export.h"
11 #include "media/filters/ffmpeg_bitstream_converter.h" 12 #include "media/filters/ffmpeg_bitstream_converter.h"
12 #include "media/formats/mp4/hevc.h" 13 #include "media/formats/mp4/hevc.h"
13 14
14 // Forward declarations for FFmpeg datatypes used. 15 // Forward declarations for FFmpeg datatypes used.
15 struct AVCodecContext; 16 struct AVCodecContext;
16 struct AVPacket; 17 struct AVPacket;
17 18
18 namespace media { 19 namespace media {
19 20
20 // Bitstream converter that converts H.265 bitstream based FFmpeg packets into 21 // Bitstream converter that converts H.265 bitstream based FFmpeg packets into
21 // H.265 Annex B bytestream format. 22 // H.265 Annex B bytestream format.
22 class MEDIA_EXPORT FFmpegH265ToAnnexBBitstreamConverter 23 class MEDIA_EXPORT FFmpegH265ToAnnexBBitstreamConverter
23 : public FFmpegBitstreamConverter { 24 : public FFmpegBitstreamConverter {
24 public: 25 public:
25 // The |stream_codec_context| will be used during conversion and should be the 26 // The |stream_codec_context| will be used during conversion and should be the
26 // AVCodecContext for the stream sourcing these packets. A reference to 27 // AVCodecContext for the stream sourcing these packets. A reference to
27 // |stream_codec_context| is retained, so it must outlive this class. 28 // |stream_codec_context| is retained, so it must outlive this class.
28 explicit FFmpegH265ToAnnexBBitstreamConverter( 29 explicit FFmpegH265ToAnnexBBitstreamConverter(
29 AVCodecContext* stream_codec_context); 30 AVCodecContext* stream_codec_context);
30 31
31 ~FFmpegH265ToAnnexBBitstreamConverter() override; 32 ~FFmpegH265ToAnnexBBitstreamConverter() override;
32 33
33 // FFmpegBitstreamConverter implementation. 34 // FFmpegBitstreamConverter implementation.
34 bool ConvertPacket(AVPacket* packet) override; 35 bool ConvertPacket(AVPacket* packet) override;
35 36
36 private: 37 private:
37 scoped_ptr<mp4::HEVCDecoderConfigurationRecord> hevc_config_; 38 std::unique_ptr<mp4::HEVCDecoderConfigurationRecord> hevc_config_;
38 39
39 // Variable to hold a pointer to memory where we can access the global 40 // Variable to hold a pointer to memory where we can access the global
40 // data from the FFmpeg file format's global headers. 41 // data from the FFmpeg file format's global headers.
41 AVCodecContext* stream_codec_context_; 42 AVCodecContext* stream_codec_context_;
42 43
43 DISALLOW_COPY_AND_ASSIGN(FFmpegH265ToAnnexBBitstreamConverter); 44 DISALLOW_COPY_AND_ASSIGN(FFmpegH265ToAnnexBBitstreamConverter);
44 }; 45 };
45 46
46 } // namespace media 47 } // namespace media
47 48
48 #endif // MEDIA_FILTERS_FFMPEG_H265_TO_ANNEX_B_BITSTREAM_CONVERTER_H_ 49 #endif // MEDIA_FILTERS_FFMPEG_H265_TO_ANNEX_B_BITSTREAM_CONVERTER_H_
49 50
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc ('k') | media/filters/ffmpeg_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698