Commit e5147cf2 authored by Mina Almasry's avatar Mina Almasry Committed by Commit Bot

[Chromecast] Fix cast_media_unittests build

Currently cast_media_unittests can't build on platforms
(enable_video_with_mixed_audio == true && use_alsa == false), because of
not finding the VideoDecoderForMixer::InitializeGraphicsForTesting
symbol.

This symbol isn't useful on those platforms, so define a dummy that can be used in
this case.

BUG=b/124520050
TEST=Build cast_media_unittests

Change-Id: I35abfc3a549cd1fa185534d7b48d8dd93db14e04
Reviewed-on: https://chromium-review.googlesource.com/c/1475048
Commit-Queue: Mina Almasry <almasrymina@chromium.org>
Reviewed-by: default avatarKenneth MacKay <kmackay@chromium.org>
Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Auto-Submit: Mina Almasry <almasrymina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633876}
parent 97cdb93e
......@@ -77,7 +77,16 @@ cast_source_set("unittests") {
if (enable_video_with_mixed_audio) {
defines = [ "ENABLE_VIDEO_WITH_MIXED_AUDIO" ]
libs = ["videodecoderformixer"]
# libvideodecoderformixer is linked here for the
# VideoDecoderForMixer::InitializeGraphicsForTesting symbol. Currently only
# alsa platforms do anything useful in this initialization, so otherwise
# just link in a dummy.
if (use_alsa) {
libs = [ "videodecoderformixer" ]
} else {
sources += [ "backend/dummy_initialize_graphics_for_testing.cc" ]
}
}
data = [
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromecast/media/cma/backend/video_decoder_for_mixer.h"
namespace chromecast {
namespace media {
CHROMECAST_EXPORT void VideoDecoderForMixer::InitializeGraphicsForTesting() {
// No initialization required.
}
} // namespace media
} // namespace chromecast
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