From 27366fc9540cb642ee4856957dabffe7ddf1f901 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 20 Nov 2009 09:32:46 -0800 Subject: Squashed commit of the following: commit 1efc38dc3c33fef57b759002db3965ed07a28cb0 Author: Andreas Huber Date: Thu Nov 19 14:36:14 2009 -0800 Sending the SEEK-COMPLETE notification temporarily broke seeking backwards in time behaviour. This is now fixed. Also, get rid of the semi-random delay after posting buffers to surface flinger in favour of delaying the buffer release until the next frame is displayed. commit 51973062eb5ee63fd64b845d72bac517cc3369cf Author: Andreas Huber Date: Wed Nov 18 14:01:43 2009 -0800 Fix one more unit test, properly send seek-complete notification only after seek actually completed. commit cb22250b34b1fcfe1bf459723a761fd003950229 Author: Andreas Huber Date: Wed Nov 18 12:31:36 2009 -0800 Fix seek-while-paused in AwesomePlayer, revert to using FileSource if MmapSource fails. commit 25eb9241138ddf7bb27ce90657116c5f8a94d880 Author: Andreas Huber Date: Wed Nov 18 12:30:40 2009 -0800 Support seeking and duration in AMRExtractor, assuming all frames are the same size. commit 44192f2ebb7ea3bbd3ba5910025692dbc6a08faa Author: Andreas Huber Date: Wed Nov 18 10:21:44 2009 -0800 MediaPlayerImpl is dead, long live AwesomePlayer. commit c5b52d3c0674f5dc94db506afbce52401cceddac Author: Andreas Huber Date: Wed Nov 18 09:42:23 2009 -0800 New implementation of the stagefright mediaplayer. --- cmds/stagefright/record.cpp | 4 ++-- cmds/stagefright/stagefright.cpp | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'cmds/stagefright') 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 #include #include +#include #include #include #include #include #include #include -#include #include #include #include @@ -105,7 +105,7 @@ sp createSource(const char *filename) { sp source; sp 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 #include #include +#include #include #include #include #include -#include #include #include #include -#include #include #include @@ -52,9 +51,6 @@ static int64_t getNowUs() { static void playSource(OMXClient *client, const sp &source) { sp 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 &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; -- cgit v1.1