Commit 0c1995de authored by David Staessens's avatar David Staessens Committed by Commit Bot

Revert "media/gpu/test: Change DCHECKS to CHECKS in video decoder test code."

This reverts commit 3c8fa0a5.

Reason for revert: This change breaks the DecodeAccelSanityVP91 test.
The CHECKS also don't print the associated message in release builds, but only
"Trace/breakpoint trap (core dumped)" which makes them useless.

Original change's description:
> media/gpu/test: Change DCHECKS to CHECKS in video decoder test code.
>
> This CL changes some of the DCHECKS in the video_decode_accelerator_(perf_)tests
> code to CHECKS, so they are also performed in release builds. This will make it
> easier to debug some test-related issues.
>
> Ideally we would use the dcheck_always_on GN argument, but as the tests are
> build as part of the Chrome binary this would greatly increase Chrome build time
> as most libraries would have to be build twice.
>
> TEST=./video_decode_accelerator_tests on eve
>
> BUG=905520
>
> Change-Id: I207abf4d53a5a3d1d5684fd5cd2a045e401bc9ad
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1826297
> Commit-Queue: David Staessens <dstaessens@chromium.org>
> Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#703581}

TBR=acourbot@chromium.org,dstaessens@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 905520, 1013439
Change-Id: I56cb5bb2cb7496d993e0fd3015cd7dc8c4a11add
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1855141
Commit-Queue: David Staessens <dstaessens@chromium.org>
Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704949}
parent 116cb3ee
...@@ -59,8 +59,8 @@ Image::Image(const base::FilePath& file_path) : file_path_(file_path) {} ...@@ -59,8 +59,8 @@ Image::Image(const base::FilePath& file_path) : file_path_(file_path) {}
Image::~Image() {} Image::~Image() {}
bool Image::Load() { bool Image::Load() {
CHECK(!file_path_.empty()); DCHECK(!file_path_.empty());
CHECK(!IsLoaded()); DCHECK(!IsLoaded());
ResolveTestFilePath(&file_path_); ResolveTestFilePath(&file_path_);
......
...@@ -34,7 +34,7 @@ VideoFrameFileWriter::VideoFrameFileWriter(const base::FilePath& output_folder, ...@@ -34,7 +34,7 @@ VideoFrameFileWriter::VideoFrameFileWriter(const base::FilePath& output_folder,
VideoFrameFileWriter::~VideoFrameFileWriter() { VideoFrameFileWriter::~VideoFrameFileWriter() {
base::AutoLock auto_lock(frame_writer_lock_); base::AutoLock auto_lock(frame_writer_lock_);
CHECK_EQ(0u, num_frames_writing_); DCHECK_EQ(0u, num_frames_writing_);
frame_writer_thread_.Stop(); frame_writer_thread_.Stop();
} }
...@@ -147,7 +147,7 @@ void VideoFrameFileWriter::WriteVideoFramePNG( ...@@ -147,7 +147,7 @@ void VideoFrameFileWriter::WriteVideoFramePNG(
scoped_refptr<const VideoFrame> video_frame, scoped_refptr<const VideoFrame> video_frame,
const base::FilePath& filename) { const base::FilePath& filename) {
DCHECK_CALLED_ON_VALID_SEQUENCE(writer_thread_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(writer_thread_sequence_checker_);
CHECK(video_frame_mapper_); DCHECK(video_frame_mapper_);
auto mapped_frame = video_frame; auto mapped_frame = video_frame;
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
...@@ -189,7 +189,7 @@ void VideoFrameFileWriter::WriteVideoFrameYUV( ...@@ -189,7 +189,7 @@ void VideoFrameFileWriter::WriteVideoFrameYUV(
scoped_refptr<const VideoFrame> video_frame, scoped_refptr<const VideoFrame> video_frame,
const base::FilePath& filename) { const base::FilePath& filename) {
DCHECK_CALLED_ON_VALID_SEQUENCE(writer_thread_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(writer_thread_sequence_checker_);
CHECK(video_frame_mapper_); DCHECK(video_frame_mapper_);
auto mapped_frame = video_frame; auto mapped_frame = video_frame;
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
......
...@@ -291,11 +291,11 @@ scoped_refptr<VideoFrame> CloneVideoFrame( ...@@ -291,11 +291,11 @@ scoped_refptr<VideoFrame> CloneVideoFrame(
} }
scoped_refptr<const VideoFrame> CreateVideoFrameFromImage(const Image& image) { scoped_refptr<const VideoFrame> CreateVideoFrameFromImage(const Image& image) {
CHECK(image.IsLoaded()); DCHECK(image.IsLoaded());
const auto format = image.PixelFormat(); const auto format = image.PixelFormat();
const auto& visible_size = image.Size(); const auto& visible_size = image.Size();
// Loaded image data must be tight. // Loaded image data must be tight.
CHECK_EQ(image.DataSize(), VideoFrame::AllocationSize(format, visible_size)); DCHECK_EQ(image.DataSize(), VideoFrame::AllocationSize(format, visible_size));
// Create planes for layout. We cannot use WrapExternalData() because it // Create planes for layout. We cannot use WrapExternalData() because it
// calls GetDefaultLayout() and it supports only a few pixel formats. // calls GetDefaultLayout() and it supports only a few pixel formats.
......
...@@ -65,7 +65,7 @@ bool VideoFrameValidator::Initialize() { ...@@ -65,7 +65,7 @@ bool VideoFrameValidator::Initialize() {
void VideoFrameValidator::Destroy() { void VideoFrameValidator::Destroy() {
frame_validator_thread_.Stop(); frame_validator_thread_.Stop();
base::AutoLock auto_lock(frame_validator_lock_); base::AutoLock auto_lock(frame_validator_lock_);
CHECK_EQ(0u, num_frames_validating_); DCHECK_EQ(0u, num_frames_validating_);
} }
std::vector<VideoFrameValidator::MismatchedFrameInfo> std::vector<VideoFrameValidator::MismatchedFrameInfo>
......
...@@ -69,7 +69,7 @@ void FrameRendererDummy::Destroy() { ...@@ -69,7 +69,7 @@ void FrameRendererDummy::Destroy() {
renderer_thread_.Stop(); renderer_thread_.Stop();
base::AutoLock auto_lock(renderer_lock_); base::AutoLock auto_lock(renderer_lock_);
CHECK(pending_frames_.empty()); DCHECK(pending_frames_.empty());
} }
bool FrameRendererDummy::AcquireGLContext() { bool FrameRendererDummy::AcquireGLContext() {
...@@ -135,7 +135,7 @@ scoped_refptr<VideoFrame> FrameRendererDummy::CreateVideoFrame( ...@@ -135,7 +135,7 @@ scoped_refptr<VideoFrame> FrameRendererDummy::CreateVideoFrame(
// TODO(dstaessens): Remove this function when allocate mode is deprecated. // TODO(dstaessens): Remove this function when allocate mode is deprecated.
base::Optional<VideoFrameLayout> layout = base::Optional<VideoFrameLayout> layout =
CreateVideoFrameLayout(pixel_format, size); CreateVideoFrameLayout(pixel_format, size);
CHECK(layout); DCHECK(layout);
return VideoFrame::WrapExternalDataWithLayout(*layout, gfx::Rect(size), size, return VideoFrame::WrapExternalDataWithLayout(*layout, gfx::Rect(size), size,
nullptr, 0, base::TimeDelta()); nullptr, 0, base::TimeDelta());
} }
......
...@@ -261,7 +261,7 @@ void FrameRendererThumbnail::Initialize() { ...@@ -261,7 +261,7 @@ void FrameRendererThumbnail::Initialize() {
void FrameRendererThumbnail::DestroyTask(base::WaitableEvent* done) { void FrameRendererThumbnail::DestroyTask(base::WaitableEvent* done) {
DCHECK_CALLED_ON_VALID_SEQUENCE(renderer_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(renderer_sequence_checker_);
CHECK(mailbox_texture_map_.empty()); DCHECK(mailbox_texture_map_.empty());
DestroyThumbnailImageTask(); DestroyThumbnailImageTask();
......
...@@ -235,7 +235,7 @@ void TestVDAVideoDecoder::ProvidePictureBuffersWithVisibleRect( ...@@ -235,7 +235,7 @@ void TestVDAVideoDecoder::ProvidePictureBuffersWithVisibleRect(
#if BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) #if BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
handle = CreateGpuMemoryBufferHandle(video_frame.get()); handle = CreateGpuMemoryBufferHandle(video_frame.get());
CHECK(!handle.is_null()); DCHECK(!handle.is_null());
#else #else
NOTREACHED(); NOTREACHED();
#endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) #endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
...@@ -312,7 +312,7 @@ void TestVDAVideoDecoder::PictureReady(const Picture& picture) { ...@@ -312,7 +312,7 @@ void TestVDAVideoDecoder::PictureReady(const Picture& picture) {
video_frame->natural_size(), video_frame->timestamp()); video_frame->natural_size(), video_frame->timestamp());
} }
CHECK(wrapped_video_frame); DCHECK(wrapped_video_frame);
// Flag that the video frame was decoded in a power efficient way. // Flag that the video frame was decoded in a power efficient way.
wrapped_video_frame->metadata()->SetBoolean( wrapped_video_frame->metadata()->SetBoolean(
...@@ -345,7 +345,7 @@ void TestVDAVideoDecoder::ReusePictureBufferThunk( ...@@ -345,7 +345,7 @@ void TestVDAVideoDecoder::ReusePictureBufferThunk(
// Called when a picture buffer is ready to be re-used. // Called when a picture buffer is ready to be re-used.
void TestVDAVideoDecoder::ReusePictureBufferTask(int32_t picture_buffer_id) { void TestVDAVideoDecoder::ReusePictureBufferTask(int32_t picture_buffer_id) {
DCHECK_CALLED_ON_VALID_SEQUENCE(vda_wrapper_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(vda_wrapper_sequence_checker_);
CHECK(decoder_); DCHECK(decoder_);
DVLOGF(4) << "Picture buffer ID: " << picture_buffer_id; DVLOGF(4) << "Picture buffer ID: " << picture_buffer_id;
// Notify the decoder the picture buffer can be reused. The decoder will only // Notify the decoder the picture buffer can be reused. The decoder will only
...@@ -369,14 +369,14 @@ void TestVDAVideoDecoder::NotifyEndOfBitstreamBuffer( ...@@ -369,14 +369,14 @@ void TestVDAVideoDecoder::NotifyEndOfBitstreamBuffer(
void TestVDAVideoDecoder::NotifyFlushDone() { void TestVDAVideoDecoder::NotifyFlushDone() {
DCHECK_CALLED_ON_VALID_SEQUENCE(vda_wrapper_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(vda_wrapper_sequence_checker_);
CHECK(flush_cb_); DCHECK(flush_cb_);
std::move(flush_cb_).Run(DecodeStatus::OK); std::move(flush_cb_).Run(DecodeStatus::OK);
} }
void TestVDAVideoDecoder::NotifyResetDone() { void TestVDAVideoDecoder::NotifyResetDone() {
DCHECK_CALLED_ON_VALID_SEQUENCE(vda_wrapper_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(vda_wrapper_sequence_checker_);
CHECK(reset_cb_); DCHECK(reset_cb_);
std::move(reset_cb_).Run(); std::move(reset_cb_).Run();
} }
......
...@@ -33,8 +33,8 @@ Video::~Video() = default; ...@@ -33,8 +33,8 @@ Video::~Video() = default;
bool Video::Load() { bool Video::Load() {
// TODO(dstaessens@) Investigate reusing existing infrastructure such as // TODO(dstaessens@) Investigate reusing existing infrastructure such as
// DecoderBuffer. // DecoderBuffer.
CHECK(!file_path_.empty()); DCHECK(!file_path_.empty());
CHECK(data_.empty()); DCHECK(data_.empty());
base::Optional<base::FilePath> resolved_path = ResolveFilePath(file_path_); base::Optional<base::FilePath> resolved_path = ResolveFilePath(file_path_);
if (!resolved_path) { if (!resolved_path) {
......
...@@ -98,8 +98,8 @@ std::unique_ptr<VideoDecoderClient> VideoDecoderClient::Create( ...@@ -98,8 +98,8 @@ std::unique_ptr<VideoDecoderClient> VideoDecoderClient::Create(
bool VideoDecoderClient::CreateDecoder() { bool VideoDecoderClient::CreateDecoder() {
DCHECK_CALLED_ON_VALID_SEQUENCE(video_player_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(video_player_sequence_checker_);
CHECK(!decoder_client_thread_.IsRunning()); DCHECK(!decoder_client_thread_.IsRunning());
CHECK(event_cb_ && frame_renderer_); DCHECK(event_cb_ && frame_renderer_);
if (!decoder_client_thread_.Start()) { if (!decoder_client_thread_.Start()) {
VLOGF(1) << "Failed to start decoder thread"; VLOGF(1) << "Failed to start decoder thread";
...@@ -143,7 +143,7 @@ FrameRenderer* VideoDecoderClient::GetFrameRenderer() const { ...@@ -143,7 +143,7 @@ FrameRenderer* VideoDecoderClient::GetFrameRenderer() const {
void VideoDecoderClient::Initialize(const Video* video) { void VideoDecoderClient::Initialize(const Video* video) {
DCHECK_CALLED_ON_VALID_SEQUENCE(video_player_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(video_player_sequence_checker_);
CHECK(video); DCHECK(video);
base::WaitableEvent done; base::WaitableEvent done;
decoder_client_thread_.task_runner()->PostTask( decoder_client_thread_.task_runner()->PostTask(
...@@ -176,7 +176,7 @@ void VideoDecoderClient::Reset() { ...@@ -176,7 +176,7 @@ void VideoDecoderClient::Reset() {
void VideoDecoderClient::CreateDecoderTask(bool* success, void VideoDecoderClient::CreateDecoderTask(bool* success,
base::WaitableEvent* done) { base::WaitableEvent* done) {
DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_);
CHECK_EQ(decoder_client_state_, VideoDecoderClientState::kUninitialized); DCHECK_EQ(decoder_client_state_, VideoDecoderClientState::kUninitialized);
LOG_ASSERT(!decoder_) << "Can't create decoder: already created"; LOG_ASSERT(!decoder_) << "Can't create decoder: already created";
if (decoder_client_config_.use_vd) { if (decoder_client_config_.use_vd) {
...@@ -206,8 +206,8 @@ void VideoDecoderClient::CreateDecoderTask(bool* success, ...@@ -206,8 +206,8 @@ void VideoDecoderClient::CreateDecoderTask(bool* success,
void VideoDecoderClient::InitializeDecoderTask(const Video* video, void VideoDecoderClient::InitializeDecoderTask(const Video* video,
base::WaitableEvent* done) { base::WaitableEvent* done) {
DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_);
CHECK(decoder_client_state_ == VideoDecoderClientState::kUninitialized || DCHECK(decoder_client_state_ == VideoDecoderClientState::kUninitialized ||
decoder_client_state_ == VideoDecoderClientState::kIdle); decoder_client_state_ == VideoDecoderClientState::kIdle);
LOG_ASSERT(decoder_) << "Can't initialize decoder: not created yet"; LOG_ASSERT(decoder_) << "Can't initialize decoder: not created yet";
LOG_ASSERT(video); LOG_ASSERT(video);
...@@ -236,15 +236,15 @@ void VideoDecoderClient::InitializeDecoderTask(const Video* video, ...@@ -236,15 +236,15 @@ void VideoDecoderClient::InitializeDecoderTask(const Video* video,
decoder_->Initialize(config, false, nullptr, std::move(init_cb), output_cb, decoder_->Initialize(config, false, nullptr, std::move(init_cb), output_cb,
WaitingCB()); WaitingCB());
CHECK_LE(decoder_client_config_.max_outstanding_decode_requests, DCHECK_LE(decoder_client_config_.max_outstanding_decode_requests,
static_cast<size_t>(decoder_->GetMaxDecodeRequests())); static_cast<size_t>(decoder_->GetMaxDecodeRequests()));
done->Signal(); done->Signal();
} }
void VideoDecoderClient::DestroyDecoderTask(base::WaitableEvent* done) { void VideoDecoderClient::DestroyDecoderTask(base::WaitableEvent* done) {
DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_);
CHECK_EQ(0u, num_outstanding_decode_requests_); DCHECK_EQ(0u, num_outstanding_decode_requests_);
DVLOGF(4); DVLOGF(4);
// Invalidate all scheduled tasks. // Invalidate all scheduled tasks.
...@@ -355,8 +355,8 @@ void VideoDecoderClient::ResetTask() { ...@@ -355,8 +355,8 @@ void VideoDecoderClient::ResetTask() {
void VideoDecoderClient::DecoderInitializedTask(bool status) { void VideoDecoderClient::DecoderInitializedTask(bool status) {
DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_);
CHECK(decoder_client_state_ == VideoDecoderClientState::kUninitialized || DCHECK(decoder_client_state_ == VideoDecoderClientState::kUninitialized ||
decoder_client_state_ == VideoDecoderClientState::kIdle); decoder_client_state_ == VideoDecoderClientState::kIdle);
LOG_ASSERT(status) << "Initializing decoder failed"; LOG_ASSERT(status) << "Initializing decoder failed";
decoder_client_state_ = VideoDecoderClientState::kIdle; decoder_client_state_ = VideoDecoderClientState::kIdle;
...@@ -365,7 +365,7 @@ void VideoDecoderClient::DecoderInitializedTask(bool status) { ...@@ -365,7 +365,7 @@ void VideoDecoderClient::DecoderInitializedTask(bool status) {
void VideoDecoderClient::DecodeDoneTask(media::DecodeStatus status) { void VideoDecoderClient::DecodeDoneTask(media::DecodeStatus status) {
DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_);
CHECK_NE(VideoDecoderClientState::kIdle, decoder_client_state_); DCHECK_NE(VideoDecoderClientState::kIdle, decoder_client_state_);
LOG_ASSERT(status != media::DecodeStatus::ABORTED || LOG_ASSERT(status != media::DecodeStatus::ABORTED ||
decoder_client_state_ == VideoDecoderClientState::kResetting); decoder_client_state_ == VideoDecoderClientState::kResetting);
DVLOGF(4); DVLOGF(4);
...@@ -397,7 +397,7 @@ void VideoDecoderClient::FrameReadyTask(scoped_refptr<VideoFrame> video_frame) { ...@@ -397,7 +397,7 @@ void VideoDecoderClient::FrameReadyTask(scoped_refptr<VideoFrame> video_frame) {
void VideoDecoderClient::FlushDoneTask(media::DecodeStatus status) { void VideoDecoderClient::FlushDoneTask(media::DecodeStatus status) {
DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_);
CHECK_EQ(0u, num_outstanding_decode_requests_); DCHECK_EQ(0u, num_outstanding_decode_requests_);
// Send an EOS frame to the renderer, so it can reset any internal state it // Send an EOS frame to the renderer, so it can reset any internal state it
// might keep in preparation of the next stream of video frames. // might keep in preparation of the next stream of video frames.
...@@ -408,7 +408,7 @@ void VideoDecoderClient::FlushDoneTask(media::DecodeStatus status) { ...@@ -408,7 +408,7 @@ void VideoDecoderClient::FlushDoneTask(media::DecodeStatus status) {
void VideoDecoderClient::ResetDoneTask() { void VideoDecoderClient::ResetDoneTask() {
DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_client_sequence_checker_);
CHECK_EQ(0u, num_outstanding_decode_requests_); DCHECK_EQ(0u, num_outstanding_decode_requests_);
// We finished resetting to a different point in the stream, so we should // We finished resetting to a different point in the stream, so we should
// update the frame index. Currently only resetting to the start of the stream // update the frame index. Currently only resetting to the start of the stream
......
...@@ -50,8 +50,8 @@ bool VideoPlayer::CreateDecoderClient( ...@@ -50,8 +50,8 @@ bool VideoPlayer::CreateDecoderClient(
std::unique_ptr<FrameRenderer> frame_renderer, std::unique_ptr<FrameRenderer> frame_renderer,
std::vector<std::unique_ptr<VideoFrameProcessor>> frame_processors) { std::vector<std::unique_ptr<VideoFrameProcessor>> frame_processors) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
CHECK_EQ(video_player_state_, VideoPlayerState::kUninitialized); DCHECK_EQ(video_player_state_, VideoPlayerState::kUninitialized);
CHECK(frame_renderer); DCHECK(frame_renderer);
DVLOGF(4); DVLOGF(4);
// base::Unretained is safe here as we will never receive callbacks after // base::Unretained is safe here as we will never receive callbacks after
...@@ -73,7 +73,7 @@ bool VideoPlayer::CreateDecoderClient( ...@@ -73,7 +73,7 @@ bool VideoPlayer::CreateDecoderClient(
void VideoPlayer::Destroy() { void VideoPlayer::Destroy() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
CHECK_NE(video_player_state_, VideoPlayerState::kDestroyed); DCHECK_NE(video_player_state_, VideoPlayerState::kDestroyed);
DVLOGF(4); DVLOGF(4);
decoder_client_.reset(); decoder_client_.reset();
...@@ -89,9 +89,9 @@ void VideoPlayer::SetEventWaitTimeout(base::TimeDelta timeout) { ...@@ -89,9 +89,9 @@ void VideoPlayer::SetEventWaitTimeout(base::TimeDelta timeout) {
bool VideoPlayer::Initialize(const Video* video) { bool VideoPlayer::Initialize(const Video* video) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
CHECK(video_player_state_ == VideoPlayerState::kUninitialized || DCHECK(video_player_state_ == VideoPlayerState::kUninitialized ||
video_player_state_ == VideoPlayerState::kIdle); video_player_state_ == VideoPlayerState::kIdle);
CHECK(video); DCHECK(video);
DVLOGF(4); DVLOGF(4);
decoder_client_->Initialize(video); decoder_client_->Initialize(video);
...@@ -107,7 +107,7 @@ bool VideoPlayer::Initialize(const Video* video) { ...@@ -107,7 +107,7 @@ bool VideoPlayer::Initialize(const Video* video) {
void VideoPlayer::Play() { void VideoPlayer::Play() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
CHECK_EQ(video_player_state_, VideoPlayerState::kIdle); DCHECK_EQ(video_player_state_, VideoPlayerState::kIdle);
DVLOGF(4); DVLOGF(4);
// Play until the end of the video. // Play until the end of the video.
...@@ -116,8 +116,8 @@ void VideoPlayer::Play() { ...@@ -116,8 +116,8 @@ void VideoPlayer::Play() {
void VideoPlayer::PlayUntil(VideoPlayerEvent event, size_t event_count) { void VideoPlayer::PlayUntil(VideoPlayerEvent event, size_t event_count) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
CHECK_EQ(video_player_state_, VideoPlayerState::kIdle); DCHECK_EQ(video_player_state_, VideoPlayerState::kIdle);
CHECK(video_); DCHECK(video_);
DVLOGF(4); DVLOGF(4);
// Start decoding the video. // Start decoding the video.
...@@ -163,7 +163,7 @@ FrameRenderer* VideoPlayer::GetFrameRenderer() const { ...@@ -163,7 +163,7 @@ FrameRenderer* VideoPlayer::GetFrameRenderer() const {
bool VideoPlayer::WaitForEvent(VideoPlayerEvent event, size_t times) { bool VideoPlayer::WaitForEvent(VideoPlayerEvent event, size_t times) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
CHECK_GE(times, 1u); DCHECK_GE(times, 1u);
DVLOGF(4) << "Event ID: " << static_cast<size_t>(event); DVLOGF(4) << "Event ID: " << static_cast<size_t>(event);
base::TimeDelta time_waiting; base::TimeDelta time_waiting;
......
...@@ -74,7 +74,7 @@ void VideoPlayerTestEnvironment::SetUp() { ...@@ -74,7 +74,7 @@ void VideoPlayerTestEnvironment::SetUp() {
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
// VideoDecoders always require import mode to be supported. // VideoDecoders always require import mode to be supported.
CHECK(!use_vd_ || import_supported_); DCHECK(!use_vd_ || import_supported_);
} }
const media::test::Video* VideoPlayerTestEnvironment::Video() const { const media::test::Video* VideoPlayerTestEnvironment::Video() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment