[vlc-devel] Factor HTTP/HTTPS/RTSP port in core
Pierre Ynard
linkfanel at yahoo.fr
Sun Aug 14 20:09:24 CEST 2011
What's the rationale behind these changes, besides factorization? This
breaks existing settings, and takes away granularity. What if I want to
run a combination of http interface/streams on different
addresses/ports?
char *hostname = var_InheritString( p_this->p_libvlc, hostvar );
- host->fds = net_ListenTCP( p_this, hostname, i_port );
+ int port = var_InheritInteger( p_this->p_libvlc, portvar );
Using p_this->p_libvlc prevents a calling module to set and use its own
bind address through inheritance. But maybe that's your very intent?
Also, why use two separate variables instead of the usual syntax
0.0.0.0:8080 ? The latter seems more convenient to me. And there is a
nice function called vlc_UrlParse() that supports it and more, and it's
used throughout the code, so while we're at it it would nice to decide
on a consistent way to set up transport addresses, and what to do when
the port is set/left to 0.
After these changes, sout blocks get a little funny:
#http{mux=ts,dst=<stuff that'll be ignored>/<path>}
#rtp{sdp=rtsp://<more ignored stuff>/path}
Isn't that a concern? Do you have patches planned to rework that too? As
a last rework, the NEWS could document these caveats-to-be.
Another thing:
+ add_integer( "rtsp-port", 5554, RTSP_PORT_TEXT, RTSP_PORT_LONGTEXT, true )
+ change_integer_range( 1, 65535 )
I couldn't guess whether you meant 554, or used 5554 instead of the
registered rtsp-alt port 8554.
--
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."
More information about the vlc-devel
mailing list