clang-format: Apply formatting

Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
This commit is contained in:
jp9000
2019-06-22 22:13:45 -07:00
parent 53615ee10f
commit f53df7da64
567 changed files with 34068 additions and 32903 deletions

View File

@@ -140,22 +140,22 @@ static void *rtmp_stream_create(obs_data_t *settings, obs_output_t *output)
}
if (os_event_init(&stream->buffer_space_available_event,
OS_EVENT_TYPE_AUTO) != 0) {
OS_EVENT_TYPE_AUTO) != 0) {
warn("Failed to initialize write buffer event");
goto fail;
}
if (os_event_init(&stream->buffer_has_data_event,
OS_EVENT_TYPE_AUTO) != 0) {
if (os_event_init(&stream->buffer_has_data_event, OS_EVENT_TYPE_AUTO) !=
0) {
warn("Failed to initialize data buffer event");
goto fail;
}
if (os_event_init(&stream->socket_available_event,
OS_EVENT_TYPE_AUTO) != 0) {
OS_EVENT_TYPE_AUTO) != 0) {
warn("Failed to initialize socket buffer event");
goto fail;
}
if (os_event_init(&stream->send_thread_signaled_exit,
OS_EVENT_TYPE_MANUAL) != 0) {
OS_EVENT_TYPE_MANUAL) != 0) {
warn("Failed to initialize socket exit event");
goto fail;
}
@@ -181,7 +181,8 @@ static void rtmp_stream_stop(void *data, uint64_t ts)
stream->stop_ts = ts / 1000ULL;
if (ts)
stream->shutdown_timeout_ts = ts +
stream->shutdown_timeout_ts =
ts +
(uint64_t)stream->max_shutdown_time_sec * 1000000000ULL;
if (active(stream)) {
@@ -195,27 +196,27 @@ static void rtmp_stream_stop(void *data, uint64_t ts)
static inline void set_rtmp_str(AVal *val, const char *str)
{
bool valid = (str && *str);
val->av_val = valid ? (char*)str : NULL;
bool valid = (str && *str);
val->av_val = valid ? (char *)str : NULL;
val->av_len = valid ? (int)strlen(str) : 0;
}
static inline void set_rtmp_dstr(AVal *val, struct dstr *str)
{
bool valid = !dstr_is_empty(str);
val->av_val = valid ? str->array : NULL;
bool valid = !dstr_is_empty(str);
val->av_val = valid ? str->array : NULL;
val->av_len = valid ? (int)str->len : 0;
}
static inline bool get_next_packet(struct rtmp_stream *stream,
struct encoder_packet *packet)
struct encoder_packet *packet)
{
bool new_packet = false;
pthread_mutex_lock(&stream->packets_mutex);
if (stream->packets.size) {
circlebuf_pop_front(&stream->packets, packet,
sizeof(struct encoder_packet));
sizeof(struct encoder_packet));
new_packet = true;
}
pthread_mutex_unlock(&stream->packets_mutex);
@@ -251,7 +252,7 @@ static bool discard_recv_data(struct rtmp_stream *stream, size_t size)
#endif
if (ret < 0) {
do_log(LOG_ERROR, "recv error: %d (%d bytes)",
error, (int)size);
error, (int)size);
}
return false;
}
@@ -273,8 +274,8 @@ static void droptest_cap_data_rate(struct rtmp_stream *stream, size_t size)
stream->droptest_size += size;
if (stream->droptest_info.size) {
circlebuf_peek_front(&stream->droptest_info,
&info, sizeof(info));
circlebuf_peek_front(&stream->droptest_info, &info,
sizeof(info));
if (stream->droptest_size > DROPTEST_MAX_BYTES) {
uint64_t elapsed = ts - info.ts;
@@ -286,7 +287,7 @@ static void droptest_cap_data_rate(struct rtmp_stream *stream, size_t size)
while (stream->droptest_size > DROPTEST_MAX_BYTES) {
circlebuf_pop_front(&stream->droptest_info,
&info, sizeof(info));
&info, sizeof(info));
stream->droptest_size -= info.size;
}
}
@@ -294,7 +295,8 @@ static void droptest_cap_data_rate(struct rtmp_stream *stream, size_t size)
}
#endif
static int socket_queue_data(RTMPSockBuf *sb, const char *data, int len, void *arg)
static int socket_queue_data(RTMPSockBuf *sb, const char *data, int len,
void *arg)
{
UNUSED_PARAMETER(sb);
@@ -323,23 +325,24 @@ retry_send:
pthread_mutex_unlock(&stream->write_buf_mutex);
os_event_signal (stream->buffer_has_data_event);
os_event_signal(stream->buffer_has_data_event);
return len;
}
static int send_packet(struct rtmp_stream *stream,
struct encoder_packet *packet, bool is_header, size_t idx)
struct encoder_packet *packet, bool is_header,
size_t idx)
{
uint8_t *data;
size_t size;
int recv_size = 0;
int ret = 0;
size_t size;
int recv_size = 0;
int ret = 0;
if (!stream->new_socket_loop) {
#ifdef _WIN32
ret = ioctlsocket(stream->rtmp.m_sb.sb_socket, FIONREAD,
(u_long*)&recv_size);
(u_long *)&recv_size);
#else
ret = ioctl(stream->rtmp.m_sb.sb_socket, FIONREAD, &recv_size);
#endif
@@ -350,14 +353,14 @@ static int send_packet(struct rtmp_stream *stream,
}
}
flv_packet_mux(packet, is_header ? 0 : stream->start_dts_offset,
&data, &size, is_header);
flv_packet_mux(packet, is_header ? 0 : stream->start_dts_offset, &data,
&size, is_header);
#ifdef TEST_FRAMEDROPS
droptest_cap_data_rate(stream, size);
#endif
ret = RTMP_Write(&stream->rtmp, (char*)data, (int)size, (int)idx);
ret = RTMP_Write(&stream->rtmp, (char *)data, (int)size, (int)idx);
bfree(data);
if (is_header)
@@ -372,14 +375,14 @@ static int send_packet(struct rtmp_stream *stream,
static inline bool send_headers(struct rtmp_stream *stream);
static inline bool can_shutdown_stream(struct rtmp_stream *stream,
struct encoder_packet *packet)
struct encoder_packet *packet)
{
uint64_t cur_time = os_gettime_ns();
bool timeout = cur_time >= stream->shutdown_timeout_ts;
if (timeout)
info("Stream shutdown timeout reached (%d second(s))",
stream->max_shutdown_time_sec);
stream->max_shutdown_time_sec);
return timeout || packet->sys_dts_usec >= (int64_t)stream->stop_ts;
}
@@ -388,8 +391,7 @@ static void set_output_error(struct rtmp_stream *stream)
{
const char *msg = NULL;
#ifdef _WIN32
switch (stream->rtmp.last_error_code)
{
switch (stream->rtmp.last_error_code) {
case WSAETIMEDOUT:
msg = obs_module_text("ConnectionTimedOut");
break;
@@ -413,8 +415,7 @@ static void set_output_error(struct rtmp_stream *stream)
break;
}
#else
switch (stream->rtmp.last_error_code)
{
switch (stream->rtmp.last_error_code) {
case ETIMEDOUT:
msg = obs_module_text("ConnectionTimedOut");
break;
@@ -527,15 +528,15 @@ static void *send_thread(void *data)
static bool send_meta_data(struct rtmp_stream *stream, size_t idx, bool *next)
{
uint8_t *meta_data;
size_t meta_data_size;
bool success = true;
size_t meta_data_size;
bool success = true;
*next = flv_meta_data(stream->output, &meta_data,
&meta_data_size, false, idx);
*next = flv_meta_data(stream->output, &meta_data, &meta_data_size,
false, idx);
if (*next) {
success = RTMP_Write(&stream->rtmp, (char*)meta_data,
(int)meta_data_size, (int)idx) >= 0;
success = RTMP_Write(&stream->rtmp, (char *)meta_data,
(int)meta_data_size, (int)idx) >= 0;
bfree(meta_data);
}
@@ -543,16 +544,14 @@ static bool send_meta_data(struct rtmp_stream *stream, size_t idx, bool *next)
}
static bool send_audio_header(struct rtmp_stream *stream, size_t idx,
bool *next)
bool *next)
{
obs_output_t *context = stream->output;
obs_output_t *context = stream->output;
obs_encoder_t *aencoder = obs_output_get_audio_encoder(context, idx);
uint8_t *header;
uint8_t *header;
struct encoder_packet packet = {
.type = OBS_ENCODER_AUDIO,
.timebase_den = 1
};
struct encoder_packet packet = {.type = OBS_ENCODER_AUDIO,
.timebase_den = 1};
if (!aencoder) {
*next = false;
@@ -566,16 +565,13 @@ static bool send_audio_header(struct rtmp_stream *stream, size_t idx,
static bool send_video_header(struct rtmp_stream *stream)
{
obs_output_t *context = stream->output;
obs_output_t *context = stream->output;
obs_encoder_t *vencoder = obs_output_get_video_encoder(context);
uint8_t *header;
size_t size;
uint8_t *header;
size_t size;
struct encoder_packet packet = {
.type = OBS_ENCODER_VIDEO,
.timebase_den = 1,
.keyframe = true
};
struct encoder_packet packet = {
.type = OBS_ENCODER_VIDEO, .timebase_den = 1, .keyframe = true};
obs_encoder_get_extra_data(vencoder, &header, &size);
packet.size = obs_parse_avc_header(&packet.data, header, size);
@@ -619,12 +615,12 @@ static void adjust_sndbuf_size(struct rtmp_stream *stream, int new_size)
socklen_t int_size = sizeof(int);
getsockopt(stream->rtmp.m_sb.sb_socket, SOL_SOCKET, SO_SNDBUF,
(char*)&cur_sendbuf_size, &int_size);
(char *)&cur_sendbuf_size, &int_size);
if (cur_sendbuf_size < new_size) {
cur_sendbuf_size = new_size;
setsockopt(stream->rtmp.m_sb.sb_socket, SOL_SOCKET, SO_SNDBUF,
(const char*)&cur_sendbuf_size, int_size);
(const char *)&cur_sendbuf_size, int_size);
}
}
@@ -670,18 +666,19 @@ static int init_send(struct rtmp_stream *stream)
bfree(stream->write_buf);
int total_bitrate = 0;
obs_output_t *context = stream->output;
obs_output_t *context = stream->output;
obs_encoder_t *vencoder = obs_output_get_video_encoder(context);
if (vencoder) {
obs_data_t *params = obs_encoder_get_settings(vencoder);
if (params) {
int bitrate = obs_data_get_int(params, "bitrate");
int bitrate =
obs_data_get_int(params, "bitrate");
if (!bitrate) {
warn ("Video encoder didn't return a "
"valid bitrate, new network "
"code may function poorly. "
"Low latency mode disabled.");
warn("Video encoder didn't return a "
"valid bitrate, new network "
"code may function poorly. "
"Low latency mode disabled.");
stream->low_latency_mode = false;
bitrate = 10000;
}
@@ -690,11 +687,13 @@ static int init_send(struct rtmp_stream *stream)
}
}
obs_encoder_t *aencoder = obs_output_get_audio_encoder(context, 0);
obs_encoder_t *aencoder =
obs_output_get_audio_encoder(context, 0);
if (aencoder) {
obs_data_t *params = obs_encoder_get_settings(aencoder);
if (params) {
int bitrate = obs_data_get_int(params, "bitrate");
int bitrate =
obs_data_get_int(params, "bitrate");
if (!bitrate)
bitrate = 160;
total_bitrate += bitrate;
@@ -713,7 +712,7 @@ static int init_send(struct rtmp_stream *stream)
#ifdef _WIN32
ret = pthread_create(&stream->socket_thread, NULL,
socket_thread_windows, stream);
socket_thread_windows, stream);
#else
warn("New socket loop not supported on this platform");
return OBS_OUTPUT_ERROR;
@@ -764,13 +763,13 @@ static void win32_log_interface_type(struct rtmp_stream *stream)
if (!h)
return;
dest_addr = *(uint32_t*)h->h_addr_list[0];
dest_addr = *(uint32_t *)h->h_addr_list[0];
if (rtmp->m_bindIP.addrLen == 0)
source_addr = 0;
else if (rtmp->m_bindIP.addr.ss_family == AF_INET)
source_addr = (*(struct sockaddr_in*)&rtmp->m_bindIP)
.sin_addr.S_un.S_addr;
source_addr = (*(struct sockaddr_in *)&rtmp->m_bindIP)
.sin_addr.S_un.S_addr;
else
return;
@@ -780,7 +779,7 @@ static void win32_log_interface_type(struct rtmp_stream *stream)
row.dwIndex = route.dwForwardIfIndex;
if (!GetIfEntry(&row)) {
uint32_t speed =row.dwSpeed / 1000000;
uint32_t speed = row.dwSpeed / 1000000;
char *type;
struct dstr other = {0};
@@ -794,7 +793,7 @@ static void win32_log_interface_type(struct rtmp_stream *stream)
}
info("Interface: %s (%s, %lu mbps)", row.bDescr, type,
speed);
speed);
dstr_free(&other);
}
@@ -819,18 +818,19 @@ static int try_connect(struct rtmp_stream *stream)
dstr_copy(&stream->encoder_name, "FMLE/3.0 (compatible; FMSc/1.0)");
set_rtmp_dstr(&stream->rtmp.Link.pubUser, &stream->username);
set_rtmp_dstr(&stream->rtmp.Link.pubUser, &stream->username);
set_rtmp_dstr(&stream->rtmp.Link.pubPasswd, &stream->password);
set_rtmp_dstr(&stream->rtmp.Link.flashVer, &stream->encoder_name);
set_rtmp_dstr(&stream->rtmp.Link.flashVer, &stream->encoder_name);
stream->rtmp.Link.swfUrl = stream->rtmp.Link.tcUrl;
if (dstr_is_empty(&stream->bind_ip) ||
dstr_cmp(&stream->bind_ip, "default") == 0) {
memset(&stream->rtmp.m_bindIP, 0, sizeof(stream->rtmp.m_bindIP));
memset(&stream->rtmp.m_bindIP, 0,
sizeof(stream->rtmp.m_bindIP));
} else {
bool success = netif_str_to_addr(&stream->rtmp.m_bindIP.addr,
&stream->rtmp.m_bindIP.addrLen,
stream->bind_ip.array);
&stream->rtmp.m_bindIP.addrLen,
stream->bind_ip.array);
if (success) {
int len = stream->rtmp.m_bindIP.addrLen;
bool ipv6 = len == sizeof(struct sockaddr_in6);
@@ -841,8 +841,8 @@ static int try_connect(struct rtmp_stream *stream)
RTMP_AddStream(&stream->rtmp, stream->key.array);
for (size_t idx = 1;; idx++) {
obs_encoder_t *encoder = obs_output_get_audio_encoder(
stream->output, idx);
obs_encoder_t *encoder =
obs_output_get_audio_encoder(stream->output, idx);
const char *encoder_name;
if (!encoder)
@@ -852,9 +852,9 @@ static int try_connect(struct rtmp_stream *stream)
RTMP_AddStream(&stream->rtmp, encoder_name);
}
stream->rtmp.m_outChunkSize = 4096;
stream->rtmp.m_outChunkSize = 4096;
stream->rtmp.m_bSendChunkSizeInfo = true;
stream->rtmp.m_bUseNagle = true;
stream->rtmp.m_bUseNagle = true;
#ifdef _WIN32
win32_log_interface_type(stream);
@@ -894,13 +894,13 @@ static bool init_connect(struct rtmp_stream *stream)
os_atomic_set_bool(&stream->disconnected, false);
os_atomic_set_bool(&stream->encode_error, false);
stream->total_bytes_sent = 0;
stream->dropped_frames = 0;
stream->min_priority = 0;
stream->got_first_video = false;
stream->dropped_frames = 0;
stream->min_priority = 0;
stream->got_first_video = false;
settings = obs_output_get_settings(stream->output);
dstr_copy(&stream->path, obs_service_get_url(service));
dstr_copy(&stream->key, obs_service_get_key(service));
dstr_copy(&stream->path, obs_service_get_url(service));
dstr_copy(&stream->key, obs_service_get_key(service));
dstr_copy(&stream->username, obs_service_get_username(service));
dstr_copy(&stream->password, obs_service_get_password(service));
dstr_depad(&stream->path);
@@ -919,10 +919,10 @@ static bool init_connect(struct rtmp_stream *stream)
bind_ip = obs_data_get_string(settings, OPT_BIND_IP);
dstr_copy(&stream->bind_ip, bind_ip);
stream->new_socket_loop = obs_data_get_bool(settings,
OPT_NEWSOCKETLOOP_ENABLED);
stream->low_latency_mode = obs_data_get_bool(settings,
OPT_LOWLATENCY_ENABLED);
stream->new_socket_loop =
obs_data_get_bool(settings, OPT_NEWSOCKETLOOP_ENABLED);
stream->low_latency_mode =
obs_data_get_bool(settings, OPT_LOWLATENCY_ENABLED);
obs_data_release(settings);
return true;
@@ -965,14 +965,14 @@ static bool rtmp_stream_start(void *data)
os_atomic_set_bool(&stream->connecting, true);
return pthread_create(&stream->connect_thread, NULL, connect_thread,
stream) == 0;
stream) == 0;
}
static inline bool add_packet(struct rtmp_stream *stream,
struct encoder_packet *packet)
struct encoder_packet *packet)
{
circlebuf_push_back(&stream->packets, packet,
sizeof(struct encoder_packet));
sizeof(struct encoder_packet));
return true;
}
@@ -982,12 +982,12 @@ static inline size_t num_buffered_packets(struct rtmp_stream *stream)
}
static void drop_frames(struct rtmp_stream *stream, const char *name,
int highest_priority, bool pframes)
int highest_priority, bool pframes)
{
UNUSED_PARAMETER(pframes);
struct circlebuf new_buf = {0};
int num_frames_dropped = 0;
struct circlebuf new_buf = {0};
int num_frames_dropped = 0;
#ifdef _DEBUG
int start_packets = (int)num_buffered_packets(stream);
@@ -1002,7 +1002,7 @@ static void drop_frames(struct rtmp_stream *stream, const char *name,
circlebuf_pop_front(&stream->packets, &packet, sizeof(packet));
/* do not drop audio data or video keyframes */
if (packet.type == OBS_ENCODER_AUDIO ||
if (packet.type == OBS_ENCODER_AUDIO ||
packet.drop_priority >= highest_priority) {
circlebuf_push_back(&new_buf, &packet, sizeof(packet));
@@ -1022,21 +1022,19 @@ static void drop_frames(struct rtmp_stream *stream, const char *name,
stream->dropped_frames += num_frames_dropped;
#ifdef _DEBUG
debug("Dropped %s, prev packet count: %d, new packet count: %d",
name,
start_packets,
(int)num_buffered_packets(stream));
debug("Dropped %s, prev packet count: %d, new packet count: %d", name,
start_packets, (int)num_buffered_packets(stream));
#endif
}
static bool find_first_video_packet(struct rtmp_stream *stream,
struct encoder_packet *first)
struct encoder_packet *first)
{
size_t count = stream->packets.size / sizeof(*first);
for (size_t i = 0; i < count; i++) {
struct encoder_packet *cur = circlebuf_data(&stream->packets,
i * sizeof(*first));
struct encoder_packet *cur =
circlebuf_data(&stream->packets, i * sizeof(*first));
if (cur->type == OBS_ENCODER_VIDEO && !cur->keyframe) {
*first = *cur;
return true;
@@ -1052,11 +1050,10 @@ static void check_to_drop_frames(struct rtmp_stream *stream, bool pframes)
int64_t buffer_duration_usec;
size_t num_packets = num_buffered_packets(stream);
const char *name = pframes ? "p-frames" : "b-frames";
int priority = pframes ?
OBS_NAL_PRIORITY_HIGHEST : OBS_NAL_PRIORITY_HIGH;
int64_t drop_threshold = pframes ?
stream->pframe_drop_threshold_usec :
stream->drop_threshold_usec;
int priority = pframes ? OBS_NAL_PRIORITY_HIGHEST
: OBS_NAL_PRIORITY_HIGH;
int64_t drop_threshold = pframes ? stream->pframe_drop_threshold_usec
: stream->drop_threshold_usec;
if (num_packets < 5) {
if (!pframes)
@@ -1072,8 +1069,8 @@ static void check_to_drop_frames(struct rtmp_stream *stream, bool pframes)
buffer_duration_usec = stream->last_dts_usec - first.dts_usec;
if (!pframes) {
stream->congestion = (float)buffer_duration_usec /
(float)drop_threshold;
stream->congestion =
(float)buffer_duration_usec / (float)drop_threshold;
}
if (buffer_duration_usec > drop_threshold) {
@@ -1083,7 +1080,7 @@ static void check_to_drop_frames(struct rtmp_stream *stream, bool pframes)
}
static bool add_video_packet(struct rtmp_stream *stream,
struct encoder_packet *packet)
struct encoder_packet *packet)
{
check_to_drop_frames(stream, false);
check_to_drop_frames(stream, true);
@@ -1103,9 +1100,9 @@ static bool add_video_packet(struct rtmp_stream *stream,
static void rtmp_stream_data(void *data, struct encoder_packet *packet)
{
struct rtmp_stream *stream = data;
struct rtmp_stream *stream = data;
struct encoder_packet new_packet;
bool added_packet = false;
bool added_packet = false;
if (disconnected(stream) || !active(stream))
return;
@@ -1132,9 +1129,9 @@ static void rtmp_stream_data(void *data, struct encoder_packet *packet)
pthread_mutex_lock(&stream->packets_mutex);
if (!disconnected(stream)) {
added_packet = (packet->type == OBS_ENCODER_VIDEO) ?
add_video_packet(stream, &new_packet) :
add_packet(stream, &new_packet);
added_packet = (packet->type == OBS_ENCODER_VIDEO)
? add_video_packet(stream, &new_packet)
: add_packet(stream, &new_packet);
}
pthread_mutex_unlock(&stream->packets_mutex);
@@ -1164,12 +1161,13 @@ static obs_properties_t *rtmp_stream_properties(void *unused)
obs_property_t *p;
obs_properties_add_int(props, OPT_DROP_THRESHOLD,
obs_module_text("RTMPStream.DropThreshold"),
200, 10000, 100);
obs_module_text("RTMPStream.DropThreshold"), 200,
10000, 100);
p = obs_properties_add_list(props, OPT_BIND_IP,
obs_module_text("RTMPStream.BindIP"),
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
obs_module_text("RTMPStream.BindIP"),
OBS_COMBO_TYPE_LIST,
OBS_COMBO_FORMAT_STRING);
obs_property_list_add_string(p, obs_module_text("Default"), "default");
@@ -1181,9 +1179,9 @@ static obs_properties_t *rtmp_stream_properties(void *unused)
netif_saddr_data_free(&addrs);
obs_properties_add_bool(props, OPT_NEWSOCKETLOOP_ENABLED,
obs_module_text("RTMPStream.NewSocketLoop"));
obs_module_text("RTMPStream.NewSocketLoop"));
obs_properties_add_bool(props, OPT_LOWLATENCY_ENABLED,
obs_module_text("RTMPStream.LowLatencyMode"));
obs_module_text("RTMPStream.LowLatencyMode"));
return props;
}
@@ -1206,7 +1204,7 @@ static float rtmp_stream_congestion(void *data)
if (stream->new_socket_loop)
return (float)stream->write_buf_len /
(float)stream->write_buf_size;
(float)stream->write_buf_size;
else
return stream->min_priority > 0 ? 1.0f : stream->congestion;
}
@@ -1218,23 +1216,21 @@ static int rtmp_stream_connect_time(void *data)
}
struct obs_output_info rtmp_output_info = {
.id = "rtmp_output",
.flags = OBS_OUTPUT_AV |
OBS_OUTPUT_ENCODED |
OBS_OUTPUT_SERVICE |
OBS_OUTPUT_MULTI_TRACK,
.id = "rtmp_output",
.flags = OBS_OUTPUT_AV | OBS_OUTPUT_ENCODED | OBS_OUTPUT_SERVICE |
OBS_OUTPUT_MULTI_TRACK,
.encoded_video_codecs = "h264",
.encoded_audio_codecs = "aac",
.get_name = rtmp_stream_getname,
.create = rtmp_stream_create,
.destroy = rtmp_stream_destroy,
.start = rtmp_stream_start,
.stop = rtmp_stream_stop,
.encoded_packet = rtmp_stream_data,
.get_defaults = rtmp_stream_defaults,
.get_properties = rtmp_stream_properties,
.get_total_bytes = rtmp_stream_total_bytes_sent,
.get_congestion = rtmp_stream_congestion,
.get_connect_time_ms = rtmp_stream_connect_time,
.get_dropped_frames = rtmp_stream_dropped_frames
.get_name = rtmp_stream_getname,
.create = rtmp_stream_create,
.destroy = rtmp_stream_destroy,
.start = rtmp_stream_start,
.stop = rtmp_stream_stop,
.encoded_packet = rtmp_stream_data,
.get_defaults = rtmp_stream_defaults,
.get_properties = rtmp_stream_properties,
.get_total_bytes = rtmp_stream_total_bytes_sent,
.get_congestion = rtmp_stream_congestion,
.get_connect_time_ms = rtmp_stream_connect_time,
.get_dropped_frames = rtmp_stream_dropped_frames,
};