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

Side by Side Diff: media/filters/ffmpeg_demuxer.cc

Issue 2860573009: Use constexpr TaskTraits constructor in media. (Closed)
Patch Set: Created 3 years, 7 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
« 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 "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
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
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
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