@@ -76,7 +76,7 @@ struct tx;
7676#define MOD_NAME "[rxtx/rtsp] "
7777#define MAGIC to_fourcc('R', 'T', 'r', 's')
7878
79- struct h264_rtp_video_rxtx {
79+ struct h264_rtp_rxtx {
8080 uint32_t magic ;
8181
8282 struct rtp_rxtx_common * rtp_common ;
@@ -96,7 +96,7 @@ static void rtps_server_usage();
9696static int get_rtsp_server_port (const char * config );
9797
9898static void *
99- create_video_rxtx_h264_std (const struct rxtx_params * params )
99+ create_rxtx_rtsp (const struct rxtx_params * params )
100100{
101101 int rtsp_port = 0 ;
102102 const char * rtsp_port_str = params -> protocol_opts ;
@@ -110,7 +110,7 @@ create_video_rxtx_h264_std(const struct rxtx_params *params)
110110 return nullptr ;
111111 }
112112 }
113- struct h264_rtp_video_rxtx * s = calloc (1 , sizeof * s );
113+ struct h264_rtp_rxtx * s = calloc (1 , sizeof * s );
114114 s -> magic = MAGIC ;
115115 s -> parent = params -> parent ;
116116 s -> start_time = params -> start_time ;
@@ -144,10 +144,10 @@ create_video_rxtx_h264_std(const struct rxtx_params *params)
144144 * this function is used to configure their RTSP server either
145145 * for video-only or using both audio and video. For audio-only
146146 * RTSP server, the server is run directly from
147- * h264_rtp_video_rxtx::set_audio_spec ().
147+ * configure_audio ().
148148 */
149149static void
150- configure_rtsp_server_video (struct h264_rtp_video_rxtx * s )
150+ configure_rtsp_server_video (struct h264_rtp_rxtx * s )
151151{
152152 assert ((s -> rtsp_params .avType & rtsp_type_video ) != 0 );
153153 switch (s -> rtsp_params .video_codec ) {
@@ -178,7 +178,7 @@ configure_rtsp_server_video(struct h264_rtp_video_rxtx *s)
178178}
179179
180180static void
181- send_frame_impl (struct h264_rtp_video_rxtx * s , struct video_frame * tx_frame )
181+ send_frame_impl (struct h264_rtp_rxtx * s , struct video_frame * tx_frame )
182182{
183183 struct rtp_rxtx_medium * video = & s -> rtp_common -> medium [TX_MEDIA_VIDEO ];
184184
@@ -213,15 +213,15 @@ send_frame_impl(struct h264_rtp_video_rxtx *s, struct video_frame *tx_frame)
213213static void
214214send_frame (void * state , struct video_frame * tx_frame )
215215{
216- struct h264_rtp_video_rxtx * s = state ;
216+ struct h264_rtp_rxtx * s = state ;
217217 send_frame_impl (s , tx_frame );
218218 tx_frame -> callbacks .dispose (tx_frame );
219219}
220220
221221static void
222222join (void * state )
223223{
224- struct h264_rtp_video_rxtx * s = state ;
224+ struct h264_rtp_rxtx * s = state ;
225225 stop_rtsp_server (s -> rtsp_server );
226226 s -> rtsp_server = nullptr ;
227227}
@@ -259,13 +259,13 @@ static int get_rtsp_server_port(const char *config) {
259259}
260260
261261static void done (void * state ) {
262- struct h264_rtp_video_rxtx * s = state ;
262+ struct h264_rtp_rxtx * s = state ;
263263 rtp_rxtx_common_done (s -> rtp_common );
264264 free (s );
265265}
266266
267267static void
268- configure_audio (struct h264_rtp_video_rxtx * s , const struct audio_frame2 * frame )
268+ configure_audio (struct h264_rtp_rxtx * s , const struct audio_frame2 * frame )
269269{
270270 s -> rtsp_params .adesc = audio_frame2_get_desc (frame );
271271 MSG (VERBOSE , "Setting audio desc %s to RTSP.\n" ,
@@ -281,7 +281,7 @@ configure_audio(struct h264_rtp_video_rxtx *s, const struct audio_frame2 *frame)
281281static void
282282h264_rtp_send_audio_frame (void * state , const struct audio_frame2 * frame )
283283{
284- struct h264_rtp_video_rxtx * s = state ;
284+ struct h264_rtp_rxtx * s = state ;
285285
286286 rtp_rxtx_sender_do_housekeeping (s -> rtp_common , TX_MEDIA_AUDIO );
287287
@@ -297,7 +297,7 @@ static bool
297297h264_rtp_ctl_property (void * state , enum rxtx_property p ,
298298 void * val , size_t * len )
299299{
300- struct h264_rtp_video_rxtx * s = state ;
300+ struct h264_rtp_rxtx * s = state ;
301301 assert (s -> magic == MAGIC );
302302 switch (p ) {
303303 case GET_RTP_COMMON_STATE : {
@@ -327,13 +327,13 @@ h264_rtp_ctl_property(void *state, enum rxtx_property p,
327327static struct rx_audio_frames *
328328h264_rtp_recv_audio_frame (void * state )
329329{
330- struct h264_rtp_video_rxtx * s = state ;
330+ struct h264_rtp_rxtx * s = state ;
331331 return rtp_recv_audio_frame (s -> rtp_common , decode_audio_frame_mulaw );
332332}
333333
334- static const struct rxtx_info h264_video_rxtx_info = {
334+ static const struct rxtx_info rtsp_rxtx_info = {
335335 .long_name = "RTP standard (using RTSP)" ,
336- .create = create_video_rxtx_h264_std ,
336+ .create = create_rxtx_rtsp ,
337337 .done = done ,
338338 .ctl_property = h264_rtp_ctl_property ,
339339
@@ -346,5 +346,4 @@ static const struct rxtx_info h264_video_rxtx_info = {
346346 .join_video_sender = join ,
347347};
348348
349- REGISTER_MODULE (rtsp , & h264_video_rxtx_info , LIBRARY_CLASS_RXTX , RXTX_ABI_VERSION );
350-
349+ REGISTER_MODULE (rtsp , & rtsp_rxtx_info , LIBRARY_CLASS_RXTX , RXTX_ABI_VERSION );
0 commit comments