From 71bd6f8faf362659d3a9052549607039585f4922 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Thu, 25 Oct 2012 12:07:27 -0700 Subject: Stagefright command line tool: input file name last Show in usage that the source file name comes last, and is preceded by the options. Change-Id: I8407fc36c8d19785cb2e6e1f7b7a352a8d86f889 --- cmds/stagefright/stagefright.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index b92a8a0..1e0e7f8 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -589,7 +589,7 @@ static void performSeekTest(const sp &source) { } static void usage(const char *me) { - fprintf(stderr, "usage: %s\n", me); + fprintf(stderr, "usage: %s [options] [input_filename]\n", me); fprintf(stderr, " -h(elp)\n"); fprintf(stderr, " -a(udio)\n"); fprintf(stderr, " -n repetitions\n"); @@ -607,8 +607,8 @@ static void usage(const char *me) { "(video only)\n"); fprintf(stderr, " -S allocate buffers from a surface\n"); fprintf(stderr, " -T allocate buffers from a surface texture\n"); - fprintf(stderr, " -d(ump) filename (raw stream data to a file)\n"); - fprintf(stderr, " -D(ump) filename (decoded PCM data to a file)\n"); + fprintf(stderr, " -d(ump) output_filename (raw stream data to a file)\n"); + fprintf(stderr, " -D(ump) output_filename (decoded PCM data to a file)\n"); } static void dumpCodecProfiles(const sp& omx, bool queryDecoders) { -- cgit v1.1 From aef79b0676d8f0ee8ef637ec8be5ba73225b038d Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Tue, 11 Dec 2012 17:03:12 -0800 Subject: stop using a deprecated SurfaceTextureClient ctor Change-Id: I792277b0d711da22f6b2abb7f1d837450d6af8e2 --- cmds/stagefright/stagefright.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 1e0e7f8..148b66e 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -941,7 +941,7 @@ int main(int argc, char **argv) { CHECK(useSurfaceTexAlloc); sp texture = new SurfaceTexture(0 /* tex */); - gSurface = new SurfaceTextureClient(texture); + gSurface = new SurfaceTextureClient(texture->getBufferQueue()); } CHECK_EQ((status_t)OK, -- cgit v1.1 From af0351f930459098d98792d569b1436c43c536d8 Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Wed, 12 Dec 2012 12:08:51 -0800 Subject: Revert "stop using a deprecated SurfaceTextureClient ctor" This reverts commit aef79b0676d8f0ee8ef637ec8be5ba73225b038d Change-Id: I5f6cf4d6d5dc895a9426f212dfc8a25b4bf2d23a --- cmds/stagefright/stagefright.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 148b66e..1e0e7f8 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -941,7 +941,7 @@ int main(int argc, char **argv) { CHECK(useSurfaceTexAlloc); sp texture = new SurfaceTexture(0 /* tex */); - gSurface = new SurfaceTextureClient(texture->getBufferQueue()); + gSurface = new SurfaceTextureClient(texture); } CHECK_EQ((status_t)OK, -- cgit v1.1 From 84b6440fa1d1274267deabe0bd8dc626b5548e4c Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Wed, 12 Dec 2012 12:15:23 -0800 Subject: stop using a deprecated SurfaceTextureClient ctor" --- cmds/stagefright/stagefright.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 1e0e7f8..148b66e 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -941,7 +941,7 @@ int main(int argc, char **argv) { CHECK(useSurfaceTexAlloc); sp texture = new SurfaceTexture(0 /* tex */); - gSurface = new SurfaceTextureClient(texture); + gSurface = new SurfaceTextureClient(texture->getBufferQueue()); } CHECK_EQ((status_t)OK, -- cgit v1.1 From 8ba01021b573889802e67e029225a96f0dfa471a Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Tue, 18 Dec 2012 09:46:54 -0800 Subject: Rename ISurfaceTexture and SurfaceTexture The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5 --- cmds/stagefright/stagefright.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 148b66e..1002ac4 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -940,7 +940,7 @@ int main(int argc, char **argv) { } else { CHECK(useSurfaceTexAlloc); - sp texture = new SurfaceTexture(0 /* tex */); + sp texture = new GLConsumer(0 /* tex */); gSurface = new SurfaceTextureClient(texture->getBufferQueue()); } -- cgit v1.1 From 8d6cc842e8d525405c68e57fdf3bc5da0b4d7e87 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Fri, 3 Feb 2012 11:06:53 -0800 Subject: Remove unnecessary parameter Just get the parameter on server side Change-Id: I433a63104dbb257e0d862be2ab61847cb36d1c15 --- cmds/stagefright/stagefright.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 148b66e..ad68a21 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -22,7 +22,6 @@ #include #include -#include #include "jpeg.h" #include "SineSource.h" @@ -821,7 +820,7 @@ int main(int argc, char **argv) { CHECK(service.get() != NULL); sp retriever = - service->createMetadataRetriever(getpid()); + service->createMetadataRetriever(); CHECK(retriever != NULL); -- cgit v1.1 From 0df36ec3303c2c6bf9b42c07945ac8bd234153f3 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Wed, 6 Feb 2013 10:44:39 -0800 Subject: HLS now properly publishes its "seekable" flags after connection has successfully completed and a sufficient amount of data fetched, and only then signals that preparation is completed. Change-Id: I7684a14238b826909f518f2af506966e522dfcfc --- cmds/stagefright/stagefright.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 2b935ed..2aae64d 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include "include/LiveSession.h" #include "include/NuCachedSource2.h" #include @@ -1004,7 +1005,7 @@ int main(int argc, char **argv) { looper = new ALooper; looper->start(); } - liveSession = new LiveSession; + liveSession = new LiveSession(NULL /* notify */); looper->registerHandler(liveSession); liveSession->connect(uri.string()); -- cgit v1.1 From 1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 14 Feb 2013 17:11:27 -0800 Subject: Refactoring: Rename SurfaceTextureClient to Surface Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830 --- cmds/stagefright/stagefright.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 2aae64d..5bdbfbb 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -53,7 +53,7 @@ #include -#include +#include #include using namespace android; @@ -941,7 +941,7 @@ int main(int argc, char **argv) { CHECK(useSurfaceTexAlloc); sp texture = new GLConsumer(0 /* tex */); - gSurface = new SurfaceTextureClient(texture->getBufferQueue()); + gSurface = new Surface(texture->getBufferQueue()); } CHECK_EQ((status_t)OK, -- cgit v1.1 From de05c8eab188e98798f2b9c3dfac53dbc18ef584 Mon Sep 17 00:00:00 2001 From: ztenghui Date: Fri, 12 Apr 2013 13:50:38 -0700 Subject: MediaMuxer prefer not to use the MPEG4Writer in real time recording mode. By default, MPEG4Write will keep running in real time recording mode. bug:8598944 Change-Id: Idf7fbd4e0feb7763660a74279ba8817b79098aaf --- cmds/stagefright/stagefright.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 5bdbfbb..115b07c 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -523,7 +523,7 @@ static void writeSourcesToMP4( } sp params = new MetaData; - params->setInt32(kKeyNotRealTime, true); + params->setInt32(kKeyRealTimeRecording, false); CHECK_EQ(writer->start(params.get()), (status_t)OK); while (!writer->reachedEOS()) { -- cgit v1.1 From 14f7672b5d450ed26a06fd3bb3ce045ea78b11b2 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Tue, 15 Jan 2013 09:04:18 -0800 Subject: New HLS implementation supporting independent stream sources, audio-only streams and more. Change-Id: Icfc45a0100243b2f7a14a9e65696be45b67d6495 --- cmds/stagefright/stagefright.cpp | 52 ++++++++++------------------------------ 1 file changed, 12 insertions(+), 40 deletions(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 115b07c..924cf6d 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -30,8 +30,6 @@ #include #include #include -#include -#include "include/LiveSession.h" #include "include/NuCachedSource2.h" #include #include @@ -678,7 +676,6 @@ int main(int argc, char **argv) { gDisplayHistogram = false; sp looper; - sp liveSession; int res; while ((res = getopt(argc, argv, "han:lm:b:ptsrow:kxSTd:D:")) >= 0) { @@ -961,9 +958,7 @@ int main(int argc, char **argv) { sp dataSource = DataSource::CreateFromURI(filename); - if (strncasecmp(filename, "sine:", 5) - && strncasecmp(filename, "httplive://", 11) - && dataSource == NULL) { + if (strncasecmp(filename, "sine:", 5) && dataSource == NULL) { fprintf(stderr, "Unable to create data source.\n"); return 1; } @@ -995,44 +990,21 @@ int main(int argc, char **argv) { mediaSources.push(mediaSource); } } else { - sp extractor; + sp extractor = MediaExtractor::Create(dataSource); - if (!strncasecmp("httplive://", filename, 11)) { - String8 uri("http://"); - uri.append(filename + 11); - - if (looper == NULL) { - looper = new ALooper; - looper->start(); - } - liveSession = new LiveSession(NULL /* notify */); - looper->registerHandler(liveSession); - - liveSession->connect(uri.string()); - dataSource = liveSession->getDataSource(); - - extractor = - MediaExtractor::Create( - dataSource, MEDIA_MIMETYPE_CONTAINER_MPEG2TS); - - syncInfoPresent = false; - } else { - extractor = MediaExtractor::Create(dataSource); - - if (extractor == NULL) { - fprintf(stderr, "could not create extractor.\n"); - return -1; - } + if (extractor == NULL) { + fprintf(stderr, "could not create extractor.\n"); + return -1; + } - sp meta = extractor->getMetaData(); + sp meta = extractor->getMetaData(); - if (meta != NULL) { - const char *mime; - CHECK(meta->findCString(kKeyMIMEType, &mime)); + if (meta != NULL) { + const char *mime; + CHECK(meta->findCString(kKeyMIMEType, &mime)); - if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_MPEG2TS)) { - syncInfoPresent = false; - } + if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_MPEG2TS)) { + syncInfoPresent = false; } } -- cgit v1.1 From 94705aff3c9eef58cbb72ec6fe5d2dcfd9481646 Mon Sep 17 00:00:00 2001 From: hkuang Date: Mon, 24 Jun 2013 11:21:17 -0700 Subject: Adds VP9 decoding support for stagefright. Also change the VP8 encoder role name from video_encoder.vpx to video_encoder.vp8 for future VP9 encoder support. Requires the change in frameworks/native and media_codecs.xml corresponding to the device. VP9 decoding test will be added to cts repo later. --- cmds/stagefright/stagefright.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 924cf6d..f8fc8ed 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -616,7 +616,7 @@ static void dumpCodecProfiles(const sp& omx, bool queryDecoders) { MEDIA_MIMETYPE_AUDIO_AMR_NB, MEDIA_MIMETYPE_AUDIO_AMR_WB, MEDIA_MIMETYPE_AUDIO_MPEG, MEDIA_MIMETYPE_AUDIO_G711_MLAW, MEDIA_MIMETYPE_AUDIO_G711_ALAW, MEDIA_MIMETYPE_AUDIO_VORBIS, - MEDIA_MIMETYPE_VIDEO_VPX + MEDIA_MIMETYPE_VIDEO_VP8, MEDIA_MIMETYPE_VIDEO_VP9 }; const char *codecType = queryDecoders? "decoder" : "encoder"; -- cgit v1.1 From 8d764bfc74c40641f018a0aa87d6f484aec92eae Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 12 Jul 2013 22:06:20 -0700 Subject: always pass the BufferQueue explicitely to consumers Change-Id: Ic2d9a9cf184a482b3c78a481ed693ee32df5ca13 --- cmds/stagefright/stagefright.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index f8fc8ed..529b96c 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -937,7 +937,8 @@ int main(int argc, char **argv) { } else { CHECK(useSurfaceTexAlloc); - sp texture = new GLConsumer(0 /* tex */); + sp bq = new BufferQueue(); + sp texture = new GLConsumer(bq, 0 /* tex */); gSurface = new Surface(texture->getBufferQueue()); } -- cgit v1.1 From 9e65879ebc633334bb061e8164c46602ad983c50 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Tue, 6 Aug 2013 15:54:17 -0700 Subject: Fix build. last attempt. Change-Id: Ib955134f90b78cfc0d31272021ad5907a41df708 --- cmds/stagefright/stagefright.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 529b96c..797e0b6 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -939,7 +939,7 @@ int main(int argc, char **argv) { sp bq = new BufferQueue(); sp texture = new GLConsumer(bq, 0 /* tex */); - gSurface = new Surface(texture->getBufferQueue()); + gSurface = new Surface(bq); } CHECK_EQ((status_t)OK, -- cgit v1.1 From c85a986af84962515c10499faab3dc8f9a0948d4 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 14 Aug 2013 20:39:49 -0700 Subject: Fix build. Change-Id: If87636a654c8cfb2449e246df213fb24b08b4ad3 --- cmds/stagefright/stagefright.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'cmds/stagefright/stagefright.cpp') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 797e0b6..030bf1b 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -51,6 +51,7 @@ #include +#include #include #include -- cgit v1.1