OpenTok C SDK
|
OpenTok Subscriber. More...
Go to the source code of this file.
Data Structures | |
struct | otc_subscriber_audio_stats |
struct | otc_subscriber_video_stats |
struct | otc_subscriber_callbacks |
Typedefs | |
typedef struct otc_subscriber | otc_subscriber |
Enumerations | |
enum | otc_video_reason { OTC_VIDEO_REASON_PUBLISH_VIDEO = 1, OTC_VIDEO_REASON_SUBSCRIBE_TO_VIDEO = 2, OTC_VIDEO_REASON_QUALITY = 3, OTC_VIDEO_REASON_CODEC_NOT_SUPPORTED = 4 } |
enum | otc_subscriber_error_code { OTC_SUBSCRIBER_INTERNAL_ERROR = 2000, OTC_SUBSCRIBER_SESSION_DISCONNECTED = 1541, OTC_SUBSCRIBER_SERVER_CANNOT_FIND_STREAM = 1604, OTC_SUBSCRIBER_STREAM_LIMIT_EXCEEDED = 1605, OTC_SUBSCRIBER_TIMED_OUT = 1542, OTC_SUBSCRIBER_WEBRTC_ERROR = 1600 } |
OpenTok Subscriber.
This file includes the type definition for an OpenTok subscriber along with several function declarations.
typedef struct otc_subscriber otc_subscriber |
OpenTok subscriber type definition.
A type representing the consumer of audio and video from a stream in the OpenTok session.
Error code enumeration for OpenTok subscribers.
This enumeration represents several error codes associated with a subscriber.
enum otc_video_reason |
Enum for reasons for a video to be started, stopped, resumed, etc.
otc_status otc_subscriber_delete | ( | otc_subscriber * | subscriber | ) |
Releases a subscriber instance, including all hardware and UI resources bound to it.
subscriber | The subcriber to be deleted. |
otc_status otc_subscriber_get_preferred_framerate | ( | const otc_subscriber * | subscriber, |
float * | preferred_framerate | ||
) |
Returns the preferred frame rate for the subscriber's stream.
subscriber | The subscriber instance. |
preferred_framerate | The preferred framerate associated with the subscriber. |
otc_status otc_subscriber_get_preferred_resolution | ( | const otc_subscriber * | subscriber, |
uint32_t * | preferred_width, | ||
uint32_t * | preferred_height | ||
) |
Returns the preferred resolution for the subscriber's stream.
subscriber | The subscriber instance. |
preferred_width | The preferred width of the subscriber. |
preferred_height | The preferred height of the subscriber. |
otc_session* otc_subscriber_get_session | ( | const otc_subscriber * | subscriber | ) |
Returns the otc_session associated this instance.
subscriber | The subscriber instance. |
otc_stream* otc_subscriber_get_stream | ( | const otc_subscriber * | subscriber | ) |
Returns the stream associated with the subscriber.
subscriber | The subscriber instance to get the stream from. |
otc_bool otc_subscriber_get_subscribe_to_audio | ( | const otc_subscriber * | subscriber | ) |
Returns whether the subscriber is subscribed to the stream's audio or not.
subscriber | The subscriber instance. |
otc_bool otc_subscriber_get_subscribe_to_video | ( | const otc_subscriber * | subscriber | ) |
Returns whether the subscriber is subscribed to the stream's video or not.
subscriber | The subscriber instance. |
const char* otc_subscriber_get_subscriber_id | ( | const otc_subscriber * | subscriber | ) |
Gets a unique identifier for a given subscriber.
subscriber | The subscriber instance. |
void* otc_subscriber_get_user_data | ( | const otc_subscriber * | subscriber | ) |
Gets user data for a given subscriber.
subscriber | The subscriber instance. |
otc_subscriber* otc_subscriber_new | ( | const otc_stream * | stream, |
const struct otc_subscriber_callbacks * | callbacks | ||
) |
Creates a new Subscriber for a given Stream.
stream | The Stream object corresponding to the stream you will subscribe to. |
callbacks | Struct with function pointers of the subscriber's callbacks. |
otc_status otc_subscriber_set_preferred_framerate | ( | otc_subscriber * | subscriber, |
float | preferred_framerate | ||
) |
Sets the preferred frame rate for the subscriber's stream.
subscriber | The subscriber instance which will be affected. |
preferred_framerate | The preferred framerate of the subscriber. |
otc_status otc_subscriber_set_preferred_resolution | ( | otc_subscriber * | subscriber, |
uint32_t | preferred_width, | ||
uint32_t | preferred_height | ||
) |
Sets the preferred resolution for the subscriber's stream.
subscriber | The subscriber instance which will be affected. |
preferred_width | The preferred width of the subscriber. |
preferred_height | The preferred height of the subscriber. |
otc_status otc_subscriber_set_subscribe_to_audio | ( | otc_subscriber * | subscriber, |
otc_bool | subscribe_to_audio | ||
) |
Subscribes to the stream's audio.
subscriber | The subscriber instance which will be affected. |
subscribe_to_audio | Whether to subscribe to audio or not. |
otc_status otc_subscriber_set_subscribe_to_video | ( | otc_subscriber * | subscriber, |
otc_bool | subscribe_to_video | ||
) |
Subscribes to the stream's video.
subscriber | The subscriber instance which will be affected. |
subscribe_to_video | Whether to subscribe to video or not. |