Loading cmds/stagefright/Android.mk +2 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,8 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ stagefright.cpp stagefright.cpp \ SineSource.cpp LOCAL_SHARED_LIBRARIES := \ libstagefright libmedia libutils libbinder Loading cmds/stagefright/stagefright.cpp +57 −3 Original line number Diff line number Diff line Loading @@ -20,9 +20,12 @@ #include <string.h> #include <unistd.h> #include "SineSource.h" #include <binder/IServiceManager.h> #include <binder/ProcessState.h> #include <media/IMediaPlayerService.h> #include <media/stagefright/AudioPlayer.h> #include <media/stagefright/CachingDataSource.h> #include <media/stagefright/FileSource.h> #include <media/stagefright/HTTPDataSource.h> Loading @@ -42,6 +45,7 @@ static long gNumRepetitions; static long gMaxNumFrames; // 0 means decode all available. static long gReproduceBug; // if not -1. static bool gPreferSoftwareCodec; static bool gPlaybackAudio; static int64_t getNowUs() { struct timeval tv; Loading Loading @@ -73,7 +77,20 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) { rawSource->start(); if (gReproduceBug >= 3 && gReproduceBug <= 5) { if (gPlaybackAudio) { AudioPlayer *player = new AudioPlayer(NULL); player->setSource(rawSource); player->start(true /* sourceAlreadyStarted */); status_t finalStatus; while (!player->reachedEOS(&finalStatus)) { usleep(100000ll); } delete player; player = NULL; } else if (gReproduceBug >= 3 && gReproduceBug <= 5) { int64_t durationUs; CHECK(meta->findInt64(kKeyDuration, &durationUs)); Loading Loading @@ -245,6 +262,7 @@ static void usage(const char *me) { fprintf(stderr, " -p(rofiles) dump decoder profiles supported\n"); fprintf(stderr, " -t(humbnail) extract video thumbnail or album art\n"); fprintf(stderr, " -s(oftware) prefer software codec\n"); fprintf(stderr, " -o playback audio\n"); } int main(int argc, char **argv) { Loading @@ -258,9 +276,10 @@ int main(int argc, char **argv) { gMaxNumFrames = 0; gReproduceBug = -1; gPreferSoftwareCodec = false; gPlaybackAudio = false; int res; while ((res = getopt(argc, argv, "han:lm:b:pts")) >= 0) { while ((res = getopt(argc, argv, "han:lm:b:ptso")) >= 0) { switch (res) { case 'a': { Loading Loading @@ -314,6 +333,12 @@ int main(int argc, char **argv) { break; } case 'o': { gPlaybackAudio = true; break; } case '?': case 'h': default: Loading @@ -325,6 +350,11 @@ int main(int argc, char **argv) { } } if (gPlaybackAudio && !audioOnly) { // This doesn't make any sense if we're decoding the video track. gPlaybackAudio = false; } argc -= optind; argv += optind; Loading Loading @@ -456,6 +486,11 @@ int main(int argc, char **argv) { dataSource = new FileSource(filename); } if (dataSource == NULL) { fprintf(stderr, "Unable to create data source.\n"); return 1; } bool isJPEG = false; size_t len = strlen(filename); Loading @@ -467,10 +502,18 @@ int main(int argc, char **argv) { if (isJPEG) { mediaSource = new JPEGSource(dataSource); } else if (!strncasecmp("sine:", filename, 5)) { char *end; long sampleRate = strtol(filename + 5, &end, 10); if (end == filename + 5) { sampleRate = 44100; } mediaSource = new SineSource(sampleRate, 1); } else { sp<MediaExtractor> extractor = MediaExtractor::Create(dataSource); if (extractor == NULL) { fprintf(stderr, "could not create data source\n"); fprintf(stderr, "could not create extractor.\n"); return -1; } Loading @@ -492,6 +535,17 @@ int main(int argc, char **argv) { if (!audioOnly && !strncasecmp(mime, "video/", 6)) { break; } meta = NULL; } if (meta == NULL) { fprintf(stderr, "No suitable %s track found. The '-a' option will " "target audio tracks only, the default is to target " "video tracks only.\n", audioOnly ? "audio" : "video"); return -1; } int64_t thumbTimeUs; Loading core/java/android/app/ActivityManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,13 @@ public class ActivityManager { */ public static final int RECENT_WITH_EXCLUDED = 0x0001; /** * @hide * TODO: Make this public. Provides a list that does not contain any * recent tasks that currently are not available to the user. */ public static final int RECENT_IGNORE_UNAVAILABLE = 0x0002; /** * Return a list of the tasks that the user has recently launched, with * the most recent being first and older ones after in order. Loading core/java/android/app/ActivityThread.java +113 −87 File changed.Preview size limit exceeded, changes collapsed. Show changes core/java/android/app/ContextImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -796,7 +796,7 @@ class ContextImpl extends Context { scheduler = mMainThread.getHandler(); } rd = new ActivityThread.PackageInfo.ReceiverDispatcher( receiver, context, scheduler, null, false).getIIntentReceiver(); receiver, context, scheduler, null, true).getIIntentReceiver(); } } try { Loading Loading
cmds/stagefright/Android.mk +2 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,8 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ stagefright.cpp stagefright.cpp \ SineSource.cpp LOCAL_SHARED_LIBRARIES := \ libstagefright libmedia libutils libbinder Loading
cmds/stagefright/stagefright.cpp +57 −3 Original line number Diff line number Diff line Loading @@ -20,9 +20,12 @@ #include <string.h> #include <unistd.h> #include "SineSource.h" #include <binder/IServiceManager.h> #include <binder/ProcessState.h> #include <media/IMediaPlayerService.h> #include <media/stagefright/AudioPlayer.h> #include <media/stagefright/CachingDataSource.h> #include <media/stagefright/FileSource.h> #include <media/stagefright/HTTPDataSource.h> Loading @@ -42,6 +45,7 @@ static long gNumRepetitions; static long gMaxNumFrames; // 0 means decode all available. static long gReproduceBug; // if not -1. static bool gPreferSoftwareCodec; static bool gPlaybackAudio; static int64_t getNowUs() { struct timeval tv; Loading Loading @@ -73,7 +77,20 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) { rawSource->start(); if (gReproduceBug >= 3 && gReproduceBug <= 5) { if (gPlaybackAudio) { AudioPlayer *player = new AudioPlayer(NULL); player->setSource(rawSource); player->start(true /* sourceAlreadyStarted */); status_t finalStatus; while (!player->reachedEOS(&finalStatus)) { usleep(100000ll); } delete player; player = NULL; } else if (gReproduceBug >= 3 && gReproduceBug <= 5) { int64_t durationUs; CHECK(meta->findInt64(kKeyDuration, &durationUs)); Loading Loading @@ -245,6 +262,7 @@ static void usage(const char *me) { fprintf(stderr, " -p(rofiles) dump decoder profiles supported\n"); fprintf(stderr, " -t(humbnail) extract video thumbnail or album art\n"); fprintf(stderr, " -s(oftware) prefer software codec\n"); fprintf(stderr, " -o playback audio\n"); } int main(int argc, char **argv) { Loading @@ -258,9 +276,10 @@ int main(int argc, char **argv) { gMaxNumFrames = 0; gReproduceBug = -1; gPreferSoftwareCodec = false; gPlaybackAudio = false; int res; while ((res = getopt(argc, argv, "han:lm:b:pts")) >= 0) { while ((res = getopt(argc, argv, "han:lm:b:ptso")) >= 0) { switch (res) { case 'a': { Loading Loading @@ -314,6 +333,12 @@ int main(int argc, char **argv) { break; } case 'o': { gPlaybackAudio = true; break; } case '?': case 'h': default: Loading @@ -325,6 +350,11 @@ int main(int argc, char **argv) { } } if (gPlaybackAudio && !audioOnly) { // This doesn't make any sense if we're decoding the video track. gPlaybackAudio = false; } argc -= optind; argv += optind; Loading Loading @@ -456,6 +486,11 @@ int main(int argc, char **argv) { dataSource = new FileSource(filename); } if (dataSource == NULL) { fprintf(stderr, "Unable to create data source.\n"); return 1; } bool isJPEG = false; size_t len = strlen(filename); Loading @@ -467,10 +502,18 @@ int main(int argc, char **argv) { if (isJPEG) { mediaSource = new JPEGSource(dataSource); } else if (!strncasecmp("sine:", filename, 5)) { char *end; long sampleRate = strtol(filename + 5, &end, 10); if (end == filename + 5) { sampleRate = 44100; } mediaSource = new SineSource(sampleRate, 1); } else { sp<MediaExtractor> extractor = MediaExtractor::Create(dataSource); if (extractor == NULL) { fprintf(stderr, "could not create data source\n"); fprintf(stderr, "could not create extractor.\n"); return -1; } Loading @@ -492,6 +535,17 @@ int main(int argc, char **argv) { if (!audioOnly && !strncasecmp(mime, "video/", 6)) { break; } meta = NULL; } if (meta == NULL) { fprintf(stderr, "No suitable %s track found. The '-a' option will " "target audio tracks only, the default is to target " "video tracks only.\n", audioOnly ? "audio" : "video"); return -1; } int64_t thumbTimeUs; Loading
core/java/android/app/ActivityManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,13 @@ public class ActivityManager { */ public static final int RECENT_WITH_EXCLUDED = 0x0001; /** * @hide * TODO: Make this public. Provides a list that does not contain any * recent tasks that currently are not available to the user. */ public static final int RECENT_IGNORE_UNAVAILABLE = 0x0002; /** * Return a list of the tasks that the user has recently launched, with * the most recent being first and older ones after in order. Loading
core/java/android/app/ActivityThread.java +113 −87 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/java/android/app/ContextImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -796,7 +796,7 @@ class ContextImpl extends Context { scheduler = mMainThread.getHandler(); } rd = new ActivityThread.PackageInfo.ReceiverDispatcher( receiver, context, scheduler, null, false).getIIntentReceiver(); receiver, context, scheduler, null, true).getIIntentReceiver(); } } try { Loading