Merge change I313953dc into eclair-mr2
* changes: Support raw audio sources in MediaPlayerImpl.
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include <media/stagefright/AudioPlayer.h>
|
#include <media/stagefright/AudioPlayer.h>
|
||||||
// #include <media/stagefright/CameraSource.h>
|
// #include <media/stagefright/CameraSource.h>
|
||||||
#include <media/stagefright/MediaDebug.h>
|
#include <media/stagefright/MediaDebug.h>
|
||||||
|
#include <media/stagefright/MediaDefs.h>
|
||||||
#include <media/stagefright/MediaExtractor.h>
|
#include <media/stagefright/MediaExtractor.h>
|
||||||
#include <media/stagefright/MediaPlayerImpl.h>
|
#include <media/stagefright/MediaPlayerImpl.h>
|
||||||
#include <media/stagefright/MetaData.h>
|
#include <media/stagefright/MetaData.h>
|
||||||
@@ -391,8 +392,15 @@ void MediaPlayerImpl::setAudioSource(const sp<MediaSource> &source) {
|
|||||||
|
|
||||||
sp<MetaData> meta = source->getFormat();
|
sp<MetaData> meta = source->getFormat();
|
||||||
|
|
||||||
mAudioDecoder = OMXCodec::Create(
|
const char *mime;
|
||||||
mClient.interface(), meta, false /* createEncoder */, source);
|
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) {
|
void MediaPlayerImpl::setVideoSource(const sp<MediaSource> &source) {
|
||||||
|
|||||||
Reference in New Issue
Block a user