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

Commit a3b71fa5 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "experimental support for fragmented mp4 playback in nuplayer" into jb-mr1-dev

parents 36cdfb18 84066788
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ LOCAL_SRC_FILES:= \

LOCAL_SHARED_LIBRARIES := \
	libstagefright liblog libutils libbinder libgui \
        libstagefright_foundation libmedia libmedia_native
        libstagefright_foundation libmedia libmedia_native libcutils

LOCAL_C_INCLUDES:= \
	frameworks/av/media/libstagefright \
+7 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include "utils/Log.h"

#include <binder/ProcessState.h>
#include <cutils/properties.h> // for property_get

#include <media/IStreamSource.h>
#include <media/mediaplayer.h>
@@ -342,8 +343,13 @@ int main(int argc, char **argv) {

    sp<IStreamSource> source;

    char prop[PROPERTY_VALUE_MAX];
    bool usemp4 = property_get("media.stagefright.use-mp4source", prop, NULL) &&
            (!strcmp(prop, "1") || !strcasecmp(prop, "true"));

    size_t len = strlen(argv[1]);
    if (len >= 3 && !strcasecmp(".ts", &argv[1][len - 3])) {
    if ((!usemp4 && len >= 3 && !strcasecmp(".ts", &argv[1][len - 3])) ||
        (usemp4 && len >= 4 && !strcasecmp(".mp4", &argv[1][len - 4]))) {
        int fd = open(argv[1], O_RDONLY);

        if (fd < 0) {
+5 −1
Original line number Diff line number Diff line
@@ -22,7 +22,11 @@

namespace android {

void hexdump(const void *_data, size_t size);
struct AString;

void hexdump(
        const void *_data, size_t size,
        size_t indent = 0, AString *appendTo = NULL);

}  // namespace android

+3 −0
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@ LOCAL_SRC_FILES:= \
        NuPlayerStreamListener.cpp      \
        RTSPSource.cpp                  \
        StreamingSource.cpp             \
        mp4/MP4Source.cpp               \
        mp4/Parser.cpp                  \
        mp4/TrackFragment.cpp           \

LOCAL_C_INCLUDES := \
	$(TOP)/frameworks/av/media/libstagefright/httplive            \
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ status_t NuPlayer::GenericSource::feedMoreTSData() {
    return OK;
}

sp<MetaData> NuPlayer::GenericSource::getFormat(bool audio) {
sp<MetaData> NuPlayer::GenericSource::getFormatMeta(bool audio) {
    sp<MediaSource> source = audio ? mAudioTrack.mSource : mVideoTrack.mSource;

    if (source == NULL) {
Loading