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

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

Issue 1904213003: Convert //media/filters from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove include Created 4 years, 8 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 | « media/filters/media_source_state.h ('k') | media/filters/memory_data_source_unittest.cc » ('j') | 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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/media_source_state.h" 5 #include "media/filters/media_source_state.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "media/base/media_track.h" 9 #include "media/base/media_track.h"
10 #include "media/base/media_tracks.h" 10 #include "media/base/media_tracks.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // the intersection ranges and the source ranges. 79 // the intersection ranges and the source ranges.
80 // Step 5.4: Replace the ranges in intersection ranges with the new 80 // Step 5.4: Replace the ranges in intersection ranges with the new
81 // intersection ranges. 81 // intersection ranges.
82 intersection_ranges = intersection_ranges.IntersectionWith(source_ranges); 82 intersection_ranges = intersection_ranges.IntersectionWith(source_ranges);
83 } 83 }
84 84
85 return intersection_ranges; 85 return intersection_ranges;
86 } 86 }
87 87
88 MediaSourceState::MediaSourceState( 88 MediaSourceState::MediaSourceState(
89 scoped_ptr<StreamParser> stream_parser, 89 std::unique_ptr<StreamParser> stream_parser,
90 scoped_ptr<FrameProcessor> frame_processor, 90 std::unique_ptr<FrameProcessor> frame_processor,
91 const CreateDemuxerStreamCB& create_demuxer_stream_cb, 91 const CreateDemuxerStreamCB& create_demuxer_stream_cb,
92 const scoped_refptr<MediaLog>& media_log) 92 const scoped_refptr<MediaLog>& media_log)
93 : create_demuxer_stream_cb_(create_demuxer_stream_cb), 93 : create_demuxer_stream_cb_(create_demuxer_stream_cb),
94 timestamp_offset_during_append_(NULL), 94 timestamp_offset_during_append_(NULL),
95 parsing_media_segment_(false), 95 parsing_media_segment_(false),
96 media_segment_contained_audio_frame_(false), 96 media_segment_contained_audio_frame_(false),
97 media_segment_contained_video_frame_(false), 97 media_segment_contained_video_frame_(false),
98 stream_parser_(stream_parser.release()), 98 stream_parser_(stream_parser.release()),
99 audio_(NULL), 99 audio_(NULL),
100 video_(NULL), 100 video_(NULL),
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // stalled because we don't have cues. If cues, with timestamps after 469 // stalled because we don't have cues. If cues, with timestamps after
470 // the seek time, eventually arrive they will be delivered properly 470 // the seek time, eventually arrive they will be delivered properly
471 // in response to ChunkDemuxerStream::Read() calls. 471 // in response to ChunkDemuxerStream::Read() calls.
472 472
473 return false; 473 return false;
474 } 474 }
475 475
476 bool MediaSourceState::OnNewConfigs( 476 bool MediaSourceState::OnNewConfigs(
477 bool allow_audio, 477 bool allow_audio,
478 bool allow_video, 478 bool allow_video,
479 scoped_ptr<MediaTracks> tracks, 479 std::unique_ptr<MediaTracks> tracks,
480 const StreamParser::TextTrackConfigMap& text_configs) { 480 const StreamParser::TextTrackConfigMap& text_configs) {
481 DCHECK_GE(state_, PENDING_PARSER_CONFIG); 481 DCHECK_GE(state_, PENDING_PARSER_CONFIG);
482 DCHECK(tracks.get()); 482 DCHECK(tracks.get());
483 media_tracks_ = std::move(tracks); 483 media_tracks_ = std::move(tracks);
484 const AudioDecoderConfig& audio_config = media_tracks_->getFirstAudioConfig(); 484 const AudioDecoderConfig& audio_config = media_tracks_->getFirstAudioConfig();
485 const VideoDecoderConfig& video_config = media_tracks_->getFirstVideoConfig(); 485 const VideoDecoderConfig& video_config = media_tracks_->getFirstVideoConfig();
486 486
487 DVLOG(1) << "OnNewConfigs(" << allow_audio << ", " << allow_video << ", " 487 DVLOG(1) << "OnNewConfigs(" << allow_audio << ", " << allow_video << ", "
488 << audio_config.IsValidConfig() << ", " 488 << audio_config.IsValidConfig() << ", "
489 << video_config.IsValidConfig() << ")"; 489 << video_config.IsValidConfig() << ")";
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 739
740 void MediaSourceState::OnSourceInitDone( 740 void MediaSourceState::OnSourceInitDone(
741 const StreamParser::InitParameters& params) { 741 const StreamParser::InitParameters& params) {
742 DCHECK_EQ(state_, PENDING_PARSER_INIT); 742 DCHECK_EQ(state_, PENDING_PARSER_INIT);
743 state_ = PARSER_INITIALIZED; 743 state_ = PARSER_INITIALIZED;
744 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; 744 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset;
745 base::ResetAndReturn(&init_cb_).Run(params); 745 base::ResetAndReturn(&init_cb_).Run(params);
746 } 746 }
747 747
748 } // namespace media 748 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/media_source_state.h ('k') | media/filters/memory_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698