/*****************************************************************************
* control.c
*****************************************************************************
- * Copyright (C) 1999-2004 the VideoLAN team
+ * Copyright (C) 1999-2004 VLC authors and VideoLAN
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
vlc_mutex_lock( &p_input->p->p_item->lock );
- /* current title if -1 */
- if ( *pi_req_title_offset < 0 )
- *pi_req_title_offset = p_input->p->i_title_offset;
+ int i_current_title = var_GetInteger( p_input, "title" );
+ if ( *pi_req_title_offset < 0 ) /* return current title if -1 */
+ *pi_req_title_offset = i_current_title;
if( p_input->p->i_title && p_input->p->i_title > *pi_req_title_offset )
{
}
}
- case INPUT_ADD_OPTION:
- {
- const char *psz_option = va_arg( args, const char * );
- const char *psz_value = va_arg( args, const char * );
- char *str;
- int i;
-
- if( asprintf( &str, "%s=%s", psz_option, psz_value ) == -1 )
- return VLC_ENOMEM;
-
- i = input_item_AddOption( p_input->p->p_item, str,
- VLC_INPUT_OPTION_UNIQUE );
- free( str );
- return i;
- }
-
case INPUT_GET_VIDEO_FPS:
pf = (double*)va_arg( args, double * );
case INPUT_GET_AOUT:
{
- aout_instance_t *p_aout = input_resource_HoldAout( p_input->p->p_resource );
+ audio_output_t *p_aout = input_resource_HoldAout( p_input->p->p_resource );
if( !p_aout )
return VLC_EGENERIC;
- aout_instance_t **pp_aout = (aout_instance_t**)va_arg( args, aout_instance_t** );
+ audio_output_t **pp_aout = (audio_output_t**)va_arg( args, audio_output_t** );
*pp_aout = p_aout;
return VLC_SUCCESS;
}
const int i_id = va_arg( args, int );
vlc_object_t **pp_decoder = va_arg( args, vlc_object_t ** );
vout_thread_t **pp_vout = va_arg( args, vout_thread_t ** );
- aout_instance_t **pp_aout = va_arg( args, aout_instance_t ** );
+ audio_output_t **pp_aout = va_arg( args, audio_output_t ** );
return es_out_Control( p_input->p->p_es_out_display, ES_OUT_GET_ES_OBJECTS_BY_ID, i_id,
pp_decoder, pp_vout, pp_aout );