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

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

Merge "MediaPlayer2: build static libs for some components"

parents 3e20fdd6 4049f13f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2,7 +2,9 @@
// libmediadrm
//

cc_library_shared {
// TODO: change it back to cc_library_shared when MediaPlayer2 switches to
// using NdkMediaDrm, instead of MediaDrm.java.
cc_library {
    name: "libmediadrm",


+5 −11
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ filegroup {
    ],
}

cc_library_shared {
cc_library {
    name: "libmedia",

    srcs: [
@@ -249,7 +249,7 @@ cc_library_shared {
    },
}

cc_library_shared {
cc_library {
    name: "libmedia_player2_util",

    srcs: [
@@ -259,6 +259,7 @@ cc_library_shared {
        "IMediaExtractorService.cpp",
        "IMediaSource.cpp",
        "IStreamSource.cpp",
        "MediaCodecBuffer.cpp",
        "MediaUtils.cpp",
        "Metadata.cpp",
        "NdkWrapper.cpp",
@@ -267,7 +268,6 @@ cc_library_shared {
    shared_libs: [
        "libbinder",
        "libcutils",
        "libgui",
        "liblog",
        "libmediaextractor",
        "libmediandk",
@@ -287,9 +287,6 @@ cc_library_shared {
    ],

    static_libs: [
        "libc_malloc_debug_backtrace",  // for memory heap analysis

        "libstagefright_nuplayer2",
        "libstagefright_rtsp",
        "libstagefright_timedtext",
    ],
@@ -316,16 +313,14 @@ cc_library_shared {
    },
}

cc_library_shared {
cc_library {
    name: "libmedia_player2",

    srcs: [
        "AudioParameter.cpp",
        "JAudioTrack.cpp",
        "MediaPlayer2Factory.cpp",
        "MediaPlayer2Manager.cpp",
        "TestPlayerStub.cpp",
        "TypeConverter.cpp",
        "mediaplayer2.cpp",
    ],

@@ -366,8 +361,7 @@ cc_library_shared {
    ],

    static_libs: [
        "libc_malloc_debug_backtrace",  // for memory heap analysis

        "libmedia_helper",
        "libstagefright_nuplayer2",
        "libstagefright_rtsp",
        "libstagefright_timedtext",
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <cutils/properties.h>
#include <media/DataSource.h>
#include <media/MediaPlayer2Engine.h>
#include <media/stagefright/FileSource.h>
#include <media/stagefright/foundation/ADebug.h>
#include <utils/Errors.h>
#include <utils/misc.h>
+10 −7
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@

#include <memunreachable/memunreachable.h>
#include <system/audio.h>
#include <system/window.h>

#include <private/android_filesystem_config.h>

@@ -470,8 +471,9 @@ status_t MediaPlayer2Manager::dump(int fd, const Vector<String16>& args)
        if (unreachableMemory) {
            result.append("\nDumping unreachable memory:\n");
            // TODO - should limit be an argument parameter?
            std::string s = GetUnreachableMemoryString(true /* contents */, 10000 /* limit */);
            result.append(s.c_str(), s.size());
            // TODO: enable GetUnreachableMemoryString if it's part of stable API
            //std::string s = GetUnreachableMemoryString(true /* contents */, 10000 /* limit */);
            //result.append(s.c_str(), s.size());
        }
    }
    write(fd, result.string(), result.size());
@@ -738,8 +740,8 @@ status_t MediaPlayer2Manager::Client::setDataSource(

void MediaPlayer2Manager::Client::disconnectNativeWindow_l() {
    if (mConnectedWindow != NULL && mConnectedWindow->getANativeWindow() != NULL) {
        status_t err = nativeWindowDisconnect(
                mConnectedWindow->getANativeWindow(), "disconnectNativeWindow");
        status_t err = native_window_api_disconnect(
                mConnectedWindow->getANativeWindow(), NATIVE_WINDOW_API_MEDIA);

        if (err != OK) {
            ALOGW("nativeWindowDisconnect returned an error: %s (%d)",
@@ -763,7 +765,8 @@ status_t MediaPlayer2Manager::Client::setVideoSurfaceTexture(
            && mConnectedWindow->getANativeWindow() == nww->getANativeWindow()) {
            return OK;
        }
        status_t err = nativeWindowConnect(nww->getANativeWindow(), "setVideoSurfaceTexture");
        status_t err = native_window_api_connect(
                nww->getANativeWindow(), NATIVE_WINDOW_API_MEDIA);

        if (err != OK) {
            ALOGE("setVideoSurfaceTexture failed: %d", err);
@@ -792,8 +795,8 @@ status_t MediaPlayer2Manager::Client::setVideoSurfaceTexture(
        mLock.unlock();
    } else if (nww != NULL) {
        mLock.unlock();
        status_t err = nativeWindowDisconnect(
                nww->getANativeWindow(), "disconnectNativeWindow");
        status_t err = native_window_api_disconnect(
                nww->getANativeWindow(), NATIVE_WINDOW_API_MEDIA);

        if (err != OK) {
            ALOGW("nativeWindowDisconnect returned an error: %s (%d)",
+0 −1
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/DataSourceFactory.h>
#include <media/stagefright/FileSource.h>
#include <media/stagefright/InterfaceUtils.h>
#include <media/stagefright/MediaBuffer.h>
#include <media/stagefright/MediaClock.h>
Loading