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

Unified Diff: media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.h

Issue 691233002: Added aac bitstream converter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Figured it out Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.h
diff --git a/media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.h b/media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.h
index 1ad0a4890d169a0422ab089a54a1a795310badc3..14bd40b587734a33c9cf086e7e25aa287f1fd05f 100644
--- a/media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.h
+++ b/media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.h
@@ -6,6 +6,8 @@
#define MEDIA_FILTERS_FFMPEG_H264_TO_ANNEX_B_BITSTREAM_CONVERTER_H_
#include "base/basictypes.h"
+#include "media/base/media_export.h"
+#include "media/filters/ffmpeg_bitstream_converter.h"
#include "media/filters/h264_to_annex_b_bitstream_converter.h"
// Forward declarations for FFmpeg datatypes used.
@@ -16,14 +18,18 @@ namespace media {
// Bitstream converter that converts H.264 bitstream based FFmpeg packets into
// H.264 Annex B bytestream format.
-class MEDIA_EXPORT FFmpegH264ToAnnexBBitstreamConverter {
+class MEDIA_EXPORT FFmpegH264ToAnnexBBitstreamConverter
+ : public FFmpegBitstreamConverter {
public:
- // The |stream_context| will be used during conversion and should be the
+ // The |stream_codec_context| will be used during conversion and should be the
// AVCodecContext for the stream sourcing these packets. A reference to
- // |stream_context| is retained, so it must outlive this class.
- explicit FFmpegH264ToAnnexBBitstreamConverter(AVCodecContext* stream_context);
- ~FFmpegH264ToAnnexBBitstreamConverter();
+ // |stream_codec_context| is retained, so it must outlive this class.
+ explicit FFmpegH264ToAnnexBBitstreamConverter(
+ AVCodecContext* stream_codec_context);
+ ~FFmpegH264ToAnnexBBitstreamConverter() override;
+
+ // FFmpegBitstreamConverter implementation.
// Converts |packet| to H.264 Annex B bytestream format. This conversion is
// on single NAL unit basis which is contained within the |packet| with the
// exception of the first packet which is prepended with the AVC decoder
@@ -42,7 +48,7 @@ class MEDIA_EXPORT FFmpegH264ToAnnexBBitstreamConverter {
//
// Returns false if conversion failed. In this case, the |packet| will not
// be changed.
- bool ConvertPacket(AVPacket* packet);
+ bool ConvertPacket(AVPacket* packet) override;
private:
// Actual converter class.
@@ -53,7 +59,7 @@ class MEDIA_EXPORT FFmpegH264ToAnnexBBitstreamConverter {
// Variable to hold a pointer to memory where we can access the global
// data from the FFmpeg file format's global headers.
- AVCodecContext* stream_context_;
+ AVCodecContext* stream_codec_context_;
DISALLOW_COPY_AND_ASSIGN(FFmpegH264ToAnnexBBitstreamConverter);
};

Powered by Google App Engine
This is Rietveld 408576698