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

Side by Side Diff: media/base/android/media_source_player.cc

Issue 753213003: Adding a new enum "MEDIA_CODEC_ABORT" for aborted cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments Created 6 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
« no previous file with comments | « media/base/android/media_decoder_job.cc ('k') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/base/android/media_source_player.h" 5 #include "media/base/android/media_source_player.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 // If |key_added_while_decode_pending_| is true and both audio and video 515 // If |key_added_while_decode_pending_| is true and both audio and video
516 // decoding succeeded, we should clear |key_added_while_decode_pending_| here. 516 // decoding succeeded, we should clear |key_added_while_decode_pending_| here.
517 // But that would add more complexity into this function. If we don't clear it 517 // But that would add more complexity into this function. If we don't clear it
518 // here, the worst case would be we call ResumePlaybackAfterKeyAdded() when 518 // here, the worst case would be we call ResumePlaybackAfterKeyAdded() when
519 // we don't really have a new key. This should rarely happen and the 519 // we don't really have a new key. This should rarely happen and the
520 // performance impact should be pretty small. 520 // performance impact should be pretty small.
521 // TODO(qinmin/xhwang): This class is complicated because we handle both audio 521 // TODO(qinmin/xhwang): This class is complicated because we handle both audio
522 // and video in one file. If we separate them, we should be able to remove a 522 // and video in one file. If we separate them, we should be able to remove a
523 // lot of duplication. 523 // lot of duplication.
524 524
525 // If the status is MEDIA_CODEC_STOPPED, stop decoding new data. The player is 525 // If the status is MEDIA_CODEC_ABORT, stop decoding new data. The player is
526 // in the middle of a seek or stop event and needs to wait for the IPCs to 526 // in the middle of a seek or stop event and needs to wait for the IPCs to
527 // come. 527 // come.
528 if (status == MEDIA_CODEC_STOPPED) 528 if (status == MEDIA_CODEC_ABORT)
529 return; 529 return;
530 530
531 if (prerolling_ && IsPrerollFinished(is_audio)) { 531 if (prerolling_ && IsPrerollFinished(is_audio)) {
532 if (IsPrerollFinished(!is_audio)) { 532 if (IsPrerollFinished(!is_audio)) {
533 prerolling_ = false; 533 prerolling_ = false;
534 StartInternal(); 534 StartInternal();
535 } 535 }
536 return; 536 return;
537 } 537 }
538 538
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release 807 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release
808 // MediaDrm when the video is paused, or when the device goes to sleep (see 808 // MediaDrm when the video is paused, or when the device goes to sleep (see
809 // http://crbug.com/272421). 809 // http://crbug.com/272421).
810 audio_decoder_job_->SetDrmBridge(NULL); 810 audio_decoder_job_->SetDrmBridge(NULL);
811 video_decoder_job_->SetDrmBridge(NULL); 811 video_decoder_job_->SetDrmBridge(NULL);
812 cdm_registration_id_ = 0; 812 cdm_registration_id_ = 0;
813 drm_bridge_ = NULL; 813 drm_bridge_ = NULL;
814 } 814 }
815 815
816 } // namespace media 816 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_decoder_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698