OLD | NEW |
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/ffmpeg_demuxer.h" | 5 #include "media/filters/ffmpeg_demuxer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 DataSource* data_source, | 848 DataSource* data_source, |
849 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 849 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
850 const MediaTracksUpdatedCB& media_tracks_updated_cb, | 850 const MediaTracksUpdatedCB& media_tracks_updated_cb, |
851 MediaLog* media_log) | 851 MediaLog* media_log) |
852 : host_(NULL), | 852 : host_(NULL), |
853 task_runner_(task_runner), | 853 task_runner_(task_runner), |
854 // FFmpeg has no asynchronous API, so we use base::WaitableEvents inside | 854 // FFmpeg has no asynchronous API, so we use base::WaitableEvents inside |
855 // the BlockingUrlProtocol to handle hops to the render thread for network | 855 // the BlockingUrlProtocol to handle hops to the render thread for network |
856 // reads and seeks. | 856 // reads and seeks. |
857 blocking_task_runner_(base::CreateSequencedTaskRunnerWithTraits( | 857 blocking_task_runner_(base::CreateSequencedTaskRunnerWithTraits( |
858 base::TaskTraits().MayBlock().WithBaseSyncPrimitives().WithPriority( | 858 {base::MayBlock(), base::WithBaseSyncPrimitives(), |
859 base::TaskPriority::USER_BLOCKING))), | 859 base::TaskPriority::USER_BLOCKING})), |
860 stopped_(false), | 860 stopped_(false), |
861 pending_read_(false), | 861 pending_read_(false), |
862 data_source_(data_source), | 862 data_source_(data_source), |
863 media_log_(media_log), | 863 media_log_(media_log), |
864 bitrate_(0), | 864 bitrate_(0), |
865 start_time_(kNoTimestamp), | 865 start_time_(kNoTimestamp), |
866 text_enabled_(false), | 866 text_enabled_(false), |
867 duration_known_(false), | 867 duration_known_(false), |
868 encrypted_media_init_data_cb_(encrypted_media_init_data_cb), | 868 encrypted_media_init_data_cb_(encrypted_media_init_data_cb), |
869 media_tracks_updated_cb_(media_tracks_updated_cb), | 869 media_tracks_updated_cb_(media_tracks_updated_cb), |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1881 | 1881 |
1882 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) { | 1882 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) { |
1883 DCHECK(task_runner_->BelongsToCurrentThread()); | 1883 DCHECK(task_runner_->BelongsToCurrentThread()); |
1884 for (const auto& stream : streams_) { | 1884 for (const auto& stream : streams_) { |
1885 if (stream) | 1885 if (stream) |
1886 stream->SetLiveness(liveness); | 1886 stream->SetLiveness(liveness); |
1887 } | 1887 } |
1888 } | 1888 } |
1889 | 1889 |
1890 } // namespace media | 1890 } // namespace media |
OLD | NEW |