Commit 960b7bb4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: factor the Control() callback

parent 163b142d
......@@ -52,7 +52,6 @@ struct demux_sys_t
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
static int StoreString( demux_t *p_demux, char **ppsz_string,
const char *psz_source_start,
......@@ -772,9 +771,3 @@ static int Demux( demux_t *p_demux )
vlc_gc_decref(p_current_input);
return 0; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
......@@ -43,7 +43,6 @@ struct demux_sys_t
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
static bool IsWhitespace( const char *psz_string );
/*****************************************************************************
......@@ -238,12 +237,6 @@ end:
return i_ret;
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
static bool IsWhitespace( const char *psz_string )
{
psz_string += strspn( psz_string, " \t\r\n" );
......
......@@ -43,7 +43,6 @@
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
static int ParseLine( char *, char **, char ***, int *);
......@@ -313,9 +312,3 @@ static int ParseLine( char *psz_line, char **ppsz_name,
return b_valid;
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
......@@ -68,7 +68,6 @@ struct demux_sys_t
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Import_GVP: main import function
......@@ -226,9 +225,3 @@ static int Demux( demux_t *p_demux )
return 0; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
......@@ -39,7 +39,6 @@
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int DemuxDVD_VR( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Import_IFO: main import function
......@@ -138,10 +137,3 @@ static int DemuxDVD_VR( demux_t *p_demux )
return 0; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
......@@ -43,7 +43,6 @@ struct demux_sys_t
int i_ntracks;
};
static int Control( demux_t *, int, va_list );
static int Demux( demux_t * );
/**
......@@ -115,13 +114,6 @@ end:
return 0;
}
/** \brief dummy function for demux callback interface */
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
/**
* \brief parse the root node of the playlist
*/
......
......@@ -46,7 +46,6 @@ struct demux_sys_t
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
static void parseEXTINF( char *psz_string, char **ppsz_artist, char **ppsz_name, int *pi_duration );
static bool ContainsURL( demux_t *p_demux );
......@@ -275,12 +274,6 @@ static int Demux( demux_t *p_demux )
return 0; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
static void parseEXTINF(char *psz_string, char **ppsz_artist,
char **ppsz_name, int *pi_duration)
{
......
......@@ -146,6 +146,12 @@ vlc_module_begin ()
set_callbacks( Import_ZPL, Close_ZPL )
vlc_module_end ()
int Control(demux_t *demux, int query, va_list args)
{
(void) demux; (void) query; (void) args;
return VLC_EGENERIC;
}
input_item_t * GetCurrentItem(demux_t *p_demux)
{
input_thread_t *p_input_thread = demux_GetParentInput( p_demux );
......
......@@ -24,6 +24,7 @@
#include <vlc_input.h>
#include <vlc_playlist.h>
int Control(demux_t *, int, va_list);
char *ProcessMRL( const char *, const char * );
char *FindPrefix( demux_t * );
......
......@@ -43,7 +43,6 @@ struct demux_sys_t
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Import_PLS: main import function
......@@ -212,9 +211,3 @@ static int Demux( demux_t *p_demux )
vlc_gc_decref(p_current_input);
return 0; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
......@@ -38,7 +38,6 @@
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
static mtime_t strTimeToMTime( const char *psz );
/*****************************************************************************
......@@ -324,12 +323,6 @@ error:
return -1;
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
static mtime_t strTimeToMTime( const char *psz )
{
int h, m, s;
......
......@@ -73,7 +73,6 @@ const char* ppsz_loop[] = { "true", "false", "palindrome" };
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Import_QTL: main import function
......@@ -266,9 +265,3 @@ error:
free( psz_mimetype );
return i_ret;
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
......@@ -63,7 +63,6 @@ struct demux_sys_t
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
static void ParseClipInfo( const char * psz_clipinfo, char **ppsz_artist, char **ppsz_title,
char **ppsz_album, char **ppsz_genre, char **ppsz_year,
char **ppsz_cdnum, char **ppsz_comments );
......@@ -386,17 +385,6 @@ static int Demux( demux_t *p_demux )
return 0; /* Needed for correct operation of go back */
}
/**
* @param p_demux: This object
* @param i_query:
* @param args: List of arguments
*/
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
/**
* Parses clipinfo parameter
* @param psz_clipinfo: string containing the clipinfo parameter along with quotes
......
......@@ -130,7 +130,6 @@ struct demux_sys_t
};
static int Demux ( demux_t *p_demux );
static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Activate: initializes m3u demux structures
......@@ -407,10 +406,3 @@ static int Demux ( demux_t *p_demux )
vlc_gc_decref(p_current_input);
return 0; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
......@@ -45,7 +45,6 @@
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
input_item_node_t *p_input_node );
......@@ -351,9 +350,3 @@ static int DemuxStation( demux_t *p_demux, xml_reader_t *p_xml_reader,
/* FIXME: leaks on missing ENDELEMENT? */
return 0;
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
......@@ -42,7 +42,6 @@ struct demux_sys_t
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Import_WPL: main import function
......@@ -117,9 +116,3 @@ static int Demux( demux_t *p_demux )
var_Destroy( p_demux, "wpl-extvlcopt" );
return 0; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
......@@ -77,7 +77,6 @@ struct demux_sys_t
char * psz_base;
};
static int Control(demux_t *, int, va_list);
static int Demux(demux_t *);
/**
......@@ -159,13 +158,6 @@ end:
return i_ret; /* Needed for correct operation of go back */
}
/** \brief dummy function for demux callback interface */
static int Control(demux_t *p_demux, int i_query, va_list args)
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
static const xml_elem_hnd_t *get_handler(const xml_elem_hnd_t *tab, size_t n, const char *name)
{
for (size_t i = 0; i < n / sizeof(xml_elem_hnd_t); i++)
......
......@@ -43,7 +43,6 @@ struct demux_sys_t
* Local prototypes
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
static char* ParseTabValue(char* psz_string);
/*****************************************************************************
......@@ -209,12 +208,6 @@ static int Demux( demux_t *p_demux )
return 0; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}
static char* ParseTabValue(char* psz_string)
{
int i_len = strlen( psz_string );
......@@ -228,5 +221,3 @@ static char* ParseTabValue(char* psz_string)
return psz_value;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment