Class: UEncode::VideoOutput
- Inherits:
-
Object
- Object
- UEncode::VideoOutput
show all
- Includes:
- Enumerable, AttrSetting
- Defined in:
- lib/uencode/elements.rb
Constant Summary
collapse
- ATTRIBUTES =
[:destination, :container]
Instance Attribute Summary collapse
Instance Method Summary
collapse
included, #set_attributes
Constructor Details
#initialize(options) ⇒ VideoOutput
Returns a new instance of VideoOutput.
273
274
275
276
277
|
# File 'lib/uencode/elements.rb', line 273
def initialize(options)
@streams = VideoStreams.new
@destinations = []
super
end
|
Instance Attribute Details
#container=(value) ⇒ Object
Sets the attribute container
241
242
243
|
# File 'lib/uencode/elements.rb', line 241
def container=(value)
@container = value
end
|
#streams ⇒ Object
Returns the value of attribute streams.
242
243
244
|
# File 'lib/uencode/elements.rb', line 242
def streams
@streams
end
|
Instance Method Details
#add_destination(dest) ⇒ Object
283
284
285
|
# File 'lib/uencode/elements.rb', line 283
def add_destination(dest)
@destinations << dest
end
|
#clip ⇒ Object
259
260
261
|
# File 'lib/uencode/elements.rb', line 259
def clip
@clip
end
|
#clip=(_clip) ⇒ Object
254
255
256
257
|
# File 'lib/uencode/elements.rb', line 254
def clip=(_clip)
_clip = Clip.new(_clip) unless _clip.instance_of?(Clip) || _clip.nil?
instance_variable_set :@clip, _clip
end
|
#each ⇒ Object
279
280
281
|
# File 'lib/uencode/elements.rb', line 279
def each
@items.each { |item| yield item }
end
|
268
269
270
|
# File 'lib/uencode/elements.rb', line 268
def metadata
@metadata
end
|
263
264
265
266
|
# File 'lib/uencode/elements.rb', line 263
def metadata=(_metadata)
_metadata = Metadata.new(_metadata) unless _metadata.instance_of?(Metadata) || _metadata.nil?
instance_variable_set :@metadata, _metadata
end
|
#overlay ⇒ Object
250
251
252
|
# File 'lib/uencode/elements.rb', line 250
def overlay
@overlay
end
|
#overlay=(_overlay) ⇒ Object
245
246
247
248
|
# File 'lib/uencode/elements.rb', line 245
def overlay=(_overlay)
_overlay = Overlay.new(_overlay) unless _overlay.instance_of?(Overlay) || _overlay.nil?
instance_variable_set :@overlay, _overlay
end
|
#to_xml ⇒ Object
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
# File 'lib/uencode/elements.rb', line 287
def to_xml
%Q{
<video>
<destinations>
#{@destinations.inject("") { |s, dest| s << dest.to_xml}}
</destinations>
#{metadata.nil? ? "" : metadata.to_xml}
#{clip.nil? ? "" : clip.to_xml}
#{overlay.nil? ? "" : overlay.to_xml}
<container>#{container}</container>
#{@streams.to_xml}
</video>
}
end
|