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

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

Issue 638233002: Preroll decoders when video starts playing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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) 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 26 matching lines...) Expand all
37 pending_event_(NO_EVENT_PENDING), 37 pending_event_(NO_EVENT_PENDING),
38 playing_(false), 38 playing_(false),
39 interpolator_(&default_tick_clock_), 39 interpolator_(&default_tick_clock_),
40 doing_browser_seek_(false), 40 doing_browser_seek_(false),
41 pending_seek_(false), 41 pending_seek_(false),
42 drm_bridge_(NULL), 42 drm_bridge_(NULL),
43 cdm_registration_id_(0), 43 cdm_registration_id_(0),
44 is_waiting_for_key_(false), 44 is_waiting_for_key_(false),
45 is_waiting_for_audio_decoder_(false), 45 is_waiting_for_audio_decoder_(false),
46 is_waiting_for_video_decoder_(false), 46 is_waiting_for_video_decoder_(false),
47 prerolling_(false), 47 prerolling_(true),
48 weak_factory_(this) { 48 weak_factory_(this) {
49 audio_decoder_job_.reset(new AudioDecoderJob( 49 audio_decoder_job_.reset(new AudioDecoderJob(
50 base::Bind(&DemuxerAndroid::RequestDemuxerData, 50 base::Bind(&DemuxerAndroid::RequestDemuxerData,
51 base::Unretained(demuxer_.get()), 51 base::Unretained(demuxer_.get()),
52 DemuxerStream::AUDIO), 52 DemuxerStream::AUDIO),
53 base::Bind(&MediaSourcePlayer::OnDemuxerConfigsChanged, 53 base::Bind(&MediaSourcePlayer::OnDemuxerConfigsChanged,
54 weak_factory_.GetWeakPtr()))); 54 weak_factory_.GetWeakPtr())));
55 video_decoder_job_.reset(new VideoDecoderJob( 55 video_decoder_job_.reset(new VideoDecoderJob(
56 base::Bind(&DemuxerAndroid::RequestDemuxerData, 56 base::Bind(&DemuxerAndroid::RequestDemuxerData,
57 base::Unretained(demuxer_.get()), 57 base::Unretained(demuxer_.get()),
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release 773 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release
774 // MediaDrm when the video is paused, or when the device goes to sleep (see 774 // MediaDrm when the video is paused, or when the device goes to sleep (see
775 // http://crbug.com/272421). 775 // http://crbug.com/272421).
776 audio_decoder_job_->SetDrmBridge(NULL); 776 audio_decoder_job_->SetDrmBridge(NULL);
777 video_decoder_job_->SetDrmBridge(NULL); 777 video_decoder_job_->SetDrmBridge(NULL);
778 cdm_registration_id_ = 0; 778 cdm_registration_id_ = 0;
779 drm_bridge_ = NULL; 779 drm_bridge_ = NULL;
780 } 780 }
781 781
782 } // namespace media 782 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_decoder_job.cc ('k') | media/base/android/media_source_player_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698