summaryrefslogtreecommitdiffstats
path: root/cmds/stagefright
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/stagefright')
-rw-r--r--cmds/stagefright/record.cpp4
-rw-r--r--cmds/stagefright/stagefright.cpp11
2 files changed, 7 insertions, 8 deletions
diff --git a/cmds/stagefright/record.cpp b/cmds/stagefright/record.cpp
index 8c25d85..a31a5c0 100644
--- a/cmds/stagefright/record.cpp
+++ b/cmds/stagefright/record.cpp
@@ -19,13 +19,13 @@
#include <binder/ProcessState.h>
#include <media/stagefright/AudioPlayer.h>
#include <media/stagefright/CameraSource.h>
+#include <media/stagefright/FileSource.h>
#include <media/stagefright/MediaBufferGroup.h>
#include <media/stagefright/MediaDebug.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MetaData.h>
#include <media/stagefright/MediaExtractor.h>
#include <media/stagefright/MPEG4Writer.h>
-#include <media/stagefright/MmapSource.h>
#include <media/stagefright/OMXClient.h>
#include <media/stagefright/OMXCodec.h>
#include <media/MediaPlayerInterface.h>
@@ -105,7 +105,7 @@ sp<MediaSource> createSource(const char *filename) {
sp<MediaSource> source;
sp<MediaExtractor> extractor =
- MediaExtractor::Create(new MmapSource(filename));
+ MediaExtractor::Create(new FileSource(filename));
size_t num_tracks = extractor->countTracks();
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index d26e558..76ec54b 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -24,15 +24,14 @@
#include <binder/ProcessState.h>
#include <media/IMediaPlayerService.h>
#include <media/stagefright/CachingDataSource.h>
+#include <media/stagefright/FileSource.h>
#include <media/stagefright/HTTPDataSource.h>
#include <media/stagefright/JPEGSource.h>
#include <media/stagefright/MediaDebug.h>
#include <media/stagefright/MediaDefs.h>
-#include <media/stagefright/MediaPlayerImpl.h>
#include <media/stagefright/MediaExtractor.h>
#include <media/stagefright/MediaSource.h>
#include <media/stagefright/MetaData.h>
-#include <media/stagefright/MmapSource.h>
#include <media/stagefright/OMXClient.h>
#include <media/stagefright/OMXCodec.h>
@@ -52,9 +51,6 @@ static int64_t getNowUs() {
static void playSource(OMXClient *client, const sp<MediaSource> &source) {
sp<MetaData> meta = source->getFormat();
- int64_t durationUs;
- CHECK(meta->findInt64(kKeyDuration, &durationUs));
-
const char *mime;
CHECK(meta->findCString(kKeyMIMEType, &mime));
@@ -74,6 +70,9 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) {
rawSource->start();
if (gReproduceBug >= 3 && gReproduceBug <= 5) {
+ int64_t durationUs;
+ CHECK(meta->findInt64(kKeyDuration, &durationUs));
+
status_t err;
MediaBuffer *buffer;
MediaSource::ReadOptions options;
@@ -368,7 +367,7 @@ int main(int argc, char **argv) {
dataSource = new HTTPDataSource(filename);
dataSource = new CachingDataSource(dataSource, 64 * 1024, 10);
} else {
- dataSource = new MmapSource(filename);
+ dataSource = new FileSource(filename);
}
bool isJPEG = false;