Loading include/media/stagefright/foundation/ALooper.h +6 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #define A_LOOPER_H_ #include <media/stagefright/foundation/ABase.h> #include <media/stagefright/foundation/AString.h> #include <utils/Errors.h> #include <utils/KeyedVector.h> #include <utils/List.h> Loading @@ -36,6 +37,9 @@ struct ALooper : public RefBase { ALooper(); // Takes effect in a subsequent call to start(). void setName(const char *name); handler_id registerHandler(const sp<AHandler> &handler); void unregisterHandler(handler_id handlerID); Loading Loading @@ -63,6 +67,8 @@ private: Mutex mLock; Condition mQueueChangedCondition; AString mName; List<Event> mEventQueue; struct LooperThread; Loading media/libstagefright/AwesomePlayer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -1241,6 +1241,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 */, Loading Loading @@ -1352,6 +1353,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); Loading media/libstagefright/NuCachedSource2.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,7 @@ NuCachedSource2::NuCachedSource2(const sp<DataSource> &source) mLastAccessPos(0), mFetching(true), mLastFetchTimeUs(-1) { mLooper->setName("NuCachedSource2"); mLooper->registerHandler(mReflector); mLooper->start(); Loading media/libstagefright/foundation/ALooper.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading @@ -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(); } Loading media/libstagefright/rtsp/ARTPWriter.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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(); Loading Loading
include/media/stagefright/foundation/ALooper.h +6 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #define A_LOOPER_H_ #include <media/stagefright/foundation/ABase.h> #include <media/stagefright/foundation/AString.h> #include <utils/Errors.h> #include <utils/KeyedVector.h> #include <utils/List.h> Loading @@ -36,6 +37,9 @@ struct ALooper : public RefBase { ALooper(); // Takes effect in a subsequent call to start(). void setName(const char *name); handler_id registerHandler(const sp<AHandler> &handler); void unregisterHandler(handler_id handlerID); Loading Loading @@ -63,6 +67,8 @@ private: Mutex mLock; Condition mQueueChangedCondition; AString mName; List<Event> mEventQueue; struct LooperThread; Loading
media/libstagefright/AwesomePlayer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -1241,6 +1241,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 */, Loading Loading @@ -1352,6 +1353,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); Loading
media/libstagefright/NuCachedSource2.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,7 @@ NuCachedSource2::NuCachedSource2(const sp<DataSource> &source) mLastAccessPos(0), mFetching(true), mLastFetchTimeUs(-1) { mLooper->setName("NuCachedSource2"); mLooper->registerHandler(mReflector); mLooper->start(); Loading
media/libstagefright/foundation/ALooper.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading @@ -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(); } Loading
media/libstagefright/rtsp/ARTPWriter.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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(); Loading