cricket::VideoFrame int64 to int64_t.

Needed for successful compile of ios arm64.

BUG=3898
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/30359004

Patch from Zeke Chin <tkchin@webrtc.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7817 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2014-12-05 09:42:57 +00:00
parent 9b5467e88d
commit 599e299b9d
7 changed files with 73 additions and 67 deletions

View File

@ -48,8 +48,8 @@ class VideoFrame {
virtual ~VideoFrame() {}
virtual bool InitToBlack(int w, int h, size_t pixel_width,
size_t pixel_height, int64 elapsed_time,
int64 time_stamp) = 0;
size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp) = 0;
// Creates a frame from a raw sample with FourCC |format| and size |w| x |h|.
// |h| can be negative indicating a vertically flipped image.
// |dw| is destination width; can be less than |w| if cropping is desired.
@ -57,8 +57,8 @@ class VideoFrame {
// Returns whether the function succeeded or failed.
virtual bool Reset(uint32 fourcc, int w, int h, int dw, int dh, uint8 *sample,
size_t sample_size, size_t pixel_width,
size_t pixel_height, int64 elapsed_time, int64 time_stamp,
int rotation) = 0;
size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp, int rotation) = 0;
// Basic accessors.
virtual size_t GetWidth() const = 0;
@ -88,10 +88,10 @@ class VideoFrame {
virtual size_t GetPixelWidth() const = 0;
virtual size_t GetPixelHeight() const = 0;
virtual int64 GetElapsedTime() const = 0;
virtual int64 GetTimeStamp() const = 0;
virtual void SetElapsedTime(int64 elapsed_time) = 0;
virtual void SetTimeStamp(int64 time_stamp) = 0;
virtual int64_t GetElapsedTime() const = 0;
virtual int64_t GetTimeStamp() const = 0;
virtual void SetElapsedTime(int64_t elapsed_time) = 0;
virtual void SetTimeStamp(int64_t time_stamp) = 0;
// Indicates the rotation angle in degrees.
virtual int GetRotation() const = 0;
@ -186,8 +186,9 @@ class VideoFrame {
protected:
// Creates an empty frame.
virtual VideoFrame *CreateEmptyFrame(int w, int h, size_t pixel_width,
size_t pixel_height, int64 elapsed_time,
int64 time_stamp) const = 0;
size_t pixel_height,
int64_t elapsed_time,
int64_t time_stamp) const = 0;
};
} // namespace cricket

View File

