gstsdp.sdpmessage
Module for [SDPMessage] class
class SDPMessage
Types 1
classSDPMessage : gobject.boxed.Boxed
The GstSDPMessage helper functions makes it easy to parse and create SDP messages.
Methods
SDPMessage self()Returns `this`, for use in `with` statements.gstsdp.sdporigin.SDPOrigin origin() @propertyGet `origin` field. Returns: owner/creator and session identifiervoid information(string propval) @propertySet `information` field. Params: propval = session informationgstsdp.sdpconnection.SDPConnection connection() @propertyGet `connection` field. Returns: connection information for the sessiongstsdp.types.SDPResult addAttribute(string key, string value = null)Add the attribute with key and value to msg.gstsdp.types.SDPResult addBandwidth(string bwtype, uint bandwidth)Add the specified bandwidth information to msg.gstsdp.types.SDPResult addEmail(string email)Add email to the list of emails in msg.gstsdp.types.SDPResult addMedia(gstsdp.sdpmedia.SDPMedia media)Adds media to the array of medias in msg. This function takes ownership of the contents of media so that media will have to be reinitialized with [gstsdp.sdpmedia.SDPMedia.init_] before it can be u...gstsdp.types.SDPResult addPhone(string phone)Add phone to the list of phones in msg.gstsdp.types.SDPResult addTime(string start, string stop, string[] repeat)Add time information start and stop to msg.gstsdp.types.SDPResult addZone(string adjTime, string typedTime)Add time zone information to msg.string asText()Convert the contents of msg to a text string. Returns: A dynamically allocated string representing the SDP description.uint attributesLen()Get the number of attributes in msg. Returns: the number of attributes in msg.gstsdp.types.SDPResult attributesToCaps(gst.caps.Caps caps)Mapping of attributes of #GstSDPMessage to #GstCapsuint bandwidthsLen()Get the number of bandwidth information in msg. Returns: the number of bandwidth information in msg.gstsdp.types.SDPResult copy(out gstsdp.sdpmessage.SDPMessage copy)Allocate a new copy of msg and store the result in copy. The value in copy should be release with gstsdpmessage_free function.gstsdp.types.SDPResult dump()Dump the parsed contents of msg to stdout. Returns: a #GstSDPResult.uint emailsLen()Get the number of emails in msg. Returns: the number of emails in msg.gstsdp.sdpattribute.SDPAttribute getAttribute(uint idx)Get the attribute at position idx in msg.string getAttributeVal(string key)Get the first attribute with key key in msg.string getAttributeValN(string key, uint nth)Get the nth attribute with key key in msg.gstsdp.sdpbandwidth.SDPBandwidth getBandwidth(uint idx)Get the bandwidth at index idx from msg.gstsdp.sdpconnection.SDPConnection getConnection()Get the connection of msg. Returns: a #GstSDPConnection. The result remains valid as long as msg is valid.string getEmail(uint idx)Get the email with number idx from msg.string getInformation()Get the information in msg. Returns: a #GstSDPResult.gstsdp.sdpkey.SDPKey getKey()Get the encryption information from msg. Returns: a #GstSDPKey.gstsdp.sdpmedia.SDPMedia getMedia(uint idx)Get the media description at index idx in msg.gstsdp.sdporigin.SDPOrigin getOrigin()Get the origin of msg. Returns: a #GstSDPOrigin. The result remains valid as long as msg is valid.string getPhone(uint idx)Get the phone with number idx from msg.string getSessionName()Get the session name in msg. Returns: a #GstSDPResult.gstsdp.sdptime.SDPTime getTime(uint idx)Get time information with index idx from msg.string getUri()Get the URI in msg. Returns: a #GstSDPResult.string getVersion()Get the version in msg. Returns: a #GstSDPResult.gstsdp.sdpzone.SDPZone getZone(uint idx)Get time zone information with index idx from msg.gstsdp.types.SDPResult insertAttribute(int idx, gstsdp.sdpattribute.SDPAttribute attr)Insert attribute into the array of attributes in msg at index idx. When -1 is given as idx, the attribute is inserted at the end.gstsdp.types.SDPResult insertBandwidth(int idx, gstsdp.sdpbandwidth.SDPBandwidth bw)Insert bandwidth parameters into the array of bandwidths in msg at index idx. When -1 is given as idx, the bandwidth is inserted at the end.gstsdp.types.SDPResult insertEmail(int idx, string email)Insert email into the array of emails in msg at index idx. When -1 is given as idx, the email is inserted at the end.gstsdp.types.SDPResult insertPhone(int idx, string phone)Insert phone into the array of phone numbers in msg at index idx. When -1 is given as idx, the phone is inserted at the end.gstsdp.types.SDPResult insertTime(int idx, gstsdp.sdptime.SDPTime t)Insert time parameters into the array of times in msg at index idx. When -1 is given as idx, the times are inserted at the end.gstsdp.types.SDPResult insertZone(int idx, gstsdp.sdpzone.SDPZone zone)Insert zone parameters into the array of zones in msg at index idx. When -1 is given as idx, the zone is inserted at the end.uint mediasLen()Get the number of media descriptions in msg. Returns: the number of media descriptions in msg.gstsdp.types.SDPResult parseKeymgmt(out gstsdp.mikeymessage.MIKEYMessage mikey)Creates a new #GstMIKEYMessage after parsing the key-mgmt attribute from a #GstSDPMessage.uint phonesLen()Get the number of phones in msg. Returns: the number of phones in msg.gstsdp.types.SDPResult removeAttribute(uint idx)Remove the attribute in msg at index idx.gstsdp.types.SDPResult removeBandwidth(uint idx)Remove the bandwidth information in msg at index idx.gstsdp.types.SDPResult removeEmail(uint idx)Remove the email in msg at index idx.gstsdp.types.SDPResult removeMedia(uint idx)Remove the media at idx from the array of medias in msg if found.gstsdp.types.SDPResult removePhone(uint idx)Remove the phone number in msg at index idx.gstsdp.types.SDPResult removeTime(uint idx)Remove the time information in msg at index idx.gstsdp.types.SDPResult removeZone(uint idx)Remove the zone information in msg at index idx.gstsdp.types.SDPResult replaceAttribute(uint idx, gstsdp.sdpattribute.SDPAttribute attr)Replace the attribute in msg at index idx with attr.gstsdp.types.SDPResult replaceBandwidth(uint idx, gstsdp.sdpbandwidth.SDPBandwidth bw)Replace the bandwidth information in msg at index idx with bw.gstsdp.types.SDPResult replaceEmail(uint idx, string email)Replace the email in msg at index idx with email.gstsdp.types.SDPResult replacePhone(uint idx, string phone)Replace the phone number in msg at index idx with phone.gstsdp.types.SDPResult replaceTime(uint idx, gstsdp.sdptime.SDPTime t)Replace the time information in msg at index idx with `t`.gstsdp.types.SDPResult replaceZone(uint idx, gstsdp.sdpzone.SDPZone zone)Replace the zone information in msg at index idx with zone.gstsdp.types.SDPResult setConnection(string nettype, string addrtype, string address, uint ttl, uint addrNumber)Configure the SDP connection in msg with the given parameters.gstsdp.types.SDPResult setInformation(string information)Set the information in msg.gstsdp.types.SDPResult setKey(string type, string data)Adds the encryption information to msg.gstsdp.types.SDPResult setOrigin(string username, string sessId, string sessVersion, string nettype, string addrtype, string addr)Configure the SDP origin in msg with the given parameters.gstsdp.types.SDPResult setSessionName(string sessionName)Set the session name in msg.gstsdp.types.SDPResult setUri(string uri)Set the URI in msg.gstsdp.types.SDPResult setVersion(string version_)Set the version in msg.uint timesLen()Get the number of time information entries in msg. Returns: the number of time information entries in msg.gstsdp.types.SDPResult uninit()Free all resources allocated in msg. msg should not be used anymore after this function. This function should be used when msg was allocated on the stack and initialized with [gstsdp.sdpmessage.SDP...uint zonesLen()Get the number of time zone information entries in msg. Returns: the number of time zone information entries in msg.string asUri(string scheme, gstsdp.sdpmessage.SDPMessage msg)Creates a uri from msg with the given scheme. The uri has the format:gstsdp.types.SDPResult init_(out gstsdp.sdpmessage.SDPMessage msg)Initialize msg so that its contents are as if it was freshly allocated with [gstsdp.sdpmessage.SDPMessage.new_]. This function is mostly used to initialize a message allocated on the stack. [gstsdp...gstsdp.types.SDPResult new_(out gstsdp.sdpmessage.SDPMessage msg)Allocate a new GstSDPMessage and store the result in msg.gstsdp.types.SDPResult newFromText(string text, out gstsdp.sdpmessage.SDPMessage msg)Parse text and create a new SDPMessage from these.gstsdp.types.SDPResult parseBuffer(ubyte[] data, gstsdp.sdpmessage.SDPMessage msg)Parse the contents of size bytes pointed to by data and store the result in msg.gstsdp.types.SDPResult parseUri(string uri, gstsdp.sdpmessage.SDPMessage msg)Parse the null-terminated uri and store the result in msg.Constructors
this(string version_ = string.init, string sessionName = string.init, string information = string.init, string uri = string.init)Create a `sdpmessage.SDPMessage` boxed type. Params: version_ = the protocol version sessionName = session name information = session information uri = URI of description