get_compat_resource


Description:

public DIDLLiteResource get_compat_resource (string sink_protocol_info, bool lenient)

Use this function to get a resource from the this that is compatible with any of the protocols specified in the sink_protocol_info.

The value of sink_protocol_info will typically be acquired from 'Sink' argument of 'GetProtocolInfo' action or 'SinkProtocolInfo' state-variable of a ConnectionManager service.

If lenient is true, the first resource in the list is returned instead of null if none of resources and protocols are found to be compatible.

Parameters:

this

DIDLLiteObject

sink_protocol_info

The SinkProtocolInfo string from MediaRenderer

lenient

Enable lenient mode

Returns:

The resource belonging to this that is comaptible with any of the protocols specified in sink_protocol_info, or null. Unref after usage.




2022 vala-language.org