Share via


IRTCClient::SetPreferredMediaTypes (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

HRESULT SetPreferredMediaTypes(
  long lMediaTypes,
  VARIANT_BOOL fPersistent
);

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 Value

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

Header rtccore.h, rtccore.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

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