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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 1541353002: Add offset support to BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compiling errors on android Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } else { 502 } else {
503 child_task_runner_->PostTask( 503 child_task_runner_->PostTask(
504 FROM_HERE, 504 FROM_HERE,
505 base::Bind(&GpuVideoDecodeAccelerator::NotifyError, 505 base::Bind(&GpuVideoDecodeAccelerator::NotifyError,
506 base::Unretained(this), 506 base::Unretained(this),
507 media::VideoDecodeAccelerator::INVALID_ARGUMENT)); 507 media::VideoDecodeAccelerator::INVALID_ARGUMENT));
508 } 508 }
509 return; 509 return;
510 } 510 }
511 511
512 media::BitstreamBuffer bitstream_buffer(params.bitstream_buffer_id, 512 media::BitstreamBuffer bitstream_buffer(
513 params.buffer_handle, params.size, 513 params.bitstream_buffer_id, params.buffer_handle, params.size,
514 params.presentation_timestamp); 514 params.offset, params.presentation_timestamp);
dcheng 2016/01/22 18:27:39 Where do we validate that params.offset can fit in
Pawel Osciak 2016/01/25 08:20:02 GNU defines off_t as 32 or 64 bit, so there it wou
Owen Lin 2016/01/25 09:30:59 Good catch, code modified.
515 if (!params.key_id.empty()) { 515 if (!params.key_id.empty()) {
516 bitstream_buffer.SetDecryptConfig( 516 bitstream_buffer.SetDecryptConfig(
517 media::DecryptConfig(params.key_id, params.iv, params.subsamples)); 517 media::DecryptConfig(params.key_id, params.iv, params.subsamples));
518 } 518 }
519 519
520 video_decode_accelerator_->Decode(bitstream_buffer); 520 video_decode_accelerator_->Decode(bitstream_buffer);
521 } 521 }
522 522
523 void GpuVideoDecodeAccelerator::OnAssignPictureBuffers( 523 void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(
524 const std::vector<int32_t>& buffer_ids, 524 const std::vector<int32_t>& buffer_ids,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 uncleared_textures_.erase(it); 637 uncleared_textures_.erase(it);
638 } 638 }
639 639
640 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 640 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
641 bool succeeded) { 641 bool succeeded) {
642 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 642 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
643 Send(message); 643 Send(message);
644 } 644 }
645 645
646 } // namespace content 646 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698