Audio/Video stream. More...
#include "config.h" #include "connection.h"
| Typedefs | |
| typedef struct otc_stream | otc_stream |
| Enumerations | |
| enum | otc_stream_video_type { OTC_STREAM_VIDEO_TYPE_CAMERA = 1 , OTC_STREAM_VIDEO_TYPE_SCREEN , OTC_STREAM_VIDEO_TYPE_CUSTOM = 3 } |
| Functions | |
| const char * | otc_stream_get_id (const otc_stream *stream) |
| const char * | otc_stream_get_name (const otc_stream *stream) |
| otc_bool | otc_stream_has_video_track (const otc_stream *stream) |
| otc_bool | otc_stream_has_video (const otc_stream *stream) |
| otc_bool | otc_stream_has_audio_track (const otc_stream *stream) |
| otc_bool | otc_stream_has_audio (const otc_stream *stream) |
| otc_bool | otc_stream_has_captions (const otc_stream *stream) |
| otc_stream * | otc_stream_copy (const otc_stream *stream) |
| otc_status | otc_stream_delete (otc_stream *stream) |
| int | otc_stream_get_video_width (const otc_stream *stream) |
| int | otc_stream_get_video_height (const otc_stream *stream) |
| int64_t | otc_stream_get_creation_time (const otc_stream *stream) |
| enum otc_stream_video_type | otc_stream_get_video_type (const otc_stream *stream) |
| const otc_connection * | otc_stream_get_connection (const otc_stream *stream) |
Detailed Description
Audio/Video stream.
This file includes the type definition for an audio-video stream along with several function declarations useful when handling it.
Typedef Documentation
otc_stream
| typedef struct otc_stream otc_stream |
Type definition for a struct representing an audio-video stream in an OpenTok session.
Enumeration Type Documentation
otc_stream_video_type
Stream video type enumeration.
This enumeration represents the different stream video types supported.
| Enumerator | |
|---|---|
| OTC_STREAM_VIDEO_TYPE_CAMERA | Camera video stream. |
| OTC_STREAM_VIDEO_TYPE_SCREEN | Screen video stream. This is used for screen-sharing. |
| OTC_STREAM_VIDEO_TYPE_CUSTOM | Custom video stream. |
Function Documentation
otc_stream_copy()
| otc_stream * otc_stream_copy | ( | const otc_stream * | stream | ) |
Makes a copy of a stream.
Parameters : | | | | --- | --- | | stream | The stream to be copied. |
Returns : A copy of the stream. This can be null if there is an error.
otc_stream_delete()
| otc_status otc_stream_delete | ( | otc_stream * | stream | ) |
Releases resources associated with the stream.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : Return value indicating either error or success.
otc_stream_get_connection()
| const otc_connection * otc_stream_get_connection | ( | const otc_stream * | stream | ) |
Get the connection associated with the client publishing the stream.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : The connection associated with the client publishing the stream.
otc_stream_get_creation_time()
| int64_t otc_stream_get_creation_time | ( | const otc_stream * | stream | ) |
Gets the creation time of the stream.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : The timestamp for the creation time of the stream.
otc_stream_get_id()
| const char * otc_stream_get_id | ( | const otc_stream * | stream | ) |
Gets the unique identifier for this stream.
Parameters : | | | | --- | --- | | stream | The stream. |
Returns : The unique identifier for this stream.
otc_stream_get_name()
| const char * otc_stream_get_name | ( | const otc_stream * | stream | ) |
Gets the name of the stream. The publisher of the stream can set this name to identify the stream.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : The stream name.
otc_stream_get_video_height()
| int otc_stream_get_video_height | ( | const otc_stream * | stream | ) |
Returns the height, in pixels, of the video stream.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : The height, in pixels, of the video stream.
otc_stream_get_video_type()
| enum otc_stream_video_type otc_stream_get_video_type | ( | const otc_stream * | stream | ) |
Returns the video type of the stream.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : The video type of the stream.
See also : otc_stream_video_type
otc_stream_get_video_width()
| int otc_stream_get_video_width | ( | const otc_stream * | stream | ) |
Returns the width, in pixels, of the video stream.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : The width, in pixels, of the video stream.
otc_stream_has_audio()
| otc_bool otc_stream_has_audio | ( | const otc_stream * | stream | ) |
Checks whether this stream is currently publishing audio or not.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : Return value indicating whether this stream is publishing audio or not.
otc_stream_has_audio_track()
| otc_bool otc_stream_has_audio_track | ( | const otc_stream * | stream | ) |
Checks whether this stream contains an audio track or not.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : Return value indicating whether this stream contains an audio track or not.
otc_stream_has_captions()
| otc_bool otc_stream_has_captions | ( | const otc_stream * | stream | ) |
Checks whether this stream is currently publishing captions or not.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : Return value indicating whether this stream is publishing captions or not.
otc_stream_has_video()
| otc_bool otc_stream_has_video | ( | const otc_stream * | stream | ) |
Checks whether this stream is currently publishing video or not.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : Return value indicating whether this stream is publishing video or not.
otc_stream_has_video_track()
| otc_bool otc_stream_has_video_track | ( | const otc_stream * | stream | ) |
Checks whether this stream contains a video track or not.
Parameters : | | | | --- | --- | | stream | The stream being queried. |
Returns : Return value indicating whether this stream contains a video track or not.