Commit 562ab59b authored by Gildas Bazin's avatar Gildas Bazin

* src/input/control.c: added INPUT_ADD_INFO/INPUT_SET_NAME to input_Control().

* src/input/input.c:
   + introduced input_item_t that is shared between the playlist/vlm and the input thread (contains input name, options, infos, etc...).
   + changed prototype of input_CreateThread() to input_thread_t *input_CreateThread( vlc_object_t *, input_item_t * ).
* ALL: use input_item_t and INPUT_ADD_INFO when necessary.
parent d79a6839
......@@ -333,7 +333,6 @@ SOURCES_libvlc_common = \
src/input/input_dec.c \
src/input/input_programs.c \
src/input/input_clock.c \
src/input/input_info.c \
src/video_output/video_output.c \
src/video_output/vout_pictures.c \
src/video_output/vout_pictures.h \
......
......@@ -153,57 +153,8 @@ struct input_area_t
off_t i_plugin_data;
};
/**
* \brief A list of info items.
*
* Composes a linked list of name/value pairs intended to inform the
* user about the current stream
* \see input_AddInfo
*/
struct input_info_t {
/**
* Name of this item
*/
char * psz_name;
/**
* Value of this item
*/
char * psz_value;
/**
* Pointer to next item in list, or NULL it at end of list
*/
input_info_t * p_next;
};
/**
* \brief A list of info categories.
*
* Composes a NULL terminated linked list of categories in which to
* place info about the stream.
*
* \see input_InfoCategory
*/
struct input_info_category_t {
/**
* The name of this category
*/
char * psz_name;
/**
* first element of a linked list containing info items
*/
input_info_t * p_info;
/**
* Pointer to next element in this list, or NULL if at end of list
*/
input_info_category_t * p_next;
};
/*****************************************************************************
* stream_descriptor_t
* stream_descriptor_t
*****************************************************************************
* Describes a stream and list its associated programs. Build upon
* the information carried in program association sections (for instance)
......@@ -262,9 +213,6 @@ struct stream_descriptor_t
/* Optional stream output */
sout_instance_t * p_sout;
/* Input info */
input_info_category_t * p_info;
/* Statistics */
count_t c_packets_read; /* packets read */
count_t c_packets_trashed; /* trashed packets */
......@@ -286,6 +234,53 @@ struct stream_position_t
#define MUTE_NO_CHANGE -1
/*****************************************************************************
* info_t
*****************************************************************************/
/**
* Info item
*/
struct info_t
{
char *psz_name; /**< Name of this info */
char *psz_value; /**< Value of the info */
};
/**
* Info category
* \see info_t
*/
struct info_category_t
{
char *psz_name; /**< Name of this category */
int i_infos; /**< Number of infos in the category */
struct info_t **pp_infos; /**< Pointer to an array of infos */
};
/*****************************************************************************
* input_item_t
*****************************************************************************
* Describes an input and is used to spawn input_thread_t objects.
*****************************************************************************/
struct input_item_t
{
char *psz_name; /**< text describing this item */
char *psz_uri; /**< mrl of this item */
int i_options; /**< Number of input options */
char **ppsz_options; /**< Array of input options */
mtime_t i_duration; /**< A hint about the duration of this
* item, in milliseconds*/
int i_categories; /**< Number of info categories */
info_category_t **pp_categories; /**< Pointer to the first info category */
vlc_mutex_t lock; /**< Item cannot be changed without this lock */
};
/*****************************************************************************
* input_thread_t
*****************************************************************************
......@@ -335,6 +330,9 @@ struct input_thread_t
/* General stream description */
stream_descriptor_t stream;
/* Input item description */
input_item_t *p_item;
/* Playlist item */
char * psz_source;
char * psz_dupsource;
......@@ -388,8 +386,8 @@ struct input_thread_t
/*****************************************************************************
* Prototypes
*****************************************************************************/
#define input_CreateThread(a,b,c,d) __input_CreateThread(VLC_OBJECT(a),b,c,d)
VLC_EXPORT( input_thread_t *, __input_CreateThread, ( vlc_object_t *, char *psz_uri, char **ppsz_options, int i_options ) );
#define input_CreateThread(a,b) __input_CreateThread(VLC_OBJECT(a),b)
VLC_EXPORT( input_thread_t *, __input_CreateThread, ( vlc_object_t *, input_item_t * ) );
VLC_EXPORT( void, input_StopThread, ( input_thread_t * ) );
VLC_EXPORT( void, input_DestroyThread, ( input_thread_t * ) );
......
......@@ -82,13 +82,6 @@ VLC_EXPORT( int, input_ClockManageControl, ( input_thread_t *, pgrm_descriptor_
VLC_EXPORT( void, input_ClockManageRef, ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) );
VLC_EXPORT( mtime_t, input_ClockGetTS, ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) );
/*****************************************************************************
* Prototypes from input_info.c
*****************************************************************************/
VLC_EXPORT( input_info_category_t *, input_InfoCategory, ( input_thread_t *, char * ) );
VLC_EXPORT( int, input_AddInfo, ( input_info_category_t *, char *, char *, ... ) );
int input_DelInfo( input_thread_t * p_input ); /* no need to export this */
/*****************************************************************************
* Prototypes from input_ext-plugins.h (buffers management)
*****************************************************************************/
......
......@@ -386,6 +386,12 @@ enum input_query_e
INPUT_DEL_BOOKMARK, /* arg1= seekpoint_t * res=can fail */
INPUT_SET_BOOKMARK, /* arg1= int res=can fail */
INPUT_ADD_OPTION, /* arg1= char * arg2= char * res=can fail */
INPUT_ADD_INFO, /* arg1= char * arg2= char * arg3=... res=can fail */
INPUT_SET_NAME, /* arg1= char * res=can fail */
INPUT_GET_SUBDELAY, /* arg1 = int* res=can fail */
INPUT_SET_SUBDELAY, /* arg1 = int res=can fail */
......
......@@ -2,7 +2,7 @@
* intf.h: interface header for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf.h,v 1.4 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* 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
......@@ -36,9 +36,9 @@ extern "C" {
*****************************************************************************/
#include "vlc_interface.h"
#include "intf_eject.h"
#include "vlc_playlist.h"
#include "stream_control.h"
#include "input_ext-intf.h"
#include "vlc_playlist.h"
# ifdef __cplusplus
}
......
......@@ -192,8 +192,6 @@ typedef struct msg_subscription_t msg_subscription_t;
typedef struct playlist_t playlist_t;
typedef struct playlist_item_t playlist_item_t;
typedef struct playlist_group_t playlist_group_t;
typedef struct item_info_t item_info_t;
typedef struct item_info_category_t item_info_category_t;
typedef struct playlist_export_t playlist_export_t;
/* Modules */
......@@ -212,11 +210,10 @@ typedef struct intf_channel_t intf_channel_t;
/* Input */
typedef struct input_thread_t input_thread_t;
typedef struct input_thread_sys_t input_thread_sys_t;
typedef struct input_item_t input_item_t;
typedef struct input_area_t input_area_t;
typedef struct input_buffers_t input_buffers_t;
typedef struct input_socket_t input_socket_t;
typedef struct input_info_t input_info_t;
typedef struct input_info_category_t input_info_category_t;
typedef struct access_sys_t access_sys_t;
typedef struct demux_sys_t demux_sys_t;
typedef struct es_descriptor_t es_descriptor_t;
......@@ -225,6 +222,8 @@ typedef struct pgrm_descriptor_t pgrm_descriptor_t;
typedef struct pgrm_sys_t pgrm_sys_t;
typedef struct stream_descriptor_t stream_descriptor_t;
typedef struct seekpoint_t seekpoint_t;
typedef struct info_t info_t;
typedef struct info_category_t info_category_t;
/* Format */
typedef struct audio_format_t audio_format_t;
......
......@@ -2,7 +2,7 @@
* vlc_playlist.h : Playlist functions
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
* $Id: vlc_playlist.h,v 1.27 2004/01/29 17:51:07 zorglub Exp $
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -33,29 +33,6 @@
* @{
*/
/**
* Playlist info item
* \see playlist_item_t
*/
struct item_info_t
{
char * psz_name; /**< Name of this info */
char * psz_value; /**< Value of the info */
};
/**
* playlist item info category
* \see playlist_item_t
* \see item_info_t
*/
struct item_info_category_t
{
char * psz_name; /**< Name of this category */
int i_infos; /**< Number of infos in the category */
item_info_t **pp_infos; /**< Pointer to an array of infos */
};
/**
* playlist export helper structure
*/
......@@ -71,15 +48,8 @@ struct playlist_export_t
*/
struct playlist_item_t
{
char * psz_name; /**< text describing this item */
char * psz_uri; /**< mrl of this item */
mtime_t i_duration; /**< A hint about the duration of this
* item, in milliseconds*/
int i_categories; /**< Number of info categories */
item_info_category_t **
pp_categories; /**< Pointer to the first info category */
int i_options; /**< Number of options */
char ** ppsz_options; /**< Array of options */
input_item_t input; /**< input item descriptor */
int i_nb_played; /**< How many times was this item played ? */
vlc_bool_t b_autodeletion; /**< Indicates whther this item is to
* be deleted after playback. True mean
......@@ -89,7 +59,6 @@ struct playlist_item_t
* played or skipped */
int i_group; /**< Which group does this item belongs to ? */
int i_id; /**< Unique id to track this item */
vlc_mutex_t lock; /**< Item cannot be changed without this lock */
};
/**
......@@ -211,17 +180,14 @@ VLC_EXPORT( int, playlist_GroupToId, (playlist_t *, char * ) );
VLC_EXPORT( char * , playlist_GetInfo, ( playlist_t * , int, const char *, const char *) );
VLC_EXPORT( char * , playlist_ItemGetInfo, ( playlist_item_t * , const char *, const char *) );
VLC_EXPORT( item_info_category_t*, playlist_GetCategory, ( playlist_t *, int, const char *) );
VLC_EXPORT( item_info_category_t*, playlist_ItemGetCategory, ( playlist_item_t *, const char *) );
VLC_EXPORT( info_category_t*, playlist_ItemGetCategory, ( playlist_item_t *, const char *) );
VLC_EXPORT( item_info_category_t*, playlist_CreateCategory, ( playlist_t *, int, const char *) );
VLC_EXPORT( item_info_category_t*, playlist_ItemCreateCategory, ( playlist_item_t *, const char *) );
VLC_EXPORT( info_category_t*, playlist_ItemCreateCategory, ( playlist_item_t *, const char *) );
VLC_EXPORT( int, playlist_AddInfo, (playlist_t *, int, const char * , const char *, const char *, ...) );
VLC_EXPORT( int, playlist_ItemAddInfo, (playlist_item_t *, const char * , const char *, const char *, ...) );
/* Option functions */
VLC_EXPORT( int, playlist_AddOption, (playlist_t *, int, const char *) );
VLC_EXPORT( int, playlist_ItemAddOption, (playlist_item_t *, const char *) );
/* Playlist sorting */
......
......@@ -55,8 +55,7 @@ typedef struct
char **option;
/* global options for all inputs */
char **input_option;
int i_input_option;
input_item_t item;
input_thread_t *p_input;
} vlm_media_t;
......
......@@ -352,55 +352,44 @@ CDDAUpdateVar( input_thread_t *p_input, int i_num, int i_action,
}
#endif
#define meta_info_add_str(title, str) \
if ( str ) { \
dbg_print( INPUT_DBG_META, "field %s: %s\n", title, str); \
input_AddInfo( p_cat, _(title), "%s", str ); \
vlc_mutex_lock( &p_playlist->object_lock ); \
p_item = playlist_ItemGetByPos( p_playlist, -1 ); \
vlc_mutex_unlock( &p_playlist->object_lock ); \
vlc_mutex_lock( &p_item->lock ); \
playlist_ItemAddInfo( p_item, p_cat->psz_name, \
_(title), "%s" , str ); \
vlc_mutex_unlock( &p_item->lock ); \
}
static void InformationCreate( input_thread_t *p_input )
{
cdda_data_t *p_cdda = (cdda_data_t *) p_input->p_access_data;
playlist_t *p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST,
FIND_PARENT );
input_info_category_t *p_cat;
p_cat = input_InfoCategory( p_input, "General" );
#ifdef HAVE_LIBCDDB
if (p_cdda->i_cddb_enabled) {
playlist_item_t *p_item;
meta_info_add_str( "Title", p_cdda->cddb.disc->title );
meta_info_add_str( "Artist", p_cdda->cddb.disc->artist );
meta_info_add_str( "Genre", p_cdda->cddb.disc->genre );
meta_info_add_str( "Extended Data", p_cdda->cddb.disc->ext_data );
{
char year[5];
if (p_cdda->cddb.disc->year != 0) {
snprintf(year, 5, "%d", p_cdda->cddb.disc->year);
meta_info_add_str( "Year", year );
}
if ( p_cdda->cddb.disc->discid ) {
input_AddInfo( p_cat, _("CDDB Disc ID"), "%x",
p_cdda->cddb.disc->discid );
}
if ( p_cdda->cddb.disc->category != CDDB_CAT_INVALID ) {
input_AddInfo( p_cat, _("CDDB Disc Category"), "%s",
CDDB_CATEGORY[p_cdda->cddb.disc->category] );
}
}
dbg_print( INPUT_DBG_META, "field %s: %s\n", "Title",
p_cdda->cddb.disc->title );
input_Control( p_input, INPUT_ADD_INFO, _("General"), _("Title"),
"%s", p_cdda->cddb.disc->title );
dbg_print( INPUT_DBG_META, "field %s: %s\n", "Artist",
p_cdda->cddb.disc->artist );
input_Control( p_input, INPUT_ADD_INFO, _("General"), _("Artist"),
"%s", p_cdda->cddb.disc->artist );
dbg_print( INPUT_DBG_META, "field %s: %s\n", "Genre",
p_cdda->cddb.disc->genre );
input_Control( p_input, INPUT_ADD_INFO, _("General"), _("Genre"),
"%s", p_cdda->cddb.disc->genre );
dbg_print( INPUT_DBG_META, "field %s: %s\n", "Extended Data",
p_cdda->cddb.disc->ext_data );
input_Control( p_input, INPUT_ADD_INFO, _("General"), _("Extended Data"),
"%s", p_cdda->cddb.disc->ext_data );
if (p_cdda->cddb.disc->year != 0)
input_Control( p_input, INPUT_ADD_INFO, _("General"),
_("Year"), "%d", p_cdda->cddb.disc->year );
if ( p_cdda->cddb.disc->discid )
input_Control( p_input, INPUT_ADD_INFO, _("General"),
_("CDDB Disc ID"), "%x", p_cdda->cddb.disc->discid );
if ( p_cdda->cddb.disc->category != CDDB_CAT_INVALID )
input_Control( p_input, INPUT_ADD_INFO, _("General"),
_("CDDB Disc Category"), "%s",
CDDB_CATEGORY[p_cdda->cddb.disc->category] );
}
#endif /*HAVE_LIBCDDB*/
......@@ -414,40 +403,40 @@ static void InformationCreate( input_thread_t *p_input )
/ CDIO_CD_FRAMES_PER_SEC;
dbg_print( INPUT_DBG_META, "Duration %ld", (long int) i_duration );
input_AddInfo( p_cat, _("Duration"), "%s",
secstotimestr( psz_buffer, i_duration ) );
input_Control( p_input, INPUT_ADD_INFO, _("General"), _("Duration"), "%s",
secstotimestr( psz_buffer, i_duration ) );
for( i_track = 0 ; i_track < p_cdda->i_nb_tracks ; i_track++ ) {
char track_str[TITLE_MAX];
mtime_t i_duration =
(p_cdda->p_sectors[i_track+1] - p_cdda->p_sectors[i_track])
/ CDIO_CD_FRAMES_PER_SEC;
(p_cdda->p_sectors[i_track+1] - p_cdda->p_sectors[i_track])
/ CDIO_CD_FRAMES_PER_SEC;
snprintf(track_str, TITLE_MAX, "%s %02d", _("Track"), i_track+1);
p_cat = input_InfoCategory( p_input, track_str );
input_AddInfo( p_cat, _("Duration"), "%s",
secstotimestr( psz_buffer, i_duration ) );
input_Control( p_input, INPUT_ADD_INFO, track_str, _("Duration"), "%s",
secstotimestr( psz_buffer, i_duration ) );
#ifdef HAVE_LIBCDDB
if (p_cdda->i_cddb_enabled) {
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc,
i_track);
if (t != NULL) {
if ( t->artist != NULL && strlen(t->artist) ) {
input_AddInfo( p_cat, _("Artist"), "%s", t->artist );
}
if ( t->title != NULL && strlen(t->title) ) {
input_AddInfo( p_cat, _("Title"), "%s", t->title );
}
if ( t->ext_data != NULL && strlen(t->ext_data) ) {
input_AddInfo( p_cat, _("Extended Data"), "%s", t->ext_data );
}
}
if ( t->artist != NULL && strlen(t->artist) ) {
input_Control( p_input, INPUT_ADD_INFO, track_str,
_("Artist"), "%s", t->artist );
}
if ( t->title != NULL && strlen(t->title) ) {
input_Control( p_input, INPUT_ADD_INFO, track_str,
_("Title"), "%s", t->title );
}
if ( t->ext_data != NULL && strlen(t->ext_data) ) {
input_Control( p_input, INPUT_ADD_INFO, track_str,
_("Extended Data"), "%s", t->ext_data );
}
}
}
#endif
}
}
if( p_playlist ) vlc_object_release( p_playlist );
}
......@@ -759,7 +748,7 @@ CDDACreatePlayListItem(const input_thread_t *p_input, cdda_data_t *p_cdda,
if( !p_item )
return;
vlc_mutex_lock( &p_item->lock );
vlc_mutex_lock( &p_item->input.lock );
p_author =
CDDAFormatStr( p_input, p_cdda,
......@@ -804,7 +793,7 @@ CDDACreatePlayListItem(const input_thread_t *p_input, cdda_data_t *p_cdda,
}
#endif /*HAVE_LIBCDDB*/
vlc_mutex_unlock( &p_item->lock );
vlc_mutex_unlock( &p_item->input.lock );
}
static int
......
......@@ -2,7 +2,7 @@
* slp.c: SLP access plugin
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id: slp.c,v 1.20 2004/01/25 17:31:22 gbazin Exp $
* $Id$
*
* Authors: Loc Minier <lool@videolan.org>
*
......@@ -132,7 +132,10 @@ static SLPBoolean AttrCallback( SLPHandle slph_slp,
return SLP_TRUE;
}
p_playlist_item->psz_name = strdup(psz_attrlist); /* NULL is checked */
if( p_playlist_item->input.psz_name )
free( p_playlist_item->input.psz_name );
p_playlist_item->input.psz_name = strdup(psz_attrlist); /* NULL is checked */
return SLP_TRUE;
}
......@@ -145,7 +148,7 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
SLPError slpe_errcode,
void * p_cookie )
{
input_thread_t * p_input = (input_thread_t *)p_cookie;
input_thread_t *p_input = (input_thread_t *)p_cookie;
playlist_t * p_playlist;
char psz_item[42] = ""; //"udp:@";
char * psz_s; /* to hold the uri of the stream */
......@@ -159,7 +162,7 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
return SLP_TRUE;
}
msg_Dbg(p_input,"URL: %s",psz_srvurl);
msg_Dbg( p_input,"URL: %s", psz_srvurl );
/* or there was a problem with getting the data we requested */
if( (slpe_errcode != SLP_OK) )
......@@ -173,7 +176,7 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
psz_s = strstr( psz_srvurl, "//" );
if( psz_s == NULL )
{
msg_Err( (input_thread_t *)p_input,
msg_Err( p_input,
"SrvUrlCallback got a strange string of your libslp" );
return SLP_TRUE;
}
......@@ -185,17 +188,13 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
sizeof(psz_item) - strlen(psz_item) - 1 );
/* create a playlist item */
p_playlist_item = malloc( sizeof( playlist_item_t ) );
memset( p_playlist_item, 0, sizeof( playlist_item_t ) );
p_playlist_item = playlist_ItemNew( p_input, psz_s, NULL );
if( p_playlist_item == NULL )
{
msg_Err( p_input, "out of memory" );
return SLP_TRUE;
}
p_playlist_item->psz_name = NULL;
p_playlist_item->psz_uri = strdup( psz_s );
p_playlist_item->i_duration = -1;
p_playlist_item->i_group = i_group;
p_playlist_item->b_enabled = VLC_TRUE;
......@@ -217,32 +216,21 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
SLPClose( slph_slp3 );
}
/* add a default name if we found no attribute */
if( p_playlist_item->psz_name == NULL )
{
p_playlist_item->psz_name = strdup( psz_s );
}
/* search the main playlist object */
p_playlist = vlc_object_find( (input_thread_t *)p_input,
VLC_OBJECT_PLAYLIST,
p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
msg_Warn( (input_thread_t *)p_input,
"could not find playlist, not adding entries" );
msg_Warn( p_input, "could not find playlist, not adding entries" );
return SLP_TRUE;
}
playlist_AddItem( p_playlist,
p_playlist_item,
PLAYLIST_APPEND,
PLAYLIST_END );
vlc_object_release( (vlc_object_t *)p_playlist );
playlist_AddItem( p_playlist, p_playlist_item,
PLAYLIST_APPEND, PLAYLIST_END );
vlc_object_release( p_playlist );
msg_Info( (input_thread_t *)p_input,
"added %s (lifetime %i) to playlist",
psz_srvurl, i_lifetime );
msg_Info( p_input, "added %s (lifetime %i) to playlist",
psz_srvurl, i_lifetime );
return SLP_TRUE;
}
......
......@@ -28,7 +28,6 @@
* Preamble
*****************************************************************************/
#include <vlc/vlc.h>
#include <vlc/input.h> /* for input infos */
#include <vlc/decoder.h>
#include <vlc/aout.h>
......@@ -464,35 +463,11 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, void **pp_out_buffer )
if( p_dec->fmt_out.audio.i_rate != p_sys->i_rate )
{
#define TITLE_MAX 30
input_info_category_t *p_cat;
char psz_streamid[TITLE_MAX];
int i_es_id = p_dec->fmt_out.i_id;
input_thread_t * p_input = vlc_object_find( p_dec, VLC_OBJECT_INPUT, FIND_PARENT );
msg_Info( p_dec, "MPGA channels:%d samplerate:%d bitrate:%d",
p_sys->i_channels, p_sys->i_rate, p_sys->i_bit_rate );
if( p_input )
{
snprintf(psz_streamid, TITLE_MAX, "%s%04x", _("Stream "), i_es_id);
p_cat = input_InfoCategory( p_input, psz_streamid );
#if 1
/* We should be finding this stream, but we aren't. */
input_AddInfo( p_cat, _("Type"), "%s", _("audio") );
input_AddInfo( p_cat, _("Description"), "%s", _("MPEG audio") );
#endif
input_AddInfo( p_cat, _("Sample Rate"), "%d", p_sys->i_rate );
input_AddInfo( p_cat, _("Bit Rate"), "%d", p_sys->i_bit_rate );
input_AddInfo( p_cat, _("Channel(s)"), "%d", p_sys->i_channels );
msg_Info( p_dec, "MPGA channels:%d samplerate:%d bitrate:%d",
p_sys->i_channels, p_sys->i_rate, p_sys->i_bit_rate );
aout_DateInit( &p_sys->end_date, p_sys->i_rate );
aout_DateSet( &p_sys->end_date, p_sys->i_pts );
vlc_object_release( p_input );
}
aout_DateInit( &p_sys->end_date, p_sys->i_rate );
aout_DateSet( &p_sys->end_date, p_sys->i_pts );