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

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

Merge "Move fragmented mp4 parser to libstagefright" into jb-mr1-dev

parents cd89e801 cb1f88c6
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -12,8 +12,6 @@ LOCAL_SRC_FILES:= \
        RTSPSource.cpp                  \
        StreamingSource.cpp             \
        mp4/MP4Source.cpp               \
        mp4/Parser.cpp                  \
        mp4/TrackFragment.cpp           \

LOCAL_C_INCLUDES := \
	$(TOP)/frameworks/av/media/libstagefright/httplive            \
+3 −3
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

#include "MP4Source.h"

#include "Parser.h"
#include "FragmentedMP4Parser.h"
#include "../NuPlayerStreamListener.h"

#include <media/IStreamSource.h>
@@ -26,7 +26,7 @@

namespace android {

struct StreamSource : public Parser::Source {
struct StreamSource : public FragmentedMP4Parser::Source {
    StreamSource(const sp<IStreamSource> &source)
        : mListener(new NuPlayer::NuPlayerStreamListener(source, 0)),
          mPosition(0) {
@@ -103,7 +103,7 @@ private:
MP4Source::MP4Source(const sp<IStreamSource> &source)
    : mSource(source),
      mLooper(new ALooper),
      mParser(new Parser),
      mParser(new FragmentedMP4Parser),
      mEOS(false) {
    mLooper->registerHandler(mParser);
}
+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@

namespace android {

struct Parser;
struct FragmentedMP4Parser;

struct MP4Source : public NuPlayer::Source {
    MP4Source(const sp<IStreamSource> &source);
@@ -41,7 +41,7 @@ protected:
private:
    sp<IStreamSource> mSource;
    sp<ALooper> mLooper;
    sp<Parser> mParser;
    sp<FragmentedMP4Parser> mParser;
    bool mEOS;

    DISALLOW_EVIL_CONSTRUCTORS(MP4Source);
+2 −0
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ LOCAL_SRC_FILES:= \
        WVMExtractor.cpp                  \
        XINGSeeker.cpp                    \
        avc_utils.cpp                     \
        mp4/FragmentedMP4Parser.cpp       \
        mp4/TrackFragment.cpp             \

LOCAL_C_INCLUDES:= \
        $(TOP)/frameworks/av/include/media/stagefright/timedtext \
+5 −5
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ namespace android {

struct ABuffer;

struct Parser : public AHandler {
struct FragmentedMP4Parser : public AHandler {
    struct Source : public RefBase {
        Source() {}

@@ -38,7 +38,7 @@ struct Parser : public AHandler {
        DISALLOW_EVIL_CONSTRUCTORS(Source);
    };

    Parser();
    FragmentedMP4Parser();

    void start(const char *filename);
    void start(const sp<Source> &source);
@@ -49,7 +49,7 @@ struct Parser : public AHandler {
    virtual void onMessageReceived(const sp<AMessage> &msg);

protected:
    virtual ~Parser();
    virtual ~FragmentedMP4Parser();

private:
    enum {
@@ -67,7 +67,7 @@ private:
    struct DispatchEntry {
        uint32_t mType;
        uint32_t mParentType;
        status_t (Parser::*mHandler)(uint32_t, size_t, uint64_t);
        status_t (FragmentedMP4Parser::*mHandler)(uint32_t, size_t, uint64_t);
    };

    struct Container {
@@ -246,7 +246,7 @@ private:
            sp<ABuffer> *dst,
            size_t offset, uint64_t size, size_t extra = 0) const;

    DISALLOW_EVIL_CONSTRUCTORS(Parser);
    DISALLOW_EVIL_CONSTRUCTORS(FragmentedMP4Parser);
};

}  // namespace android
Loading