New upstream version 24.0.1+dfsg1
This commit is contained in:
parent
b14f9eae6d
commit
5a730d6ec3
842 changed files with 42245 additions and 33385 deletions
|
|
@ -16,14 +16,15 @@
|
|||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#define do_log(level, format, ...) \
|
||||
#define do_log(level, format, ...) \
|
||||
blog(level, "[rtmp stream: '%s'] " format, \
|
||||
obs_output_get_name(stream->output), ##__VA_ARGS__)
|
||||
obs_output_get_name(stream->output), ##__VA_ARGS__)
|
||||
|
||||
#define warn(format, ...) do_log(LOG_WARNING, format, ##__VA_ARGS__)
|
||||
#define info(format, ...) do_log(LOG_INFO, format, ##__VA_ARGS__)
|
||||
#define debug(format, ...) do_log(LOG_DEBUG, format, ##__VA_ARGS__)
|
||||
#define warn(format, ...) do_log(LOG_WARNING, format, ##__VA_ARGS__)
|
||||
#define info(format, ...) do_log(LOG_INFO, format, ##__VA_ARGS__)
|
||||
#define debug(format, ...) do_log(LOG_DEBUG, format, ##__VA_ARGS__)
|
||||
|
||||
#define OPT_DYN_BITRATE "dyn_bitrate"
|
||||
#define OPT_DROP_THRESHOLD "drop_threshold_ms"
|
||||
#define OPT_PFRAME_DROP_THRESHOLD "pframe_drop_threshold_ms"
|
||||
#define OPT_MAX_SHUTDOWN_TIME_SEC "max_shutdown_time_sec"
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
#define OPT_LOWLATENCY_ENABLED "low_latency_mode_enabled"
|
||||
|
||||
//#define TEST_FRAMEDROPS
|
||||
//#define TEST_FRAMEDROPS_WITH_BITRATE_SHORTCUTS
|
||||
|
||||
#ifdef TEST_FRAMEDROPS
|
||||
|
||||
|
|
@ -44,67 +46,87 @@ struct droptest_info {
|
|||
};
|
||||
#endif
|
||||
|
||||
struct dbr_frame {
|
||||
uint64_t send_beg;
|
||||
uint64_t send_end;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
struct rtmp_stream {
|
||||
obs_output_t *output;
|
||||
obs_output_t *output;
|
||||
|
||||
pthread_mutex_t packets_mutex;
|
||||
pthread_mutex_t packets_mutex;
|
||||
struct circlebuf packets;
|
||||
bool sent_headers;
|
||||
bool sent_headers;
|
||||
|
||||
bool got_first_video;
|
||||
int64_t start_dts_offset;
|
||||
bool got_first_video;
|
||||
int64_t start_dts_offset;
|
||||
|
||||
volatile bool connecting;
|
||||
pthread_t connect_thread;
|
||||
volatile bool connecting;
|
||||
pthread_t connect_thread;
|
||||
|
||||
volatile bool active;
|
||||
volatile bool disconnected;
|
||||
volatile bool encode_error;
|
||||
pthread_t send_thread;
|
||||
volatile bool active;
|
||||
volatile bool disconnected;
|
||||
volatile bool encode_error;
|
||||
pthread_t send_thread;
|
||||
|
||||
int max_shutdown_time_sec;
|
||||
int max_shutdown_time_sec;
|
||||
|
||||
os_sem_t *send_sem;
|
||||
os_event_t *stop_event;
|
||||
uint64_t stop_ts;
|
||||
uint64_t shutdown_timeout_ts;
|
||||
os_sem_t *send_sem;
|
||||
os_event_t *stop_event;
|
||||
uint64_t stop_ts;
|
||||
uint64_t shutdown_timeout_ts;
|
||||
|
||||
struct dstr path, key;
|
||||
struct dstr username, password;
|
||||
struct dstr encoder_name;
|
||||
struct dstr bind_ip;
|
||||
struct dstr path, key;
|
||||
struct dstr username, password;
|
||||
struct dstr encoder_name;
|
||||
struct dstr bind_ip;
|
||||
|
||||
/* frame drop variables */
|
||||
int64_t drop_threshold_usec;
|
||||
int64_t pframe_drop_threshold_usec;
|
||||
int min_priority;
|
||||
float congestion;
|
||||
int64_t drop_threshold_usec;
|
||||
int64_t pframe_drop_threshold_usec;
|
||||
int min_priority;
|
||||
float congestion;
|
||||
|
||||
int64_t last_dts_usec;
|
||||
int64_t last_dts_usec;
|
||||
|
||||
uint64_t total_bytes_sent;
|
||||
int dropped_frames;
|
||||
uint64_t total_bytes_sent;
|
||||
int dropped_frames;
|
||||
|
||||
#ifdef TEST_FRAMEDROPS
|
||||
struct circlebuf droptest_info;
|
||||
size_t droptest_size;
|
||||
uint64_t droptest_last_key_check;
|
||||
size_t droptest_max;
|
||||
size_t droptest_size;
|
||||
#endif
|
||||
|
||||
RTMP rtmp;
|
||||
pthread_mutex_t dbr_mutex;
|
||||
struct circlebuf dbr_frames;
|
||||
size_t dbr_data_size;
|
||||
uint64_t dbr_inc_timeout;
|
||||
long audio_bitrate;
|
||||
long dbr_est_bitrate;
|
||||
long dbr_orig_bitrate;
|
||||
long dbr_prev_bitrate;
|
||||
long dbr_cur_bitrate;
|
||||
long dbr_inc_bitrate;
|
||||
bool dbr_enabled;
|
||||
|
||||
bool new_socket_loop;
|
||||
bool low_latency_mode;
|
||||
bool disable_send_window_optimization;
|
||||
bool socket_thread_active;
|
||||
pthread_t socket_thread;
|
||||
uint8_t *write_buf;
|
||||
size_t write_buf_len;
|
||||
size_t write_buf_size;
|
||||
pthread_mutex_t write_buf_mutex;
|
||||
os_event_t *buffer_space_available_event;
|
||||
os_event_t *buffer_has_data_event;
|
||||
os_event_t *socket_available_event;
|
||||
os_event_t *send_thread_signaled_exit;
|
||||
RTMP rtmp;
|
||||
|
||||
bool new_socket_loop;
|
||||
bool low_latency_mode;
|
||||
bool disable_send_window_optimization;
|
||||
bool socket_thread_active;
|
||||
pthread_t socket_thread;
|
||||
uint8_t *write_buf;
|
||||
size_t write_buf_len;
|
||||
size_t write_buf_size;
|
||||
pthread_mutex_t write_buf_mutex;
|
||||
os_event_t *buffer_space_available_event;
|
||||
os_event_t *buffer_has_data_event;
|
||||
os_event_t *socket_available_event;
|
||||
os_event_t *send_thread_signaled_exit;
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue