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

Unified Diff: talk/media/base/videoframe.h

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/media/base/videoengine_unittest.h ('k') | talk/media/base/videoframe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/base/videoframe.h
diff --git a/talk/media/base/videoframe.h b/talk/media/base/videoframe.h
index 7199dccf6dda06a6b68e79d3094b263140f6aa10..68367200bbc8b6ea6091e8662e8d563fbe7851c8 100644
--- a/talk/media/base/videoframe.h
+++ b/talk/media/base/videoframe.h
@@ -49,12 +49,12 @@ class VideoFrame {
// |dh| is destination height, like |dw|, but must be a positive number.
// Returns whether the function succeeded or failed.
- virtual bool Reset(uint32 fourcc,
+ virtual bool Reset(uint32_t fourcc,
int w,
int h,
int dw,
int dh,
- uint8* sample,
+ uint8_t* sample,
size_t sample_size,
size_t pixel_width,
size_t pixel_height,
@@ -63,12 +63,12 @@ class VideoFrame {
bool apply_rotation) = 0;
// TODO(guoweis): Remove this once all external implementations are updated.
- virtual bool Reset(uint32 fourcc,
+ virtual bool Reset(uint32_t fourcc,
int w,
int h,
int dw,
int dh,
- uint8* sample,
+ uint8_t* sample,
size_t sample_size,
size_t pixel_width,
size_t pixel_height,
@@ -88,16 +88,16 @@ class VideoFrame {
size_t GetChromaHeight() const { return (GetHeight() + 1) / 2; }
size_t GetChromaSize() const { return GetUPitch() * GetChromaHeight(); }
// These can return NULL if the object is not backed by a buffer.
- virtual const uint8 *GetYPlane() const = 0;
- virtual const uint8 *GetUPlane() const = 0;
- virtual const uint8 *GetVPlane() const = 0;
- virtual uint8 *GetYPlane() = 0;
- virtual uint8 *GetUPlane() = 0;
- virtual uint8 *GetVPlane() = 0;
+ virtual const uint8_t* GetYPlane() const = 0;
+ virtual const uint8_t* GetUPlane() const = 0;
+ virtual const uint8_t* GetVPlane() const = 0;
+ virtual uint8_t* GetYPlane() = 0;
+ virtual uint8_t* GetUPlane() = 0;
+ virtual uint8_t* GetVPlane() = 0;
- virtual int32 GetYPitch() const = 0;
- virtual int32 GetUPitch() const = 0;
- virtual int32 GetVPitch() const = 0;
+ virtual int32_t GetYPitch() const = 0;
+ virtual int32_t GetUPitch() const = 0;
+ virtual int32_t GetVPitch() const = 0;
// Returns the handle of the underlying video frame. This is used when the
// frame is backed by a texture. The object should be destroyed when it is no
@@ -144,15 +144,18 @@ class VideoFrame {
// sufficient size. Returns the frame's actual size, regardless of whether
// it was written or not (like snprintf). If there is insufficient space,
// nothing is written.
- virtual size_t CopyToBuffer(uint8 *buffer, size_t size) const;
+ virtual size_t CopyToBuffer(uint8_t* buffer, size_t size) const;
// Writes the frame into the given planes, stretched to the given width and
// height. The parameter "interpolate" controls whether to interpolate or just
// take the nearest-point. The parameter "crop" controls whether to crop this
// frame to the aspect ratio of the given dimensions before stretching.
- virtual bool CopyToPlanes(
- uint8* dst_y, uint8* dst_u, uint8* dst_v,
- int32 dst_pitch_y, int32 dst_pitch_u, int32 dst_pitch_v) const;
+ virtual bool CopyToPlanes(uint8_t* dst_y,
+ uint8_t* dst_u,
+ uint8_t* dst_v,
+ int32_t dst_pitch_y,
+ int32_t dst_pitch_u,
+ int32_t dst_pitch_v) const;
// Writes the frame into the target VideoFrame.
virtual void CopyToFrame(VideoFrame* target) const;
@@ -172,16 +175,25 @@ class VideoFrame {
// Returns the frame's actual size, regardless of whether it was written or
// not (like snprintf). Parameters size and stride_rgb are in units of bytes.
// If there is insufficient space, nothing is written.
- virtual size_t ConvertToRgbBuffer(uint32 to_fourcc, uint8 *buffer,
- size_t size, int stride_rgb) const;
+ virtual size_t ConvertToRgbBuffer(uint32_t to_fourcc,
+ uint8_t* buffer,
+ size_t size,
+ int stride_rgb) const;
// Writes the frame into the given planes, stretched to the given width and
// height. The parameter "interpolate" controls whether to interpolate or just
// take the nearest-point. The parameter "crop" controls whether to crop this
// frame to the aspect ratio of the given dimensions before stretching.
- virtual void StretchToPlanes(
- uint8 *y, uint8 *u, uint8 *v, int32 pitchY, int32 pitchU, int32 pitchV,
- size_t width, size_t height, bool interpolate, bool crop) const;
+ virtual void StretchToPlanes(uint8_t* y,
+ uint8_t* u,
+ uint8_t* v,
+ int32_t pitchY,
+ int32_t pitchU,
+ int32_t pitchV,
+ size_t width,
+ size_t height,
+ bool interpolate,
+ bool crop) const;
// Writes the frame into the target VideoFrame, stretched to the size of that
// frame. The parameter "interpolate" controls whether to interpolate or just
@@ -201,7 +213,10 @@ class VideoFrame {
virtual bool SetToBlack();
// Tests if sample is valid. Returns true if valid.
- static bool Validate(uint32 fourcc, int w, int h, const uint8 *sample,
+ static bool Validate(uint32_t fourcc,
+ int w,
+ int h,
+ const uint8_t* sample,
size_t sample_size);
// Size of an I420 image of given dimensions when stored as a frame buffer.
« no previous file with comments | « talk/media/base/videoengine_unittest.h ('k') | talk/media/base/videoframe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698