OpenTok C SDK
media_transformer.h
Go to the documentation of this file.
1 
10 #ifndef MEDIA_TRANSFORMER_H
11 #define MEDIA_TRANSFORMER_H
12 
13 #include "audio_data.h"
14 #include "video_frame.h"
15 
16 OTC_BEGIN_DECL
17 
18 #define OTC_MEDIA_TRANSFORMER_ERROR_SPACE 0x0A000000
19 
20 enum otc_media_transformer_error_code {
21  OTC_MEDIA_TRANSFORMER_INTERNAL_ERROR =
22  OTC_MEDIA_TRANSFORMER_ERROR_SPACE,
23  OTC_MEDIA_TRANSFORMER_INVALID_TYPE,
24  OTC_MEDIA_TRANSFORMER_NAME_NOT_PROVIDED,
25  OTC_MEDIA_TRANSFORMER_CUSTOM_CALLBACK_NOT_PROVIDED,
26  OTC_MEDIA_TRANSFORMER_PROPERTIES_NOT_PROVIDED,
27  OTC_MEDIA_TRANSFORMER_MODEL_NOT_FOUND,
28  OTC_MEDIA_TRANSFORMER_OPENTOK_TRANSFORMERS_LIBRARY_NOT_LOADED,
29  OTC_MEDIA_TRANSFORMER_OPENTOK_TRANSFORMERS_SYMBOL_NOT_FOUND
30 };
31 
35 
39 
44  OTC_MEDIA_TRANSFORMER_TYPE_CUSTOM = 0,
45  OTC_MEDIA_TRANSFORMER_TYPE_VONAGE
46 };
47 
72 OTC_DECL(struct otc_video_transformer*)
75  const char* name,
76  const char* properties,
78  void* user_data);
79 
95 OTC_DECL(struct otc_audio_transformer*)
98  const char* name,
99  const char* properties,
101  void* user_data);
102 
111 OTC_DECL(otc_status)
113  struct otc_video_transformer* video_transformer);
114 
123 OTC_DECL(otc_status)
125  struct otc_audio_transformer* audio_transformer);
126 
132 OTC_DECL(const char*) otc_get_media_transformers_error_message(int error);
133 
134 OTC_END_DECL
135 
136 #endif /* MEDIA_TRANSFORMER_H */
void(* video_transform_callback)(void *user_data, struct otc_video_frame *frame)
The callback that will perform the custom transformation.
Definition: video_frame.h:134
otc_media_transformer_type
Available types of media transformers.
Definition: media_transformer.h:43
int otc_status
Definition: base.h:153
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)
void(* audio_transform_callback)(void *user_data, struct otc_audio_data *frame)
The callback that will perform the custom transformation.
Definition: audio_data.h:33
struct otc_video_transformer otc_video_transformer
Definition: media_transformer.h:34
otc_status otc_audio_transformer_delete(struct otc_audio_transformer *audio_transformer)
Deletes an audio transformer.
Audio Data.
struct otc_audio_transformer otc_audio_transformer
Definition: media_transformer.h:38
const char * otc_get_media_transformers_error_message(int error)
otc_status otc_video_transformer_delete(struct otc_video_transformer *video_transformer)
Deletes a 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)
Video frame.