FS-7500: Work in progress. Added codec config params that can be set from session and made vpx codec re-init on size change. Also add periodic key frame timer

This commit is contained in:
Anthony Minessale
2014-11-14 19:01:56 -06:00
committed by Michael Jerris
parent 365a5dd820
commit 659c1e474e
10 changed files with 536 additions and 374 deletions
+8
View File
@@ -157,6 +157,9 @@ typedef struct switch_core_media_params_s {
switch_bool_t external_video_source;
uint32_t video_key_freq;
uint32_t video_key_first;
} switch_core_media_params_t;
static inline const char *switch_media_type2str(switch_media_type_t type)
@@ -305,6 +308,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_codec_control(switch_core_sess
switch_codec_control_type_t *rtype,
void **ret_data);
#define switch_core_media_gen_key_frame(_session) switch_core_media_codec_control(_session, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_IO_WRITE, \
SCC_VIDEO_REFRESH, SCCT_NONE, NULL, NULL, NULL) \
SWITCH_DECLARE(switch_timer_t *) switch_core_media_get_timer(switch_core_session_t *session, switch_media_type_t mtype);
SWITCH_END_EXTERN_C
+12 -3
View File
@@ -591,12 +591,21 @@ struct switch_directory_handle {
void *private_info;
};
/* nobody has more setting than speex so we will let them set the standard */
/*! \brief Various codec settings (currently only relevant to speex) */
struct switch_codec_settings {
struct switch_audio_codec_settings {
int unused;
};
struct switch_video_codec_settings {
uint32_t bandwidth;
int32_t width;
int32_t height;
};
union switch_codec_settings {
struct switch_audio_codec_settings audio;
struct switch_video_codec_settings video;
};
/*! an abstract handle of a fmtp parsed by codec */
struct switch_codec_fmtp {
/*! actual samples transferred per second for those who are not moron g722 RFC writers */
+1
View File
@@ -517,6 +517,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_del_dtls(switch_rtp_t *rtp_session, d
SWITCH_DECLARE(int) switch_rtp_has_dtls(void);
SWITCH_DECLARE(void) switch_rtp_video_refresh(switch_rtp_t *rtp_session);
SWITCH_DECLARE(void) switch_rtp_video_loss(switch_rtp_t *rtp_session);
/*!
\}
+3 -2
View File
@@ -1496,7 +1496,8 @@ typedef enum {
SFF_RTCP = (1 << 10),
SFF_MARKER = (1 << 11),
SFF_WAIT_KEY_FRAME = (1 << 12),
SFF_RAW_RTP_PARSE_FRAME = (1 << 13)
SFF_RAW_RTP_PARSE_FRAME = (1 << 13),
SFF_PICTURE_RESET = (1 << 14)
} switch_frame_flag_enum_t;
typedef uint32_t switch_frame_flag_t;
@@ -2101,7 +2102,7 @@ typedef struct switch_codec switch_codec_t;
typedef struct switch_core_thread_session switch_core_thread_session_t;
typedef struct switch_codec_implementation switch_codec_implementation_t;
typedef struct switch_buffer switch_buffer_t;
typedef struct switch_codec_settings switch_codec_settings_t;
typedef union switch_codec_settings switch_codec_settings_t;
typedef struct switch_codec_fmtp switch_codec_fmtp_t;
typedef struct switch_odbc_handle switch_odbc_handle_t;
typedef struct switch_pgsql_handle switch_pgsql_handle_t;