Class: ActiveVlc::Stage::Base

Inherits:
Object
  • Object
show all
Includes:
Parametric, PipelineDump
Defined in:
lib/activevlc/stage/base.rb

Direct Known Subclasses

Duplicate, Gather, Input, Stream, Transcode

Constant Summary

Constants included from PipelineDump

PipelineDump::TAB_WIDTH

Instance Attribute Summary collapse

Attributes included from Parametric

#parameters

Instance Method Summary collapse

Methods included from Parametric

#has_missing_parameter?, #visit

Methods included from PipelineDump

#_dump, #_dump_depth, #_find_in_ancestors

Constructor Details

#initialize(type = :dummy, opts = {}) ⇒ Base

Returns a new instance of Base.



23
24
25
26
27
# File 'lib/activevlc/stage/base.rb', line 23

def initialize(type = :dummy, opts = {})
  super() # ActiveVlc::Parametric
  @options = Hash.new.merge opts
  @type = type
end

Instance Attribute Details

#optionsObject (readonly)

Options represents vlc’s sout options



21
22
23
# File 'lib/activevlc/stage/base.rb', line 21

def options
  @options
end

#typeObject (readonly)

Returns the value of attribute type.



19
20
21
# File 'lib/activevlc/stage/base.rb', line 19

def type
  @type
end

Instance Method Details

#[](key) ⇒ Object



29
# File 'lib/activevlc/stage/base.rb', line 29

def [](key) @options[key] end

#[]=(key, value) ⇒ Object



30
# File 'lib/activevlc/stage/base.rb', line 30

def []=(key, value) @options[key] = value end

#fragmentObject



32
33
34
# File 'lib/activevlc/stage/base.rb', line 32

def fragment
  render_fragment(@type, @options)
end