Structs

This structure includes a set of function pointers to callback functions to use with an audio device. The SDK calls these functions when events related to the audio device occur.

This structure represents the settings associated with an audio device.

ICE server configuration.

A structure representing the supported codecs for encoding and decoding video.

Publisher audio stats.

Publisher callback functions.

Represents RTC statistics for a media stream published by the publisher.

Defines the struct for setting the publisher RTC stats report callack.

Publisher video stats.

Session callback functions.

Session capabilities.

Session signal options.

This struct represents subscriber audio stats, reported periodically by the {@link otc_subscriber_callbacks.on_audio_stats} callback function.

Subscriber callback functions.

Defines the struct for setting the subcriber RTC stats report callack.

This struct represents subscriber video stats, reported periodically by the {@link otc_subscriber_callbacks.on_video_stats} callback function.

Audio device callback functions.

Video capturer settings.

Defines a struct containing callback functions for a video frame plane memory wrapper struct. @see otc_video_frame_new_planar_memory_wrapper

Constants

< Constant that represents false.

< Constant that represents success.

< Constant that represents true.

Acquiring video camera error code.

Connection dropped error code.

Connection time out error code.

Fatal error code.

Invalid funtion argument error code.

Unknown publisher instance error code.

Unknown subscriber instance error code.

Video capture error code.

Video rendering error code.

Media engine access error code.

< Debug level messages.

< No messages enum value.

< Error level messages.

< Fatal level messages.

< Info level messages.

< Message level messages.

< Trace level messages.

< Warning level messages.

< Time-out attempting to publish.

< The connection timed out while attempting to get the session’s state.

< The subscriber failed because the stream is missing. This can happen if the subscriber is created at the same time the stream is removed from the session.

< Attempting to subscribe to a stream in a session that you have disconnected from.

< The client tried to subscribe to a stream in a session that has exceeded the limit for simultaneous streams.

< Video codec type for H.264.

< Video codec type for VP8.

< NV12 video frame format enum value.

< NV21 video frame format enum value.

< RGB24 video frame format enum value.

< UYVY video frame format enum value.

< YUY2 video frame format enum value.

< Video frame plane packed enum value.

< Video frame plane U enum value.

< Video frame plane V enum value.

< Video frame plane Y enum value.

< The video event was caused when video in the subscriber stream was disabled because the stream uses a video codec that is not supported on the device.

< The video event was caused by a change to the video stream quality.

Functions

Retrieves unrendered audio samples from the session. These samples are mixed from the streams in the session you have subscribed to.

Passes in audio data from the audio device to transmit to a session. This audio data is used by streams you publish to the session.

Makes a copy of this connection.

Releases resources associated with the connection.

Returns the timestamp for when the client connected to the OpenTok session.

Returns the data associated with the connection. You set this data when you create the token used for by the client to connect to the OpenTok session. See the Token Creation Overview developer guide.

Returns the unique identifier for this connection.

Gets the session ID for the session the connection is connected to.

Destroys the library engine. You should call this function when you are done executing code that uses the library. @return Return value indicating either error or success.

Gets the current console logging level. @return The log level set.

Initializes the library. You must call this function before the execution of any other code using the library. @param reserved A void pointer to a memory area holding reserved resources used for the internal implementation. This must be set to NULL. @return Return value indicating either error or success.

Enables logging of SDK messages for a given log level. @param log_level The desired log level. @see otc_log_set_logger_callback @see otc_get_log_level

Sets the function pointer to a custom logging callback function to get messages logged by the SDK. If you do not set a logging callback function, the SDK will log messages to the console. @param callback A pointer to the callback function. @see otc_log_enable

Deletes an otc_media_utils_codecs instance.

Updates a otc_media_utils_codecs struct with the media codecs that are available on the device.

Releases a publisher instance, including all hardware resources bound to it.

Returns whether the publisher audio fallback feature is enabled or not. See the {@link otc_publisher_set_audio_fallback_enabled} function.

Gets the name for a given publisher.

Returns whether the Publisher is publishing audio or not.

Returns whether the publisher is publishing video or not.

Gets a unique identifier for a publisher.

Gets the RTC stats report for the subscriber. This is an asynchronous operation. create an otc_publisher_rtc_stats_report_cb struct and pass it into the {@link otc_publisher_set_rtc_stats_report_cb} function prior to calling this function. When the stats are available, the {@link otc_publisher_set_rtc_stats_report_cb} callback function is called.

Returns the {@link otc_session} associated this publisher instance.

Returns the stream associated with the publisher.

Gets user data for a given publisher.

Gets the publisher video type. See the {@link otc_publisher_set_video_type} function.

Creates a new otc_publisher instance.

Creates a new otc_publisher instance.

Enables or disables the audio fallback feature.

Sets the max audio bitrate for the publisher.

Whether to publish audio or not. By default, streams publish both audio and video.

Whether to publish video or not. By default, streams publish both audio and video.

Sets the RTC stats report callback the publisher.

Sets the publisher video type. By default, videos have the video type set to OTC_PUBLISHER_VIDEO_TYPE_CAMERA (indicating the source of the video is a camera). Set this to OTC_PUBLISHER_VIDEO_TYPE_SCREEN to indicate that the video source is screen sharing. Other clients can detect the video type for streams in the session (to determine the video source type).

Deletes an otc_publisher_settings instance.

Creates a new otc_publisher_settings instance.

Enables an audio track for a publisher to be constructed with {@link otc_publisher_new_with_settings}.

Sets the desired name for a publisher to be constructed with {@link otc_publisher_new_with_settings}.

Enables stereo audio for a publisher to be constructed with {@link otc_publisher_new_with_settings}.

Sets the video capturer for a publisher to be constructed with {@link otc_publisher_new_with_settings}.

Enables a video track for a publisher to be constructed with {@link otc_publisher_new_with_settings}.

Connects the client to an OpenTok session.

Releases resources associated with the session.

Disconnects the client from this session. All of the client’s subscribers and publishers will also be will be disconnected from the session.

Gets the capabilities of the client connecxted to the session. All {@link otc_session_capabilities} members are undefined until {@link otc_session_callbacks.on_connected} has been called.

Gets the connection object associated with this session.

Gets the unique session ID for this session.

Gets the user data associated with the session. See {@link otc_session_callbacks.user_data}.

Creates a new {@link otc_session} struct instance. Pass this into the {@link otc_session_connect} function to connect to the OpenTok session.

Creates a new OpenTok session with advanced settings. These include settings for suppressing connection events, custom TURN servers, the IP proxy feature, and the IP whitelist feature.

Starts a publisher streaming to the session.

Report that your app experienced an issue. You can use the issue ID with the Inspector tool or when discussing an issue with the Vonage Video API support team.

Sends a signal to all clients connected to the session. See {@link otc_session_send_signal_with_options}, {@link otc_session_send_signal_to_connection}, and {@link otc_session_send_signal_to_connection_with_options}. Also see the Signaling overview.

Sends a signal to a specific client connected to the session. See {@link otc_session_send_signal_to_connection_with_options}, {@link otc_session_send_signal}, and {@link otc_session_send_signal_with_options}. Also see the Signaling overview.

Sends a signal to a specific client, with specified options. See {@link otc_session_send_signal}, {@link otc_session_send_signal_to_connection}, and {@link otc_session_send_signal_with_options}. Also see the Signaling overview.

Sends a signal to all clients connected to the session, with specified options. See {@link otc_session_send_signal}, {@link otc_session_send_signal_to_connection}, and {@link otc_session_send_signal_to_connection_with_options}. Also see the Signaling overview.

Deletes an {@link otc_session_settings} instance.

Creates a new {@link otc_session_settings} instance, used to set up advanced session settings. Call the following functions to configure these settings before calling the {@link otc_session_new_with_settings} function to create a session with these settings:

Prevent connection events, to support large interactive video sessions. This prevents {@link otc_session_callbacks.on_connection_created} and {@link otc_session_callbacks.on_connection_dropped} callback functions from being invoked when other clients connect to or disconnect from the session. (Also, the OpenTok server does not send these events to the client.) For more information, see Suppressing connection events in the OpenTok developer guides.

Enables custom ICE sever configuration. This is part of the configurable TURN feature.

Pass in OTC_TRUE to have the client use the IP address white list. This feature is available as an add-on feature for Enterprise partners.

Starts subscribing to (receiving a stream for) a subscriber’s audio-video stream in this session.

Causes a publisher from a session (causing its stream to stop).

Stops subscribing to (receiving a stream for) a specified subscriber in the session.

Sets the audio device to be used. You must call this function before you connect to a session. Additionally, this is a global operation that must persist throughout the lifetime of a session.

