refactoring

This commit is contained in:
Maxim Devaev
2025-01-18 05:09:32 +02:00
parent 80ffc8b2bd
commit 10595a13e9
3 changed files with 5 additions and 2 deletions

View File

@@ -29,6 +29,9 @@
#define US_RTP_DATAGRAM_SIZE 1200
#define US_RTP_HEADER_SIZE 12
#define US_RTP_VIDEO_PAYLOAD 96
#define US_RTP_AUDIO_PAYLOAD 111
typedef struct {
uint payload;

View File

@@ -33,7 +33,7 @@ us_rtpa_s *us_rtpa_init(us_rtp_callback_f callback) {
us_rtpa_s *rtpa;
US_CALLOC(rtpa, 1);
rtpa->rtp = us_rtp_init();
us_rtp_assign(rtpa->rtp, 111, false);
us_rtp_assign(rtpa->rtp, US_RTP_AUDIO_PAYLOAD, false);
rtpa->callback = callback;
return rtpa;
}

View File

@@ -45,7 +45,7 @@ us_rtpv_s *us_rtpv_init(us_rtp_callback_f callback) {
us_rtpv_s *rtpv;
US_CALLOC(rtpv, 1);
rtpv->rtp = us_rtp_init();
us_rtp_assign(rtpv->rtp, 96, true);
us_rtp_assign(rtpv->rtp, US_RTP_VIDEO_PAYLOAD, true);
rtpv->callback = callback;
return rtpv;
}