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

Side by Side Diff: media/gpu/fake_video_decode_accelerator.cc

Issue 2058113002: Add 'cbcs' encryption scheme support in Android media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/gpu/fake_video_decode_accelerator.h" 5 #include "media/gpu/fake_video_decode_accelerator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 FakeVideoDecodeAccelerator::~FakeVideoDecodeAccelerator() {} 43 FakeVideoDecodeAccelerator::~FakeVideoDecodeAccelerator() {}
44 44
45 bool FakeVideoDecodeAccelerator::Initialize(const Config& config, 45 bool FakeVideoDecodeAccelerator::Initialize(const Config& config,
46 Client* client) { 46 Client* client) {
47 DCHECK(child_task_runner_->BelongsToCurrentThread()); 47 DCHECK(child_task_runner_->BelongsToCurrentThread());
48 if (config.profile == VIDEO_CODEC_PROFILE_UNKNOWN) { 48 if (config.profile == VIDEO_CODEC_PROFILE_UNKNOWN) {
49 LOG(ERROR) << "unknown codec profile"; 49 LOG(ERROR) << "unknown codec profile";
50 return false; 50 return false;
51 } 51 }
52 if (config.is_encrypted) { 52 if (config.is_encrypted()) {
53 NOTREACHED() << "encrypted streams are not supported"; 53 NOTREACHED() << "encrypted streams are not supported";
54 return false; 54 return false;
55 } 55 }
56 56
57 // V4L2VideoDecodeAccelerator waits until first decode call to ask for buffers 57 // V4L2VideoDecodeAccelerator waits until first decode call to ask for buffers
58 // This class asks for it on initialization instead. 58 // This class asks for it on initialization instead.
59 client_ = client; 59 client_ = client;
60 client_->ProvidePictureBuffers(kNumBuffers, PIXEL_FORMAT_UNKNOWN, 1, 60 client_->ProvidePictureBuffers(kNumBuffers, PIXEL_FORMAT_UNKNOWN, 1,
61 frame_buffer_size_, kDefaultTextureTarget); 61 frame_buffer_size_, kDefaultTextureTarget);
62 return true; 62 return true;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // Bitstream no longer needed. 176 // Bitstream no longer needed.
177 client_->NotifyEndOfBitstreamBuffer(bitstream_id); 177 client_->NotifyEndOfBitstreamBuffer(bitstream_id);
178 if (flushing_ && queued_bitstream_ids_.empty()) { 178 if (flushing_ && queued_bitstream_ids_.empty()) {
179 flushing_ = false; 179 flushing_ = false;
180 client_->NotifyFlushDone(); 180 client_->NotifyFlushDone();
181 } 181 }
182 } 182 }
183 } 183 }
184 184
185 } // namespace media 185 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698