X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fjack.c;h=bb5cafb79d404ad25c2f0b489cf8c713cafef027;hb=d3c77e33205db2859a6d1f1594ae8efd82e7fd3b;hp=6b4c48994b0a13c56ce7913517d7e7494a91d5df;hpb=24cddfa0efa80557f538d6dbf08f9b0b4b4d52a4;p=vlc diff --git a/modules/access/jack.c b/modules/access/jack.c index 6b4c48994b..bb5cafb79d 100644 --- a/modules/access/jack.c +++ b/modules/access/jack.c @@ -41,14 +41,12 @@ #include #include #include -#include #include #include #include #include -#include #include #include @@ -76,12 +74,12 @@ vlc_module_begin () set_category( CAT_INPUT ) set_subcategory( SUBCAT_INPUT_ACCESS ) - add_integer( "jack-input-caching", DEFAULT_PTS_DELAY / 1000, NULL, + add_integer( "jack-input-caching", DEFAULT_PTS_DELAY / 1000, CACHING_TEXT, CACHING_LONGTEXT, true ) - add_bool( "jack-input-use-vlc-pace", false, NULL, + add_bool( "jack-input-use-vlc-pace", false, PACE_TEXT, PACE_LONGTEXT, true ) - add_bool( "jack-input-auto-connect", false, NULL, - AUTO_CONNECT_TEXT, AUTO_CONNECT_LONGTEXT, true ) + add_bool( "jack-input-auto-connect", false, + AUTO_CONNECT_TEXT, AUTO_CONNECT_LONGTEXT, false ) add_shortcut( "jack" ) set_callbacks( Open, Close ) @@ -159,7 +157,7 @@ static int Open( vlc_object_t *p_this ) /* define name and connect to jack server */ char p_vlc_client_name[32]; sprintf( p_vlc_client_name, "vlc-input-%d", getpid() ); - p_sys->p_jack_client = jack_client_new( p_vlc_client_name ); + p_sys->p_jack_client = jack_client_open( p_vlc_client_name, JackNullOption, NULL ); if( p_sys->p_jack_client == NULL ) { msg_Err( p_demux, "failed to connect to JACK server" ); @@ -366,8 +364,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) case DEMUX_GET_PTS_DELAY: pi64 = ( int64_t* )va_arg( args, int64_t * ); - *pi64 = ( int64_t )var_GetInteger( p_demux, "jack-input-caching" ) - * 1000; + *pi64 = var_GetInteger( p_demux, "jack-input-caching" ) * 1000; return VLC_SUCCESS; case DEMUX_GET_TIME: @@ -444,7 +441,7 @@ int Process( jack_nframes_t i_frames, void *p_arg ) } } - return 1; + return 0; } @@ -462,6 +459,8 @@ static block_t *GrabJack( demux_t *p_demux ) if( i_read < 100 ) /* avoid small read */ { /* vlc has too much free time on its hands? */ +#undef msleep +#warning Hmm.... looks wrong msleep(1000); return NULL; } @@ -539,7 +538,7 @@ static void Port_finder( demux_t *p_demux ) i_out_ports++; } /* alloc an array to store all the matched ports */ - p_sys->pp_jack_port_table = realloc( p_sys->pp_jack_port_table, + p_sys->pp_jack_port_table = xrealloc( p_sys->pp_jack_port_table, (i_out_ports * sizeof( char * ) + i_total_out_ports * sizeof( char * ) ) ); for(int i=0; ip_sys; - char *psz_dup = strdup( p_demux->psz_path ); + char *psz_dup = strdup( p_demux->psz_location ); char *psz_parser = psz_dup; if( !strncmp( psz_parser, "channels=", strlen( "channels=" ) ) )