From 3cee798c0b1f013d89874bfbe43709fa3de506cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 11 Sep 2007 20:14:00 +0000 Subject: [PATCH] Generic support for text streams in RTP. No actually subtype implemented currently though. --- modules/stream_out/rtp.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c index 9a48f701de..a50a816846 100644 --- a/modules/stream_out/rtp.c +++ b/modules/stream_out/rtp.c @@ -701,13 +701,20 @@ char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url ) sout_stream_id_t *id = p_sys->es[i]; const char *mime_major; /* major MIME type */ - if( id->i_cat == AUDIO_ES ) - mime_major = "audio"; - else - if( id->i_cat == VIDEO_ES ) - mime_major = "video"; - else - continue; + switch( id->i_cat ) + { + case VIDEO_ES: + mime_major = "video"; + break; + case AUDIO_ES: + mime_major = "audio"; + break; + case SPU_ES: + mime_major = "text"; + break; + default: + continue; + } sdp_AddMedia( &psz_sdp, mime_major, "RTP/AVP", inclport * id->i_port, id->i_payload_type, VLC_FALSE, id->i_bitrate, -- 2.39.5