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

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

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 years, 8 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/decrypting_video_decoder.h" 5 #include "media/filters/decrypting_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/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/trace_event/trace_event.h" 13 #include "base/trace_event/trace_event.h"
14 #include "media/base/bind_to_current_loop.h" 14 #include "media/base/bind_to_current_loop.h"
15 #include "media/base/cdm_context.h" 15 #include "media/base/cdm_context.h"
16 #include "media/base/decoder_buffer.h" 16 #include "media/base/decoder_buffer.h"
17 #include "media/base/media_log.h" 17 #include "media/base/media_log.h"
18 #include "media/base/video_frame.h" 18 #include "media/base/video_frame.h"
19 19
20 namespace media { 20 namespace media {
21 21
22 const char DecryptingVideoDecoder::kDecoderName[] = "DecryptingVideoDecoder"; 22 const char DecryptingVideoDecoder::kDecoderName[] = "DecryptingVideoDecoder";
23 23
24 DecryptingVideoDecoder::DecryptingVideoDecoder( 24 DecryptingVideoDecoder::DecryptingVideoDecoder(
25 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 25 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
26 const scoped_refptr<MediaLog>& media_log, 26 MediaLog* media_log,
27 const base::Closure& waiting_for_decryption_key_cb) 27 const base::Closure& waiting_for_decryption_key_cb)
28 : task_runner_(task_runner), 28 : task_runner_(task_runner),
29 media_log_(media_log), 29 media_log_(media_log),
30 state_(kUninitialized), 30 state_(kUninitialized),
31 waiting_for_decryption_key_cb_(waiting_for_decryption_key_cb), 31 waiting_for_decryption_key_cb_(waiting_for_decryption_key_cb),
32 decryptor_(NULL), 32 decryptor_(NULL),
33 key_added_while_decode_pending_(false), 33 key_added_while_decode_pending_(false),
34 trace_id_(0), 34 trace_id_(0),
35 weak_factory_(this) {} 35 weak_factory_(this) {}
36 36
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 309 }
310 310
311 void DecryptingVideoDecoder::DoReset() { 311 void DecryptingVideoDecoder::DoReset() {
312 DCHECK(init_cb_.is_null()); 312 DCHECK(init_cb_.is_null());
313 DCHECK(decode_cb_.is_null()); 313 DCHECK(decode_cb_.is_null());
314 state_ = kIdle; 314 state_ = kIdle;
315 base::ResetAndReturn(&reset_cb_).Run(); 315 base::ResetAndReturn(&reset_cb_).Run();
316 } 316 }
317 317
318 } // namespace media 318 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/decrypting_video_decoder.h ('k') | media/filters/decrypting_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698