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

Side by Side Diff: media/test/pipeline_integration_test_base.cc

Issue 2768713002: Pass a |media_log| to FFmpegVideoDecoder and roll ffmpeg (Closed)
Patch Set: Created 3 years, 9 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
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/test/pipeline_integration_test_base.h" 5 #include "media/test/pipeline_integration_test_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
12 #include "base/run_loop.h" 13 #include "base/run_loop.h"
13 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
14 #include "media/base/cdm_context.h" 15 #include "media/base/cdm_context.h"
15 #include "media/base/media_log.h" 16 #include "media/base/media_log.h"
16 #include "media/base/media_tracks.h" 17 #include "media/base/media_tracks.h"
17 #include "media/base/test_data_util.h" 18 #include "media/base/test_data_util.h"
18 #include "media/filters/chunk_demuxer.h" 19 #include "media/filters/chunk_demuxer.h"
19 #if !defined(MEDIA_DISABLE_FFMPEG) 20 #if !defined(MEDIA_DISABLE_FFMPEG)
20 #include "media/filters/ffmpeg_audio_decoder.h" 21 #include "media/filters/ffmpeg_audio_decoder.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer( 327 std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer(
327 ScopedVector<VideoDecoder> prepend_video_decoders, 328 ScopedVector<VideoDecoder> prepend_video_decoders,
328 ScopedVector<AudioDecoder> prepend_audio_decoders) { 329 ScopedVector<AudioDecoder> prepend_audio_decoders) {
329 ScopedVector<VideoDecoder> video_decoders = std::move(prepend_video_decoders); 330 ScopedVector<VideoDecoder> video_decoders = std::move(prepend_video_decoders);
330 #if !defined(MEDIA_DISABLE_LIBVPX) 331 #if !defined(MEDIA_DISABLE_LIBVPX)
331 video_decoders.push_back(new VpxVideoDecoder()); 332 video_decoders.push_back(new VpxVideoDecoder());
332 #endif // !defined(MEDIA_DISABLE_LIBVPX) 333 #endif // !defined(MEDIA_DISABLE_LIBVPX)
333 334
334 // Android does not have an ffmpeg video decoder. 335 // Android does not have an ffmpeg video decoder.
335 #if !defined(MEDIA_DISABLE_FFMPEG) && !defined(OS_ANDROID) 336 #if !defined(MEDIA_DISABLE_FFMPEG) && !defined(OS_ANDROID)
336 video_decoders.push_back(new FFmpegVideoDecoder()); 337 video_decoders.push_back(
338 new FFmpegVideoDecoder(make_scoped_refptr(new MediaLog())));
337 #endif 339 #endif
338 340
339 // Simulate a 60Hz rendering sink. 341 // Simulate a 60Hz rendering sink.
340 video_sink_.reset(new NullVideoSink( 342 video_sink_.reset(new NullVideoSink(
341 clockless_playback_, base::TimeDelta::FromSecondsD(1.0 / 60), 343 clockless_playback_, base::TimeDelta::FromSecondsD(1.0 / 60),
342 base::Bind(&PipelineIntegrationTestBase::OnVideoFramePaint, 344 base::Bind(&PipelineIntegrationTestBase::OnVideoFramePaint,
343 base::Unretained(this)), 345 base::Unretained(this)),
344 message_loop_.task_runner())); 346 message_loop_.task_runner()));
345 347
346 // Disable frame dropping if hashing is enabled. 348 // Disable frame dropping if hashing is enabled.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 DCHECK(clockless_playback_); 447 DCHECK(clockless_playback_);
446 return clockless_audio_sink_->render_time(); 448 return clockless_audio_sink_->render_time();
447 } 449 }
448 450
449 base::TimeTicks DummyTickClock::NowTicks() { 451 base::TimeTicks DummyTickClock::NowTicks() {
450 now_ += base::TimeDelta::FromSeconds(60); 452 now_ += base::TimeDelta::FromSeconds(60);
451 return now_; 453 return now_;
452 } 454 }
453 455
454 } // namespace media 456 } // namespace media
OLDNEW
« media/filters/ffmpeg_video_decoder.cc ('K') | « media/renderers/default_renderer_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698