Compartilhar via


IRTCClient::SetPreferredMediaTypes (Windows CE 5.0)

Send Feedback

This method defines the preferred media types for new sessions. A session uses this set of media types if they are available on the session.

HRESULT SetPreferredMediaTypes(longlMediaTypes,VARIANT_BOOLfPersistent);

Parameters

  • lMediaTypes
    [in] RTCMT_ constant specifying the media type.

    The following media types are not supported:

    • RTCMT_VIDEO_SEND
    • RTCMT_VIDEO_RECEIVE
    • RTCMT_T120_SENDRECV
  • fPersistent
    [in] VARIANT_TRUE if media types set in this method persist between instances of the application.

    VARIANT_FALSE if the types do not persist.

Return Values

This method can return an RTC_E_ constant.

The following table shows an additional possible return value.

Value Description
E_INVALIDARG Invalid media type.

Remarks

The value that this method sets persists for each user after the application is shut down.

The lMediaTypes parameter sets the media types globally for all sessions on the current client object. This setting dictates which media types can be accepted for incoming PC-to-PC sessions.

If the media types offered on an incoming PC-to-PC session are not allowed, the RTC Client API rejects the incoming session without notifying the application.

This setting also dictates the media types allowed for newly created outgoing PC-to-PC sessions.

Calling the IRTCSession::AddStream and IRTCSession::RemoveStream methods changes the media types allowed by the RTC Client API.

The application should call SetPreferredMediaTypes with the appropriate value before creating a new outgoing PC-to-PC session.

The application should also call this method after disconnecting from a session in which IRTCSession::AddStream or IRTCSession::RemoveStream has been called. This ensures that the application receives notifications of incoming PC-to-PC sessions with the preferred media types.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.

See Also

IRTCClient | IRTCClient::PreferredMediaTypes | IRTCSession::AddStream | IRTCSession::RemoveStream

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.