mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-05-26 15:26:12 +00:00
janus: rtpv: marked -> last_nalu
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
#include "rtp.h"
|
#include "rtp.h"
|
||||||
|
|
||||||
|
|
||||||
void _rtpv_process_nalu(us_rtpv_s *rtpv, const u8 *data, uz size, u32 pts, bool marked);
|
void _rtpv_process_nalu(us_rtpv_s *rtpv, const u8 *data, uz size, u32 pts, bool last_nalu);
|
||||||
|
|
||||||
static sz _find_annexb(const u8 *data, uz size);
|
static sz _find_annexb(const u8 *data, uz size);
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ void us_rtpv_wrap(us_rtpv_s *rtpv, const us_frame_s *frame, bool zero_playout_de
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtpv_process_nalu(us_rtpv_s *rtpv, const u8 *data, uz size, u32 pts, bool marked) {
|
void _rtpv_process_nalu(us_rtpv_s *rtpv, const u8 *data, uz size, u32 pts, bool last_nalu) {
|
||||||
US_A(size > 1);
|
US_A(size > 1);
|
||||||
|
|
||||||
const uint ref_idc = (data[0] >> 5) & 3;
|
const uint ref_idc = (data[0] >> 5) & 3;
|
||||||
@@ -113,7 +113,7 @@ void _rtpv_process_nalu(us_rtpv_s *rtpv, const u8 *data, uz size, u32 pts, bool
|
|||||||
u8 *dg = rtp->datagram;
|
u8 *dg = rtp->datagram;
|
||||||
|
|
||||||
if (size + US_RTP_HEADER_SIZE <= US_RTP_TOTAL_SIZE) {
|
if (size + US_RTP_HEADER_SIZE <= US_RTP_TOTAL_SIZE) {
|
||||||
us_rtp_write_header(rtp, pts, marked);
|
us_rtp_write_header(rtp, pts, last_nalu);
|
||||||
memcpy(dg + US_RTP_HEADER_SIZE, data, size);
|
memcpy(dg + US_RTP_HEADER_SIZE, data, size);
|
||||||
rtp->used = size + US_RTP_HEADER_SIZE;
|
rtp->used = size + US_RTP_HEADER_SIZE;
|
||||||
const bool sps_or_pps = (type == 7 || type == 8);
|
const bool sps_or_pps = (type == 7 || type == 8);
|
||||||
@@ -136,7 +136,7 @@ void _rtpv_process_nalu(us_rtpv_s *rtpv, const u8 *data, uz size, u32 pts, bool
|
|||||||
frag_size = remaining;
|
frag_size = remaining;
|
||||||
}
|
}
|
||||||
|
|
||||||
us_rtp_write_header(rtp, pts, (marked && last));
|
us_rtp_write_header(rtp, pts, (last_nalu && last));
|
||||||
|
|
||||||
dg[US_RTP_HEADER_SIZE] = 28 | (ref_idc << 5);
|
dg[US_RTP_HEADER_SIZE] = 28 | (ref_idc << 5);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user