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

Unified Diff: media/formats/webm/webm_webvtt_parser.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/webm/webm_webvtt_parser.h
diff --git a/media/formats/webm/webm_webvtt_parser.h b/media/formats/webm/webm_webvtt_parser.h
index 12bbbd4dd29749bc57ac45a713835dc10391c02c..75c38644cc5db26dcfc6cc1537852bd4720d7f39 100644
--- a/media/formats/webm/webm_webvtt_parser.h
+++ b/media/formats/webm/webm_webvtt_parser.h
@@ -5,9 +5,11 @@
#ifndef MEDIA_FORMATS_WEBM_WEBM_WEBVTT_PARSER_H_
#define MEDIA_FORMATS_WEBM_WEBM_WEBVTT_PARSER_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "media/base/media_export.h"
namespace media {
@@ -15,7 +17,8 @@ namespace media {
class MEDIA_EXPORT WebMWebVTTParser {
public:
// Utility function to parse the WebVTT cue from a byte stream.
- static void Parse(const uint8* payload, int payload_size,
+ static void Parse(const uint8_t* payload,
+ int payload_size,
std::string* id,
std::string* settings,
std::string* content);
@@ -23,13 +26,13 @@ class MEDIA_EXPORT WebMWebVTTParser {
private:
// The payload is the embedded WebVTT cue, stored in a WebM block.
// The parser treats this as a UTF-8 byte stream.
- WebMWebVTTParser(const uint8* payload, int payload_size);
+ WebMWebVTTParser(const uint8_t* payload, int payload_size);
// Parse the cue identifier, settings, and content from the stream.
void Parse(std::string* id, std::string* settings, std::string* content);
// Remove a byte from the stream, advancing the stream pointer.
// Returns true if a character was returned; false means "end of stream".
- bool GetByte(uint8* byte);
+ bool GetByte(uint8_t* byte);
// Backup the stream pointer.
void UngetByte();
@@ -38,8 +41,8 @@ class MEDIA_EXPORT WebMWebVTTParser {
void ParseLine(std::string* line);
// Represents the portion of the stream that has not been consumed yet.
- const uint8* ptr_;
- const uint8* const ptr_end_;
+ const uint8_t* ptr_;
+ const uint8_t* const ptr_end_;
DISALLOW_COPY_AND_ASSIGN(WebMWebVTTParser);
};

Powered by Google App Engine
This is Rietveld 408576698