Class: ActiveVlc::LibVlc::Media

Inherits:
Object
  • Object
show all
Defined in:
lib/activevlc/libvlc/media.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr, mrl) ⇒ Media

Returns a new instance of Media.



15
16
17
18
# File 'lib/activevlc/libvlc/media.rb', line 15

def initialize(ptr, mrl)
  @ptr = MediaPtr.new(ptr)
  @mrl = mrl
end

Instance Attribute Details

#mrlObject (readonly)

Returns the value of attribute mrl.



13
14
15
# File 'lib/activevlc/libvlc/media.rb', line 13

def mrl
  @mrl
end

#ptrObject (readonly)

Returns the value of attribute ptr.



13
14
15
# File 'lib/activevlc/libvlc/media.rb', line 13

def ptr
  @ptr
end

Instance Method Details

#<<(option) ⇒ Object



20
21
22
23
24
25
# File 'lib/activevlc/libvlc/media.rb', line 20

def <<(option)
  raise "option must be a String" unless option.is_a?(String)

  Api.libvlc_media_add_option(@ptr, option)
  self
end

#event_managerObject



27
28
29
# File 'lib/activevlc/libvlc/media.rb', line 27

def event_manager
  EventManager.new Api.libvlc_media_event_manager(@ptr)
end