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

Unified Diff: media/formats/mp4/avc.h

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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/formats/mp4/avc.h
diff --git a/media/formats/mp4/avc.h b/media/formats/mp4/avc.h
index a774ddd1b7320aaae000bfa885a2b56dadb23420..19858b9ced1ed15529d9daa1b5d47c4bb9603739 100644
--- a/media/formats/mp4/avc.h
+++ b/media/formats/mp4/avc.h
@@ -7,7 +7,6 @@
#include <vector>
-#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "media/base/media_export.h"
#include "media/formats/mp4/bitstream_converter.h"
@@ -23,7 +22,7 @@ struct AVCDecoderConfigurationRecord;
class MEDIA_EXPORT AVC {
public:
static bool ConvertFrameToAnnexB(int length_size,
- std::vector<uint8>* buffer,
+ std::vector<uint8_t>* buffer,
std::vector<SubsampleEntry>* subsamples);
// Inserts the SPS & PPS data from |avc_config| into |buffer|.
@@ -33,12 +32,12 @@ class MEDIA_EXPORT AVC {
// Returns true if the param sets were successfully inserted.
static bool InsertParamSetsAnnexB(
const AVCDecoderConfigurationRecord& avc_config,
- std::vector<uint8>* buffer,
+ std::vector<uint8_t>* buffer,
std::vector<SubsampleEntry>* subsamples);
static bool ConvertConfigToAnnexB(
const AVCDecoderConfigurationRecord& avc_config,
- std::vector<uint8>* buffer);
+ std::vector<uint8_t>* buffer);
// Verifies that the contents of |buffer| conform to
// Section 7.4.1.2.3 of ISO/IEC 14496-10.
@@ -47,16 +46,17 @@ class MEDIA_EXPORT AVC {
// Returns true if |buffer| contains conformant Annex B data
// TODO(acolwell): Remove the std::vector version when we can use,
// C++11's std::vector<T>::data() method.
- static bool IsValidAnnexB(const std::vector<uint8>& buffer,
+ static bool IsValidAnnexB(const std::vector<uint8_t>& buffer,
const std::vector<SubsampleEntry>& subsamples);
- static bool IsValidAnnexB(const uint8* buffer, size_t size,
+ static bool IsValidAnnexB(const uint8_t* buffer,
+ size_t size,
const std::vector<SubsampleEntry>& subsamples);
// Given a |buffer| and |subsamples| information and |pts| pointer into the
// |buffer| finds the index of the subsample |ptr| is pointing into.
- static int FindSubsampleIndex(const std::vector<uint8>& buffer,
+ static int FindSubsampleIndex(const std::vector<uint8_t>& buffer,
const std::vector<SubsampleEntry>* subsamples,
- const uint8* ptr);
+ const uint8_t* ptr);
};
// AVCBitstreamConverter converts AVC/H.264 bitstream from MP4 container format
@@ -69,9 +69,10 @@ class AVCBitstreamConverter : public BitstreamConverter {
scoped_ptr<AVCDecoderConfigurationRecord> avc_config);
// BitstreamConverter interface
- bool ConvertFrame(std::vector<uint8>* frame_buf,
+ bool ConvertFrame(std::vector<uint8_t>* frame_buf,
bool is_keyframe,
std::vector<SubsampleEntry>* subsamples) const override;
+
private:
~AVCBitstreamConverter() override;
scoped_ptr<AVCDecoderConfigurationRecord> avc_config_;

Powered by Google App Engine
This is Rietveld 408576698