X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Frtsp%2Faccess.c;h=39cd5a246f98c09bed4735d67f73df524b04c622;hb=38f300b12dc0e09f4bf9c18450323a177de03b9f;hp=1f81c1c132e3f905d13e52115291e812db82bd6b;hpb=880f95fd6fd6cbeeb9734f0ab72bc4d77b84b273;p=vlc diff --git a/modules/access/rtsp/access.c b/modules/access/rtsp/access.c index 1f81c1c132..39cd5a246f 100644 --- a/modules/access/rtsp/access.c +++ b/modules/access/rtsp/access.c @@ -2,7 +2,7 @@ * access.c: Real rtsp input ***************************************************************************** * Copyright (C) 2005 VideoLAN - * $Id: file.c 10310 2005-03-11 22:36:40Z anil $ + * $Id$ * * Authors: Gildas Bazin * @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ /***************************************************************************** @@ -26,6 +26,7 @@ *****************************************************************************/ #include #include +#include #include "network.h" #include "rtsp.h" @@ -39,11 +40,11 @@ static void Close( vlc_object_t * ); #define CACHING_TEXT N_("Caching value (ms)") #define CACHING_LONGTEXT N_( \ - "Allows you to modify the default caching value for RTSP streams. This " \ - "value should be set in millisecond units." ) + "Caching value for RTSP streams. This " \ + "value should be set in milliseconds." ) vlc_module_begin(); - set_description( _("Standard filesystem file input") ); + set_description( _("Real RTSP") ); set_shortname( _("Real RTSP") ); set_category( CAT_INPUT ); set_subcategory( SUBCAT_INPUT_ACCESS ); @@ -53,6 +54,7 @@ vlc_module_begin(); set_callbacks( Open, Close ); add_shortcut( "realrtsp" ); add_shortcut( "rtsp" ); + add_shortcut( "pnm" ); vlc_module_end(); @@ -84,10 +86,12 @@ static int RtspConnect( void *p_userdata, char *psz_server, int i_port ) access_sys_t *p_sys = p_access->p_sys; /* Open connection */ - p_sys->fd = net_OpenTCP( p_access, psz_server, i_port ); + p_sys->fd = net_ConnectTCP( p_access, psz_server, i_port ); if( p_sys->fd < 0 ) { msg_Err( p_access, "cannot connect to %s:%d", psz_server, i_port ); + intf_UserFatal( p_access, VLC_FALSE, _("Connection failed"), + _("VLC could not connect to \"%s:%d\"."), psz_server, i_port ); return VLC_EGENERIC; } @@ -214,12 +218,15 @@ static int Open( vlc_object_t *p_this ) msg_Err( p_access, "rtsp session can not be established" ); + intf_UserFatal( p_access, VLC_FALSE, _("Session failed"), + _("The requested RTSP session could not be established.") ); goto error; } p_sys->p_header = block_New( p_access, 4096 ); p_sys->p_header->i_buffer = - rmff_dump_header( h, p_sys->p_header->p_buffer, 1024 ); + rmff_dump_header( h, (char *)p_sys->p_header->p_buffer, 1024 ); + rmff_free_header( h ); } else { @@ -231,6 +238,7 @@ static int Open( vlc_object_t *p_this ) var_Create( p_access, "realrtsp-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); + if( psz_server ) free( psz_server ); return VLC_SUCCESS; error: