OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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/source_buffer_state.h" | 5 #include "media/filters/source_buffer_state.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 intersection_ranges = intersection_ranges.IntersectionWith(source_ranges); | 112 intersection_ranges = intersection_ranges.IntersectionWith(source_ranges); |
113 } | 113 } |
114 | 114 |
115 return intersection_ranges; | 115 return intersection_ranges; |
116 } | 116 } |
117 | 117 |
118 SourceBufferState::SourceBufferState( | 118 SourceBufferState::SourceBufferState( |
119 std::unique_ptr<StreamParser> stream_parser, | 119 std::unique_ptr<StreamParser> stream_parser, |
120 std::unique_ptr<FrameProcessor> frame_processor, | 120 std::unique_ptr<FrameProcessor> frame_processor, |
121 const CreateDemuxerStreamCB& create_demuxer_stream_cb, | 121 const CreateDemuxerStreamCB& create_demuxer_stream_cb, |
122 const scoped_refptr<MediaLog>& media_log) | 122 MediaLog* media_log) |
123 : create_demuxer_stream_cb_(create_demuxer_stream_cb), | 123 : create_demuxer_stream_cb_(create_demuxer_stream_cb), |
124 timestamp_offset_during_append_(NULL), | 124 timestamp_offset_during_append_(NULL), |
125 parsing_media_segment_(false), | 125 parsing_media_segment_(false), |
126 stream_parser_(stream_parser.release()), | 126 stream_parser_(stream_parser.release()), |
127 frame_processor_(frame_processor.release()), | 127 frame_processor_(frame_processor.release()), |
128 media_log_(media_log), | 128 media_log_(media_log), |
129 state_(UNINITIALIZED), | 129 state_(UNINITIALIZED), |
130 auto_update_timestamp_offset_(false) { | 130 auto_update_timestamp_offset_(false) { |
131 DCHECK(!create_demuxer_stream_cb_.is_null()); | 131 DCHECK(!create_demuxer_stream_cb_.is_null()); |
132 DCHECK(frame_processor_); | 132 DCHECK(frame_processor_); |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 } | 908 } |
909 void SourceBufferState::OnSourceInitDone( | 909 void SourceBufferState::OnSourceInitDone( |
910 const StreamParser::InitParameters& params) { | 910 const StreamParser::InitParameters& params) { |
911 DCHECK_EQ(state_, PENDING_PARSER_INIT); | 911 DCHECK_EQ(state_, PENDING_PARSER_INIT); |
912 state_ = PARSER_INITIALIZED; | 912 state_ = PARSER_INITIALIZED; |
913 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; | 913 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; |
914 base::ResetAndReturn(&init_cb_).Run(params); | 914 base::ResetAndReturn(&init_cb_).Run(params); |
915 } | 915 } |
916 | 916 |
917 } // namespace media | 917 } // namespace media |
OLD | NEW |