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

Unified Diff: media/filters/ffmpeg_demuxer.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 699b2f8f928d20d6bef343f7d9be7712f8becded..e237059cf934e782a49982bfeaf8a9c99c63c720 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -203,7 +203,7 @@ static void SetTimeProperty(MediaLogEvent* event,
std::unique_ptr<FFmpegDemuxerStream> FFmpegDemuxerStream::Create(
FFmpegDemuxer* demuxer,
AVStream* stream,
- const scoped_refptr<MediaLog>& media_log) {
+ MediaLog* media_log) {
if (!demuxer || !stream)
return nullptr;
@@ -265,14 +265,14 @@ FFmpegDemuxerStream::FFmpegDemuxerStream(
AVStream* stream,
std::unique_ptr<AudioDecoderConfig> audio_config,
std::unique_ptr<VideoDecoderConfig> video_config,
- scoped_refptr<MediaLog> media_log)
+ MediaLog* media_log)
: demuxer_(demuxer),
task_runner_(base::ThreadTaskRunnerHandle::Get()),
stream_(stream),
start_time_(kNoTimestamp),
audio_config_(audio_config.release()),
video_config_(video_config.release()),
- media_log_(std::move(media_log)),
+ media_log_(media_log),
type_(UNKNOWN),
liveness_(LIVENESS_UNKNOWN),
end_of_stream_(false),
@@ -835,7 +835,7 @@ FFmpegDemuxer::FFmpegDemuxer(
DataSource* data_source,
const EncryptedMediaInitDataCB& encrypted_media_init_data_cb,
const MediaTracksUpdatedCB& media_tracks_updated_cb,
- const scoped_refptr<MediaLog>& media_log)
+ MediaLog* media_log)
: host_(NULL),
task_runner_(task_runner),
// FFmpeg has no asynchronous API, so we use base::WaitableEvents inside
@@ -1373,7 +1373,7 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
VideoDecoderConfig video_config = streams_[i]->video_decoder_config();
RecordVideoCodecStats(video_config, stream->codecpar->color_range,
- media_log_.get());
+ media_log_);
media_track = media_tracks->AddVideoTrack(video_config, track_id, "main",
track_label, track_language);
« no previous file with comments | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698