Makes a copy of a stream.

Releases resources associated with the stream.

Get the connection associated with the client publishing the stream.

Gets the creation time of the stream.

Gets the unique identifier for this stream.

Gets the name of the stream. The publisher of the stream can set this name to identify the stream.

Returns the height, in pixels, of the video stream.

Returns the video type of the stream.

Returns the width, in pixels, of the video stream.

Checks whether this stream is currently publishing audio or not.

Checks whether this stream contains an audio track or not.

Checks whether this stream is currently publishing video or not.

Checks whether this stream contains a video track or not.

Releases a subscriber instance, including all hardware and UI resources bound to it.

Returns the preferred frame rate for the subscriber’s stream.

Returns the preferred resolution for the subscriber’s stream.

Gets the RTC stats report for the subscriber. This is an asynchronous operation. create an otc_subscriber_rtc_stats_report_cb struct and pass it into the {@link otc_subscriber_set_rtc_stats_report_cb} function prior to calling this function. When the stats are available, the {@link otc_subscriber_set_rtc_stats_report_cb} callback function is called.

Returns the {@link otc_session} associated this instance.

Returns the stream associated with the subscriber.

Returns whether the subscriber is subscribed to the stream’s audio or not.

Returns whether the subscriber is subscribed to the stream’s video or not.

Gets a unique identifier for a given subscriber.

Gets user data for a given subscriber.

Creates a new Subscriber for a given Stream.

Sets the preferred frame rate for the subscriber’s stream.

Sets the preferred resolution for the subscriber’s stream.

Sets the RTC stats report callback the subscriber. See otc_subscriber_get_rtc_stats_report.

Subscribes to the stream’s audio.

Subscribes to the stream’s video.

Provides a video frame to the video capturer.

Converts a given frame. All the video frames provided by the SDK callback functions are bound to this. If you plan to save the frame so you use it later, you’ll need to copy it. In addition to that, if you want to convert a video frame to a different format, you’ll use this function also If the destination format is the same as the source, a shallow copy (n buffer copy) will be made if possible.

Converts a given frame in place. This changes the data of the input frame.

Copies a given video frame.

Free resources associated with the frame.

Gets a pointer to the buffer containing video frame data.

Gets the size of the buffer containing video frame data.

Gets the video format of a video frame.

Gets the height of a video frame, in pixels.

Gets the metadata associated with the video frame.

Gets the number of planes of a video frame. Typically, this returns 3 for a YUV fame and 1 for a RGBA/BGRA fame.

Gets the binary data from one of the planes of a video frame.

Gets the height of a plane in a video frame.

Gets the size of a plane in a video frame.

Gets plane stride from a give plane in a video frame.

Gets the width of a plane in a video frame.

Gets a video frame timestamp.

Gets the width of a video frame, in pixels.

Checks whether a video frame is contiguous or not.

Checks whether a video frame is packed or not.

Makes a mutable copy of a given video frame.

Creates a new video frame with a given format.

Creates a new video frame with I420 format.

Creates a new video frame with I420 format from a list of planes.

Creates a new I420 format video frame from YUV data.

Creates a new video frame with MJPEG format.

Creates a new video frame with an NV12 wrapper.

Creates a new video frame with an NV21 wrapper.

Creates a new compressed video frame.

Creates a new video frame from data in a contiguous memmory buffer.

Creates a new video frame with a given format from its planes.

Creates a new video frame from a planar memory wrapper. The {@link otc_video_frame_planar_memory_callbacks} struct, passed in, defines callback functions that are invoked when video frame and stride data is requested.

Sets the video format of a video frame.

Sets the metadata associated with a video frame.

Sets the timestamp for a video frame.

Type Definitions

Type definition for Boolean values.

This enumeration includes commonly used constants.

This enumeration includes error codes.

Log level enumeration.

Type definition for a function pointer to the function used as the custom logging callback to get messages logged by the SDK. @param message A pointer to the message being logged. @see otc_log_set_logger_callback

Error code enumeration for OpenTok publishers.

Publisher video type enumeration.

Error code enumeration for OpenTok sessions.

Type definition for statuses.

Stream video type enumeration.

Error code enumeration for OpenTok subscribers.

Video codec type enum.

Video frame video format enumeration.

Type definition for the video frame memory release callback function.

Video frame video plane enumeration.

Enum for reasons for a video to be started, stopped, resumed, etc.