안드로이드 플레이어를 "속여"려고합니다. MediaPlayer (VideoView 랩퍼를 사용하고 있습니다)를 사용하여 localhost에 연결하면 RTSP 요청에 응답 할 수 있습니다. 기본 비디오 시스템이 VisualOn 유형 (VOME) 인 경우 응용 프로그램이 제대로 작동하지만 PacketView 시스템 (PVPlayer)을 사용하는 모든 장치는 DESCRIBE 요청/챌린지에 응답을 보낸 후 TCP 연결이 닫힙니다.Android 로컬 RTSP 서버 (스푸핑), DESCRIBE 답장을 보낸 후 PVPlayer가 TCP 소켓을 닫습니다.
사실 회신에 문제가 없음을 알고 있습니다. 내가 정확한 코드 (동일한 답을 생성)를 취할 때 RTSP 서버를 모방하여 표준 (안드로이드 라이브러리 없음) JAR로 만들고 안드로이드가 연결할 수있는 PC에서 실행하고 RTSP 대화가 완벽하게 진행됩니다. 그러면 안드로이드는 특정 포트에서 RTP를 찾고 있습니다 (이는 달성하려는 상태 임). 내가 해봤
: 로컬 호스트 127.0.0.1 위와 같이
127.0.0.0/8에서 다른 IP를이 연결이 이루어지고 있지만, TCP 소켓은 응답을 DESCRIBE 후 닫힙니다.
내가 가진 유일한 추측은 PVPlayer가 (어떤 이유로 든) 로컬 RTSP 서버 사용을 차단한다는 것입니다 (응답이 실제로 어디에서 오는지 확인하는 것을 확인).
감사합니다.
브레이든
출력 : (내가 부르는)
11-01 17:03:49.096: VERBOSE/PVPlayer(1085): PVPlayer constructor
11-01 17:03:49.096: VERBOSE/PVPlayer(1085): construct PlayerDriver
11-01 17:03:49.096: VERBOSE/PlayerDriver(1085): constructor
11-01 17:03:49.104: VERBOSE/PlayerDriver(1085): OpenCore hardware module loaded
11-01 17:03:49.104: VERBOSE/PlayerDriver(1085): start player thread
11-01 17:03:49.127: VERBOSE/PlayerDriver(1085): startPlayerThread
11-01 17:03:49.127: VERBOSE/PlayerDriver(1085): InitializeForThread
11-01 17:03:49.127: VERBOSE/PlayerDriver(1085): OMX_MasterInit
11-01 17:03:49.127: DEBUG/omx_interface(1085): TIOMXInterface: creating interface
11-01 17:03:49.127: DEBUG/omx_interface(1085): Calling DLOPEN on OMX_CORE_LIBRARY (libOMX_Core.so)
11-01 17:03:49.127: DEBUG/omx_interface(1085): DLOPEN SUCCEEDED (libOMX_Core.so)
11-01 17:03:49.127: DEBUG/omx_interface(1085): TIOMXInterface: library lookup success
11-01 17:03:49.135: DEBUG/TIOMX_CORE(1085): init count = 1
11-01 17:03:49.135: VERBOSE/PlayerDriver(1085): OsclScheduler::Init
11-01 17:03:49.135: VERBOSE/PlayerDriver(1085): CreatePlayer
11-01 17:03:49.151: DEBUG/(1085): enter PVGetInterface
11-01 17:03:49.151: DEBUG/(1085): enter Instance
11-01 17:03:49.151: DEBUG/(1085): enter SharedLibraryLookup
11-01 17:03:49.151: DEBUG/(1085): enter RegisterAllRecognizers
11-01 17:03:49.159: VERBOSE/PlayerDriver(1085): AddToScheduler
11-01 17:03:49.159: VERBOSE/PlayerDriver(1085): PendForExec
11-01 17:03:49.159: VERBOSE/PlayerDriver(1085): OsclActiveScheduler::Current
11-01 17:03:49.159: VERBOSE/PlayerDriver(1085): StartScheduler
11-01 17:03:49.159: VERBOSE/PVPlayer(1085): send PLAYER_SETUP
11-01 17:03:49.159: VERBOSE/PlayerDriver(1085): Send player code: 2
11-01 17:03:49.159: VERBOSE/PlayerDriver(1085): CommandCompleted
11-01 17:03:49.159: VERBOSE/PlayerDriver(1085): Completed command PLAYER_SETUP status=PVMFSuccess
11-01 17:03:49.159: VERBOSE/PVPlayer(1085): setDataSource(rtsp://localhost:5554 /sample.mp4)
11-01 17:03:49.166: VERBOSE/PVPlayer(1085): setVideoSurface(0x17f2a0)
11-01 17:03:49.166: VERBOSE/PVPlayer(1085): setVideoSurface(0x17f2d8)
11-01 17:03:49.166: VERBOSE/PVPlayer(1085): prepareAsync
11-01 17:03:49.166: VERBOSE/PVPlayer(1085): data source = rtsp://localhost:5554 /sample.mp4
11-01 17:03:49.174: VERBOSE/PlayerDriver(1085): Send player code: 3
11-01 17:03:49.174: VERBOSE/PlayerDriver(1085): handleSetDataSource
11-01 17:03:49.174: VERBOSE/PlayerDriver(1085): handleSetDataSource- scanning for extension
11-01 17:03:49.215: DEBUG/KeyguardViewMediator(1210): setHidden false
11-01 17:03:49.229: VERBOSE/PlayerDriver(1085): CommandCompleted
11-01 17:03:49.237: VERBOSE/PlayerDriver(1085): Completed command PLAYER_SET_DATA_SOURCE status=PVMFSuccess
11-01 17:03:49.237: VERBOSE/PVPlayer(1085): run_init s=0, cancelled=0
11-01 17:03:49.237: VERBOSE/PlayerDriver(1085): Send player code: 6
11-01 17:03:49.237: VERBOSE/PlayerDriver(1085): release string is 2.1-update1 len 11
11-01 17:03:49.237: DEBUG/KeyguardViewMediator(1210): setHidden false
11-01 17:03:49.252: INFO/global(4253): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
11-01 17:03:49.252: INFO/braden_nio(4253): spoofaway started...
11-01 17:03:49.252: INFO/System.out(4253): OPTIONS rtsp://localhost:5554/sample.mp4 RTSP/1.0
11-01 17:03:49.252: INFO/System.out(4253): CSeq: 0
11-01 17:03:49.252: INFO/System.out(4253): User-Agent: PVPlayer CORE/6.506.4.1 OpenCORE/2.02 (Linux;Android 2.1-update1)
11-01 17:03:49.252: INFO/System.out(4253): ClientChallenge: 9e26d33f2984236010ef6253fb1887f7
11-01 17:03:49.252: INFO/System.out(4253): PlayerStarttime: [28/03/2003:22:50:23 00:00]
11-01 17:03:49.252: INFO/System.out(4253): CompanyID: KnKV4M4I/B2FjJ1TToLycw==
11-01 17:03:49.252: INFO/System.out(4253): GUID: 00000000-0000-0000-0000-000000000000
11-01 17:03:49.252: INFO/System.out(4253):
11-01 17:03:49.252: INFO/System.out(4253): Loooop
11-01 17:03:49.252: INFO/System.out(4253): DESCRIBE rtsp://localhost:5554/sample.mp4 RTSP/1.0
11-01 17:03:49.252: INFO/System.out(4253): CSeq: 1
11-01 17:03:49.252: INFO/System.out(4253): User-Agent: PVPlayer CORE/6.506.4.1 OpenCORE/2.02 (Linux;Android 2.1-update1)
11-01 17:03:49.252: INFO/System.out(4253): Accept: application/sdp
11-01 17:03:49.252: INFO/System.out(4253): Accept-Encoding:
11-01 17:03:49.260: INFO/System.out(4253):
11-01 17:03:49.260: INFO/System.out(4253): describe sent:RTSP/1.0 200 OK
11-01 17:03:49.260: INFO/System.out(4253): Content-Base: rtsp://localhost:5554/sample.mp4/
11-01 17:03:49.260: INFO/System.out(4253): Date: Mon, 31 Oct 2011 15:20:44 EDT
11-01 17:03:49.260: INFO/System.out(4253): Content-Length: 577
11-01 17:03:49.260: INFO/System.out(4253): Session: 1429213185;timeout=60
11-01 17:03:49.260: INFO/System.out(4253): Expires: Mon, 31 Oct 2011 15:20:44 EDT
11-01 17:03:49.260: INFO/System.out(4253): Cseq: 1
11-01 17:03:49.284: INFO/System.out(4253): Content-Type: application/sdp
11-01 17:03:49.284: INFO/System.out(4253): Server: Wowza Media Server 2.2.4 build27452
11-01 17:03:49.284: INFO/System.out(4253): Cache-Control: no-cache
11-01 17:03:49.284: INFO/System.out(4253):
11-01 17:03:49.284: INFO/System.out(4253): v=0
11-01 17:03:49.284: INFO/System.out(4253): o=- 1429213185 1429213185 IN IP4 127.0.0.1
11-01 17:03:49.284: INFO/System.out(4253): s=WowzaMediaServer
11-01 17:03:49.284: INFO/System.out(4253): c=IN IP4 0.0.0.0
11-01 17:03:49.284: INFO/System.out(4253): t=0 0
11-01 17:03:49.284: INFO/System.out(4253): a=sdplang:en
11-01 17:03:49.284: INFO/System.out(4253): a=range:npt=0- 596.458
11-01 17:03:49.284: INFO/System.out(4253): a=control:*
11-01 17:03:49.284: INFO/System.out(4253): m=audio 0 RTP/AVP 96
11-01 17:03:49.284: INFO/System.out(4253): a=rtpmap:96 mpeg4-generic/48000/2
11-01 17:03:49.284: INFO/System.out(4253): a=fmtp:96 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1190
11-01 17:03:49.284: INFO/System.out(4253): a=control:trackID=1
11-01 17:03:49.284: INFO/System.out(4253): m=video 0 RTP/AVP 97
11-01 17:03:49.284: INFO/System.out(4253): a=rtpmap:97 H264/90000
11-01 17:03:49.284: INFO/System.out(4253): a=fmtp:97 packetization-mode=1;profile-level-id=42C01E;sprop-parameter-sets=Z0LAHpZiA2P8vCAAAAMAIAAABgHixck=,aMuMsg==
11-01 17:03:49.284: INFO/System.out(4253): a=cliprect:0,0,240,424
11-01 17:03:49.284: INFO/System.out(4253): a=framesize:97 424-240
11-01 17:03:49.284: INFO/System.out(4253): a=framerate:24.0
11-01 17:03:49.284: INFO/System.out(4253): a=control:trackID=2
11-01 17:03:49.284: INFO/System.out(4253): Loooop
11-01 17:03:49.291: VERBOSE/PlayerDriver(1085): HandleInformationalEvent: PVMFInfoErrorHandlingStart
11-01 17:03:49.291: VERBOSE/PlayerDriver(1085): HandleInformationalEvent: type=26 UNHANDLED
11-01 17:03:49.291: WARN/MediaPlayer(4253): info/warning (1, 26)
11-01 17:03:49.291: INFO/MediaPlayer(4253): Info (1,26)
11-01 17:03:49.323: VERBOSE/PlayerDriver(1085): CommandCompleted
11-01 17:03:49.323: VERBOSE/PlayerDriver(1085): Completed command PLAYER_INIT status=PVMFFailure
11-01 17:03:49.323: ERROR/PlayerDriver(1085): Command PLAYER_INIT completed with an error or info PVMFFailure
11-01 17:03:49.323: ERROR/MediaPlayer(4253): error (1, -1)
11-01 17:03:49.323: ERROR/MediaPlayer(4253): Error (1,-1)
11-01 17:03:49.323: DEBUG/VideoView(4253): Error: 1,-1
11-01 17:03:49.354: VERBOSE/PVPlayer(1085): run_set_video_surface s=-2147483648, cancelled=0
11-01 17:03:49.354: VERBOSE/PlayerDriver(1085): HandleInformationalEvent: PVMFInfoErrorHandlingComplete
11-01 17:03:49.354: WARN/PlayerDriver(1085): PVMFInfoErrorHandlingComplete
11-01 17:03:49.401: DEBUG/KeyguardViewMediator(1210): setHidden false
어디에서나 가져 오기? – barkside
이 장치들은 "이중 기술"을합니다. 이들은 몇 개의 RTSP 요청 (응답을 기대하는)을 작성한 다음 TCP 연결을 종료하고 다른 연결을 연 다음 재생까지 모든 요청을 반복합니다. 나는 왜 그들이이 일을하는지 잘 모르겠다. 분명히 솔루션은 Android MediaPlayer (스테이지 판/기타)에서 스레드 방식으로 연결을 허용하는 것이 었습니다. 예 : while (true) { socket = serversocket.accept(); *** = 새 스레드 (소켓); ***. start(); } – braden
bradenV2 나는 당신이 여기 묻는 사람이라는 것을 알고 있지만, 나는 또한 당신이 한 일을하려고 노력하고있다. (local rstp, videoview는 localhost에 연결한다.) 그러나 장치의 서버가 어디에 있는지 테스트 할 방법을 찾을 수 없다. 정말 기능적입니다. 로컬 rstp 서버의 일부 코드를 공유 할 수 있습니까? – josephus