Interface Call.Content.Interface.Media.DRAFT2

Interface Index (Compact) | Summary | Description | Methods | Signals | Properties | Types

Methods

UpdateCodecs (a(usuua{ss}): Codecs) nothing

Signals

NewDescriptionOffer (o: Description, u: Contact, a{sv}: Properties)
LocalDescriptionsChanged (a{ua{sv}}: UpdatedDescriptions, au: RemovedDescriptions)
RemoteDescriptionsChanged (a{ua{sv}}: UpdatedDescriptions, au: RemovedDescriptions)

Properties

RemoteDescriptions a{ua{sv}} (ContactDescriptionPropertiesMap) Read only
LocalDescriptions a{ua{sv}} (ContactDescriptionPropertiesMap) Read only
DescriptionOffer (oua{sv}) (DescriptionOffer) Read only

Types

Contact_Codec_Map Mapping a{ua(usuua{ss})}
ContactDescriptionPropertiesMap Mapping a{ua{sv}}
Codec Struct (usuua{ss})
DescriptionOffer Struct (oua{sv})
WARNING: This interface is experimental and is likely to cause havoc to your API/ABI if bindings are generated. Do not include this interface in libraries that care about compatibility.
Added in UNRELEASED. (draft 2)
Objects implementing this interface must also implement:

Description

Interface to use by a software implementation of media streaming. The reason behind splitting the members of this interface out from the main Content.DRAFT interface is that the software is not necessarily what controls the media. An example of this is in GSM phones, where the CM just tells the phone to dial a number and it does the audio routing in a device specific hardware way and the CM does not need to concern itself with codecs.

Codec negotiation

When a new Call.DRAFT channel appears, whether it was requested or not, a Description.DRAFT object will either be waiting in the DescriptionOffer property, or will appear at some point via the NewDescriptionOffer signal.

If the remote codecs and other content information is available then the EmptyDescription property will be false and the RemoteCodecs property on the description offer lists the codecs which are supported by the remote contact, and so will determine the codecs that should be proposed by the local user's streaming implementation.

For incoming calls on protocols where the content is described when starting the call (for example, Jingle), the RemoteCodecs will contain information on the codecs that have already been proposed by the remote contact, otherwise the EmptyDescription property will be true

The streaming implementation should look at the remote description and the codecs and other features known by the local user and call Description.DRAFT.Accept with the locally supported description.

This means that in practice, outgoing calls will have a content description pop up with EmptyDescription, property true so the local user will call Accept with a description of all supported codecs and other features. If this description is accepted, then LocalDescriptionsChanged will fire with the details of description passed into Accept. If the call is incoming, then the RemoteCodecs will contain details of the remote contact's codecs and the local user will call Accept with the codecs that both sides understand. After the codec set is accepted, both LocalDescriptionsChanged and RemoteDescriptionsChanged will fire to signal their respective changes.

Protocols without negotiation

For protocols where the codecs are not negotiable, instead of popping up the initial content's Description.DRAFT object with EmptyDescription, set to true and no codecs/features being defined, the CM should set the supported codec values to known codec values in said object's codec map.

Changing codecs mid-call

To update the local codecs in all local descriptions mid-call, the UpdateCodecs method should be called with details of the new codec list. If this is accepted, then LocalDescriptionsChanged will be emitted with the new codec set.

If the other side decides to update his or her codec list during a call, a new Description.DRAFT object will appear through NewDescriptionOffer which should be acted on as documented above.

Methods

(Permalink)

UpdateCodecs (a(usuua{ss}): Codecs) → nothing

Parameters

  • Codecs — a(usuua{ss}) (Codec_List)
  • The updated codecs map as will be used by the local end.
Update the local codec mapping. This method should only be used during an existing call to update the codec mapping in all local content descriptions.

Signals

(Permalink)

NewDescriptionOffer (o: Description, u: Contact, a{sv}: Properties)

