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

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

Issue 16297002: Update media/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/ffmpeg_audio_decoder_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.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/ffmpeg_demuxer.h" 5 #include "media/filters/ffmpeg_demuxer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 pending_read_(false), 293 pending_read_(false),
294 pending_seek_(false), 294 pending_seek_(false),
295 data_source_(data_source), 295 data_source_(data_source),
296 bitrate_(0), 296 bitrate_(0),
297 start_time_(kNoTimestamp()), 297 start_time_(kNoTimestamp()),
298 audio_disabled_(false), 298 audio_disabled_(false),
299 duration_known_(false), 299 duration_known_(false),
300 url_protocol_(data_source, BindToLoop(message_loop_, base::Bind( 300 url_protocol_(data_source, BindToLoop(message_loop_, base::Bind(
301 &FFmpegDemuxer::OnDataSourceError, base::Unretained(this)))), 301 &FFmpegDemuxer::OnDataSourceError, base::Unretained(this)))),
302 need_key_cb_(need_key_cb) { 302 need_key_cb_(need_key_cb) {
303 DCHECK(message_loop_); 303 DCHECK(message_loop_.get());
304 DCHECK(data_source_); 304 DCHECK(data_source_);
305 } 305 }
306 306
307 FFmpegDemuxer::~FFmpegDemuxer() {} 307 FFmpegDemuxer::~FFmpegDemuxer() {}
308 308
309 void FFmpegDemuxer::Stop(const base::Closure& callback) { 309 void FFmpegDemuxer::Stop(const base::Closure& callback) {
310 DCHECK(message_loop_->BelongsToCurrentThread()); 310 DCHECK(message_loop_->BelongsToCurrentThread());
311 url_protocol_.Abort(); 311 url_protocol_.Abort();
312 data_source_->Stop(BindToCurrentLoop(base::Bind( 312 data_source_->Stop(BindToCurrentLoop(base::Bind(
313 &FFmpegDemuxer::OnDataSourceStopped, weak_this_, 313 &FFmpegDemuxer::OnDataSourceStopped, weak_this_,
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 } 766 }
767 for (size_t i = 0; i < buffered.size(); ++i) 767 for (size_t i = 0; i < buffered.size(); ++i)
768 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); 768 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i));
769 } 769 }
770 770
771 void FFmpegDemuxer::OnDataSourceError() { 771 void FFmpegDemuxer::OnDataSourceError() {
772 host_->OnDemuxerError(PIPELINE_ERROR_READ); 772 host_->OnDemuxerError(PIPELINE_ERROR_READ);
773 } 773 }
774 774
775 } // namespace media 775 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_audio_decoder_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698