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

Side by Side Diff: media/filters/ffmpeg_video_decoder.cc

Issue 10535029: Add support for encrypted WebM files as defined in the RFC. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated encrypted WebM test data. Created 8 years, 6 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 "media/filters/ffmpeg_video_decoder.h" 5 #include "media/filters/ffmpeg_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 ReleaseFFmpegResources(); 167 ReleaseFFmpegResources();
168 state_ = kUninitialized; 168 state_ = kUninitialized;
169 closure.Run(); 169 closure.Run();
170 } 170 }
171 171
172 const gfx::Size& FFmpegVideoDecoder::natural_size() { 172 const gfx::Size& FFmpegVideoDecoder::natural_size() {
173 return natural_size_; 173 return natural_size_;
174 } 174 }
175 175
176 void FFmpegVideoDecoder::set_decryptor(AesDecryptor* decryptor) { 176 void FFmpegVideoDecoder::set_decryptor(Decryptor* decryptor) {
177 DCHECK_EQ(state_, kUninitialized); 177 DCHECK_EQ(state_, kUninitialized);
178 decryptor_ = decryptor; 178 decryptor_ = decryptor;
179 } 179 }
180 180
181 FFmpegVideoDecoder::~FFmpegVideoDecoder() { 181 FFmpegVideoDecoder::~FFmpegVideoDecoder() {
182 ReleaseFFmpegResources(); 182 ReleaseFFmpegResources();
183 } 183 }
184 184
185 void FFmpegVideoDecoder::DoRead(const ReadCB& read_cb) { 185 void FFmpegVideoDecoder::DoRead(const ReadCB& read_cb) {
186 DCHECK_EQ(MessageLoop::current(), message_loop_); 186 DCHECK_EQ(MessageLoop::current(), message_loop_);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 scoped_refptr<VideoFrame> FFmpegVideoDecoder::AllocateVideoFrame() { 425 scoped_refptr<VideoFrame> FFmpegVideoDecoder::AllocateVideoFrame() {
426 VideoFrame::Format format = PixelFormatToVideoFormat(codec_context_->pix_fmt); 426 VideoFrame::Format format = PixelFormatToVideoFormat(codec_context_->pix_fmt);
427 size_t width = codec_context_->width; 427 size_t width = codec_context_->width;
428 size_t height = codec_context_->height; 428 size_t height = codec_context_->height;
429 429
430 return VideoFrame::CreateFrame(format, width, height, 430 return VideoFrame::CreateFrame(format, width, height,
431 kNoTimestamp(), kNoTimestamp()); 431 kNoTimestamp(), kNoTimestamp());
432 } 432 }
433 433
434 } // namespace media 434 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698