[vlc-devel] [PATCH] live555: retrieve RTSP track languages from SDP
Gilles Chanteperdrix
gilles.chanteperdrix at xenomai.org
Tue Dec 17 20:28:41 CET 2013
by parsing the "a=lang:" attribute.
---
modules/access/live555.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index b9ed723..014fc7e 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -685,6 +685,7 @@ static int SessionsSetup( demux_t *p_demux )
unsigned int i_receive_buffer = 0;
int i_frame_buffer = DEFAULT_FRAME_BUFFER_SIZE;
unsigned const thresh = 200000; /* RTP reorder threshold .2 second (default .1) */
+ const char *lang;
b_rtsp_tcp = var_CreateGetBool( p_demux, "rtsp-tcp" ) ||
var_GetBool( p_demux, "rtsp-http" );
@@ -1090,6 +1091,15 @@ static int SessionsSetup( demux_t *p_demux )
}
}
+ /* Try and parse a=lang: attribute */
+ lang = strstr(sub->savedSDPLines(), "a=lang:");
+ if (lang) {
+ unsigned sz;
+ lang += 7;
+ sz = strcspn(lang, " \r\n");
+ tk->fmt.psz_language = strndup(lang, sz);
+ }
+
if( !tk->b_quicktime && !tk->b_muxed && !tk->b_asf )
{
tk->p_es = es_out_Add( p_demux->out, &tk->fmt );
--
1.8.4.rc3
More information about the vlc-devel
mailing list