21#ifndef OTC_SESSION_FWD_DECL
22#define OTC_SESSION_FWD_DECL
26#define OTC_MAX_VIDEO_LAYERS 3
75 OTC_MEDIA_TYPE_VIDEO = 0,
253 size_t number_of_stats);
266 size_t number_of_stats);
281 const char* error_string,
349 void (*on_video_quality_changed)(
struct otc_publisher* publisher,
390 size_t number_of_stats);
1030OTC_DECL(const
char*)
int otc_bool
Definition base.h:167
otc_video_reason
Definition base.h:17
int otc_status
Definition base.h:262
otc_network_reason
Definition base.h:46
OpenTok Camera Capture Resolution on default video capturers.
otc_camera_capture_resolution
Definition camera_capture_resolution.h:17
otc_status otc_publisher_settings_set_sender_stats_track(otc_publisher_settings *settings, otc_bool enabled)
otc_publisher_video_type
Definition publisher.h:66
@ OTC_PUBLISHER_VIDEO_TYPE_CAMERA
Definition publisher.h:67
@ OTC_PUBLISHER_VIDEO_TYPE_SCREEN
Definition publisher.h:68
otc_status otc_publisher_set_video_transformers(otc_publisher *publisher, otc_video_transformer **transformers, uint8_t size)
Sets an array of video transformers to this publisher's video stream. If null resets transformers.
otc_status otc_publisher_set_degradation_preference(otc_publisher *publisher, enum otc_degradation_preference degradation_preference)
Sets the preferred policy that the video engine will follow when adjusting frame rate and resolution ...
otc_status otc_publisher_settings_set_preferred_video_codecs_automatic(otc_publisher_settings *settings)
Enables automatic codec prioritization for this publisher's stream.
otc_status otc_publisher_set_target_scalability_mode(otc_publisher *publisher, const char *scalability_mode)
Sets the target scalability mode (SVC - Scalable Video Coding) for this publisher....
otc_status otc_publisher_settings_set_video_track(otc_publisher_settings *settings, otc_bool enabled)
otc_publisher * otc_publisher_new(const char *name, const struct otc_video_capturer_callbacks *capturer, const struct otc_publisher_callbacks *callbacks)
otc_status otc_publisher_set_video_bitrate_preset(otc_publisher *publisher, enum otc_video_bitrate_preset preset)
Sets a video bitrate preset for this publisher's video stream.
int otc_publisher_get_max_video_bitrate(const otc_publisher *publisher)
Gets the maximum video bitrate set for this publisher's video stream.
enum otc_degradation_preference otc_publisher_get_degradation_preference(const otc_publisher *publisher)
Gets the preferred policy that the video engine will follow when adjusting frame rate and resolution ...
otc_publisher_settings * otc_publisher_settings_new()
otc_status otc_publisher_set_max_audio_bitrate(otc_publisher *publisher, uint32_t bitrate)
otc_status otc_publisher_settings_set_publisher_audio_fallback_enabled(otc_publisher_settings *settings, const otc_bool enabled)
otc_publisher * otc_publisher_new_with_settings(const struct otc_publisher_callbacks *callbacks, otc_publisher_settings *settings)
otc_status otc_publisher_settings_set_default_camera_capture_resolution(otc_publisher_settings *settings, const enum otc_camera_capture_resolution camera_capture_resolution)
otc_status otc_publisher_settings_set_disable_audio_processing(otc_publisher_settings *settings, otc_bool disabled)
otc_bool otc_publisher_get_publish_video(const otc_publisher *publisher)
otc_status otc_publisher_set_audio_transformers(otc_publisher *publisher, otc_audio_transformer **transformers, uint8_t size)
Sets an array of audio transformers to this publisher's audio stream. If null resets transformers.
otc_status otc_publisher_set_captions_input_language(otc_publisher *publisher, const char *language)
otc_status otc_publisher_settings_set_stereo(otc_publisher_settings *settings, otc_bool enabled)
void * otc_publisher_get_user_data(const struct otc_publisher *publisher)
otc_status otc_publisher_settings_set_auto_gain_control(otc_publisher_settings *settings, otc_bool enabled)
otc_status otc_publisher_settings_set_preferred_video_codecs(otc_publisher_settings *settings, const otc_video_codec_type *codecs, size_t num_codecs)
Sets the preferred video codecs to use for this publisher's stream.
otc_status otc_publisher_set_video_type(struct otc_publisher *publisher, enum otc_publisher_video_type video_type)
otc_video_bitrate_preset
Preset strategies for controlling video bitrate in a publisher's stream.
Definition publisher.h:1075
@ OTC_VIDEO_BITRATE_PRESET_BW_SAVER
Bandwidth saver preset.
Definition publisher.h:1089
@ OTC_VIDEO_BITRATE_PRESET_EXTRA_BW_SAVER
Extra bandwidth saver preset.
Definition publisher.h:1096
@ OTC_VIDEO_BITRATE_PRESET_DEFAULT
Default preset. No extra restrictions are applied.
Definition publisher.h:1081
@ OTC_VIDEO_BITRATE_PRESET_CUSTOM
Custom bitrate.
Definition publisher.h:1105
otc_status otc_publisher_set_publish_captions(otc_publisher *publisher, otc_bool publish_captions)
enum otc_video_bitrate_preset otc_publisher_get_video_bitrate_preset(const otc_publisher *publisher)
Gets the currently active video bitrate preset for this publisher's stream.
otc_status otc_publisher_settings_set_noise_suppression(otc_publisher_settings *settings, otc_bool enabled)
otc_status otc_publisher_set_publish_audio(otc_publisher *publisher, otc_bool publish_audio)
const char * otc_publisher_get_captions_input_language(const otc_publisher *publisher)
otc_status otc_publisher_set_publish_video(otc_publisher *publisher, otc_bool publish_video)
const char * otc_publisher_get_name(const struct otc_publisher *publisher)
otc_stream * otc_publisher_get_stream(otc_publisher *publisher)
otc_bool otc_publisher_get_publish_audio(const otc_publisher *publisher)
otc_degradation_preference
Describes the policy that the video engine will try to follow when adapting frame rate and resolution...
Definition publisher.h:1148
@ OTC_DEGRADATION_PREFERENCE_MAINTAIN_FRAMERATE
The video engine will try to keep the frame rate steady but might reduce resolution if necessary.
Definition publisher.h:1162
@ OTC_DEGRADATION_PREFERENCE_BALANCED
The video engine will try to reach a balance between reducing resolution and frame rate when necessar...
Definition publisher.h:1170
@ OTC_DEGRADATION_PREFERENCE_MAINTAIN_RESOLUTION
The video engine will not reduce the resolution but might reduce the frame rate if necessary.
Definition publisher.h:1166
@ OTC_DEGRADATION_PREFERENCE_NOT_SET
Default value. The video engine will decide the optimal degradation preference.
Definition publisher.h:1152
@ OTC_DEGRADATION_PREFERENCE_MAINTAIN_FRAMERATE_AND_RESOLUTION
The video engine will not reduce the resolution and will try to keep the frame rate steady....
Definition publisher.h:1158
const char * otc_publisher_get_target_scalability_mode(otc_publisher *publisher)
Gets the target scalability mode that was explicitly set via otc_publisher_set_target_scalability_mod...
struct otc_publisher otc_publisher
Definition publisher.h:33
otc_status otc_publisher_settings_set_subscriber_audio_fallback_enabled(otc_publisher_settings *settings, const otc_bool enabled)
enum otc_publisher_video_type otc_publisher_get_video_type(const struct otc_publisher *publisher)
otc_status otc_publisher_settings_delete(otc_publisher_settings *settings)
otc_status otc_publisher_settings_set_echo_cancellation(otc_publisher_settings *settings, otc_bool enabled)
otc_status otc_publisher_settings_set_name(otc_publisher_settings *settings, const char *name)
otc_bool otc_publisher_get_publish_captions(const otc_publisher *publisher)
otc_media_type
Media type.
Definition publisher.h:74
struct otc_publisher_settings otc_publisher_settings
Definition publisher.h:37
otc_status otc_publisher_settings_set_scalable_screenshare(otc_publisher_settings *settings, const otc_bool enabled)
otc_status otc_publisher_settings_set_video_capturer(otc_publisher_settings *settings, const struct otc_video_capturer_callbacks *capturer)
otc_publisher_error_code
Definition publisher.h:43
@ OTC_PUBLISHER_SESSION_DISCONNECTED
Definition publisher.h:45
@ OTC_PUBLISHER_INTERNAL_ERROR
Definition publisher.h:44
@ OTC_PUBLISHER_WEBRTC_ERROR
Definition publisher.h:49
@ OTC_PUBLISHER_ENCRYPTION_NOT_ENABLED
Definition publisher.h:57
@ OTC_PUBLISHER_ENCRYPTION_INTERNAL_ERROR
Definition publisher.h:54
@ OTC_PUBLISHER_ENCRYPTION_UNSUPPORTED_CODEC
Definition publisher.h:56
@ OTC_PUBLISHER_UNABLE_TO_PUBLISH
Definition publisher.h:48
@ OTC_PUBLISHER_CAPTIONS_CHANGE_RATE_LIMIT_ERROR
Definition publisher.h:50
@ OTC_PUBLISHER_TIMED_OUT
Definition publisher.h:47
otc_status otc_publisher_settings_set_allow_audio_capture_while_muted(otc_publisher_settings *settings, const otc_bool enabled)
otc_status otc_publisher_settings_set_audio_track(otc_publisher_settings *settings, otc_bool enabled)
otc_status otc_publisher_settings_set_opus_dtx(otc_publisher_settings *settings, otc_bool enabled)
const char * otc_publisher_get_publisher_id(const otc_publisher *publisher)
otc_session * otc_publisher_get_session(const otc_publisher *publisher)
otc_status otc_publisher_set_max_video_bitrate(otc_publisher *publisher, int bitrate_bps)
Gets the maximum video bitrate set for this publisher's video stream.
struct otc_session otc_session
Definition session.h:21
struct otc_stream otc_stream
Definition stream.h:18
Definition publisher.h:104
double start_time
Definition publisher.h:120
int64_t packets_lost
Definition publisher.h:110
double timestamp
Definition publisher.h:117
otc_transport_stats transport
Definition publisher.h:122
int64_t packets_sent
Definition publisher.h:112
int64_t bytes_sent
Definition publisher.h:114
const char * subscriber_id
Definition publisher.h:107
const char * connection_id
Definition publisher.h:105
float audio_level
Definition publisher.h:116
Definition publisher.h:183
void * user_data
Definition publisher.h:395
void(* on_video_disabled)(otc_publisher *publisher, void *user_data, enum otc_video_reason reason)
Definition publisher.h:291
void(* on_video_stats)(otc_publisher *publisher, void *user_data, struct otc_publisher_video_stats video_stats[], size_t number_of_stats)
Definition publisher.h:263
void(* on_render_frame)(otc_publisher *publisher, void *user_data, const otc_video_frame *frame)
Definition publisher.h:218
void * reserved
Definition publisher.h:401
void(* on_stream_created)(otc_publisher *publisher, void *user_data, const otc_stream *stream)
Definition publisher.h:191
void(* on_video_enabled)(otc_publisher *publisher, void *user_data, enum otc_video_reason reason)
Definition publisher.h:302
void(* on_media_link_stats)(otc_publisher *publisher, void *user_data, struct otc_publisher_media_link_stats media_link_stats[], size_t number_of_stats)
Definition publisher.h:387
void(* on_video_disable_warning_lifted)(otc_publisher *publisher, void *user_data)
Definition publisher.h:324
void(* on_video_disable_warning)(otc_publisher *publisher, void *user_data)
Definition publisher.h:314
void(* on_error)(otc_publisher *publisher, void *user_data, const char *error_string, enum otc_publisher_error_code error_code)
Definition publisher.h:279
void(* on_stream_destroyed)(otc_publisher *publisher, void *user_data, const otc_stream *stream)
Definition publisher.h:202
void(* on_audio_stats)(otc_publisher *publisher, void *user_data, struct otc_publisher_audio_stats audio_stats[], size_t number_of_stats)
Definition publisher.h:250
void(* on_audio_level_updated)(otc_publisher *publisher, void *user_data, float audio_level)
Definition publisher.h:229
void(* on_publisher_mute_forced)(otc_publisher *publisher, void *user_data)
Definition publisher.h:239
void(* on_network_condition_changed)(otc_publisher *publisher, void *user_data, const struct otc_publisher_media_link_stats *stats, enum otc_network_reason reason)
Definition publisher.h:372
Definition publisher.h:846
void * user_data
Definition publisher.h:850
void(* on_rtc_stats_report)(otc_publisher *publisher, void *user_data, const struct otc_publisher_rtc_stats *stats, size_t entries)
Definition publisher.h:866
Definition publisher.h:780
const char * json_array_of_reports
Definition publisher.h:838
const char * connection_id
Definition publisher.h:785
Definition publisher.h:86
int32_t width
Definition publisher.h:87
int32_t height
Definition publisher.h:88
int64_t total_bitrate
Definition publisher.h:91
int64_t bitrate
Definition publisher.h:90
const char * scalability_mode
Definition publisher.h:92
enum otc_video_reason quality_limitation_reason
Definition publisher.h:93
double encoded_frame_rate
Definition publisher.h:89
const char * codec
Definition publisher.h:94
Definition publisher.h:132
double start_time
Definition publisher.h:147
int64_t packets_lost
Definition publisher.h:138
double timestamp
Definition publisher.h:144
otc_transport_stats transport
Definition publisher.h:151
int64_t packets_sent
Definition publisher.h:140
int64_t bytes_sent
Definition publisher.h:142
const char * subscriber_id
Definition publisher.h:135
const char * connection_id
Definition publisher.h:133
size_t number_of_video_layers
Definition publisher.h:149
struct otc_publisher_video_layer_stats video_layers[3]
Definition publisher.h:150
Definition video_capturer.h:43
struct otc_video_frame otc_video_frame
Definition video_frame.h:21