Skip to content

Commit

Permalink
compat: media: don't put Android 5.x as a requirement for MediaCodecS…
Browse files Browse the repository at this point in the history
…ource

We will most likely get the case that a device running Android 4.x
will get a backport of the MediaCodecSource class. In that case we
should still support it through the media compat API. The device
running Android 4.x then only has to specify a

 BOARD_HAS_MEDIA_CODEC_SOURCE := true

in its BoardConfig.mk and we will add support for it.
  • Loading branch information
morphis committed Apr 13, 2016
1 parent d1d1cab commit 2deb3e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compat/media/Android.mk
Expand Up @@ -25,6 +25,11 @@ HAS_ANDROID_5 := $(shell test $(ANDROID_VERSION_MAJOR) -ge 5 && echo true)

ifeq ($(HAS_ANDROID_5),true)
LOCAL_C_INCLUDES += system/media/camera/include

# All devices having Android 5.x also have MediaCodecSource
# available so we don't have to put a switch for this into
# any BoardConfig.mk
BOARD_HAS_MEDIA_CODEC_SOURCE := true
endif

LOCAL_MODULE := camera_service
Expand Down Expand Up @@ -65,7 +70,7 @@ LOCAL_SRC_FILES:= \
media_message_layer.cpp \
media_meta_data_layer.cpp

ifeq ($(HAS_ANDROID_5),true)
ifeq ($(BOARD_HAS_MEDIA_CODEC_SOURCE),true)
# MediaCodecSource support is only available starting with
# Android 5.x so we have to limit support for it.
LOCAL_SRC_FILES += media_codec_source_layer.cpp
Expand Down

0 comments on commit 2deb3e7

Please sign in to comment.