Merge pull request #1767 in FS/freeswitch from ~DRAGOS_OANCEA/freeswitch-dragos:FS-11959 to master
* commit '317e197b0b7093a18112d8e5c22b86092044bad9': FS-11959: add switch_jb_get_packets_per_frame() - gets the number of packets per video frame
This commit is contained in:
commit
9bfd5255b2
|
@ -65,6 +65,7 @@ SWITCH_DECLARE(void) switch_jb_ts_mode(switch_jb_t *jb, uint32_t samples_per_fra
|
||||||
SWITCH_DECLARE(void) switch_jb_set_flag(switch_jb_t *jb, switch_jb_flag_t flag);
|
SWITCH_DECLARE(void) switch_jb_set_flag(switch_jb_t *jb, switch_jb_flag_t flag);
|
||||||
SWITCH_DECLARE(void) switch_jb_clear_flag(switch_jb_t *jb, switch_jb_flag_t flag);
|
SWITCH_DECLARE(void) switch_jb_clear_flag(switch_jb_t *jb, switch_jb_flag_t flag);
|
||||||
SWITCH_DECLARE(uint32_t) switch_jb_get_nack_success(switch_jb_t *jb);
|
SWITCH_DECLARE(uint32_t) switch_jb_get_nack_success(switch_jb_t *jb);
|
||||||
|
SWITCH_DECLARE(uint32_t) switch_jb_get_packets_per_frame(switch_jb_t *jb);
|
||||||
|
|
||||||
SWITCH_END_EXTERN_C
|
SWITCH_END_EXTERN_C
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -986,6 +986,15 @@ SWITCH_DECLARE(uint32_t) switch_jb_get_nack_success(switch_jb_t *jb)
|
||||||
return nack_recovered;
|
return nack_recovered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SWITCH_DECLARE(uint32_t) switch_jb_get_packets_per_frame(switch_jb_t *jb)
|
||||||
|
{
|
||||||
|
uint32_t ppf;
|
||||||
|
switch_mutex_lock(jb->mutex);
|
||||||
|
ppf = jb->packet_count; /* get current packets per frame */
|
||||||
|
switch_mutex_unlock(jb->mutex);
|
||||||
|
return ppf;
|
||||||
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_jb_peek_frame(switch_jb_t *jb, uint32_t ts, uint16_t seq, int peek, switch_frame_t *frame)
|
SWITCH_DECLARE(switch_status_t) switch_jb_peek_frame(switch_jb_t *jb, uint32_t ts, uint16_t seq, int peek, switch_frame_t *frame)
|
||||||
{
|
{
|
||||||
switch_jb_node_t *node = NULL;
|
switch_jb_node_t *node = NULL;
|
||||||
|
|
Loading…
Reference in New Issue