diff options
author | Andreas Huber <andih@google.com> | 2010-08-30 13:29:51 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-08-30 13:29:51 -0700 |
commit | c5c4286bebffa4c2a9539c8e09207c3130351531 (patch) | |
tree | 70d993e063bfb0531773c736b2ef726daf1de1ac /media | |
parent | cc567f511a159867dcde8da824cab7464e687535 (diff) | |
parent | c28160fcf5fb785106e00fa5854929be8b49a98a (diff) | |
download | frameworks_av-c5c4286bebffa4c2a9539c8e09207c3130351531.zip frameworks_av-c5c4286bebffa4c2a9539c8e09207c3130351531.tar.gz frameworks_av-c5c4286bebffa4c2a9539c8e09207c3130351531.tar.bz2 |
am 6df6d606: am df992ac9: Merge "ALoopers can now be named (useful to distinguish threads)." into gingerbread
Merge commit '6df6d60681be9d524ce7fc07f2511008de424d27'
* commit '6df6d60681be9d524ce7fc07f2511008de424d27':
ALoopers can now be named (useful to distinguish threads).
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 2 | ||||
-rw-r--r-- | media/libstagefright/NuCachedSource2.cpp | 1 | ||||
-rw-r--r-- | media/libstagefright/foundation/ALooper.cpp | 7 | ||||
-rw-r--r-- | media/libstagefright/rtsp/ARTPWriter.cpp | 1 | ||||
-rw-r--r-- | media/libstagefright/rtsp/MyHandler.h | 6 |
5 files changed, 13 insertions, 4 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index f0fa5f9..085e92d 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -1263,6 +1263,7 @@ status_t AwesomePlayer::finishSetDataSource_l() { } else if (!strncmp("rtsp://gtalk/", mUri.string(), 13)) { if (mLooper == NULL) { mLooper = new ALooper; + mLooper->setName("gtalk rtp"); mLooper->start( false /* runOnCallingThread */, false /* canCallJava */, @@ -1374,6 +1375,7 @@ status_t AwesomePlayer::finishSetDataSource_l() { } else if (!strncasecmp("rtsp://", mUri.string(), 7)) { if (mLooper == NULL) { mLooper = new ALooper; + mLooper->setName("rtsp"); mLooper->start(); } mRTSPController = new ARTSPController(mLooper); diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp index c02b7f3..9171aab 100644 --- a/media/libstagefright/NuCachedSource2.cpp +++ b/media/libstagefright/NuCachedSource2.cpp @@ -180,6 +180,7 @@ NuCachedSource2::NuCachedSource2(const sp<DataSource> &source) mLastAccessPos(0), mFetching(true), mLastFetchTimeUs(-1) { + mLooper->setName("NuCachedSource2"); mLooper->registerHandler(mReflector); mLooper->start(); diff --git a/media/libstagefright/foundation/ALooper.cpp b/media/libstagefright/foundation/ALooper.cpp index 77afb01..b7087f8 100644 --- a/media/libstagefright/foundation/ALooper.cpp +++ b/media/libstagefright/foundation/ALooper.cpp @@ -65,6 +65,10 @@ ALooper::~ALooper() { stop(); } +void ALooper::setName(const char *name) { + mName = name; +} + ALooper::handler_id ALooper::registerHandler(const sp<AHandler> &handler) { return gLooperRoster.registerHandler(this, handler); } @@ -100,7 +104,8 @@ status_t ALooper::start( mThread = new LooperThread(this, canCallJava); - status_t err = mThread->run("ALooper", priority); + status_t err = mThread->run( + mName.empty() ? "ALooper" : mName.c_str(), priority); if (err != OK) { mThread.clear(); } diff --git a/media/libstagefright/rtsp/ARTPWriter.cpp b/media/libstagefright/rtsp/ARTPWriter.cpp index d4eed7c..ce1ee0e 100644 --- a/media/libstagefright/rtsp/ARTPWriter.cpp +++ b/media/libstagefright/rtsp/ARTPWriter.cpp @@ -31,6 +31,7 @@ ARTPWriter::ARTPWriter(int fd) mReflector(new AHandlerReflector<ARTPWriter>(this)) { CHECK_GE(fd, 0); + mLooper->setName("rtp writer"); mLooper->registerHandler(mReflector); mLooper->start(); diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index 8337c93..a4fa2b1 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -76,7 +76,7 @@ struct MyHandler : public AHandler { mFirstAccessUnitNTP(0), mNumAccessUnitsReceived(0), mCheckPending(false) { - + mNetLooper->setName("rtsp net"); mNetLooper->start(false /* runOnCallingThread */, false /* canCallJava */, PRIORITY_HIGHEST); @@ -389,7 +389,7 @@ struct MyHandler : public AHandler { } mNumAccessUnitsReceived = 0; - msg->post(500000); + msg->post(1000000); break; } @@ -400,7 +400,7 @@ struct MyHandler : public AHandler { if (!mCheckPending) { mCheckPending = true; sp<AMessage> check = new AMessage('chek', id()); - check->post(500000); + check->post(1000000); } size_t trackIndex; |