lib/builders/basic_builder.rb
#Reads the data from <visual></visual> - node
#and creates a Visual - object from that data.
Reads the data from  - node
and creates a Visual - object from that data.
Reads the data from - node and creates a Visual - object from that data .
def read_visual(visual)
    type = visual.attribute("type").to_s
    file = XPath.first(visual, "file").text
    start_point = XPath.first(visual, "clip-start").text
    end_point = XPath.first(visual, "clip-end").text
    place = XPath.first(visual, "place").text
    mute = XPath.first(visual, "mute").text
    if(mute == "true")
      mute = true
    elsif(mute == "false")
      mute = false
    end
    volume_points = []
    XPath.each(visual, "volumepoints/volumepoint"){|vol_point|
      volume_points << read_volume_point(vol_point)
    }
    effects = []
    visual_effects = XPath.first(visual, "effects")
    visual_effects.each_element_with_text(){|element|
      effects << read_effect(element)
    }
    return Visual.new(type, file, start_point, end_point, place, mute, volume_points, effects)
  end
def read_visual ( visual ) type = visual . attribute ( "type" ) . to_s file = XPath . first ( visual , "file" ) . text start_point = XPath . first ( visual , "clip-start" ) . text end_point = XPath . first ( visual , "clip-end" ) . text place = XPath . first ( visual , "place" ) . text mute = XPath . first ( visual , "mute" ) . text if ( mute == "true" ) mute = true elsif ( mute == "false" ) mute = false end volume_points = [ ] XPath . each ( visual , "volumepoints/volumepoint" ) { | vol_point | volume_points << read_volume_point ( vol_point ) } effects = [ ] visual_effects = XPath . first ( visual , "effects" ) visual_effects . each_element_with_text ( ) { | element | effects << read_effect ( element ) } return Visual . new ( type , file , start_point , end_point , place , mute , volume_points , effects ) end
Reads the data from <visual></visual> - node
and creates a Visual - object from that data.
Reads the data from <visual > < / visual > - node and creates a Visual - object from that data .
#If no VolumePoints are found, an empty array is given. #This signals Visual to create default volumepoints. #parse effects
visual
<not_specific>