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

Commit 0533aade authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I313953dc into eclair-mr2

* changes:
  Support raw audio sources in MediaPlayerImpl.
parents 12bc3af0 313953dc
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include <media/stagefright/AudioPlayer.h>
// #include <media/stagefright/CameraSource.h>
#include <media/stagefright/MediaDebug.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaExtractor.h>
#include <media/stagefright/MediaPlayerImpl.h>
#include <media/stagefright/MetaData.h>
@@ -391,9 +392,16 @@ void MediaPlayerImpl::setAudioSource(const sp<MediaSource> &source) {

    sp<MetaData> meta = source->getFormat();

    const char *mime;
    CHECK(meta->findCString(kKeyMIMEType, &mime));

    if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_RAW)) {
        mAudioDecoder = source;
    } else {
        mAudioDecoder = OMXCodec::Create(
                mClient.interface(), meta, false /* createEncoder */, source);
    }
}

void MediaPlayerImpl::setVideoSource(const sp<MediaSource> &source) {
    LOGI("setVideoSource");