2 * Copyright 2016, Dario Casalinuovo. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _RTSP_MEDIA_IO_H
6 #define _RTSP_MEDIA_IO_H
15 class HaikuRTSPClient
;
18 class RTSPMediaIO
: public BAdapterIO
21 RTSPMediaIO(BUrl ourUrl
);
22 virtual ~RTSPMediaIO();
24 virtual ssize_t
WriteAt(off_t position
,
28 virtual status_t
SetSize(off_t size
);
30 virtual status_t
Open();
35 static int32
_LoopThread(void* data
);
39 HaikuRTSPClient
* fClient
;
40 UsageEnvironment
* fEnv
;
41 TaskScheduler
* fScheduler
;
43 char fLoopWatchVariable
;
44 thread_id fLoopThread
;
48 class HaikuRTSPClient
: public RTSPClient
51 HaikuRTSPClient(UsageEnvironment
& env
,
53 portNumBits tunnelOverHTTPPortNum
,
54 RTSPMediaIO
* fInputAdapter
);
58 BInputAdapter
* GetInputAdapter() const;
60 status_t
WaitForInit(bigtime_t timeout
);
67 virtual ~HaikuRTSPClient();
69 MediaSubsessionIterator
* iter
;
70 MediaSession
* session
;
71 MediaSubsession
* subsession
;
72 TaskToken streamTimerTask
;
76 RTSPMediaIO
* fInterface
;