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

Unified Diff: ppapi/proxy/video_frame_resource.cc

Issue 142023008: [PPAPI][MediaStream] Rename AudioFrame to AudioBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
Index: ppapi/proxy/video_frame_resource.cc
diff --git a/ppapi/proxy/video_frame_resource.cc b/ppapi/proxy/video_frame_resource.cc
index b314838076aea7e517f9ba4fca90280631208c4a..941471256eebe5750ffabc9807deb01c9cde41a2 100644
--- a/ppapi/proxy/video_frame_resource.cc
+++ b/ppapi/proxy/video_frame_resource.cc
@@ -13,15 +13,15 @@ namespace proxy {
VideoFrameResource::VideoFrameResource(PP_Instance instance,
int32_t index,
- MediaStreamFrame* frame)
+ MediaStreamBuffer* buffer)
: Resource(OBJECT_IS_PROXY, instance),
index_(index),
- frame_(frame) {
- DCHECK_EQ(frame_->header.type, MediaStreamFrame::TYPE_VIDEO);
+ buffer_(buffer) {
+ DCHECK_EQ(buffer_->header.type, MediaStreamBuffer::TYPE_VIDEO);
}
VideoFrameResource::~VideoFrameResource() {
- CHECK(!frame_) << "An unused (or unrecycled) frame is destroyed.";
+ CHECK(!buffer_) << "An unused (or unrecycled) frame is destroyed.";
}
thunk::PPB_VideoFrame_API* VideoFrameResource::AsPPB_VideoFrame_API() {
@@ -29,66 +29,66 @@ thunk::PPB_VideoFrame_API* VideoFrameResource::AsPPB_VideoFrame_API() {
}
PP_TimeDelta VideoFrameResource::GetTimestamp() {
- if (!frame_) {
+ if (!buffer_) {
VLOG(1) << "Frame is invalid";
return 0.0;
}
- return frame_->video.timestamp;
+ return buffer_->video.timestamp;
}
void VideoFrameResource::SetTimestamp(PP_TimeDelta timestamp) {
- if (!frame_) {
+ if (!buffer_) {
VLOG(1) << "Frame is invalid";
return;
}
- frame_->video.timestamp = timestamp;
+ buffer_->video.timestamp = timestamp;
}
PP_VideoFrame_Format VideoFrameResource::GetFormat() {
- if (!frame_) {
+ if (!buffer_) {
VLOG(1) << "Frame is invalid";
return PP_VIDEOFRAME_FORMAT_UNKNOWN;
}
- return frame_->video.format;
+ return buffer_->video.format;
}
PP_Bool VideoFrameResource::GetSize(PP_Size* size) {
- if (!frame_) {
+ if (!buffer_) {
VLOG(1) << "Frame is invalid";
return PP_FALSE;
}
- *size = frame_->video.size;
+ *size = buffer_->video.size;
return PP_TRUE;
}
void* VideoFrameResource::GetDataBuffer() {
- if (!frame_) {
+ if (!buffer_) {
VLOG(1) << "Frame is invalid";
return NULL;
}
- return frame_->video.data;
+ return buffer_->video.data;
}
uint32_t VideoFrameResource::GetDataBufferSize() {
- if (!frame_) {
+ if (!buffer_) {
VLOG(1) << "Frame is invalid";
return 0;
}
- return frame_->video.data_size;
+ return buffer_->video.data_size;
}
-MediaStreamFrame* VideoFrameResource::GetFrameBuffer() {
- return frame_;
+MediaStreamBuffer* VideoFrameResource::GetBuffer() {
+ return buffer_;
}
-int32_t VideoFrameResource::GetFrameBufferIndex() {
+int32_t VideoFrameResource::GetBufferIndex() {
return index_;
}
void VideoFrameResource::Invalidate() {
- DCHECK(frame_);
+ DCHECK(buffer_);
DCHECK_GE(index_, 0);
- frame_ = NULL;
+ buffer_ = NULL;
index_ = -1;
}

Powered by Google App Engine
This is Rietveld 408576698