OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/renderer/media/android/media_source_delegate.h" | 5 #include "content/renderer/media/android/media_source_delegate.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 duration_change_cb_ = duration_change_cb; | 167 duration_change_cb_ = duration_change_cb; |
168 waiting_for_decryption_key_cb_ = | 168 waiting_for_decryption_key_cb_ = |
169 media::BindToCurrentLoop(waiting_for_decryption_key_cb); | 169 media::BindToCurrentLoop(waiting_for_decryption_key_cb); |
170 access_unit_size_ = kAccessUnitSizeForMediaSource; | 170 access_unit_size_ = kAccessUnitSizeForMediaSource; |
171 | 171 |
172 chunk_demuxer_.reset(new media::ChunkDemuxer( | 172 chunk_demuxer_.reset(new media::ChunkDemuxer( |
173 media::BindToCurrentLoop( | 173 media::BindToCurrentLoop( |
174 base::Bind(&MediaSourceDelegate::OnDemuxerOpened, main_weak_this_)), | 174 base::Bind(&MediaSourceDelegate::OnDemuxerOpened, main_weak_this_)), |
175 media::BindToCurrentLoop(base::Bind( | 175 media::BindToCurrentLoop(base::Bind( |
176 &MediaSourceDelegate::OnEncryptedMediaInitData, main_weak_this_)), | 176 &MediaSourceDelegate::OnEncryptedMediaInitData, main_weak_this_)), |
177 media_log_, false)); | 177 media_log_)); |
178 | 178 |
179 // |this| will be retained until StopDemuxer() is posted, so Unretained() is | 179 // |this| will be retained until StopDemuxer() is posted, so Unretained() is |
180 // safe here. | 180 // safe here. |
181 media_task_runner_->PostTask(FROM_HERE, | 181 media_task_runner_->PostTask(FROM_HERE, |
182 base::Bind(&MediaSourceDelegate::InitializeDemuxer, | 182 base::Bind(&MediaSourceDelegate::InitializeDemuxer, |
183 base::Unretained(this))); | 183 base::Unretained(this))); |
184 } | 184 } |
185 | 185 |
186 void MediaSourceDelegate::InitializeDemuxer() { | 186 void MediaSourceDelegate::InitializeDemuxer() { |
187 DCHECK(media_task_runner_->BelongsToCurrentThread()); | 187 DCHECK(media_task_runner_->BelongsToCurrentThread()); |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 configs->video_codec = config.codec(); | 802 configs->video_codec = config.codec(); |
803 configs->video_size = config.natural_size(); | 803 configs->video_size = config.natural_size(); |
804 configs->is_video_encrypted = config.is_encrypted(); | 804 configs->is_video_encrypted = config.is_encrypted(); |
805 configs->video_extra_data = config.extra_data(); | 805 configs->video_extra_data = config.extra_data(); |
806 return true; | 806 return true; |
807 } | 807 } |
808 return false; | 808 return false; |
809 } | 809 } |
810 | 810 |
811 } // namespace content | 811 } // namespace content |
OLD | NEW |