Skip to content

Commit

Permalink
Cleaning up the SDPs, continuing to isolate the verbosity level on ea…
Browse files Browse the repository at this point in the history
…ch subcomponent
  • Loading branch information
wberube committed Oct 24, 2024
1 parent 1b9b04b commit 6c746e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/rtsp/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define likely(x) __builtin_expect((x), 1)
#define unlikely(x) __builtin_expect((x), 0)

#ifdef DEBUG
#ifdef DEBUG_RTSP
/* -------------------------------------------------------------------------- */
#define DBG( fmt, args...) do {\
fprintf(stderr, "--- DEBUG:%s:%s:%d ---: ", __FILE__, __FUNCTION__, __LINE__);\
Expand Down
22 changes: 11 additions & 11 deletions src/rtsp/rtsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static void __method_describe(struct connection_item_t *p, rtsp_handle h)
"s=librtsp\r\n"
"c=IN IP4 0.0.0.0\r\n"
"t=0 0\r\n"
"a=tool:libavformat 52.73.0\r\n";
"a=range:npt=0-\r\n";
char audioRtp[256] = "\r\n";
char audioRtpfmt[16];

Expand Down Expand Up @@ -173,8 +173,8 @@ static void __method_describe(struct connection_item_t *p, rtsp_handle h)
sprintf(audioRtp,
"\r\n"
"m=audio 0 RTP/AVP %d\r\n"
"a=rtpmap:%d %s/90000\r\n"
"a=control:track=1\r\n",
"a=control:track=1\r\n"
"a=rtpmap:%d %s/90000\r\n",
h->audioPt, h->audioPt, audioRtpfmt, h->audioPt);
}

Expand All @@ -192,10 +192,10 @@ static void __method_describe(struct connection_item_t *p, rtsp_handle h)

snprintf(sdp, __RTSP_TCP_BUF_SIZE- 1,
"%sm=video 0 RTP/AVP 96\r\n"
"a=rtpmap:96 H265/90000\r\n"
"a=control:track=0\r\n"
"a=fmtp:96 packetization-mode=1;"
" profile-level-id=%s;"
"a=rtpmap:96 H265/90000\r\n"
"a=fmtp:96 profile-level-id=%s;"
" packetization-mode=1;"
" sprop-parameter-sets=%s,%s,%s;%s",
baseRtp,
h->sprop_sps_b16->result,
Expand All @@ -215,10 +215,10 @@ static void __method_describe(struct connection_item_t *p, rtsp_handle h)

snprintf(sdp, __RTSP_TCP_BUF_SIZE - 1,
"%sm=video 0 RTP/AVP 96\r\n"
"a=rtpmap:96 H264/90000\r\n"
"a=control:track=0\r\n"
"a=fmtp:96 packetization-mode=1;"
" profile-level-id=%s;"
"a=rtpmap:96 H265/90000\r\n"
"a=fmtp:96 profile-level-id=%s;"
" packetization-mode=1;"
" sprop-parameter-sets=%s,%s;%s",
baseRtp,
h->sprop_sps_b16->result,
Expand All @@ -228,9 +228,9 @@ static void __method_describe(struct connection_item_t *p, rtsp_handle h)
} else {
snprintf(sdp, __RTSP_TCP_BUF_SIZE - 1,
"%sm=video 0 RTP/AVP 96\r\n"
"a=control:track=0\r\n"
"a=rtpmap:96 %s/90000\r\n"
"a=fmtp:96 packetization-mode=1\r\n"
"a=control:track=0%s",
"a=fmtp:96 packetization-mode=1%s",
baseRtp,
h->isH265 ? "H265" : "H264",
audioRtp);
Expand Down

0 comments on commit 6c746e1

Please sign in to comment.