Media transformer functions. More...
#include "audio_data.h"
#include "video_frame.h"
Enumerations | |
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... |
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.
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.
type | The type of transformer. Set the to OTC_MEDIA_TRANSFORMER_TYPE_CUSTOM for a custom transformer. (Vonage Media Library audio transformers are not supported in this beta version.) | |
name | A name for the custom tranformer. | |
properties | A JSON string with the properties of the Vonage audio transformer. No Vonage audio transformer is yet supported so this paramater must be NULL. | |
[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. |
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. Currently, video transformers are only supported on Apple silicon Macs, and this function only applies to the Vonage Video API macOS SDK. It does not work in the Vonage Video API Linux SDK. For more information, see Using the Vonage Media Processor library.
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. Currently supported transformers are "BackgroundBlur" and "BackgroundReplacement". | |
properties | A JSON string with the properties of the Vonage video transformer. For a background blur transformer, the format of the JSON is "{\"radius":"None"}". Valid values for the <code>radius</code> property
a None", "High", and "Low". For a custom background blur transformer, the format of the JSON is "{\"radius":"Custom","custom_radius":"value"}", where custom_radius can be any positive integer. For a background replacement transformer, the format of the JSON is "{\"image_file_path":"path/to/image"}", where image_file_path is the absolute file path of a local image to use as virtual background. Supported image formats are PNG and JPEG. | |
[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. |