*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h>
#include <vlc/vlc.h>
-#include <vlc/input.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "input_internal.h"
/* Rate */
var_Create( p_input, "rate", VLC_VAR_INTEGER );
- val.i_int = p_input->i_rate;
+ val.i_int = p_input->p->i_rate;
var_Change( p_input, "rate", VLC_VAR_SETVALUE, &val, NULL );
var_AddCallback( p_input, "rate", RateCallback, NULL );
var_Destroy( p_input, "bookmark" );
var_Destroy( p_input, "program" );
- if( p_input->i_title > 1 )
+ if( p_input->p->i_title > 1 )
{
/* TODO Destroy sub navigation var ? */
var_Destroy( p_input, "next-title" );
var_Destroy( p_input, "prev-title" );
}
- if( p_input->i_title > 0 )
+ if( p_input->p->i_title > 0 )
{
/* FIXME title > 0 doesn't mean current title has more than 1 seekpoint */
var_Destroy( p_input, "next-chapter" );
int i;
/* Create more command variables */
- if( p_input->i_title > 1 )
+ if( p_input->p->i_title > 1 )
{
var_Create( p_input, "next-title", VLC_VAR_VOID );
text.psz_string = _("Next title");
/* Create title and navigation */
val.psz_string = malloc( sizeof("title ") + 5 );
- for( i = 0; i < p_input->i_title; i++ )
+ for( i = 0; i < p_input->p->i_title; i++ )
{
vlc_value_t val2, text, text2;
int j;
var_AddCallback( p_input, val.psz_string,
NavigationCallback, (void *)i );
- if( p_input->title[i]->psz_name == NULL ||
- *p_input->title[i]->psz_name == '\0' )
+ if( p_input->p->title[i]->psz_name == NULL ||
+ *p_input->p->title[i]->psz_name == '\0' )
{
asprintf( &text.psz_string, _("Title %i"),
- i + p_input->i_title_offset );
+ i + p_input->p->i_title_offset );
}
else
{
- text.psz_string = strdup( p_input->title[i]->psz_name );
+ text.psz_string = strdup( p_input->p->title[i]->psz_name );
}
var_Change( p_input, "navigation", VLC_VAR_ADDCHOICE, &val, &text );
free( text.psz_string );
- for( j = 0; j < p_input->title[i]->i_seekpoint; j++ )
+ for( j = 0; j < p_input->p->title[i]->i_seekpoint; j++ )
{
val2.i_int = j;
- if( p_input->title[i]->seekpoint[j]->psz_name == NULL ||
- *p_input->title[i]->seekpoint[j]->psz_name == '\0' )
+ if( p_input->p->title[i]->seekpoint[j]->psz_name == NULL ||
+ *p_input->p->title[i]->seekpoint[j]->psz_name == '\0' )
{
/* Default value */
asprintf( &text2.psz_string, _("Chapter %i"),
- j + p_input->i_seekpoint_offset );
+ j + p_input->p->i_seekpoint_offset );
}
else
{
text2.psz_string =
- strdup( p_input->title[i]->seekpoint[j]->psz_name );
+ strdup( p_input->p->title[i]->seekpoint[j]->psz_name );
}
var_Change( p_input, val.psz_string, VLC_VAR_ADDCHOICE,
*****************************************************************************/
void input_ControlVarTitle( input_thread_t *p_input, int i_title )
{
- input_title_t *t = p_input->title[i_title];
+ input_title_t *t = p_input->p->title[i_title];
vlc_value_t val;
int i;
{
/* Default value */
asprintf( &text.psz_string, _("Chapter %i"),
- i + p_input->i_seekpoint_offset );
+ i + p_input->p->i_seekpoint_offset );
}
else
{