diff options
author | penghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-08 03:20:15 +0000 |
---|---|---|
committer | penghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-08 03:20:15 +0000 |
commit | a2c5dcd3c17d73acbac56bd01440470a5a40de66 (patch) | |
tree | f4b6ca800086d746c86c8d5e044221a522aa29e4 /ppapi/proxy/video_frame_resource.cc | |
parent | d5ab4fc6021a2a4d8dc8804a36885e9568fb877b (diff) | |
download | chromium_src-a2c5dcd3c17d73acbac56bd01440470a5a40de66.zip chromium_src-a2c5dcd3c17d73acbac56bd01440470a5a40de66.tar.gz chromium_src-a2c5dcd3c17d73acbac56bd01440470a5a40de66.tar.bz2 |
[PPAPI][MediaStream] Rename AudioFrame to AudioBuffer
For audio, a frame usually has the same meaning as sample,
so AudioFrame is not a good name for a bunch of audio
samples. Change it to AudioBuffer.
This CL only changes the name in base classes. The API
interface will be changed in a separate CL.
BUG=330851
Review URL: https://codereview.chromium.org/142023008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249919 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/video_frame_resource.cc')
-rw-r--r-- | ppapi/proxy/video_frame_resource.cc | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/ppapi/proxy/video_frame_resource.cc b/ppapi/proxy/video_frame_resource.cc index b314838..9414712 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; } |