Class: RTP::Sender

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/rtp/sender.rb

Instance Method Summary collapse

Constructor Details

#initializeSender

Returns a new instance of Sender.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rtp/sender.rb', line 9

def initialize
  @stream_module = RTP::Senders::Socat
  @sessions = {}
  @pids = {}
  @rtcp_threads = {}
  @rtp_timestamp = 2612015746
  @rtp_sequence = 21934
  @rtp_map = []
  @fmtp = []
  @source_ip = []
  @source_port = []
end

Instance Method Details

#stream_moduleModule

Gets the current stream_module.

Returns:

  • (Module)

    Module name.



33
34
35
# File 'lib/rtp/sender.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.

Parameters:

  • module_name (Module)

    Module name.



25
26
27
28
# File 'lib/rtp/sender.rb', line 25

def stream_module=(module_name)
  @stream_module = module_name
  self.class.send(:include, module_name)
end