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

Commit d581d9a0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "Codec2 Move"

* changes:
  Rename Codec2-related entities
  Move Codec2-related code from hardware/google/av
parents f0cefec8 d0f0e14d
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
cc_library_shared {
    name: "libcodec2",
    vendor_available: true,

    srcs: ["C2.cpp"],

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

    include_dirs: [
        "frameworks/native/include/media/hardware",
    ],

    export_include_dirs: [
        "include",
    ],

    header_libs: [
        "libhardware_headers",
        "libutils_headers",
    ],

    export_header_lib_headers: [
        "libhardware_headers",
        "libutils_headers",
    ],

    sanitize: {
        misc_undefined: [
            "unsigned-integer-overflow",
            "signed-integer-overflow",
        ],
        cfi: false, // true,
        diag: {
            cfi: false, // true,
        },
    },

    ldflags: ["-Wl,-Bsymbolic"],
}
+48 −0
Original line number Diff line number Diff line
# =============================================================================
# DOCUMENTATION GENERATION
# =============================================================================
C2_ROOT := $(call my-dir)

C2_DOCS_ROOT := $(OUT_DIR)/target/common/docs/codec2

C2_OUT_TEMP := $(PRODUCT_OUT)/gen/ETC/Codec2-docs_intermediates

C2_DOXY := $(or $(shell command -v doxygen),\
		$(shell command -v /Applications/Doxygen.app/Contents/Resources/doxygen))

.PHONY: check-doxygen
check-doxygen:
ifndef C2_DOXY
	$(error 'doxygen is not available')
endif

$(C2_OUT_TEMP)/doxy-api.config: $(C2_ROOT)/docs/doxygen.config
	# only document include directory, no internal sections
	sed 's/\(^INPUT *=.*\)/\1include\//; \
	s/\(^INTERNAL_DOCS *= *\).*/\1NO/; \
	s/\(^ENABLED_SECTIONS *=.*\)INTERNAL\(.*\).*/\1\2/; \
	s:\(^OUTPUT_DIRECTORY *= \)out:\1'$(OUT_DIR)':;' \
		$(C2_ROOT)/docs/doxygen.config > $@

$(C2_OUT_TEMP)/doxy-internal.config: $(C2_ROOT)/docs/doxygen.config
	sed 's:\(^OUTPUT_DIRECTORY *= \)out\(.*\)api:\1'$(OUT_DIR)'\2internal:;' \
		$(C2_ROOT)/docs/doxygen.config > $@

.PHONY: docs-api
docs-api: $(C2_OUT_TEMP)/doxy-api.config check-doxygen
	echo API docs are building in $(C2_DOCS_ROOT)/api
	rm -rf $(C2_DOCS_ROOT)/api
	mkdir -p $(C2_DOCS_ROOT)/api
	$(C2_DOXY) $(C2_OUT_TEMP)/doxy-api.config

.PHONY: docs-internal
docs-internal: $(C2_OUT_TEMP)/doxy-internal.config check-doxygen
	echo Internal docs are building in $(C2_DOCS_ROOT)/internal
	rm -rf $(C2_DOCS_ROOT)/internal
	mkdir -p $(C2_DOCS_ROOT)/internal
	$(C2_DOXY) $(C2_OUT_TEMP)/doxy-internal.config

.PHONY: docs-all
docs-all: docs-api docs-internal

include $(call all-makefiles-under,$(call my-dir))

media/codec2/C2.cpp

0 → 100644
+33 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 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.
 */

#include <C2.h>
#include <C2Buffer.h>
#include <C2Component.h>
#include <C2Config.h>
#include <C2Param.h>
#include <C2ParamDef.h>
#include <C2Work.h>

/**
 * There is nothing here yet. This library is built to see what symbols and methods get
 * defined as part of the API include files.
 *
 * Going forward, the Codec2 library will contain utility methods that are useful for
 * Codec2 clients.
 */

+30 −0
Original line number Diff line number Diff line
cc_library_shared {
    name: "libcodec2_soft_aacdec",
    defaults: [
        "libcodec2_soft-defaults",
        "libcodec2_soft_sanitize_all-defaults",
    ],

    srcs: [
        "C2SoftAacDec.cpp",
        "DrcPresModeWrap.cpp",
    ],

    static_libs: [
        "libFraunhoferAAC",
    ],
}

cc_library_shared {
    name: "libcodec2_soft_aacenc",
    defaults: [
        "libcodec2_soft-defaults",
        "libcodec2_soft_sanitize_all-defaults",
    ],

    srcs: ["C2SoftAacEnc.cpp"],

    static_libs: [
        "libFraunhoferAAC",
    ],
}
+941 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading