mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-02 05:36:31 +00:00
refactoring
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user