Changeset 3814df3b05159f91a38b1ed240fb623efaa2c917

Show
Ignore:
Timestamp:
23/01/06 16:35:02 (3 years ago)
Author:
Christophe Mutricy <xtophe@videolan.org>
git-committer:
Christophe Mutricy <xtophe@videolan.org> 1138030502 +0000
git-parent:

[3d24634c3622bcb54d086eefc5d21c8b107774d9]

git-author:
Christophe Mutricy <xtophe@videolan.org> 1138030502 +0000
Message:

http.c: add an option to disable bonjour (closes #509).

Please review and improve the option text and longtext strings.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access_output/http.c

    r2cb472d r3814df3  
    8383                         "file that will be HTTP/SSL stream output. Leave " \ 
    8484                         "empty if you don't have one." ) 
     85#define BONJOUR_TEXT N_( "Advertise with Bonjour") 
     86#define BONJOUR_LONGTEXT N_( "Advertise the stream with the Bonjour protocol" ) 
     87 
    8588 
    8689vlc_module_begin(); 
     
    107110    add_string( SOUT_CFG_PREFIX "crl", NULL, NULL, 
    108111                CRL_TEXT, CRL_LONGTEXT, VLC_TRUE ); 
     112    add_bool( SOUT_CFG_PREFIX "bonjour", VLC_FALSE, NULL, 
     113              BONJOUR_TEXT, BONJOUR_LONGTEXT,VLC_TRUE); 
    109114    set_callbacks( Open, Close ); 
    110115vlc_module_end(); 
     
    317322    if( psz_name != NULL ) psz_name++; 
    318323    else psz_name = p_playlist->status.p_item->input.psz_uri; 
    319  
    320     p_sys->p_bonjour = bonjour_start_service( (vlc_object_t *)p_access, 
    321                                               "_vlc-http._tcp", 
    322                                               psz_name, i_bind_port, psz_txt ); 
    323     free( (void *)psz_txt ); 
    324     if( p_sys->p_bonjour == NULL ) 
    325     { 
    326         vlc_object_release( p_playlist ); 
    327         httpd_HostDelete( p_sys->p_httpd_host ); 
    328         free( (void *)p_sys ); 
    329         return VLC_EGENERIC; 
    330     } 
    331  
     324     
     325    if( config_GetInt(p_this, SOUT_CFG_PREFIX "bonjour") ) 
     326    { 
     327        p_sys->p_bonjour = bonjour_start_service( (vlc_object_t *)p_access, 
     328                                                  "_vlc-http._tcp", 
     329                                                  psz_name, i_bind_port, psz_txt ); 
     330        free( (void *)psz_txt ); 
     331        if( p_sys->p_bonjour == NULL ) 
     332        { 
     333            vlc_object_release( p_playlist ); 
     334            httpd_HostDelete( p_sys->p_httpd_host ); 
     335            free( (void *)p_sys ); 
     336            return VLC_EGENERIC; 
     337        } 
     338    } 
    332339    vlc_object_release( p_playlist ); 
    333340#endif 
     
    357364 
    358365#ifdef HAVE_AVAHI_CLIENT 
    359     bonjour_stop_service( p_sys->p_bonjour ); 
     366    if( config_GetInt(p_this, SOUT_CFG_PREFIX "bonjour") ) 
     367        bonjour_stop_service( p_sys->p_bonjour ); 
    360368#endif 
    361369