From b5590846c035a28399818451201aaf1256913ec3 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 3 Dec 2010 16:12:25 -0800 Subject: Squashed commit of the following: commit 9254c845d7c82976fd4b8be406ce4b17eeb0e119 Author: Andreas Huber Date: Fri Dec 3 15:26:12 2010 -0800 Remove obsolete code from the cached data source. Change-Id: I794b986ac8977cbc834dff189221a636ba564e36 commit 2ee33711064c58c53ba65ed9e63dd4b01ec2380e Author: Andreas Huber Date: Fri Dec 3 15:23:13 2010 -0800 LiveSource is dead, long live LiveSession. Change-Id: Ibcd0731ecf9c94f0b3e5db3d53d012d9da2a1c66 commit 9eabb2c3cd8571ab859bdeae0aa7f655c414d8fa Author: Andreas Huber Date: Fri Dec 3 12:49:31 2010 -0800 Respect explicitly signalled discontinuities. Change-Id: I3c0c16a2de7a99742d25db7d1b2ff0258de52271 commit 7f7f7b6b906b6ece6e4d43af7fd5f494e805c5e5 Author: Andreas Huber Date: Fri Dec 3 11:45:57 2010 -0800 Better protection against syncword emulation in AAC ADTS content. Change-Id: I867e80a4556dd46d24ab3e781177c248a5221719 commit fe765766582efcc350aed01135ea603576adccf6 Author: Andreas Huber Date: Fri Dec 3 09:15:59 2010 -0800 New implementation of http live driving code. Change-Id: I31ddf3d6a0d5929b121be704a2b9c3d6775f7737 Change-Id: Id8d1829c8fcb173756965013f848c1d426ef1048 --- cmds/stagefright/stagefright.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'cmds') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 07e506a..7ba5291 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -31,7 +31,7 @@ #include #include #include "include/ARTSPController.h" -#include "include/LiveSource.h" +#include "include/LiveSession.h" #include "include/NuCachedSource2.h" #include #include @@ -560,6 +560,7 @@ int main(int argc, char **argv) { sp looper; sp rtspController; + sp liveSession; int res; while ((res = getopt(argc, argv, "han:lm:b:ptsow:kx")) >= 0) { @@ -852,8 +853,15 @@ int main(int argc, char **argv) { String8 uri("http://"); uri.append(filename + 11); - dataSource = new LiveSource(uri.string()); - dataSource = new NuCachedSource2(dataSource); + if (looper == NULL) { + looper = new ALooper; + looper->start(); + } + liveSession = new LiveSession; + looper->registerHandler(liveSession); + + liveSession->connect(uri.string()); + dataSource = liveSession->getDataSource(); extractor = MediaExtractor::Create( -- cgit v1.1