Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33de46e8 authored by Anton Hansson's avatar Anton Hansson
Browse files

Convert three media binaries to Android.bp

This converts mediaserver, mediametrics and screenrecord and the
libraries they depend on to Android.bp

See build/soong/README.md for more information.

Bug: 122331945
Bug: 80410283
Test: boot blueline
Test: youtube
Test: screenrecord
Change-Id: I132b8b4f7965449df68fb1544034a7241c594a63
parent 1128b3fa
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
// Copyright 2013 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

cc_binary {
    name: "screenrecord",

    srcs: [
        "screenrecord.cpp",
        "EglWindow.cpp",
        "FrameOutput.cpp",
        "TextRenderer.cpp",
        "Overlay.cpp",
        "Program.cpp",
    ],

    shared_libs: [
        "libstagefright",
        "libmedia",
        "libmedia_omx",
        "libutils",
        "libbinder",
        "libstagefright_foundation",
        "libjpeg",
        "libui",
        "libgui",
        "libcutils",
        "liblog",
        "libEGL",
        "libGLESv2",
    ],

    include_dirs: [
        "frameworks/av/media/libstagefright",
        "frameworks/av/media/libstagefright/include",
        "frameworks/native/include/media/openmax",
    ],

    cflags: [
        "-Werror",
        "-Wall",
        "-Wno-multichar",
        //"-UNDEBUG",
    ]
}

cmds/screenrecord/Android.mk

deleted100644 → 0
+0 −45
Original line number Diff line number Diff line
# Copyright 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
	screenrecord.cpp \
	EglWindow.cpp \
	FrameOutput.cpp \
	TextRenderer.cpp \
	Overlay.cpp \
	Program.cpp

LOCAL_SHARED_LIBRARIES := \
	libstagefright libmedia libmedia_omx libutils libbinder libstagefright_foundation \
	libjpeg libui libgui libcutils liblog libEGL libGLESv2

LOCAL_C_INCLUDES := \
	frameworks/av/media/libstagefright \
	frameworks/av/media/libstagefright/include \
	frameworks/native/include/media/openmax \
	external/jpeg

LOCAL_CFLAGS := -Werror -Wall
LOCAL_CFLAGS += -Wno-multichar
#LOCAL_CFLAGS += -UNDEBUG

LOCAL_MODULE_TAGS := optional

LOCAL_MODULE:= screenrecord

include $(BUILD_EXECUTABLE)
+46 −0
Original line number Diff line number Diff line

cc_library_static {
    name: "libregistermsext",
    srcs: ["register.cpp"],

    cflags: [
        "-Werror",
        "-Wall",
    ],
}

cc_binary {
    name: "mediaserver",

    srcs: ["main_mediaserver.cpp"],

    shared_libs: [
        "libresourcemanagerservice",
        "liblog",
        "libmediaplayerservice",
        "libutils",
        "libbinder",
        "libandroidicu",
        "android.hardware.media.omx@1.0",
    ],

    static_libs: [
        "libicuandroid_utils",
        "libregistermsext",
    ],

    include_dirs: [
        "frameworks/av/media/libmediaplayerservice",
        "frameworks/av/services/mediaresourcemanager",
    ],

    compile_multilib: "32",

    init_rc: ["mediaserver.rc"],

    cflags: [
        "-Werror",
        "-Wall",
    ],

}

media/mediaserver/Android.mk

deleted100644 → 0
+0 −41
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)

ifneq ($(BOARD_USE_CUSTOM_MEDIASERVEREXTENSIONS),true)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := register.cpp
LOCAL_MODULE := libregistermsext
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Werror -Wall
include $(BUILD_STATIC_LIBRARY)
endif

include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
        main_mediaserver.cpp

LOCAL_SHARED_LIBRARIES := \
        libresourcemanagerservice \
        liblog \
        libmediaplayerservice \
        libutils \
        libbinder \
        libandroidicu \
        android.hardware.media.omx@1.0 \

LOCAL_STATIC_LIBRARIES := \
        libicuandroid_utils \
        libregistermsext

LOCAL_C_INCLUDES := \
        frameworks/av/media/libmediaplayerservice \
        frameworks/av/services/mediaresourcemanager \

LOCAL_MODULE:= mediaserver
LOCAL_32_BIT_ONLY := true

LOCAL_INIT_RC := mediaserver.rc

LOCAL_CFLAGS := -Werror -Wall

include $(BUILD_EXECUTABLE)
+49 −0
Original line number Diff line number Diff line
// Media Statistics service
//

cc_binary {
    name: "mediametrics",

    srcs: [
        "main_mediametrics.cpp",
        "MediaAnalyticsService.cpp",
    ],

    shared_libs: [
        "libcutils",
        "liblog",
        "libmedia",
        "libutils",
        "libbinder",
        "libdl",
        "libgui",
        "libmedia",
        "libmediautils",
        "libmediametrics",
        "libstagefright_foundation",
        "libutils",
    ],

    static_libs: ["libregistermsext"],

    include_dirs: [
        "frameworks/av/media/libstagefright/include",
        "frameworks/av/media/libstagefright/rtsp",
        "frameworks/av/media/libstagefright/webm",
        "frameworks/av/include/media",
        "frameworks/av/include/camera",
        "frameworks/native/include/media/openmax",
        "frameworks/native/include/media/hardware",
        "external/tremolo/Tremolo",
    ],

    init_rc: ["mediametrics.rc"],

    cflags: [
        "-Werror",
        "-Wall",
        "-Wno-error=deprecated-declarations",
    ],
    clang: true,

}
Loading