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

Commit 76c12009 authored by Robert Shih's avatar Robert Shih Committed by android-build-merger
Browse files

Merge "Re-enable source re-scan for StreamingSource" into nyc-dev

am: d4c4d224

* commit 'd4c4d224':
  Re-enable source re-scan for StreamingSource

Change-Id: I0c1460ad7178b1b617679108fa156b81003f375b
parents 514d8c51 d4c4d224
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/MediaSource.h>
#include <media/stagefright/MetaData.h>
#include <media/stagefright/Utils.h>

namespace android {

@@ -217,14 +218,21 @@ sp<AnotherPacketSource> NuPlayer::StreamingSource::getSource(bool audio) {
    return static_cast<AnotherPacketSource *>(source.get());
}

sp<MetaData> NuPlayer::StreamingSource::getFormatMeta(bool audio) {
sp<AMessage> NuPlayer::StreamingSource::getFormat(bool audio) {
    sp<AnotherPacketSource> source = getSource(audio);

    sp<AMessage> format = new AMessage;
    if (source == NULL) {
        return NULL;
        format->setInt32("err", -EWOULDBLOCK);
        return format;
    }

    return source->getFormat();
    sp<MetaData> meta = source->getFormat();
    status_t err = convertMetaDataToMessage(meta, &format);
    if (err != OK) {
        format->setInt32("err", err);
    }
    return format;
}

status_t NuPlayer::StreamingSource::dequeueAccessUnit(
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ protected:

    virtual void onMessageReceived(const sp<AMessage> &msg);

    virtual sp<MetaData> getFormatMeta(bool audio);
    virtual sp<AMessage> getFormat(bool audio);

private:
    enum {