Class: RTSP::StreamServer
- Inherits:
-
Object
- Object
- RTSP::StreamServer
- Includes:
- SocatStreaming, Singleton
- Defined in:
- lib/rtsp/stream_server.rb
Constant Summary
Constants included from SocatStreaming
RTSP::SocatStreaming::BLOCK_SIZE, RTSP::SocatStreaming::BSD_OPTIONS, RTSP::SocatStreaming::H264_FMTP, RTSP::SocatStreaming::H264_RTP_MAP, RTSP::SocatStreaming::MP4_FMTP, RTSP::SocatStreaming::MP4_RTP_MAP, RTSP::SocatStreaming::RTCP_SOURCE, RTSP::SocatStreaming::SOCAT_OPTIONS
Constants included from Global
Global::DEFAULT_RTSP_PORT, Global::DEFAULT_VERSION
Instance Attribute Summary
Attributes included from SocatStreaming
#fmtp, #interface_ip, #pids, #rtcp_source_identifier, #rtcp_threads, #rtp_map, #rtp_sequence, #rtp_timestamp, #sessions, #source_ip, #source_port
Attributes included from Global
#log, #log_level, #logger, #raise_errors
Instance Method Summary collapse
-
#initialize ⇒ StreamServer
constructor
A new instance of StreamServer.
-
#stream_module ⇒ Module
Gets the current stream_module.
-
#stream_module=(module_name) ⇒ Object
Sets the stream module to be used by the stream server.
Methods included from SocatStreaming
#description, #disconnect, #generate_rtcp_source_id, #parse_sequence_number, #setup_streamer, #start_streaming, #stop_streaming
Methods included from Global
#log?, #raise_errors?, #reset_config!, #rtsp_version
Constructor Details
#initialize ⇒ StreamServer
Returns a new instance of StreamServer.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rtsp/stream_server.rb', line 9 def initialize @stream_module = SocatStreaming @sessions = {} @pids = {} @rtcp_threads = {} @rtp_timestamp = 2612015746 @rtp_sequence = 21934 @rtp_map = [] @fmtp = [] @source_ip = [] @source_port = [] end |
Instance Method Details
#stream_module ⇒ Module
Gets the current stream_module
33 34 35 |
# File 'lib/rtsp/stream_server.rb', line 33 def stream_module @stream_module end |
#stream_module=(module_name) ⇒ Object
Sets the stream module to be used by the stream server.
25 26 27 28 |
# File 'lib/rtsp/stream_server.rb', line 25 def stream_module= module_name @stream_module = module_name self.class.send(:include, module_name) end |