Package brisa :: Package upnp :: Package didl :: Module didl_lite :: Class Resource
[hide private]
[frames] | no frames]

Class Resource

source code

object --+
         |
        Resource

Represents a resource. Used for generating the DIDL XML messages.

Instance Methods [hide private]
 
__init__(self, value='', protocol_info='', import_uri='', size=None, duration='', bitrate=None, sample_frequency=None, bits_per_sample=None, nr_audio_channels=None, resolution='', color_depth=None, protection='')
Constructor for the Resource class.
source code
 
from_element(self, elt)
Sets the resource properties from an element.
source code
 
to_didl_element(self)
Returns an Element based on this Resource.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
from_string(cls, xml_string)
Returns an instance generated from a xml string.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, value='', protocol_info='', import_uri='', size=None, duration='', bitrate=None, sample_frequency=None, bits_per_sample=None, nr_audio_channels=None, resolution='', color_depth=None, protection='')
(Constructor)

source code 

Constructor for the Resource class.

Parameters:
  • value - value of the res tag
  • protocol_info (string) - information about the protocol in the form a:b:c:d
  • import_uri (string) - uri locator for resource update
  • size (int) - size in bytes
  • duration (string) - duration of the playback of the res at normal speed (H*:MM:SS:F* or H*:MM:SS:F0/F1)
  • bitrate (int) - bitrate in bytes/second
  • sample_frequency (int) - sample frequency in Hz
  • bits_per_sample (int) - bits per sample
  • nr_audio_channels (int) - number of audio channels
  • resolution (string) - resolution of the resource (X*Y)
  • color_depth (int) - color depth in bits
  • protection (string) - statement of protection type
Overrides: object.__init__