Loading media/libmediaplayerservice/nuplayer/RTSPSource.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,10 @@ void NuPlayer::RTSPSource::stop() { if (mLooper == NULL) { return; } // Close socket before posting message to RTSPSource message handler. close(mHandler->getARTSPConnection()->getSocket()); sp<AMessage> msg = new AMessage(kWhatDisconnect, this); sp<AMessage> dummy; Loading media/libstagefright/rtsp/ARTSPConnection.h +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ struct ARTSPConnection : public AHandler { const char *url, AString *host, unsigned *port, AString *path, AString *user, AString *pass); int getSocket() { return mSocket; } protected: virtual ~ARTSPConnection(); virtual void onMessageReceived(const sp<AMessage> &msg); Loading media/libstagefright/rtsp/MyHandler.h +4 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,10 @@ struct MyHandler : public AHandler { msg->post(); } sp<ARTSPConnection> getARTSPConnection() { return mConn; } static void addRR(const sp<ABuffer> &buf) { uint8_t *ptr = buf->data() + buf->size(); ptr[0] = 0x80 | 0; Loading Loading
media/libmediaplayerservice/nuplayer/RTSPSource.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,10 @@ void NuPlayer::RTSPSource::stop() { if (mLooper == NULL) { return; } // Close socket before posting message to RTSPSource message handler. close(mHandler->getARTSPConnection()->getSocket()); sp<AMessage> msg = new AMessage(kWhatDisconnect, this); sp<AMessage> dummy; Loading
media/libstagefright/rtsp/ARTSPConnection.h +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ struct ARTSPConnection : public AHandler { const char *url, AString *host, unsigned *port, AString *path, AString *user, AString *pass); int getSocket() { return mSocket; } protected: virtual ~ARTSPConnection(); virtual void onMessageReceived(const sp<AMessage> &msg); Loading
media/libstagefright/rtsp/MyHandler.h +4 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,10 @@ struct MyHandler : public AHandler { msg->post(); } sp<ARTSPConnection> getARTSPConnection() { return mConn; } static void addRR(const sp<ABuffer> &buf) { uint8_t *ptr = buf->data() + buf->size(); ptr[0] = 0x80 | 0; Loading