summaryrefslogtreecommitdiff
path: root/media/filters/vpx_video_decoder.cc
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2013-07-23 11:17:05 +0100
committerBen Murdoch <benm@google.com>2013-07-23 11:17:05 +0100
commitca12bfac764ba476d6cd062bf1dde12cc64c3f40 (patch)
tree1cd09db25ea5de98e73c8efbe572e103daee8b2b /media/filters/vpx_video_decoder.cc
parentfcb3e05bdd21d752df9c3dff28b6bbf29b5b733b (diff)
downloadchromium_org-ca12bfac764ba476d6cd062bf1dde12cc64c3f40.tar.gz
Merge from Chromium at DEPS revision r213057
This commit was generated by merge_to_master.py. Change-Id: I3e2e2506eb9b0080157e9c5f133559df3e600388
Diffstat (limited to 'media/filters/vpx_video_decoder.cc')
-rw-r--r--media/filters/vpx_video_decoder.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index 7b8f011e6e..9880eda0a5 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -222,7 +222,7 @@ void VpxVideoDecoder::DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer) {
DCHECK(buffer);
// Transition to kDecodeFinished on the first end of stream buffer.
- if (state_ == kNormal && buffer->IsEndOfStream()) {
+ if (state_ == kNormal && buffer->end_of_stream()) {
state_ = kDecodeFinished;
base::ResetAndReturn(&read_cb_).Run(kOk, VideoFrame::CreateEmptyFrame());
return;
@@ -235,6 +235,7 @@ void VpxVideoDecoder::DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer) {
return;
}
+ // If we didn't get a frame we need more data.
if (!video_frame.get()) {
base::ResetAndReturn(&read_cb_).Run(kNotEnoughData, NULL);
return;
@@ -246,14 +247,14 @@ void VpxVideoDecoder::DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer) {
bool VpxVideoDecoder::VpxDecode(const scoped_refptr<DecoderBuffer>& buffer,
scoped_refptr<VideoFrame>* video_frame) {
DCHECK(video_frame);
- DCHECK(!buffer->IsEndOfStream());
+ DCHECK(!buffer->end_of_stream());
// Pass |buffer| to libvpx.
- int64 timestamp = buffer->GetTimestamp().InMicroseconds();
+ int64 timestamp = buffer->timestamp().InMicroseconds();
void* user_priv = reinterpret_cast<void*>(&timestamp);
vpx_codec_err_t status = vpx_codec_decode(vpx_codec_,
- buffer->GetData(),
- buffer->GetDataSize(),
+ buffer->data(),
+ buffer->data_size(),
user_priv,
0);
if (status != VPX_CODEC_OK) {
@@ -275,18 +276,18 @@ bool VpxVideoDecoder::VpxDecode(const scoped_refptr<DecoderBuffer>& buffer,
}
const vpx_image_t* vpx_image_alpha = NULL;
- if (vpx_codec_alpha_ && buffer->GetSideDataSize() >= 8) {
+ if (vpx_codec_alpha_ && buffer->side_data_size() >= 8) {
// Pass alpha data to libvpx.
- int64 timestamp_alpha = buffer->GetTimestamp().InMicroseconds();
+ int64 timestamp_alpha = buffer->timestamp().InMicroseconds();
void* user_priv_alpha = reinterpret_cast<void*>(&timestamp_alpha);
// First 8 bytes of side data is side_data_id in big endian.
const uint64 side_data_id = base::NetToHost64(
- *(reinterpret_cast<const uint64*>(buffer->GetSideData())));
+ *(reinterpret_cast<const uint64*>(buffer->side_data())));
if (side_data_id == 1) {
status = vpx_codec_decode(vpx_codec_alpha_,
- buffer->GetSideData() + 8,
- buffer->GetSideDataSize() - 8,
+ buffer->side_data() + 8,
+ buffer->side_data_size() - 8,
user_priv_alpha,
0);