Loading cmds/stagefright/stagefright.cpp +1 −27 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include <binder/ProcessState.h> #include <media/IMediaPlayerService.h> #include <media/stagefright/foundation/ALooper.h> #include "include/ARTSPController.h" #include "include/LiveSession.h" #include "include/NuCachedSource2.h" #include <media/stagefright/AudioPlayer.h> Loading Loading @@ -636,7 +635,6 @@ int main(int argc, char **argv) { gDisplayHistogram = false; sp<ALooper> looper; sp<ARTSPController> rtspController; sp<LiveSession> liveSession; int res; Loading Loading @@ -948,7 +946,6 @@ int main(int argc, char **argv) { sp<DataSource> dataSource = DataSource::CreateFromURI(filename); if (strncasecmp(filename, "sine:", 5) && strncasecmp(filename, "rtsp://", 7) && strncasecmp(filename, "httplive://", 11) && dataSource == NULL) { fprintf(stderr, "Unable to create data source.\n"); Loading Loading @@ -984,23 +981,7 @@ int main(int argc, char **argv) { } else { sp<MediaExtractor> extractor; if (!strncasecmp("rtsp://", filename, 7)) { if (looper == NULL) { looper = new ALooper; looper->start(); } rtspController = new ARTSPController(looper); status_t err = rtspController->connect(filename); if (err != OK) { fprintf(stderr, "could not connect to rtsp server.\n"); return -1; } extractor = rtspController.get(); syncInfoPresent = false; } else if (!strncasecmp("httplive://", filename, 11)) { if (!strncasecmp("httplive://", filename, 11)) { String8 uri("http://"); uri.append(filename + 11); Loading Loading @@ -1117,13 +1098,6 @@ int main(int argc, char **argv) { } else { playSource(&client, mediaSource); } if (rtspController != NULL) { rtspController->disconnect(); rtspController.clear(); sleep(3); } } if ((useSurfaceAlloc || useSurfaceTexAlloc) && !audioOnly) { Loading media/libmediaplayerservice/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ LOCAL_SHARED_LIBRARIES := \ libdl LOCAL_STATIC_LIBRARIES := \ libstagefright_rtsp \ libstagefright_nuplayer \ libstagefright_rtsp \ LOCAL_C_INCLUDES := \ $(JNI_H_INCLUDE) \ Loading media/libmediaplayerservice/MediaPlayerService.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -584,6 +584,10 @@ player_type getPlayerType(const char* url) } } if (!strncasecmp("rtsp://", url, 7)) { return NU_PLAYER; } // use MidiFile for MIDI extensions int lenURL = strlen(url); for (int i = 0; i < NELEM(FILE_EXTS); ++i) { Loading media/libmediaplayerservice/nuplayer/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ LOCAL_SRC_FILES:= \ NuPlayerDriver.cpp \ NuPlayerRenderer.cpp \ NuPlayerStreamListener.cpp \ RTSPSource.cpp \ StreamingSource.cpp \ LOCAL_C_INCLUDES := \ Loading @@ -15,6 +16,7 @@ LOCAL_C_INCLUDES := \ $(TOP)/frameworks/base/media/libstagefright/include \ $(TOP)/frameworks/base/media/libstagefright/mpeg2ts \ $(TOP)/frameworks/base/media/libstagefright/httplive \ $(TOP)/frameworks/base/media/libstagefright/rtsp \ LOCAL_MODULE:= libstagefright_nuplayer Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +17 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include "NuPlayerDriver.h" #include "NuPlayerRenderer.h" #include "NuPlayerSource.h" #include "RTSPSource.h" #include "StreamingSource.h" #include "ATSParser.h" Loading Loading @@ -87,7 +88,14 @@ void NuPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { sp<AMessage> msg = new AMessage(kWhatSetDataSource, id()); msg->setObject("source", new HTTPLiveSource(url, headers, mUIDValid, mUID)); if (!strncasecmp(url, "rtsp://", 7)) { msg->setObject( "source", new RTSPSource(url, headers, mUIDValid, mUID)); } else { msg->setObject( "source", new HTTPLiveSource(url, headers, mUIDValid, mUID)); } msg->post(); } Loading Loading @@ -568,8 +576,15 @@ void NuPlayer::finishReset() { CHECK(mAudioDecoder == NULL); CHECK(mVideoDecoder == NULL); ++mScanSourcesGeneration; mScanSourcesPending = false; mRenderer.clear(); if (mSource != NULL) { mSource->stop(); mSource.clear(); } if (mDriver != NULL) { sp<NuPlayerDriver> driver = mDriver.promote(); Loading Loading
cmds/stagefright/stagefright.cpp +1 −27 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include <binder/ProcessState.h> #include <media/IMediaPlayerService.h> #include <media/stagefright/foundation/ALooper.h> #include "include/ARTSPController.h" #include "include/LiveSession.h" #include "include/NuCachedSource2.h" #include <media/stagefright/AudioPlayer.h> Loading Loading @@ -636,7 +635,6 @@ int main(int argc, char **argv) { gDisplayHistogram = false; sp<ALooper> looper; sp<ARTSPController> rtspController; sp<LiveSession> liveSession; int res; Loading Loading @@ -948,7 +946,6 @@ int main(int argc, char **argv) { sp<DataSource> dataSource = DataSource::CreateFromURI(filename); if (strncasecmp(filename, "sine:", 5) && strncasecmp(filename, "rtsp://", 7) && strncasecmp(filename, "httplive://", 11) && dataSource == NULL) { fprintf(stderr, "Unable to create data source.\n"); Loading Loading @@ -984,23 +981,7 @@ int main(int argc, char **argv) { } else { sp<MediaExtractor> extractor; if (!strncasecmp("rtsp://", filename, 7)) { if (looper == NULL) { looper = new ALooper; looper->start(); } rtspController = new ARTSPController(looper); status_t err = rtspController->connect(filename); if (err != OK) { fprintf(stderr, "could not connect to rtsp server.\n"); return -1; } extractor = rtspController.get(); syncInfoPresent = false; } else if (!strncasecmp("httplive://", filename, 11)) { if (!strncasecmp("httplive://", filename, 11)) { String8 uri("http://"); uri.append(filename + 11); Loading Loading @@ -1117,13 +1098,6 @@ int main(int argc, char **argv) { } else { playSource(&client, mediaSource); } if (rtspController != NULL) { rtspController->disconnect(); rtspController.clear(); sleep(3); } } if ((useSurfaceAlloc || useSurfaceTexAlloc) && !audioOnly) { Loading
media/libmediaplayerservice/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ LOCAL_SHARED_LIBRARIES := \ libdl LOCAL_STATIC_LIBRARIES := \ libstagefright_rtsp \ libstagefright_nuplayer \ libstagefright_rtsp \ LOCAL_C_INCLUDES := \ $(JNI_H_INCLUDE) \ Loading
media/libmediaplayerservice/MediaPlayerService.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -584,6 +584,10 @@ player_type getPlayerType(const char* url) } } if (!strncasecmp("rtsp://", url, 7)) { return NU_PLAYER; } // use MidiFile for MIDI extensions int lenURL = strlen(url); for (int i = 0; i < NELEM(FILE_EXTS); ++i) { Loading
media/libmediaplayerservice/nuplayer/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ LOCAL_SRC_FILES:= \ NuPlayerDriver.cpp \ NuPlayerRenderer.cpp \ NuPlayerStreamListener.cpp \ RTSPSource.cpp \ StreamingSource.cpp \ LOCAL_C_INCLUDES := \ Loading @@ -15,6 +16,7 @@ LOCAL_C_INCLUDES := \ $(TOP)/frameworks/base/media/libstagefright/include \ $(TOP)/frameworks/base/media/libstagefright/mpeg2ts \ $(TOP)/frameworks/base/media/libstagefright/httplive \ $(TOP)/frameworks/base/media/libstagefright/rtsp \ LOCAL_MODULE:= libstagefright_nuplayer Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +17 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include "NuPlayerDriver.h" #include "NuPlayerRenderer.h" #include "NuPlayerSource.h" #include "RTSPSource.h" #include "StreamingSource.h" #include "ATSParser.h" Loading Loading @@ -87,7 +88,14 @@ void NuPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { sp<AMessage> msg = new AMessage(kWhatSetDataSource, id()); msg->setObject("source", new HTTPLiveSource(url, headers, mUIDValid, mUID)); if (!strncasecmp(url, "rtsp://", 7)) { msg->setObject( "source", new RTSPSource(url, headers, mUIDValid, mUID)); } else { msg->setObject( "source", new HTTPLiveSource(url, headers, mUIDValid, mUID)); } msg->post(); } Loading Loading @@ -568,8 +576,15 @@ void NuPlayer::finishReset() { CHECK(mAudioDecoder == NULL); CHECK(mVideoDecoder == NULL); ++mScanSourcesGeneration; mScanSourcesPending = false; mRenderer.clear(); if (mSource != NULL) { mSource->stop(); mSource.clear(); } if (mDriver != NULL) { sp<NuPlayerDriver> driver = mDriver.promote(); Loading