@ -76,7 +76,7 @@ class FakeWebRtcVideoDecoder : public webrtc::VideoDecoder {
virtual int32 Decode(
const webrtc::EncodedImage&, bool, const webrtc::RTPFragmentationHeader*,
const webrtc::CodecSpecificInfo*, int64) {
const webrtc::CodecSpecificInfo*, int64_t) {
num_frames_received_++;
return WEBRTC_VIDEO_CODEC_OK;
}

View File

@ -38,16 +38,16 @@
namespace cricket {
WebRtcTextureVideoFrame::WebRtcTextureVideoFrame(
webrtc::NativeHandle* handle, int width, int height, int64 elapsed_time,
int64 time_stamp)
webrtc::NativeHandle* handle, int width, int height, int64_t elapsed_time,
int64_t time_stamp)
: handle_(handle), width_(width), height_(height),
elapsed_time_(elapsed_time), time_stamp_(time_stamp) {}
WebRtcTextureVideoFrame::~WebRtcTextureVideoFrame() {}
bool WebRtcTextureVideoFrame::InitToBlack(
int w, int h, size_t pixel_width, size_t pixel_height, int64 elapsed_time,
int64 time_stamp) {
int w, int h, size_t pixel_width, size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp) {
UNIMPLEMENTED;
return false;
}
@ -55,7 +55,7 @@ bool WebRtcTextureVideoFrame::InitToBlack(
bool WebRtcTextureVideoFrame::Reset(
uint32 fourcc, int w, int h, int dw, int dh, uint8* sample,
size_t sample_size, size_t pixel_width, size_t pixel_height,
int64 elapsed_time, int64 time_stamp, int rotation) {
int64_t elapsed_time, int64_t time_stamp, int rotation) {
UNIMPLEMENTED;
return false;
}
@ -174,8 +174,8 @@ bool WebRtcTextureVideoFrame::SetToBlack() {
}
VideoFrame* WebRtcTextureVideoFrame::CreateEmptyFrame(
int w, int h, size_t pixel_width, size_t pixel_height, int64 elapsed_time,
int64 time_stamp) const {
int w, int h, size_t pixel_width, size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp) const {
UNIMPLEMENTED;
return NULL;
}

View File

@ -39,16 +39,17 @@ namespace cricket {
class WebRtcTextureVideoFrame : public VideoFrame {
public:
WebRtcTextureVideoFrame(webrtc::NativeHandle* handle, int width, int height,
int64 elapsed_time, int64 time_stamp);
int64_t elapsed_time, int64_t time_stamp);
virtual ~WebRtcTextureVideoFrame();
// From base class VideoFrame.
virtual bool InitToBlack(int w, int h, size_t pixel_width,
size_t pixel_height, int64 elapsed_time,
int64 time_stamp);
size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp);
virtual bool Reset(uint32 fourcc, int w, int h, int dw, int dh, uint8* sample,
size_t sample_size, size_t pixel_width,
size_t pixel_height, int64 elapsed_time, int64 time_stamp,
size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp,
int rotation);
virtual size_t GetWidth() const { return width_; }
virtual size_t GetHeight() const { return height_; }
@ -63,12 +64,12 @@ class WebRtcTextureVideoFrame : public VideoFrame {
virtual int32 GetVPitch() const;
virtual size_t GetPixelWidth() const { return 1; }
virtual size_t GetPixelHeight() const { return 1; }
virtual int64 GetElapsedTime() const { return elapsed_time_; }
virtual int64 GetTimeStamp() const { return time_stamp_; }
virtual void SetElapsedTime(int64 elapsed_time) {
virtual int64_t GetElapsedTime() const { return elapsed_time_; }
virtual int64_t GetTimeStamp() const { return time_stamp_; }
virtual void SetElapsedTime(int64_t elapsed_time) {
elapsed_time_ = elapsed_time;
}
virtual void SetTimeStamp(int64 time_stamp) { time_stamp_ = time_stamp; }
virtual void SetTimeStamp(int64_t time_stamp) { time_stamp_ = time_stamp; }
virtual int GetRotation() const { return 0; }
virtual VideoFrame* Copy() const;
virtual bool MakeExclusive();
@ -96,16 +97,17 @@ class WebRtcTextureVideoFrame : public VideoFrame {
protected:
virtual VideoFrame* CreateEmptyFrame(int w, int h, size_t pixel_width,
size_t pixel_height, int64 elapsed_time,
int64 time_stamp) const;
size_t pixel_height,
int64_t elapsed_time,
int64_t time_stamp) const;
private:
// The handle of the underlying video frame.
rtc::scoped_refptr<webrtc::NativeHandle> handle_;
int width_;
int height_;
int64 elapsed_time_;
int64 time_stamp_;
int64_t elapsed_time_;
int64_t time_stamp_;
};
} // namespace cricket

View File

@ -558,8 +558,8 @@ class WebRtcVideoRenderFrame : public VideoFrame {
int h,
size_t pixel_width,
size_t pixel_height,
int64 elapsed_time,
int64 time_stamp) OVERRIDE {
int64_t elapsed_time,
int64_t time_stamp) OVERRIDE {
UNIMPLEMENTED;
return false;
}
@ -573,8 +573,8 @@ class WebRtcVideoRenderFrame : public VideoFrame {
size_t sample_size,
size_t pixel_width,
size_t pixel_height,
int64 elapsed_time,
int64 time_stamp,
int64_t elapsed_time,
int64_t time_stamp,
int rotation) OVERRIDE {
UNIMPLEMENTED;
return false;
@ -625,16 +625,16 @@ class WebRtcVideoRenderFrame : public VideoFrame {
virtual size_t GetPixelWidth() const OVERRIDE { return 1; }
virtual size_t GetPixelHeight() const OVERRIDE { return 1; }
virtual int64 GetElapsedTime() const OVERRIDE {
virtual int64_t GetElapsedTime() const OVERRIDE {
// Convert millisecond render time to ns timestamp.
return frame_->render_time_ms() * rtc::kNumNanosecsPerMillisec;
}
virtual int64 GetTimeStamp() const OVERRIDE {
virtual int64_t GetTimeStamp() const OVERRIDE {
// Convert 90K rtp timestamp to ns timestamp.
return (frame_->timestamp() / 90) * rtc::kNumNanosecsPerMillisec;
}
virtual void SetElapsedTime(int64 elapsed_time) OVERRIDE { UNIMPLEMENTED; }
virtual void SetTimeStamp(int64 time_stamp) OVERRIDE { UNIMPLEMENTED; }
virtual void SetElapsedTime(int64_t elapsed_time) OVERRIDE { UNIMPLEMENTED; }
virtual void SetTimeStamp(int64_t time_stamp) OVERRIDE { UNIMPLEMENTED; }
virtual int GetRotation() const OVERRIDE {
UNIMPLEMENTED;
@ -661,8 +661,8 @@ class WebRtcVideoRenderFrame : public VideoFrame {
int h,
size_t pixel_width,
size_t pixel_height,
int64 elapsed_time,
int64 time_stamp) const OVERRIDE {
int64_t elapsed_time,
int64_t time_stamp) const OVERRIDE {
WebRtcVideoFrame* frame = new WebRtcVideoFrame();
frame->InitToBlack(
w, h, pixel_width, pixel_height, elapsed_time, time_stamp);

View File

@ -113,7 +113,7 @@ WebRtcVideoFrame::~WebRtcVideoFrame() {}
bool WebRtcVideoFrame::Init(
uint32 format, int w, int h, int dw, int dh, uint8* sample,
size_t sample_size, size_t pixel_width, size_t pixel_height,
int64 elapsed_time, int64 time_stamp, int rotation) {
int64_t elapsed_time, int64_t time_stamp, int rotation) {
return Reset(format, w, h, dw, dh, sample, sample_size, pixel_width,
pixel_height, elapsed_time, time_stamp, rotation);
}
@ -145,15 +145,16 @@ bool WebRtcVideoFrame::Alias(const CapturedFrame* frame, int dw, int dh) {
}
bool WebRtcVideoFrame::InitToBlack(int w, int h, size_t pixel_width,
size_t pixel_height, int64 elapsed_time,
int64 time_stamp) {
size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp) {
InitToEmptyBuffer(w, h, pixel_width, pixel_height, elapsed_time, time_stamp);
return SetToBlack();
}
void WebRtcVideoFrame::Alias(
uint8* buffer, size_t buffer_size, int w, int h, size_t pixel_width,
size_t pixel_height, int64 elapsed_time, int64 time_stamp, int rotation) {
size_t pixel_height, int64_t elapsed_time, int64_t time_stamp,
int rotation) {
rtc::scoped_refptr<RefCountedBuffer> video_buffer(
new RefCountedBuffer());
video_buffer->Alias(buffer, buffer_size);
@ -253,8 +254,8 @@ size_t WebRtcVideoFrame::ConvertToRgbBuffer(uint32 to_fourcc, uint8* buffer,
void WebRtcVideoFrame::Attach(
RefCountedBuffer* video_buffer, size_t buffer_size, int w, int h,
size_t pixel_width, size_t pixel_height, int64 elapsed_time,
int64 time_stamp, int rotation) {
size_t pixel_width, size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp, int rotation) {
if (video_buffer_.get() == video_buffer) {
return;
}
@ -279,7 +280,7 @@ const webrtc::VideoFrame* WebRtcVideoFrame::frame() const {
bool WebRtcVideoFrame::Reset(
uint32 format, int w, int h, int dw, int dh, uint8* sample,
size_t sample_size, size_t pixel_width, size_t pixel_height,
int64 elapsed_time, int64 time_stamp, int rotation) {
int64_t elapsed_time, int64_t time_stamp, int rotation) {
if (!Validate(format, w, h, sample, sample_size)) {
return false;
}
@ -334,8 +335,8 @@ bool WebRtcVideoFrame::Reset(
}
VideoFrame* WebRtcVideoFrame::CreateEmptyFrame(
int w, int h, size_t pixel_width, size_t pixel_height, int64 elapsed_time,
int64 time_stamp) const {
int w, int h, size_t pixel_width, size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp) const {
WebRtcVideoFrame* frame = new WebRtcVideoFrame();
frame->InitToEmptyBuffer(w, h, pixel_width, pixel_height, elapsed_time,
time_stamp);
@ -344,7 +345,8 @@ VideoFrame* WebRtcVideoFrame::CreateEmptyFrame(
void WebRtcVideoFrame::InitToEmptyBuffer(int w, int h, size_t pixel_width,
size_t pixel_height,
int64 elapsed_time, int64 time_stamp) {
int64_t elapsed_time,
int64_t time_stamp) {
size_t buffer_size = VideoFrame::SizeOf(w, h);
rtc::scoped_refptr<RefCountedBuffer> video_buffer(
new RefCountedBuffer(buffer_size));

View File

@ -50,7 +50,7 @@ class WebRtcVideoFrame : public VideoFrame {
// Returns "true" if successful.
bool Init(uint32 format, int w, int h, int dw, int dh, uint8* sample,
size_t sample_size, size_t pixel_width, size_t pixel_height,
int64 elapsed_time, int64 time_stamp, int rotation);
int64_t elapsed_time, int64_t time_stamp, int rotation);
bool Init(const CapturedFrame* frame, int dw, int dh);
@ -59,13 +59,13 @@ class WebRtcVideoFrame : public VideoFrame {
bool Alias(const CapturedFrame* frame, int dw, int dh);
bool InitToBlack(int w, int h, size_t pixel_width, size_t pixel_height,
int64 elapsed_time, int64 time_stamp);
int64_t elapsed_time, int64_t time_stamp);
// Aliases this WebRtcVideoFrame to a memory buffer. |buffer| must outlive
// this WebRtcVideoFrame.
void Alias(uint8* buffer, size_t buffer_size, int w, int h,
size_t pixel_width, size_t pixel_height, int64 elapsed_time,
int64 time_stamp, int rotation);
size_t pixel_width, size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp, int rotation);
webrtc::VideoFrame* frame();
const webrtc::VideoFrame* frame() const;
@ -73,8 +73,8 @@ class WebRtcVideoFrame : public VideoFrame {
// From base class VideoFrame.
virtual bool Reset(uint32 format, int w, int h, int dw, int dh, uint8* sample,
size_t sample_size, size_t pixel_width,
size_t pixel_height, int64 elapsed_time, int64 time_stamp,
int rotation);
size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp, int rotation);
virtual size_t GetWidth() const;
virtual size_t GetHeight() const;
@ -91,12 +91,12 @@ class WebRtcVideoFrame : public VideoFrame {
virtual size_t GetPixelWidth() const { return pixel_width_; }
virtual size_t GetPixelHeight() const { return pixel_height_; }
virtual int64 GetElapsedTime() const { return elapsed_time_; }
virtual int64 GetTimeStamp() const { return time_stamp_; }
virtual void SetElapsedTime(int64 elapsed_time) {
virtual int64_t GetElapsedTime() const { return elapsed_time_; }
virtual int64_t GetTimeStamp() const { return time_stamp_; }
virtual void SetElapsedTime(int64_t elapsed_time) {
elapsed_time_ = elapsed_time;
}
virtual void SetTimeStamp(int64 time_stamp) { time_stamp_ = time_stamp; }
virtual void SetTimeStamp(int64_t time_stamp) { time_stamp_ = time_stamp; }
virtual int GetRotation() const { return rotation_; }
@ -111,20 +111,21 @@ class WebRtcVideoFrame : public VideoFrame {
typedef rtc::RefCountedObject<FrameBuffer> RefCountedBuffer;
void Attach(RefCountedBuffer* video_buffer, size_t buffer_size, int w, int h,
size_t pixel_width, size_t pixel_height, int64 elapsed_time,
int64 time_stamp, int rotation);
size_t pixel_width, size_t pixel_height, int64_t elapsed_time,
int64_t time_stamp, int rotation);
virtual VideoFrame* CreateEmptyFrame(int w, int h, size_t pixel_width,
size_t pixel_height, int64 elapsed_time,
int64 time_stamp) const;
size_t pixel_height,
int64_t elapsed_time,
int64_t time_stamp) const;
void InitToEmptyBuffer(int w, int h, size_t pixel_width, size_t pixel_height,
int64 elapsed_time, int64 time_stamp);
int64_t elapsed_time, int64_t time_stamp);
rtc::scoped_refptr<RefCountedBuffer> video_buffer_;
size_t pixel_width_;
size_t pixel_height_;
int64 elapsed_time_;
int64 time_stamp_;
int64_t elapsed_time_;
int64_t time_stamp_;
int rotation_;
};