vlc | branch: master | Steve Lhomme <[email protected]> | Fri Mar 18 17:52:32 2016 +0100| [cbc6fd07b4a9601f204d2c285e6dbc15bbf97c57] | committer: Jean-Baptiste Kempf
chromecast:sout: pass the MIME type to the HTTP output > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cbc6fd07b4a9601f204d2c285e6dbc15bbf97c57 --- modules/stream_out/chromecast/cast.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp index 119f2aa..81d04c0 100644 --- a/modules/stream_out/chromecast/cast.cpp +++ b/modules/stream_out/chromecast/cast.cpp @@ -157,6 +157,7 @@ static int Open(vlc_object_t *p_this) sout_stream_sys_t *p_sys = NULL; intf_sys_t *p_intf = NULL; char *psz_mux = NULL; + char *psz_var_mime = NULL; sout_stream_t *p_sout = NULL; bool b_has_video = true; std::stringstream ss; @@ -168,10 +169,13 @@ static int Open(vlc_object_t *p_this) { goto error; } + psz_var_mime = var_GetNonEmptyString(p_stream, SOUT_CFG_PREFIX "mime"); + if (psz_var_mime == NULL || !psz_var_mime[0]) + goto error; ss << "http{dst=:" << var_InheritInteger(p_stream, SOUT_CFG_PREFIX "http-port") << "/stream" << ",mux=" << psz_mux - << ",access=http}"; + << ",access=http{mime=" << psz_var_mime << "}}"; p_sout = sout_StreamChainNew( p_stream->p_sout, ss.str().c_str(), NULL, NULL); if (p_sout == NULL) { @@ -194,12 +198,13 @@ static int Open(vlc_object_t *p_this) p_stream->p_sys = p_sys; free(psz_mux); - + free(psz_var_mime); return VLC_SUCCESS; error: sout_StreamChainDelete(p_sout, p_sout); free(psz_mux); + free(psz_var_mime); delete p_sys; return VLC_EGENERIC; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