Parameters

  • Description — o
  • The object path of the new description. This replaces any previous description.
  • Contact — u
  • The remote contact the description belongs to.
  • Properties — a{sv} (Qualified_Property_Value_Map)
  • The immutable properties of the remote description.
    Rationale:
    Having all the Description properties here saves a D-Bus round-trip - it shouldn't be necessary to get the properties from the Description object, in practice.

Emitted when a new Description.DRAFT appears or a previous one disappears. The streaming implementation MUST respond by calling the Accept or Reject method on the description object if it has >appeared.

Emission of this signal indicates that the DescriptionOffer property has changed to (Description, Contact, DescriptionProperties).

(Permalink)

LocalDescriptionsChanged (a{ua{sv}}: UpdatedDescriptions, au: RemovedDescriptions)

Parameters

  • UpdatedDescriptions — a{ua{sv}} (ContactDescriptionPropertiesMap)
  • The local content descriptions that were updated

  • RemovedDescriptions — au
  • The local content descriptions that are no longer part of this content

Change notification for LocalDescriptions

(Permalink)

RemoteDescriptionsChanged (a{ua{sv}}: UpdatedDescriptions, au: RemovedDescriptions)

Parameters

  • UpdatedDescriptions — a{ua{sv}} (ContactDescriptionPropertiesMap)
  • The remote content descriptions that were updated

  • RemovedDescriptions — au
  • The remote content descriptions that are no longer part of this content

Change notification for RemoteDescriptions

Properties

Accessed using the org.freedesktop.DBus.Properties interface.
(Permalink)

RemoteDescriptions — a{ua{sv}} (ContactDescriptionPropertiesMap)

Read only

A map from contact handles to descriptions give supported by that contact.

(Permalink)

LocalDescriptions — a{ua{sv}} (ContactDescriptionPropertiesMap)

Read only

A map from contact handles to the descriptions as response.

(Permalink)

DescriptionOffer — (oua{sv}) (DescriptionOffer)

Read only

The object path to the current Description.DRAFT object, its RemoteContact and a of the Descriptions properties. If the object path is "/" then there isn't an outstanding content description, and the mapping MUST be empty.

Rationale:
Having all Description.DRAFT properties here saves a D-Bus round-trip - it shouldn't be necessary to get these properties from the Content Description object, in practice.

Change notification is via the NewDescriptionOffer (which replaces the value of this property with a new content description if any)

Types

Mapping (Permalink)

Contact_Codec_Map — a{ua(usuua{ss})}

A map from contact to the list of codecs he or she supports.
  • Handle — u (Contact_Handle)
  • A contact handle.
  • Codecs — a(usuua{ss}) (Codec_List)
  • The codecs that the contact supports.
Mapping (Permalink)

ContactDescriptionPropertiesMap — a{ua{sv}}

  • RemoteContact — u (Handle)
  • The remote contact this description refers to
  • DescriptionProperties — a{sv} (DescriptionProperties)
  • The properties of the description
Struct (Permalink)

Codec — (usuua{ss})

A description of a codec.
  • Identifier — u
  • Numeric identifier for the codec. This will be used as the PT in the SDP or content description.
  • Name — s
  • The name of the codec.
  • Clockrate — u
  • The clockrate of the codec.
  • Channels — u
  • Number of channels of the codec if applicable, otherwise 0.
  • Parameters — a{ss} (String_String_Map)
  • Extra parameters for this codec.
Struct (Permalink)

DescriptionOffer — (oua{sv})

The remote description offer and its information
  • Codec_Offer — o
  • The object path to the Description.DRAFT
  • Remote_Contact — u (Contact_Handle)
  • The contact handle that this description applies.
  • Properties — a{sv} (DescriptionProperties)
  • The immutable properties of all interfaces of the codec description.
    Rationale:
    Having all the codec description properties here saves a D-Bus round-trip - it shouldn't be necessary to get the properties from the Description object, in practice.