diff options
author | Marco Nelissen <marcone@google.com> | 2015-02-18 23:05:27 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-18 23:05:27 +0000 |
commit | 1fb8290c1f99e1db96b681e6eaae0193ea81674e (patch) | |
tree | 8325cc8242245d4c5c29e8ac13d84fea29b20694 /media/libmediaplayerservice | |
parent | 8d48bed0f29cf008ddc9e56bb0661f34b8e7c724 (diff) | |
parent | a7c1df10d39a8056ca755ccd77b06816c6de3225 (diff) | |
download | frameworks_av-1fb8290c1f99e1db96b681e6eaae0193ea81674e.zip frameworks_av-1fb8290c1f99e1db96b681e6eaae0193ea81674e.tar.gz frameworks_av-1fb8290c1f99e1db96b681e6eaae0193ea81674e.tar.bz2 |
am a7c1df10: am a963dacc: am 64753517: Merge "Add dumpsys info"
* commit 'a7c1df10d39a8056ca755ccd77b06816c6de3225':
Add dumpsys info
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r-- | media/libmediaplayerservice/MediaPlayerService.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 1936218..694f1a4 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -59,6 +59,7 @@ #include <media/stagefright/MediaErrors.h> #include <media/stagefright/AudioPlayer.h> #include <media/stagefright/foundation/ADebug.h> +#include <media/stagefright/foundation/ALooperRoster.h> #include <system/audio.h> @@ -247,6 +248,9 @@ void unmarshallAudioAttributes(const Parcel& parcel, audio_attributes_t *attribu namespace android { +extern ALooperRoster gLooperRoster; + + static bool checkPermission(const char* permissionString) { #ifndef HAVE_ANDROID_OS return true; @@ -428,6 +432,10 @@ status_t MediaPlayerService::Client::dump(int fd, const Vector<String16>& args) return NO_ERROR; } +/** + * The only arguments this understands right now are -c, -von and -voff, + * which are parsed by ALooperRoster::dump() + */ status_t MediaPlayerService::dump(int fd, const Vector<String16>& args) { const size_t SIZE = 256; @@ -461,7 +469,7 @@ status_t MediaPlayerService::dump(int fd, const Vector<String16>& args) } result.append(" Files opened and/or mapped:\n"); - snprintf(buffer, SIZE, "/proc/%d/maps", gettid()); + snprintf(buffer, SIZE, "/proc/%d/maps", getpid()); FILE *f = fopen(buffer, "r"); if (f) { while (!feof(f)) { @@ -481,13 +489,13 @@ status_t MediaPlayerService::dump(int fd, const Vector<String16>& args) result.append("\n"); } - snprintf(buffer, SIZE, "/proc/%d/fd", gettid()); + snprintf(buffer, SIZE, "/proc/%d/fd", getpid()); DIR *d = opendir(buffer); if (d) { struct dirent *ent; while((ent = readdir(d)) != NULL) { if (strcmp(ent->d_name,".") && strcmp(ent->d_name,"..")) { - snprintf(buffer, SIZE, "/proc/%d/fd/%s", gettid(), ent->d_name); + snprintf(buffer, SIZE, "/proc/%d/fd/%s", getpid(), ent->d_name); struct stat s; if (lstat(buffer, &s) == 0) { if ((s.st_mode & S_IFMT) == S_IFLNK) { @@ -528,6 +536,8 @@ status_t MediaPlayerService::dump(int fd, const Vector<String16>& args) result.append("\n"); } + gLooperRoster.dump(fd, args); + bool dumpMem = false; for (size_t i = 0; i < args.size(); i++) { if (args[i] == String16("-m")) { |