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

Side by Side Diff: content/renderer/pepper/content_decryptor_delegate.cc

Issue 208653009: Encrypted media: avoid resetting video state on audio deinit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 6ae3753f Initial. Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/pepper/content_decryptor_delegate.h" 5 #include "content/renderer/pepper/content_decryptor_delegate.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 plugin_decryption_interface_->InitializeVideoDecoder(pp_instance_, 464 plugin_decryption_interface_->InitializeVideoDecoder(pp_instance_,
465 &pp_decoder_config, 465 &pp_decoder_config,
466 pp_resource); 466 pp_resource);
467 return true; 467 return true;
468 } 468 }
469 469
470 bool ContentDecryptorDelegate::DeinitializeDecoder( 470 bool ContentDecryptorDelegate::DeinitializeDecoder(
471 Decryptor::StreamType stream_type) { 471 Decryptor::StreamType stream_type) {
472 CancelDecode(stream_type); 472 CancelDecode(stream_type);
473 473
474 natural_size_ = gfx::Size(); 474 if (stream_type == Decryptor::kVideo)
475 natural_size_ = gfx::Size();
475 476
476 // TODO(tomfinegan): Add decoder deinitialize request tracking, and get 477 // TODO(tomfinegan): Add decoder deinitialize request tracking, and get
477 // stream type from media stack. 478 // stream type from media stack.
478 plugin_decryption_interface_->DeinitializeDecoder( 479 plugin_decryption_interface_->DeinitializeDecoder(
479 pp_instance_, MediaDecryptorStreamTypeToPpStreamType(stream_type), 0); 480 pp_instance_, MediaDecryptorStreamTypeToPpStreamType(stream_type), 0);
480 return true; 481 return true;
481 } 482 }
482 483
483 bool ContentDecryptorDelegate::ResetDecoder(Decryptor::StreamType stream_type) { 484 bool ContentDecryptorDelegate::ResetDecoder(Decryptor::StreamType stream_type) {
484 CancelDecode(stream_type); 485 CancelDecode(stream_type);
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 const media::Decryptor::AudioBuffers empty_frames; 1056 const media::Decryptor::AudioBuffers empty_frames;
1056 audio_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, 1057 audio_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError,
1057 empty_frames); 1058 empty_frames);
1058 } 1059 }
1059 1060
1060 if (!video_decode_cb_.is_null()) 1061 if (!video_decode_cb_.is_null())
1061 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); 1062 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL);
1062 } 1063 }
1063 1064
1064 } // namespace content 1065 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698