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

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

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 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/source_buffer_stream.h ('k') | media/filters/source_buffer_stream_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) 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/source_buffer_stream.h" 5 #include "media/filters/source_buffer_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return SourceBufferRange::ALLOW_GAPS; 132 return SourceBufferRange::ALLOW_GAPS;
133 } 133 }
134 134
135 NOTREACHED(); 135 NOTREACHED();
136 return SourceBufferRange::NO_GAPS_ALLOWED; 136 return SourceBufferRange::NO_GAPS_ALLOWED;
137 } 137 }
138 138
139 } // namespace 139 } // namespace
140 140
141 SourceBufferStream::SourceBufferStream(const AudioDecoderConfig& audio_config, 141 SourceBufferStream::SourceBufferStream(const AudioDecoderConfig& audio_config,
142 const scoped_refptr<MediaLog>& media_log) 142 MediaLog* media_log)
143 : media_log_(media_log), 143 : media_log_(media_log),
144 seek_buffer_timestamp_(kNoTimestamp), 144 seek_buffer_timestamp_(kNoTimestamp),
145 coded_frame_group_start_time_(kNoDecodeTimestamp()), 145 coded_frame_group_start_time_(kNoDecodeTimestamp()),
146 range_for_next_append_(ranges_.end()), 146 range_for_next_append_(ranges_.end()),
147 last_output_buffer_timestamp_(kNoDecodeTimestamp()), 147 last_output_buffer_timestamp_(kNoDecodeTimestamp()),
148 max_interbuffer_distance_(kNoTimestamp), 148 max_interbuffer_distance_(kNoTimestamp),
149 memory_limit_(kSourceBufferAudioMemoryLimit) { 149 memory_limit_(kSourceBufferAudioMemoryLimit) {
150 DCHECK(audio_config.IsValidConfig()); 150 DCHECK(audio_config.IsValidConfig());
151 audio_configs_.push_back(audio_config); 151 audio_configs_.push_back(audio_config);
152 } 152 }
153 153
154 SourceBufferStream::SourceBufferStream(const VideoDecoderConfig& video_config, 154 SourceBufferStream::SourceBufferStream(const VideoDecoderConfig& video_config,
155 const scoped_refptr<MediaLog>& media_log) 155 MediaLog* media_log)
156 : media_log_(media_log), 156 : media_log_(media_log),
157 seek_buffer_timestamp_(kNoTimestamp), 157 seek_buffer_timestamp_(kNoTimestamp),
158 coded_frame_group_start_time_(kNoDecodeTimestamp()), 158 coded_frame_group_start_time_(kNoDecodeTimestamp()),
159 range_for_next_append_(ranges_.end()), 159 range_for_next_append_(ranges_.end()),
160 last_output_buffer_timestamp_(kNoDecodeTimestamp()), 160 last_output_buffer_timestamp_(kNoDecodeTimestamp()),
161 max_interbuffer_distance_(kNoTimestamp), 161 max_interbuffer_distance_(kNoTimestamp),
162 memory_limit_(kSourceBufferVideoMemoryLimit) { 162 memory_limit_(kSourceBufferVideoMemoryLimit) {
163 DCHECK(video_config.IsValidConfig()); 163 DCHECK(video_config.IsValidConfig());
164 video_configs_.push_back(video_config); 164 video_configs_.push_back(video_config);
165 } 165 }
166 166
167 SourceBufferStream::SourceBufferStream(const TextTrackConfig& text_config, 167 SourceBufferStream::SourceBufferStream(const TextTrackConfig& text_config,
168 const scoped_refptr<MediaLog>& media_log) 168 MediaLog* media_log)
169 : media_log_(media_log), 169 : media_log_(media_log),
170 text_track_config_(text_config), 170 text_track_config_(text_config),
171 seek_buffer_timestamp_(kNoTimestamp), 171 seek_buffer_timestamp_(kNoTimestamp),
172 coded_frame_group_start_time_(kNoDecodeTimestamp()), 172 coded_frame_group_start_time_(kNoDecodeTimestamp()),
173 range_for_next_append_(ranges_.end()), 173 range_for_next_append_(ranges_.end()),
174 last_output_buffer_timestamp_(kNoDecodeTimestamp()), 174 last_output_buffer_timestamp_(kNoDecodeTimestamp()),
175 max_interbuffer_distance_(kNoTimestamp), 175 max_interbuffer_distance_(kNoTimestamp),
176 memory_limit_(kSourceBufferAudioMemoryLimit) {} 176 memory_limit_(kSourceBufferAudioMemoryLimit) {}
177 177
178 SourceBufferStream::~SourceBufferStream() { 178 SourceBufferStream::~SourceBufferStream() {
(...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 1780
1781 if (!have_preroll_buffer) 1781 if (!have_preroll_buffer)
1782 return false; 1782 return false;
1783 1783
1784 pending_buffer_.swap(*out_buffer); 1784 pending_buffer_.swap(*out_buffer);
1785 pending_buffers_complete_ = false; 1785 pending_buffers_complete_ = false;
1786 return true; 1786 return true;
1787 } 1787 }
1788 1788
1789 } // namespace media 1789 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/source_buffer_stream.h ('k') | media/filters/source_buffer_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698