OpenTok C SDK
|
Media transformer functions. More...
Go to the source code of this file.
Macros | |
#define | OTC_MEDIA_TRANSFORMER_ERROR_SPACE 0x0A000000 |
Typedefs | |
typedef struct otc_video_transformer | otc_video_transformer |
typedef struct otc_audio_transformer | otc_audio_transformer |
Enumerations | |
enum | otc_media_transformer_error_code { OTC_MEDIA_TRANSFORMER_INTERNAL_ERROR, OTC_MEDIA_TRANSFORMER_INVALID_TYPE, OTC_MEDIA_TRANSFORMER_NAME_NOT_PROVIDED, OTC_MEDIA_TRANSFORMER_CUSTOM_CALLBACK_NOT_PROVIDED, OTC_MEDIA_TRANSFORMER_PROPERTIES_NOT_PROVIDED, OTC_MEDIA_TRANSFORMER_MODEL_NOT_FOUND, OTC_MEDIA_TRANSFORMER_OPENTOK_TRANSFORMERS_LIBRARY_NOT_LOADED, OTC_MEDIA_TRANSFORMER_OPENTOK_TRANSFORMERS_SYMBOL_NOT_FOUND } |
enum | otc_media_transformer_type { OTC_MEDIA_TRANSFORMER_TYPE_CUSTOM = 0, OTC_MEDIA_TRANSFORMER_TYPE_VONAGE } |
Available types of media transformers. | |
Functions | |
struct otc_video_transformer * | otc_video_transformer_create (enum otc_media_transformer_type type, const char *name, const char *properties, video_transform_callback cb, void *user_data) |
struct otc_audio_transformer * | otc_audio_transformer_create (enum otc_media_transformer_type type, const char *name, const char *properties, audio_transform_callback cb, void *user_data) |
otc_status | otc_video_transformer_delete (struct otc_video_transformer *video_transformer) |
Deletes a video transformer. More... | |
otc_status | otc_audio_transformer_delete (struct otc_audio_transformer *audio_transformer) |
Deletes an audio transformer. More... | |
const char * | otc_get_media_transformers_error_message (int error) |
Media transformer functions.
This file includes functions for working with custom media transformers and Vonage Media Processor library transformers. For more informmation, see this developer guide.
Note: This functionality only applies to the Vonage Video API macOS SDK. It does not work in the Vonage Video API Linux SDK.
typedef struct otc_audio_transformer otc_audio_transformer |
OpenTok audio transformer.
typedef struct otc_video_transformer otc_video_transformer |
OpenTok video transformer.
struct otc_audio_transformer* otc_audio_transformer_create | ( | enum otc_media_transformer_type | type, |
const char * | name, | ||
const char * | properties, | ||
audio_transform_callback | cb, | ||
void * | user_data | ||
) |
Creates an instance of a custom audio transformer.
Note: This function only applies to the Vonage Video API macOS SDK. It does not work in the Vonage Video API Linux SDK. If an error occurs, NULL is returned and "errno" is set.
type | The type of transformer. Set the to OTC_MEDIA_TRANSFORMER_TYPE_CUSTOM for a custom transformer. | |
name | A name for the custom tranformer. | |
properties | A JSON string with the properties of the Vonage audio transformer. | |
[in] | cb | The callback that will perform a custom transformation (disregarded for Vonage transformers) |
[in] | user_data | Opaque data passed by the user and returned in the callback. |
otc_status otc_audio_transformer_delete | ( | struct otc_audio_transformer * | audio_transformer | ) |
Deletes an audio transformer.
Note: This function only applies to the Vonage Video API macOS SDK. It does not work in the Vonage Video API Linux SDK.
[in] | audio_transformer | opaque pointer audio transfomer to delete. |
const char* otc_get_media_transformers_error_message | ( | int | error | ) |
Gets the error message associated to provided media transformers error code.
error | The media transformers error code. |
struct otc_video_transformer* otc_video_transformer_create | ( | enum otc_media_transformer_type | type, |
const char * | name, | ||
const char * | properties, | ||
video_transform_callback | cb, | ||
void * | user_data | ||
) |
Creates an instance of a Vonage Media Library video transformer or a custom video transformer. This function is supported in the Vonge Video client SDK for macOS (not the Linux SDK). For more information, see Using the Vonage Media Processor library.
Important: In version 2.27.3+ of the Vonage Video client SDK for macOS, you need to add the Vonage Media Library separately from the Vonage Video macOS SDK. For details, see Vonage Media Library integration.
Check additional information in the Vonage Media Library README.md file.
If an error occurs, NULL is returned and "errno" is set.
type | The type of transformer. Set the to OTC_MEDIA_TRANSFORMER_TYPE_CUSTOM for a custom transformer. Set the to OTC_MEDIA_TRANSFORMER_TYPE_VONAGE for a Vonage Media Library transformer. | |
name | The name of the Vonage Media Library transformer or a unique name for the custom video transformer. | |
properties | A JSON string with the properties of the Vonage video transformer. | |
[in] | cb | The callback that will perform a custom transformation (disregarded for Vonage transformers) |
[in] | user_data | Opaque data passed by the user and returned in the callback. |
otc_status otc_video_transformer_delete | ( | struct otc_video_transformer * | video_transformer | ) |
Deletes a video transformer.
Note: This function only applies to the Vonage Video API macOS SDK. It does not work in the Vonage Video API Linux SDK.
[in] | video_transformer | opaque pointer video transfomer to delete. |