From 6876730b6da8f78a34c18306a0234c77b681641b Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sun, 3 Dec 2006 19:23:16 +0000 Subject: should fix bug reported by Christophe Thommeret where avi+subtitles (actually master/slave streams) could cause demux to get into an endless loop. CVS patchset: 8401 CVS date: 2006/12/03 19:23:16 --- src/xine-engine/demux.c | 4 ++-- src/xine-engine/video_decoder.c | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index c6a234ae5..2178ccb71 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -20,7 +20,7 @@ * Demuxer helper functions * hide some xine engine details from demuxers and reduce code duplication * - * $Id: demux.c,v 1.64 2006/08/13 23:51:34 miguelfreitas Exp $ + * $Id: demux.c,v 1.65 2006/12/03 19:23:16 miguelfreitas Exp $ */ @@ -336,7 +336,7 @@ static void *demux_loop (void *stream_gen) { finished_count_video = stream->finished_count_video + 1; pthread_mutex_unlock (&stream->counter_lock); - /* demux_thread_running is zero if demux loop has being stopped by user */ + /* demux_thread_running is zero if demux loop has been stopped by user */ non_user = stream->demux_thread_running; stream->demux_thread_running = 0; diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 16ebb61b2..8f6b82faa 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.161 2006/09/08 21:11:29 miguelfreitas Exp $ + * $Id: video_decoder.c,v 1.162 2006/12/03 19:23:16 miguelfreitas Exp $ * */ @@ -193,8 +193,13 @@ static void *video_decoder_loop (void *stream_gen) { /* * wait the output fifos to run dry before sending the notification event - * to the frontend. this test is only valid if there is only a single - * stream attached to the current output port. + * to the frontend. exceptions: + * 1) don't wait if there is more than one stream attached to the current + * output port (the other stream might be sending data so we would be + * here forever) + * 2) early_finish_event: send notification asap to allow gapless switch + * 3) slave stream: don't wait. get into an unblocked state asap to allow + * new master actions. */ while(1) { int num_bufs, num_streams; @@ -204,7 +209,8 @@ static void *video_decoder_loop (void *stream_gen) { num_streams = stream->video_out->get_property(stream->video_out, VO_PROP_NUM_STREAMS); running_ticket->release(running_ticket, 0); - if( num_bufs > 0 && num_streams == 1 && !stream->early_finish_event ) + if( num_bufs > 0 && num_streams == 1 && !stream->early_finish_event && + stream->master == stream ) xine_usec_sleep (10000); else break; -- cgit v1.2.3 From 952847b799797174c03ad074f5651210f1c6ebb2 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 13 Dec 2006 18:30:30 +0000 Subject: Lock the log buffer while updating it. CVS patchset: 8411 CVS date: 2006/12/13 18:30:30 --- src/xine-engine/scratch.c | 30 ++++++++++++++++++++---------- src/xine-engine/scratch.h | 4 +++- src/xine-engine/xine.c | 21 +++++++++++++++------ src/xine-engine/xine_internal.h | 3 ++- 4 files changed, 40 insertions(+), 18 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/scratch.c b/src/xine-engine/scratch.c index eac5eee63..d750a8a07 100644 --- a/src/xine-engine/scratch.c +++ b/src/xine-engine/scratch.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: scratch.c,v 1.22 2006/10/18 18:46:17 hadess Exp $ + * $Id: scratch.c,v 1.23 2006/12/13 18:30:30 dsalt Exp $ * * top-level xine functions * @@ -47,6 +47,8 @@ static void __attribute__((__format__(__printf__, 2, 0))) struct tm tm; size_t l; + pthread_mutex_lock (&this->lock); + time (&t); localtime_r (&t, &tm); @@ -61,37 +63,46 @@ static void __attribute__((__format__(__printf__, 2, 0))) lprintf ("printing format %s to line %d\n", format, this->cur); this->cur = (this->cur + 1) % this->num_lines; + + pthread_mutex_unlock (&this->lock); } static const char **scratch_get_content (scratch_buffer_t *this) { int i, j; + pthread_mutex_lock (&this->lock); + for(i = 0, j = (this->cur - 1); i < this->num_lines; i++, j--) { if(j < 0) j = (this->num_lines - 1); - this->ordered[i] = this->lines[j]; + free (this->ordered[i]); + this->ordered[i] = this->lines[j] ? strdup (this->lines[j]) : NULL; lprintf ("line %d contains >%s<\n", i , this->lines[j]); } + pthread_mutex_unlock (&this->lock); return this->ordered; } static void scratch_dispose (scratch_buffer_t *this) { - char *mem; int i; - mem = (char *) this->lines[0]; - + pthread_mutex_lock (&this->lock); + for(i = 0; i < this->num_lines; i++ ) { + free(this->ordered[i]); free(this->lines[i]); - this->lines[i] = NULL; } free (this->lines); free (this->ordered); + + pthread_mutex_unlock (&this->lock); + pthread_mutex_destroy (&this->lock); + free (this); } @@ -104,16 +115,15 @@ scratch_buffer_t *_x_new_scratch_buffer (int num_lines) { this->lines = xine_xmalloc (sizeof (char *) * (num_lines + 1)); this->ordered = xine_xmalloc (sizeof (char *) * (num_lines + 1)); - for (i = 0; i < num_lines; i++) - this->lines[i] = NULL; + for (i = 0; i <= num_lines; i++) + this->lines[i] = this->ordered[i] = NULL; - this->ordered[i] = NULL; - this->lines[i] = NULL; this->scratch_printf = scratch_printf; this->get_content = scratch_get_content; this->dispose = scratch_dispose; this->num_lines = num_lines; this->cur = 0; + pthread_mutex_init (&this->lock, NULL); return this; } diff --git a/src/xine-engine/scratch.h b/src/xine-engine/scratch.h index d23d68503..719a9f8d9 100644 --- a/src/xine-engine/scratch.h +++ b/src/xine-engine/scratch.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: scratch.h,v 1.11 2006/09/26 05:19:49 dgp85 Exp $ + * $Id: scratch.h,v 1.12 2006/12/13 18:30:30 dsalt Exp $ * * scratch buffer for log output * @@ -27,6 +27,7 @@ #define HAVE_SCRATCH_H #include +#include typedef struct scratch_buffer_s scratch_buffer_t; @@ -50,6 +51,7 @@ struct scratch_buffer_s { int num_lines; int cur; + pthread_mutex_t lock; }; scratch_buffer_t *_x_new_scratch_buffer (int num_lines) XINE_PROTECTED; diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 78476a768..2440e2d95 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.335 2006/10/16 22:18:24 valtri Exp $ + * $Id: xine.c,v 1.336 2006/12/13 18:30:30 dsalt Exp $ */ /* @@ -1604,9 +1604,10 @@ void xine_init (xine_t *this) { this->streams = xine_list_new(); /* - * streams lock + * locks */ pthread_mutex_init (&this->streams_lock, NULL); + pthread_mutex_init (&this->log_lock, NULL); /* * start metronom clock @@ -1951,12 +1952,21 @@ const char *const *xine_get_log_names (xine_t *this) { return log_sections; } +static inline void check_log_alloc (xine_t *this, int buf) +{ + pthread_mutex_lock (&this->log_lock); + + if ( ! this->log_buffers[buf] ) + this->log_buffers[buf] = _x_new_scratch_buffer(150); + + pthread_mutex_unlock (&this->log_lock); +} + void xine_log (xine_t *this, int buf, const char *format, ...) { va_list argp; char buffer[SCRATCH_LINE_LEN_MAX]; - if ( ! this->log_buffers[buf] ) - this->log_buffers[buf] = _x_new_scratch_buffer(150); + check_log_alloc (this, buf); va_start (argp, format); this->log_buffers[buf]->scratch_printf (this->log_buffers[buf], format, argp); @@ -1973,8 +1983,7 @@ void xine_log (xine_t *this, int buf, const char *format, ...) { void xine_vlog(xine_t *this, int buf, const char *format, va_list args) { - if ( ! this->log_buffers[buf] ) - this->log_buffers[buf] = _x_new_scratch_buffer(150); + check_log_alloc (this, buf); this->log_buffers[buf]->scratch_printf(this->log_buffers[buf], format, args); } diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 8ee5d8219..e25339c46 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_internal.h,v 1.179 2006/10/02 15:56:06 valtri Exp $ + * $Id: xine_internal.h,v 1.180 2006/12/13 18:30:30 dsalt Exp $ * */ @@ -118,6 +118,7 @@ struct xine_s { #ifdef XINE_ENGINE_INTERNAL xine_ticket_t *port_ticket; + pthread_mutex_t log_lock; #endif }; -- cgit v1.2.3 From 60736763897ef57e53327f5b2cdc4b4208deb6b0 Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Thu, 14 Dec 2006 10:14:48 +0000 Subject: Added configure option --enable-antialing (disabled by default because RLE encoded antialiased fonts don't look good). CVS patchset: 8415 CVS date: 2006/12/14 10:14:48 --- src/xine-engine/osd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index b5f45d0af..210bcf26e 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -102,6 +102,12 @@ # define KERNING_DEFAULT ft_kerning_default #endif +#ifdef ENABLE_ANTIALIASING +# define FT_LOAD_FLAGS FT_LOAD_DEFAULT +#else +# define FT_LOAD_FLAGS (FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING) +#endif + typedef struct osd_fontchar_s { uint16_t code; uint16_t width; @@ -1171,7 +1177,7 @@ static int osd_render_text (osd_object_t *osd, int x1, int y1, } previous = i; - if (FT_Load_Glyph(osd->ft2->face, i, FT_LOAD_DEFAULT)) { + if (FT_Load_Glyph(osd->ft2->face, i, FT_LOAD_FLAGS)) { xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("osd: error loading glyph\n")); continue; } -- cgit v1.2.3 From 1f4418dd9bfbc4110cd761afb6b832f261acf516 Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Fri, 15 Dec 2006 11:31:28 +0000 Subject: Added BUF_AUDIO_FLVADPCM (Flash ADPCM). CVS patchset: 8418 CVS date: 2006/12/15 11:31:28 --- src/xine-engine/buffer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index fa8d96388..cb6b6e4cb 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.h,v 1.159 2006/11/14 14:11:59 dgp85 Exp $ + * $Id: buffer.h,v 1.160 2006/12/15 11:31:29 klan Exp $ * * * contents: @@ -255,6 +255,7 @@ extern "C" { #define BUF_AUDIO_TRUESPEECH 0x03390000 #define BUF_AUDIO_TTA 0x033A0000 #define BUF_AUDIO_SMACKER 0x033B0000 +#define BUF_AUDIO_FLVADPCM 0x033C0000 /* spu buffer types: */ -- cgit v1.2.3 From 8eae85edce64a5454036be7ffa5c526dc7e1f92e Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Mon, 18 Dec 2006 21:22:45 +0000 Subject: Added INPUT_CAP_NOCACHE: disable usage of internal input cache by default. CVS patchset: 8421 CVS date: 2006/12/18 21:22:45 --- src/xine-engine/xine.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 2440e2d95..6149675f7 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.336 2006/12/13 18:30:30 dsalt Exp $ + * $Id: xine.c,v 1.337 2006/12/18 21:22:45 klan Exp $ */ /* @@ -769,6 +769,9 @@ static int open_internal (xine_stream_t *stream, const char *mrl) { return 0; } + if (stream->input_plugin->get_capabilities(stream->input_plugin) & INPUT_CAP_NOCACHE) + no_cache = 1; + if (*stream_setup) { while (stream_setup && *stream_setup && *(++stream_setup)) { -- cgit v1.2.3 From b69b939bc672c639696bd1862808ade41e9aedbc Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Tue, 19 Dec 2006 14:10:35 +0000 Subject: Added some cleanup code to make some calls cancelable (at least xine_open can be safely canceled now). CVS patchset: 8424 CVS date: 2006/12/19 14:10:35 --- src/xine-engine/xine.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 6149675f7..07d9455e1 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.337 2006/12/18 21:22:45 klan Exp $ + * $Id: xine.c,v 1.338 2006/12/19 14:10:35 klan Exp $ */ /* @@ -78,6 +78,10 @@ #endif /* WIN32 */ +static void mutex_cleanup (void *mutex) { + pthread_mutex_unlock ((pthread_mutex_t *) mutex); +} + void _x_handle_stream_end (xine_stream_t *stream, int non_user) { if (stream->status == XINE_STATUS_QUIT) @@ -294,6 +298,7 @@ static void stop_internal (xine_stream_t *stream) { void xine_stop (xine_stream_t *stream) { pthread_mutex_lock (&stream->frontend_lock); + pthread_cleanup_push (mutex_cleanup, (void *) &stream->frontend_lock); /* make sure that other threads cannot change the speed, especially pauseing the stream */ pthread_mutex_lock(&stream->speed_change_lock); @@ -320,6 +325,7 @@ void xine_stop (xine_stream_t *stream) { stream->xine->port_ticket->release(stream->xine->port_ticket, 1); stream->ignore_speed_change = 0; + pthread_cleanup_pop (0); pthread_mutex_unlock (&stream->frontend_lock); } @@ -395,6 +401,7 @@ static void close_internal (xine_stream_t *stream) { void xine_close (xine_stream_t *stream) { pthread_mutex_lock (&stream->frontend_lock); + pthread_cleanup_push (mutex_cleanup, (void *) &stream->frontend_lock); close_internal (stream); @@ -408,6 +415,7 @@ void xine_close (xine_stream_t *stream) { if (stream->status != XINE_STATUS_QUIT) stream->status = XINE_STATUS_IDLE; + pthread_cleanup_pop (0); pthread_mutex_unlock (&stream->frontend_lock); } @@ -1134,11 +1142,13 @@ int xine_open (xine_stream_t *stream, const char *mrl) { int ret; pthread_mutex_lock (&stream->frontend_lock); + pthread_cleanup_push (mutex_cleanup, (void *) &stream->frontend_lock); lprintf ("open MRL:%s\n", mrl); ret = open_internal (stream, mrl); + pthread_cleanup_pop (0); pthread_mutex_unlock (&stream->frontend_lock); return ret; @@ -1266,6 +1276,7 @@ int xine_play (xine_stream_t *stream, int start_pos, int start_time) { int ret; pthread_mutex_lock (&stream->frontend_lock); + pthread_cleanup_push (mutex_cleanup, (void *) &stream->frontend_lock); stream->delay_finish_event = 0; @@ -1275,6 +1286,7 @@ int xine_play (xine_stream_t *stream, int start_pos, int start_time) { stream->gapless_switch = 0; + pthread_cleanup_pop (0); pthread_mutex_unlock (&stream->frontend_lock); return ret; @@ -1288,6 +1300,7 @@ int xine_eject (xine_stream_t *stream) { return 0; pthread_mutex_lock (&stream->frontend_lock); + pthread_cleanup_push (mutex_cleanup, (void *) &stream->frontend_lock); status = 0; /* only eject, if we are stopped OR a different input plugin is playing */ @@ -1298,7 +1311,9 @@ int xine_eject (xine_stream_t *stream) { status = stream->eject_class->eject_media (stream->eject_class); } + pthread_cleanup_pop (0); pthread_mutex_unlock (&stream->frontend_lock); + return status; } -- cgit v1.2.3 From ace000d3a03181607b130c28da69652f5f60f7d6 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 19 Dec 2006 19:10:50 +0000 Subject: Mark string-type configuration items according to whether they're plain strings or names of files, device nodes or directories. This information is available to front ends (via .num_value) so that they can present file/dir-open dialogue boxes if they so choose. Subtitle font selection is split up due to this. CVS patchset: 8425 CVS date: 2006/12/19 19:10:50 --- src/xine-engine/configfile.c | 51 +++++++++++++++++++++++++++++++--------- src/xine-engine/configfile.h | 12 +++++++++- src/xine-engine/xine.c | 6 ++--- src/xine-engine/xine_interface.c | 18 +++++++++++++- 4 files changed, 71 insertions(+), 16 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index 21ebfd5be..5d552f8f1 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.c,v 1.81 2006/09/26 21:51:11 dgp85 Exp $ + * $Id: configfile.c,v 1.82 2006/12/19 19:10:52 dsalt Exp $ * * config object (was: file) management - implementation * @@ -491,14 +491,15 @@ static cfg_entry_t *config_register_key (config_values_t *this, return entry; } -static char *config_register_string (config_values_t *this, - const char *key, - const char *def_value, - const char *description, - const char *help, - int exp_level, - xine_config_cb_t changed_cb, - void *cb_data) { +static cfg_entry_t *config_register_string_internal (config_values_t *this, + const char *key, + const char *def_value, + int num_value, + const char *description, + const char *help, + int exp_level, + xine_config_cb_t changed_cb, + void *cb_data) { cfg_entry_t *entry; _x_assert(this); @@ -512,7 +513,7 @@ static char *config_register_string (config_values_t *this, if (entry->type != XINE_CONFIG_TYPE_UNKNOWN) { lprintf("config entry already registered: %s\n", key); pthread_mutex_unlock(&this->config_lock); - return entry->str_value; + return entry; } config_reset_value(entry); @@ -525,13 +526,40 @@ static char *config_register_string (config_values_t *this, else entry->str_value = strdup(def_value); + entry->num_value = num_value; + /* fill out rest of struct */ entry->str_default = strdup(def_value); entry->description = (description) ? strdup(description) : NULL; entry->help = (help) ? strdup(help) : NULL; pthread_mutex_unlock(&this->config_lock); - return entry->str_value; + return entry; +} + +static char *config_register_string (config_values_t *this, + const char *key, + const char *def_value, + const char *description, + const char *help, + int exp_level, + xine_config_cb_t changed_cb, + void *cb_data) { + return config_register_string_internal (this, key, def_value, 0, description, + help, exp_level, changed_cb, cb_data)->str_value; +} + +static char *config_register_filename (config_values_t *this, + const char *key, + const char *def_value, + int req_type, + const char *description, + const char *help, + int exp_level, + xine_config_cb_t changed_cb, + void *cb_data) { + return config_register_string_internal (this, key, def_value, req_type, description, + help, exp_level, changed_cb, cb_data)->str_value; } static int config_register_num (config_values_t *this, @@ -1184,6 +1212,7 @@ config_values_t *_x_config_init (void) { pthread_mutex_init(&this->config_lock, &attr); this->register_string = config_register_string; + this->register_filename = config_register_filename; this->register_range = config_register_range; this->register_enum = config_register_enum; this->register_num = config_register_num; diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h index 2a98be9f1..29413610c 100644 --- a/src/xine-engine/configfile.h +++ b/src/xine-engine/configfile.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.h,v 1.38 2006/09/26 05:19:48 dgp85 Exp $ + * $Id: configfile.h,v 1.39 2006/12/19 19:10:52 dsalt Exp $ * * config file management * @@ -108,6 +108,16 @@ struct config_values_s { xine_config_cb_t changed_cb, void *cb_data); + char* (*register_filename) (config_values_t *self, + const char *key, + const char *def_value, + int req_type, + const char *description, + const char *help, + int exp_level, + xine_config_cb_t changed_cb, + void *cb_data); + int (*register_range) (config_values_t *self, const char *key, int def_value, diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 07d9455e1..63afc86d3 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.338 2006/12/19 14:10:35 klan Exp $ + * $Id: xine.c,v 1.339 2006/12/19 19:10:52 dsalt Exp $ */ /* @@ -1579,9 +1579,9 @@ void xine_init (xine_t *this) { /* * save directory */ - this->save_path = this->config->register_string ( + this->save_path = this->config->register_filename ( this->config, - "media.capture.save_dir", "", + "media.capture.save_dir", "", XINE_CONFIG_STRING_IS_DIRECTORY_NAME, _("directory for saving streams"), _("When using the stream save feature, files will be written only into this directory.\n" "This setting is security critical, because when changed to a different directory, xine " diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index d0dc0e4a5..7e7527de7 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_interface.c,v 1.99 2006/10/16 06:29:38 dgp85 Exp $ + * $Id: xine_interface.c,v 1.100 2006/12/19 19:10:52 dsalt Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -100,7 +100,23 @@ const char* xine_config_register_string (xine_t *self, cb_data); } + +const char* xine_config_register_filename (xine_t *self, + const char *key, + const char *def_value, + int req_type, + const char *description, + const char *help, + int exp_level, + xine_config_cb_t changed_cb, + void *cb_data) { + return self->config->register_filename (self->config, + key, def_value, req_type, + description, help, exp_level, + changed_cb, cb_data); +} + int xine_config_register_range (xine_t *self, const char *key, int def_value, -- cgit v1.2.3 From efab2aab1e401c4a7ed564ab5535ba367bce29ed Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Fri, 22 Dec 2006 16:38:15 +0000 Subject: Removed INPUT_CAP_NOCACHE. CVS patchset: 8432 CVS date: 2006/12/22 16:38:15 --- src/xine-engine/xine.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 63afc86d3..f5583a52f 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.339 2006/12/19 19:10:52 dsalt Exp $ + * $Id: xine.c,v 1.340 2006/12/22 16:38:15 klan Exp $ */ /* @@ -777,9 +777,6 @@ static int open_internal (xine_stream_t *stream, const char *mrl) { return 0; } - if (stream->input_plugin->get_capabilities(stream->input_plugin) & INPUT_CAP_NOCACHE) - no_cache = 1; - if (*stream_setup) { while (stream_setup && *stream_setup && *(++stream_setup)) { -- cgit v1.2.3 From e1c221ba977a17e1cd47cc1eb78d4ffc967dec3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Dec 2006 15:07:51 +0000 Subject: Fix race condition in audio_out by using a recursive mutex; patch by Reinhard Nissl. [bug #1551911] CVS patchset: 8437 CVS date: 2006/12/25 15:07:51 --- src/xine-engine/audio_out.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index ce8cbe536..90a139010 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.207 2006/11/04 23:30:14 dsalt Exp $ + * $Id: audio_out.c,v 1.208 2006/12/25 15:07:52 dgp85 Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe @@ -1055,9 +1055,7 @@ static void *ao_loop (void *this_gen) { delay = this->driver->delay(this->driver); while (delay < 0 && this->audio_loop_running) { /* Get the audio card into RUNNING state. */ - pthread_mutex_unlock( &this->driver_lock ); ao_fill_gap (this, 10000); /* FIXME, this PTS of 1000 should == period size */ - pthread_mutex_lock( &this->driver_lock ); delay = this->driver->delay(this->driver); } pthread_mutex_unlock( &this->driver_lock ); @@ -1200,7 +1198,7 @@ static void *ao_loop (void *this_gen) { if (this->driver_open) { pthread_mutex_lock( &this->driver_lock ); - result = this->driver->write (this->driver, out_buf->mem, out_buf->num_frames ); + result = this->driver_open ? this->driver->write (this->driver, out_buf->mem, out_buf->num_frames ) : 0; pthread_mutex_unlock( &this->driver_lock ); } else { result = 0; @@ -1984,6 +1982,7 @@ xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, aos_t *this; int i, err; pthread_attr_t pth_attrs; + pthread_mutexattr_t attr; static const char* resample_modes[] = {"auto", "off", "on", NULL}; static const char* av_sync_methods[] = {"metronom feedback", "resample", NULL}; @@ -1994,8 +1993,14 @@ xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, this->clock = xine->clock; this->streams = xine_list_new(); + /* warning: driver_lock is a recursive mutex. it must NOT be + * used with neither pthread_cond_wait() or pthread_cond_timedwait() + */ + pthread_mutexattr_init( &attr ); + pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); + pthread_mutex_init( &this->streams_lock, NULL ); - pthread_mutex_init( &this->driver_lock, NULL ); + pthread_mutex_init( &this->driver_lock, &attr ); pthread_mutex_init( &this->driver_action_lock, NULL ); this->ao.open = ao_open; -- cgit v1.2.3 From ef9e52f5031dc0042f30d368f707926aeaa2b4a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Dec 2006 18:43:38 +0000 Subject: Correctly export _x_post_frame_u_turn. CVS patchset: 8452 CVS date: 2006/12/25 18:43:38 --- src/xine-engine/post.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index f8aba5cef..521fae9e5 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: post.h,v 1.23 2006/09/26 05:19:49 dgp85 Exp $ + * $Id: post.h,v 1.24 2006/12/25 18:43:38 dgp85 Exp $ * * post plugin definitions * @@ -259,7 +259,7 @@ void _x_post_frame_copy_up(vo_frame_t *to, vo_frame_t *from) XINE_PROTECTED; /* when you shortcut a frames usual draw() travel so that it will never reach * the draw() function of the original issuer, you still have to do some * housekeeping on the frame, before returning control up the pipe */ -void _x_post_frame_u_turn(vo_frame_t *frame, xine_stream_t *stream); +void _x_post_frame_u_turn(vo_frame_t *frame, xine_stream_t *stream) XINE_PROTECTED; /* use this to create a new, trivially decorated overlay manager in which * port functions can be replaced with own implementations */ -- cgit v1.2.3 From ec4bff004365df1851af20a669929a2d90670856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Dec 2006 21:59:32 +0000 Subject: Fix a grammar error, and mark the error message for translation. CVS patchset: 8458 CVS date: 2006/12/25 21:59:32 --- src/xine-engine/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c index c36e97877..389146dcb 100644 --- a/src/xine-engine/buffer.c +++ b/src/xine-engine/buffer.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.c,v 1.36 2006/06/20 00:35:07 dgp85 Exp $ + * $Id: buffer.c,v 1.37 2006/12/25 21:59:32 dgp85 Exp $ * * * contents: @@ -64,7 +64,7 @@ static void buffer_pool_free (buf_element_t *element) { this->buffer_pool_num_free++; if (this->buffer_pool_num_free > this->buffer_pool_capacity) { - printf("xine-lib:buffer: Their has been a fatal error: TOO MANY FREE's\n"); + fprintf(stderr, _("xine-lib: buffer.c: There has been a fatal error: TOO MANY FREE's\n")); _x_abort(); } -- cgit v1.2.3 From 081af23420456da89e8a75ab7aad2b88d9868d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 26 Dec 2006 03:18:56 +0000 Subject: Add WavPack to the list of supported audio buffers. CVS patchset: 8459 CVS date: 2006/12/26 03:18:56 --- src/xine-engine/buffer.h | 3 ++- src/xine-engine/buffer_types.c | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index cb6b6e4cb..22e1a7a04 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.h,v 1.160 2006/12/15 11:31:29 klan Exp $ + * $Id: buffer.h,v 1.161 2006/12/26 03:18:56 dgp85 Exp $ * * * contents: @@ -256,6 +256,7 @@ extern "C" { #define BUF_AUDIO_TTA 0x033A0000 #define BUF_AUDIO_SMACKER 0x033B0000 #define BUF_AUDIO_FLVADPCM 0x033C0000 +#define BUF_AUDIO_WAVPACK 0x033D0000 /* spu buffer types: */ diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index ea8d58842..161ec70a9 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer_types.c,v 1.106 2006/10/02 15:56:06 valtri Exp $ + * $Id: buffer_types.c,v 1.107 2006/12/26 03:18:56 dgp85 Exp $ * * * contents: @@ -1114,6 +1114,13 @@ static audio_db_t audio_db[] = { BUF_AUDIO_MPC, "Musepack" }, +{ + { + 0 + }, + BUF_AUDIO_WAVPACK, + "Wavpack" +}, { { 0 }, 0, "last entry" } }; -- cgit v1.2.3 From 994f6c9f96a720e1caa94485029f321059a63c8e Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Sun, 7 Jan 2007 20:26:23 +0000 Subject: Wrap the seek_time() and get_current_time() methods when supported by the real input plugin. CVS patchset: 8491 CVS date: 2007/01/07 20:26:23 --- src/xine-engine/input_rip.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c index bb6548bc2..bdcc1ce50 100644 --- a/src/xine-engine/input_rip.c +++ b/src/xine-engine/input_rip.c @@ -29,7 +29,7 @@ * - it's possible speeder saving streams in the xine without playing: * xine stream_mrl#save:file.raw\;noaudio\;novideo * - * $Id: input_rip.c,v 1.31 2006/06/20 00:35:07 dgp85 Exp $ + * $Id: input_rip.c,v 1.32 2007/01/07 20:26:23 klan Exp $ */ /* TODO: @@ -430,6 +430,14 @@ static off_t rip_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin) return this->curpos; } +static off_t rip_plugin_seek_time(input_plugin_t *this_gen, int time_offset, int origin) { + rip_input_plugin_t *this = (rip_input_plugin_t *)this_gen; + + lprintf("seek_time, time_offset: %d, origin: %d\n", time_offset, origin); + + return this->main_input_plugin->seek_time(this->main_input_plugin, time_offset, origin); +} + /* * return current position, * check values for debug build @@ -448,6 +456,12 @@ static off_t rip_plugin_get_current_pos(input_plugin_t *this_gen) { return this->curpos; } +static int rip_plugin_get_current_time(input_plugin_t *this_gen) { + rip_input_plugin_t *this = (rip_input_plugin_t *)this_gen; + + return this->main_input_plugin->get_current_time(this->main_input_plugin); +} + static off_t rip_plugin_get_length (input_plugin_t *this_gen) { rip_input_plugin_t *this = (rip_input_plugin_t *)this_gen; off_t length; @@ -655,7 +669,11 @@ input_plugin_t *_x_rip_plugin_get_instance (xine_stream_t *stream, const char *f this->input_plugin.read = rip_plugin_read; this->input_plugin.read_block = rip_plugin_read_block; this->input_plugin.seek = rip_plugin_seek; + if(this->main_input_plugin->seek_time) + this->input_plugin.seek_time = rip_plugin_seek_time; this->input_plugin.get_current_pos = rip_plugin_get_current_pos; + if(this->main_input_plugin->get_current_time) + this->input_plugin.get_current_time = rip_plugin_get_current_time; this->input_plugin.get_length = rip_plugin_get_length; this->input_plugin.get_blocksize = rip_plugin_get_blocksize; this->input_plugin.get_mrl = rip_plugin_get_mrl; -- cgit v1.2.3 From dac1c574d51ce8f6e37f0100cc05e49a39ab860d Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Wed, 10 Jan 2007 20:13:14 +0000 Subject: make number of frames configurable (nothing to see here, i'm just testing xine latency in some realtime experiments...) CVS patchset: 8496 CVS date: 2007/01/10 20:13:14 --- src/xine-engine/video_out.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 19d635d76..446ba0a45 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.225 2006/03/25 01:26:34 dsalt Exp $ + * $Id: video_out.c,v 1.226 2007/01/10 20:13:14 miguelfreitas Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -1783,11 +1783,23 @@ xine_video_port_t *_x_vo_new_port (xine_t *xine, vo_driver_t *driver, int grabon this->frame_drop_limit = 3; this->frame_drop_cpt = 0; - num_frame_buffers = driver->get_property (driver, VO_PROP_MAX_NUM_FRAMES); - - if (!num_frame_buffers) - num_frame_buffers = NUM_FRAME_BUFFERS; /* default */ - else if (num_frame_buffers<5) + /* default number of video frames from config */ + num_frame_buffers = xine->config->register_num (xine->config, + "engine.buffers.video_num_frames", + NUM_FRAME_BUFFERS, /* default */ + _("default number of video frames"), + _("The default number of video frames to request " + "from xine video out driver. Some drivers will " + "override this setting with their own values."), + 20, NULL, NULL); + + /* check driver's limit and use the smaller value */ + i = driver->get_property (driver, VO_PROP_MAX_NUM_FRAMES); + if (i && i < num_frame_buffers) + num_frame_buffers = i; + + /* we need at least 5 frames */ + if (num_frame_buffers<5) num_frame_buffers = 5; this->extra_info_base = calloc (num_frame_buffers, -- cgit v1.2.3 From 793816cfd30d99a2aacc914cd71922c17cad1d37 Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Sun, 14 Jan 2007 16:53:37 +0000 Subject: Added BUF_VIDEO_VP6F (Flash VP6). The only difference with the standard VP6 codec is that the image is not flipped upside-down. CVS patchset: 8507 CVS date: 2007/01/14 16:53:37 --- src/xine-engine/buffer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 22e1a7a04..64fe52a20 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.h,v 1.161 2006/12/26 03:18:56 dgp85 Exp $ + * $Id: buffer.h,v 1.162 2007/01/14 16:53:37 klan Exp $ * * * contents: @@ -190,6 +190,7 @@ extern "C" { #define BUF_VIDEO_KMVC 0x02600000 #define BUF_VIDEO_FLASHSV 0x02610000 #define BUF_VIDEO_CAVS 0x02620000 +#define BUF_VIDEO_VP6F 0x02630000 /* audio buffer types: (please keep in sync with buffer_types.c) */ -- cgit v1.2.3 From 22bb23b9d3ed75affddc3d9277c54adb4b01ff22 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Tue, 16 Jan 2007 16:00:26 +0000 Subject: avoid division by zero. still need to investigate the cause, might be due to pause when using net_buf_ctrl CVS patchset: 8513 CVS date: 2007/01/16 16:00:26 --- src/xine-engine/video_out.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 446ba0a45..f6788d6b2 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.226 2007/01/10 20:13:14 miguelfreitas Exp $ + * $Id: video_out.c,v 1.227 2007/01/16 16:00:26 miguelfreitas Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -1195,7 +1195,7 @@ static void *video_out_loop (void *this_gen) { if (this->clock->speed == XINE_SPEED_PAUSE) paused_loop (this, vpts); - if (next_frame_vpts) { + if (next_frame_vpts && this->clock->speed > 0) { usec_to_sleep = (next_frame_vpts - vpts) * 100 * XINE_FINE_SPEED_NORMAL / (9 * this->clock->speed); } else { /* we don't know when the next frame is due, only wait a little */ -- cgit v1.2.3 From ab3e2144196d0881e7984d053e6a01cc2bf65392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 18 Jan 2007 23:28:46 +0000 Subject: Make _x_demux_check_extension() accept constant strings. CVS patchset: 8520 CVS date: 2007/01/18 23:28:46 --- src/xine-engine/demux.c | 4 ++-- src/xine-engine/xine_internal.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index 2178ccb71..d1bd2bc1d 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -20,7 +20,7 @@ * Demuxer helper functions * hide some xine engine details from demuxers and reduce code duplication * - * $Id: demux.c,v 1.65 2006/12/03 19:23:16 miguelfreitas Exp $ + * $Id: demux.c,v 1.66 2007/01/18 23:28:46 dgp85 Exp $ */ @@ -448,7 +448,7 @@ int _x_demux_read_header( input_plugin_t *input, unsigned char *buffer, off_t si return read_size; } -int _x_demux_check_extension (char *mrl, char *extensions){ +int _x_demux_check_extension (const char *mrl, const char *extensions){ char *last_dot, *e, *ext_copy, *ext_work; ext_copy = strdup(extensions); diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index e25339c46..30899a4b3 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_internal.h,v 1.180 2006/12/13 18:30:30 dsalt Exp $ + * $Id: xine_internal.h,v 1.181 2007/01/18 23:28:46 dgp85 Exp $ * */ @@ -416,7 +416,7 @@ void _x_demux_control_end (xine_stream_t *stream, uint32_t flags) XINE_ int _x_demux_start_thread (xine_stream_t *stream) XINE_PROTECTED; int _x_demux_stop_thread (xine_stream_t *stream) XINE_PROTECTED; int _x_demux_read_header (input_plugin_t *input, unsigned char *buffer, off_t size) XINE_PROTECTED; -int _x_demux_check_extension (char *mrl, char *extensions) XINE_PROTECTED; +int _x_demux_check_extension (const char *mrl, const char *extensions) XINE_PROTECTED; off_t _x_read_abort (xine_stream_t *stream, int fd, char *buf, off_t todo) XINE_PROTECTED; -- cgit v1.2.3 From bfc1b44063ed6cfbc97da722803d6da90de0cf53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 18 Jan 2007 23:30:18 +0000 Subject: Handle strings coming from plugins as constants. CVS patchset: 8521 CVS date: 2007/01/18 23:30:18 --- src/xine-engine/load_plugins.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 62f4705fa..25325aae1 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.228 2006/11/23 21:05:31 klan Exp $ + * $Id: load_plugins.c,v 1.229 2007/01/18 23:30:18 dgp85 Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -2375,14 +2375,14 @@ char *xine_get_file_extensions (xine_t *self) { list_size = xine_sarray_size (catalog->plugin_lists[PLUGIN_DEMUX - 1]); for (list_id = 0; list_id < list_size; list_id++) { demux_class_t *cls; - char *exts; + const char *exts; node = xine_sarray_get (catalog->plugin_lists[PLUGIN_DEMUX - 1], list_id); if (node->plugin_class || _load_plugin_class(self, node, NULL)) { cls = (demux_class_t *)node->plugin_class; - if((exts = cls->get_extensions(cls)) && strlen(exts)) + if((exts = cls->get_extensions(cls)) && *exts) len += strlen(exts) + 1; } } @@ -2394,7 +2394,7 @@ char *xine_get_file_extensions (xine_t *self) { list_size = xine_sarray_size (catalog->plugin_lists[PLUGIN_DEMUX - 1]); for (list_id = 0; list_id < list_size; list_id++) { demux_class_t *cls; - char *e; + const char *e; int l; node = xine_sarray_get (catalog->plugin_lists[PLUGIN_DEMUX - 1], list_id); @@ -2402,7 +2402,7 @@ char *xine_get_file_extensions (xine_t *self) { cls = (demux_class_t *)node->plugin_class; - if((e = cls->get_extensions (cls)) && strlen(e)) { + if((e = cls->get_extensions (cls)) && *e) { l = strlen(e); memcpy (&str[pos], e, l); @@ -2444,7 +2444,7 @@ char *xine_get_mime_types (xine_t *self) { for (list_id = 0; list_id < list_size; list_id++) { demux_class_t *cls; - char *s; + const char *s; node = xine_sarray_get (catalog->plugin_lists[PLUGIN_DEMUX - 1], list_id); if (node->plugin_class || _load_plugin_class(self, node, NULL)) { @@ -2466,7 +2466,7 @@ char *xine_get_mime_types (xine_t *self) { for (list_id = 0; list_id < list_size; list_id++) { demux_class_t *cls; - char *s; + const char *s; int l; node = xine_sarray_get (catalog->plugin_lists[PLUGIN_DEMUX - 1], list_id); @@ -2503,6 +2503,7 @@ char *xine_get_demux_for_mime_type (xine_t *self, const char *mime_type) { char *id = NULL; char *mime_arg, *mime_demux; char *s; + const char *mt; int list_id, list_size; /* create a copy and convert to lower case */ @@ -2522,9 +2523,9 @@ char *xine_get_demux_for_mime_type (xine_t *self, const char *mime_type) { cls = (demux_class_t *)node->plugin_class; - s = cls->get_mimetypes (cls); - if (s) { - mime_demux = strdup(s); + mt = cls->get_mimetypes (cls); + if (mt) { + mime_demux = strdup(mt); for(s=mime_demux; *s; s++) *s = tolower(*s); -- cgit v1.2.3 From 703ba00e157e08035262393e8af9bb4b4d979c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 00:12:22 +0000 Subject: Fix constant on ordered attribute. CVS patchset: 8522 CVS date: 2007/01/19 00:12:22 --- src/xine-engine/scratch.c | 4 ++-- src/xine-engine/scratch.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/scratch.c b/src/xine-engine/scratch.c index d750a8a07..67281b041 100644 --- a/src/xine-engine/scratch.c +++ b/src/xine-engine/scratch.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: scratch.c,v 1.23 2006/12/13 18:30:30 dsalt Exp $ + * $Id: scratch.c,v 1.24 2007/01/19 00:12:22 dgp85 Exp $ * * top-level xine functions * @@ -67,7 +67,7 @@ static void __attribute__((__format__(__printf__, 2, 0))) pthread_mutex_unlock (&this->lock); } -static const char **scratch_get_content (scratch_buffer_t *this) { +static char **scratch_get_content (scratch_buffer_t *this) { int i, j; pthread_mutex_lock (&this->lock); diff --git a/src/xine-engine/scratch.h b/src/xine-engine/scratch.h index 719a9f8d9..bcfe815c3 100644 --- a/src/xine-engine/scratch.h +++ b/src/xine-engine/scratch.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: scratch.h,v 1.12 2006/12/13 18:30:30 dsalt Exp $ + * $Id: scratch.h,v 1.13 2007/01/19 00:12:22 dgp85 Exp $ * * scratch buffer for log output * @@ -41,12 +41,12 @@ struct scratch_buffer_s { #endif (*scratch_printf) (scratch_buffer_t *this, const char *format, va_list ap); - const char **(*get_content) (scratch_buffer_t *this); + char **(*get_content) (scratch_buffer_t *this); void (*dispose) (scratch_buffer_t *this); char **lines; - const char **ordered; + char **ordered; int num_lines; int cur; -- cgit v1.2.3 From 17d470f75b57265107c7f164334dbc53489124cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 01:05:24 +0000 Subject: Make get_mrl return a const char * too. CVS patchset: 8524 CVS date: 2007/01/19 01:05:24 --- src/xine-engine/input_cache.c | 4 ++-- src/xine-engine/input_rip.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/input_cache.c b/src/xine-engine/input_cache.c index 33b8b47da..be5b005ec 100644 --- a/src/xine-engine/input_cache.c +++ b/src/xine-engine/input_cache.c @@ -22,7 +22,7 @@ * The goal of this input plugin is to reduce * the number of calls to the real input plugin. * - * $Id: input_cache.c,v 1.12 2006/09/08 06:20:37 tmattern Exp $ + * $Id: input_cache.c,v 1.13 2007/01/19 01:05:25 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -304,7 +304,7 @@ static uint32_t cache_plugin_get_blocksize(input_plugin_t *this_gen) { return this->main_input_plugin->get_blocksize(this->main_input_plugin); } -static char* cache_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* cache_plugin_get_mrl (input_plugin_t *this_gen) { cache_input_plugin_t *this = (cache_input_plugin_t *)this_gen; return this->main_input_plugin->get_mrl(this->main_input_plugin); diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c index bdcc1ce50..d7a0c46ca 100644 --- a/src/xine-engine/input_rip.c +++ b/src/xine-engine/input_rip.c @@ -29,7 +29,7 @@ * - it's possible speeder saving streams in the xine without playing: * xine stream_mrl#save:file.raw\;noaudio\;novideo * - * $Id: input_rip.c,v 1.32 2007/01/07 20:26:23 klan Exp $ + * $Id: input_rip.c,v 1.33 2007/01/19 01:05:25 dgp85 Exp $ */ /* TODO: @@ -479,7 +479,7 @@ static uint32_t rip_plugin_get_blocksize(input_plugin_t *this_gen) { return this->main_input_plugin->get_blocksize(this->main_input_plugin); } -static char* rip_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* rip_plugin_get_mrl (input_plugin_t *this_gen) { rip_input_plugin_t *this = (rip_input_plugin_t *)this_gen; return this->main_input_plugin->get_mrl(this->main_input_plugin); -- cgit v1.2.3 From 1fd15c0a4b22302656d29123c07ba23d811235f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 01:16:46 +0000 Subject: Fix possible strict aliasing breakage. CVS patchset: 8526 CVS date: 2007/01/19 01:16:46 --- src/xine-engine/broadcaster.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/broadcaster.c b/src/xine-engine/broadcaster.c index edf52e474..fab99cf55 100644 --- a/src/xine-engine/broadcaster.c +++ b/src/xine-engine/broadcaster.c @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: broadcaster.c,v 1.12 2006/06/20 00:18:44 dgp85 Exp $ + * $Id: broadcaster.c,v 1.13 2007/01/19 01:16:46 dgp85 Exp $ * * broadcaster.c - xine network broadcaster * @@ -305,7 +305,10 @@ static void audio_put_cb (fifo_buffer_t *fifo, buf_element_t *buf, void *this_ge broadcaster_t *_x_init_broadcaster(xine_stream_t *stream, int port) { broadcaster_t *this; - struct sockaddr_in servAddr; + union { + struct sockaddr_in in; + struct sockaddr sa; + } servAddr; int msock, err; msock = socket(PF_INET, SOCK_STREAM, 0); @@ -314,11 +317,11 @@ broadcaster_t *_x_init_broadcaster(xine_stream_t *stream, int port) xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "broadcaster: error opening master socket.\n"); return NULL; } - servAddr.sin_family = AF_INET; - servAddr.sin_addr.s_addr = htonl(INADDR_ANY); - servAddr.sin_port = htons(port); + servAddr.in.sin_family = AF_INET; + servAddr.in.sin_addr.s_addr = htonl(INADDR_ANY); + servAddr.in.sin_port = htons(port); - if(bind(msock, (struct sockaddr *) &servAddr, sizeof(servAddr))<0) + if(bind(msock, &servAddr.sa, sizeof(servAddr))<0) { xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "broadcaster: error binding to port %d\n", port); return NULL; -- cgit v1.2.3 From 7f9137760dac9a965b11c63ee677e7f49b2a588b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 01:21:25 +0000 Subject: Extra safety, although it should be good anyway. CVS patchset: 8527 CVS date: 2007/01/19 01:21:25 --- src/xine-engine/broadcaster.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/broadcaster.c b/src/xine-engine/broadcaster.c index fab99cf55..fc70df7b1 100644 --- a/src/xine-engine/broadcaster.c +++ b/src/xine-engine/broadcaster.c @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: broadcaster.c,v 1.13 2007/01/19 01:16:46 dgp85 Exp $ + * $Id: broadcaster.c,v 1.14 2007/01/19 01:21:25 dgp85 Exp $ * * broadcaster.c - xine network broadcaster * @@ -321,7 +321,7 @@ broadcaster_t *_x_init_broadcaster(xine_stream_t *stream, int port) servAddr.in.sin_addr.s_addr = htonl(INADDR_ANY); servAddr.in.sin_port = htons(port); - if(bind(msock, &servAddr.sa, sizeof(servAddr))<0) + if(bind(msock, &servAddr.sa, sizeof(servAddr.sa))<0) { xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "broadcaster: error binding to port %d\n", port); return NULL; -- cgit v1.2.3 From 91a936809d488528b7cf8a6c35c0c3494a3d5687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 01:23:06 +0000 Subject: Err no it was the other way around. CVS patchset: 8528 CVS date: 2007/01/19 01:23:06 --- src/xine-engine/broadcaster.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/broadcaster.c b/src/xine-engine/broadcaster.c index fc70df7b1..3beacb226 100644 --- a/src/xine-engine/broadcaster.c +++ b/src/xine-engine/broadcaster.c @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: broadcaster.c,v 1.14 2007/01/19 01:21:25 dgp85 Exp $ + * $Id: broadcaster.c,v 1.15 2007/01/19 01:23:06 dgp85 Exp $ * * broadcaster.c - xine network broadcaster * @@ -321,7 +321,7 @@ broadcaster_t *_x_init_broadcaster(xine_stream_t *stream, int port) servAddr.in.sin_addr.s_addr = htonl(INADDR_ANY); servAddr.in.sin_port = htons(port); - if(bind(msock, &servAddr.sa, sizeof(servAddr.sa))<0) + if(bind(msock, &servAddr.sa, sizeof(servAddr.in))<0) { xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "broadcaster: error binding to port %d\n", port); return NULL; -- cgit v1.2.3 From a0044b6bea994ea4f32ad049bd5fcccc5216e2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 02:32:00 +0000 Subject: Make supported_types a pointer to constant. CVS patchset: 8531 CVS date: 2007/01/19 02:32:00 --- src/xine-engine/xine_plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine_plugin.h b/src/xine-engine/xine_plugin.h index f55c5be63..1a6ebe04e 100644 --- a/src/xine-engine/xine_plugin.h +++ b/src/xine-engine/xine_plugin.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_plugin.h,v 1.21 2006/09/26 05:19:49 dgp85 Exp $ + * $Id: xine_plugin.h,v 1.22 2007/01/19 02:32:00 dgp85 Exp $ * * generic plugin definitions * @@ -73,7 +73,7 @@ typedef struct { /* special_info for a decoder plugin */ typedef struct { - uint32_t *supported_types; /* streamtypes this decoder can handle */ + const uint32_t *supported_types; /* streamtypes this decoder can handle */ int priority; } decoder_info_t; -- cgit v1.2.3 From 84ef7559e5b19931e0c61209c1c0d7b4035a438d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 02:49:31 +0000 Subject: Revert, and remember to flush cache. CVS patchset: 8534 CVS date: 2007/01/19 02:49:31 --- src/xine-engine/xine_plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine_plugin.h b/src/xine-engine/xine_plugin.h index 1a6ebe04e..4ddb65eda 100644 --- a/src/xine-engine/xine_plugin.h +++ b/src/xine-engine/xine_plugin.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_plugin.h,v 1.22 2007/01/19 02:32:00 dgp85 Exp $ + * $Id: xine_plugin.h,v 1.23 2007/01/19 02:49:31 dgp85 Exp $ * * generic plugin definitions * @@ -73,7 +73,7 @@ typedef struct { /* special_info for a decoder plugin */ typedef struct { - const uint32_t *supported_types; /* streamtypes this decoder can handle */ + uint32_t *supported_types; /* streamtypes this decoder can handle */ int priority; } decoder_info_t; -- cgit v1.2.3 From 46a9c8c8821582ded1157d8a221638327f0bbaf8 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 3 Feb 2007 16:31:55 +0000 Subject: A few const-correctness fixes. CVS patchset: 8587 CVS date: 2007/02/03 16:31:55 --- src/xine-engine/alphablend.c | 2 +- src/xine-engine/xine_interface.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/alphablend.c b/src/xine-engine/alphablend.c index a0ff6ccf3..9947da365 100644 --- a/src/xine-engine/alphablend.c +++ b/src/xine-engine/alphablend.c @@ -66,7 +66,7 @@ static void mem_blend24(uint8_t *mem, uint8_t r, uint8_t g, uint8_t b, } } -static void mem_blend32(uint8_t *mem, uint8_t *src, uint8_t o, int len) { +static void mem_blend32(uint8_t *mem, const uint8_t *src, uint8_t o, int len) { uint8_t *limit = mem + len*4; while (mem < limit) { *mem = BLEND_BYTE(*mem, src[0], o); diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 7e7527de7..afbd15051 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_interface.c,v 1.100 2006/12/19 19:10:52 dsalt Exp $ + * $Id: xine_interface.c,v 1.101 2007/02/03 16:31:55 dsalt Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -929,7 +929,7 @@ int _x_message(xine_stream_t *stream, int type, ...) { va_list ap; char *s, *params; char *args[1025]; - static char *std_explanation[] = { + static const char *std_explanation[] = { "", N_("Warning:"), N_("Unknown host:"), -- cgit v1.2.3 From 7cb91f8dcbe3b01bfd3516b76ff62de3396f5e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 19 Feb 2007 23:20:19 +0000 Subject: Fix warning about incompatible pointer type. CVS patchset: 8600 CVS date: 2007/02/19 23:20:19 --- src/xine-engine/xine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index f5583a52f..600169121 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.340 2006/12/22 16:38:15 klan Exp $ + * $Id: xine.c,v 1.341 2007/02/19 23:20:19 dgp85 Exp $ */ /* @@ -2003,7 +2003,7 @@ void xine_vlog(xine_t *this, int buf, const char *format, this->log_buffers[buf]->scratch_printf(this->log_buffers[buf], format, args); } -const char *const *xine_get_log (xine_t *this, int buf) { +char *const *xine_get_log (xine_t *this, int buf) { if(buf >= XINE_LOG_NUM) return NULL; -- cgit v1.2.3 From 8173333f753f6dbaeffc21fd9425825ab2b659fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 19 Feb 2007 23:33:33 +0000 Subject: Fix building with LOG enabled. CVS patchset: 8602 CVS date: 2007/02/19 23:33:33 --- src/xine-engine/load_plugins.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 25325aae1..d35eba736 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.229 2007/01/18 23:30:18 dgp85 Exp $ + * $Id: load_plugins.c,v 1.230 2007/02/19 23:33:33 dgp85 Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -1989,18 +1989,19 @@ int _x_decoder_available (xine_t *xine, uint32_t buftype) return 0; } - #ifdef LOG static void _display_file_plugin_list (xine_list_t *list, plugin_file_t *file) { - plugin_node_t *node; + xine_list_iterator_t ite = xine_list_front(list); + + while (ite) { + plugin_node_t *node = xine_list_get_value(list, ite); - node = xine_list_first_content(list); - while (node) { if ((node->file == file) && (node->ref)) { printf(" plugin: %s, class: %p , %d instance(s)\n", node->info->id, node->plugin_class, node->ref); } - node = xine_list_next_content(list); + + ite = xine_list_next(list, ite); } } #endif -- cgit v1.2.3 From 828ab12ab770b1258bc89086f3337b497f9268fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 19 Feb 2007 23:53:40 +0000 Subject: Make the enum functions accept the strict parameter, const char* array rather than char* array. CVS patchset: 8605 CVS date: 2007/02/19 23:53:40 --- src/xine-engine/configfile.c | 4 ++-- src/xine-engine/configfile.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index 5d552f8f1..3a523c936 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.c,v 1.82 2006/12/19 19:10:52 dsalt Exp $ + * $Id: configfile.c,v 1.83 2007/02/19 23:53:40 dgp85 Exp $ * * config object (was: file) management - implementation * @@ -717,7 +717,7 @@ static int config_parse_enum (const char *str, char **values) { static int config_register_enum (config_values_t *this, const char *key, int def_value, - char **values, + const char **values, const char *description, const char *help, int exp_level, diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h index 29413610c..9dd368d5a 100644 --- a/src/xine-engine/configfile.h +++ b/src/xine-engine/configfile.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.h,v 1.39 2006/12/19 19:10:52 dsalt Exp $ + * $Id: configfile.h,v 1.40 2007/02/19 23:53:40 dgp85 Exp $ * * config file management * @@ -131,7 +131,7 @@ struct config_values_s { int (*register_enum) (config_values_t *self, const char *key, int def_value, - char **values, + const char **values, const char *description, const char *help, int exp_level, -- cgit v1.2.3 From 2802ec520af5d4ef87d2030789f7df7a2a0da0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Feb 2007 00:01:19 +0000 Subject: Reduce warnings to one, that seems to be caused by GCC counting compatibility wrong. CVS patchset: 8606 CVS date: 2007/02/20 00:01:19 --- src/xine-engine/configfile.c | 9 +++++---- src/xine-engine/configfile.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index 3a523c936..cdbcae4fb 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.c,v 1.83 2007/02/19 23:53:40 dgp85 Exp $ + * $Id: configfile.c,v 1.84 2007/02/20 00:01:19 dgp85 Exp $ * * config object (was: file) management - implementation * @@ -689,9 +689,9 @@ static int config_register_range (config_values_t *this, return entry->num_value; } -static int config_parse_enum (const char *str, char **values) { +static int config_parse_enum (const char *str, const char **values) { - char **value; + const char **value; int i; @@ -725,7 +725,8 @@ static int config_register_enum (config_values_t *this, void *cb_data) { cfg_entry_t *entry; - char **value_src, **value_dest; + const char **value_src; + char **value_dest; int value_count; diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h index 9dd368d5a..3fb1124b4 100644 --- a/src/xine-engine/configfile.h +++ b/src/xine-engine/configfile.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.h,v 1.40 2007/02/19 23:53:40 dgp85 Exp $ + * $Id: configfile.h,v 1.41 2007/02/20 00:01:19 dgp85 Exp $ * * config file management * @@ -163,7 +163,7 @@ struct config_values_s { void (*update_string) (config_values_t *self, const char *key, const char *value); /* small utility function for enum handling */ - int (*parse_enum) (const char *str, char **values); + int (*parse_enum) (const char *str, const char **values); /* * lookup config entries -- cgit v1.2.3 From 780908b7567d712ebd866081760b91abcb03017c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Feb 2007 00:34:55 +0000 Subject: Fix a lot of format warnings in lprintf calls (mostly %ldd -> %"PRId64"). CVS patchset: 8608 CVS date: 2007/02/20 00:34:55 --- src/xine-engine/audio_decoder.c | 4 ++-- src/xine-engine/input_cache.c | 8 +++---- src/xine-engine/input_rip.c | 50 ++++++++++++++++++++--------------------- src/xine-engine/metronom.c | 6 ++--- src/xine-engine/osd.c | 4 ++-- src/xine-engine/video_decoder.c | 4 ++-- 6 files changed, 38 insertions(+), 38 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index d504d9511..549c19b02 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.138 2006/09/08 21:11:29 miguelfreitas Exp $ + * $Id: audio_decoder.c,v 1.139 2007/02/20 00:34:57 dgp85 Exp $ * * * functions that implement audio decoding @@ -67,7 +67,7 @@ static void *audio_decoder_loop (void *stream_gen) { if( !replaying_headers ) buf = stream->audio_fifo->get (stream->audio_fifo); - lprintf ("audio_loop: got package pts = %lld, type = %08x\n", buf->pts, buf->type); + lprintf ("audio_loop: got package pts = %"PRId64", type = %08x\n", buf->pts, buf->type); _x_extra_info_merge( stream->audio_decoder_extra_info, buf->extra_info ); stream->audio_decoder_extra_info->seek_count = stream->video_seek_count; diff --git a/src/xine-engine/input_cache.c b/src/xine-engine/input_cache.c index be5b005ec..a566e1f84 100644 --- a/src/xine-engine/input_cache.c +++ b/src/xine-engine/input_cache.c @@ -22,7 +22,7 @@ * The goal of this input plugin is to reduce * the number of calls to the real input plugin. * - * $Id: input_cache.c,v 1.13 2007/01/19 01:05:25 dgp85 Exp $ + * $Id: input_cache.c,v 1.14 2007/02/20 00:34:57 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -67,7 +67,7 @@ static off_t cache_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { off_t read_len = 0; off_t main_read; - lprintf("cache_plugin_read: len=%lld\n", len); + lprintf("cache_plugin_read: len=%"PRId64"\n", len); this->read_call++; /* optimized for common cases */ @@ -205,7 +205,7 @@ static off_t cache_plugin_seek(input_plugin_t *this_gen, off_t offset, int origi off_t rel_offset; off_t new_buf_pos; - lprintf("offset: %lld, origin: %d\n", offset, origin); + lprintf("offset: %"PRId64", origin: %d\n", offset, origin); this->seek_call++; if( !this->buf_len ) { @@ -236,7 +236,7 @@ static off_t cache_plugin_seek(input_plugin_t *this_gen, off_t offset, int origi } new_buf_pos = (off_t)this->buf_pos + rel_offset; - lprintf("buf_len: %d, rel_offset=%lld, new_buf_pos=%lld\n", + lprintf("buf_len: %d, rel_offset=%"PRId64", new_buf_pos=%"PRId64"\n", this->buf_len, rel_offset, new_buf_pos); if ((new_buf_pos < 0) || (new_buf_pos >= this->buf_len)) { diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c index d7a0c46ca..d8715fb85 100644 --- a/src/xine-engine/input_rip.c +++ b/src/xine-engine/input_rip.c @@ -29,7 +29,7 @@ * - it's possible speeder saving streams in the xine without playing: * xine stream_mrl#save:file.raw\;noaudio\;novideo * - * $Id: input_rip.c,v 1.33 2007/01/19 01:05:25 dgp85 Exp $ + * $Id: input_rip.c,v 1.34 2007/02/20 00:34:57 dgp85 Exp $ */ /* TODO: @@ -103,7 +103,7 @@ static off_t rip_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { rip_input_plugin_t *this = (rip_input_plugin_t *)this_gen; off_t retlen, npreview, nread, nwrite, nread_orig, nread_file; - lprintf("reading %lld bytes (curpos = %lld, savepos = %lld)\n", len, this->curpos, this->savepos); + lprintf("reading %"PRId64" bytes (curpos = %"PRId64", savepos = %"PRId64")\n", len, this->curpos, this->savepos); if (len < 0) return -1; @@ -117,7 +117,7 @@ static off_t rip_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { nread = min_off(this->savepos - this->preview_size, len - npreview); } - lprintf(" => get %lld bytes from preview (%lld bytes)\n", npreview, this->preview_size); + lprintf(" => get %"PRId64" bytes from preview (%"PRId64" bytes)\n", npreview, this->preview_size); memcpy(buf, &this->preview[this->curpos], npreview); } else { @@ -134,7 +134,7 @@ static off_t rip_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { /* re-reading from file */ if (nread_file) { - lprintf(" => read %lld bytes from file\n", nread_file); + lprintf(" => read %"PRId64" bytes from file\n", nread_file); if (fread(&buf[npreview], nread_file, 1, this->file) != 1) { xine_log(this->stream->xine, XINE_LOG_MSG, _("input_rip: reading of saved data failed: %s\n"), strerror(errno)); return -1; @@ -143,11 +143,11 @@ static off_t rip_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { /* really to read/catch */ if (nread_orig + nwrite) { - lprintf(" => read %lld bytes from input plugin\n", nread_orig + nwrite); + lprintf(" => read %"PRId64" bytes from input plugin\n", nread_orig + nwrite); /* read from main input plugin */ retlen = this->main_input_plugin->read(this->main_input_plugin, &buf[npreview + nread_file], nread_orig + nwrite); - lprintf("%s => returned %lld" CLR_RST "\n", retlen == nread_orig + nwrite ? "" : CLR_FAIL, retlen); + lprintf("%s => returned %"PRId64"" CLR_RST "\n", retlen == nread_orig + nwrite ? "" : CLR_FAIL, retlen); if (retlen < 0) { xine_log(this->stream->xine, XINE_LOG_MSG, @@ -163,7 +163,7 @@ static off_t rip_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { return -1; } this->savepos += nwrite; - lprintf(" => saved %lld bytes\n", nwrite); + lprintf(" => saved %"PRId64" bytes\n", nwrite); } else nwrite = 0; } @@ -212,7 +212,7 @@ static buf_element_t *rip_plugin_read_block(input_plugin_t *this_gen, fifo_buffe buf_element_t *buf = NULL; off_t retlen, npreview, nread, nwrite, nread_orig, nread_file; - lprintf("reading %lld bytes (curpos = %lld, savepos = %lld) (block)\n", todo, this->curpos, this->savepos); + lprintf("reading %"PRId64" bytes (curpos = %"PRId64", savepos = %"PRId64") (block)\n", todo, this->curpos, this->savepos); if (todo <= 0) return NULL; @@ -226,7 +226,7 @@ static buf_element_t *rip_plugin_read_block(input_plugin_t *this_gen, fifo_buffe nread = min_off(this->savepos - this->preview_size, todo - npreview); } - lprintf(" => get %lld bytes from preview (%lld bytes) (block)\n", npreview, this->preview_size); + lprintf(" => get %"PRId64" bytes from preview (%"PRId64" bytes) (block)\n", npreview, this->preview_size); } else { npreview = 0; nread = min_off(this->savepos - this->curpos, todo); @@ -247,13 +247,13 @@ static buf_element_t *rip_plugin_read_block(input_plugin_t *this_gen, fifo_buffe /* get data from preview */ if (npreview) { - lprintf(" => get %lld bytes from the preview (block)\n", npreview); + lprintf(" => get %"PRId64" bytes from the preview (block)\n", npreview); memcpy(buf->content, &this->preview[this->curpos], npreview); } /* re-reading from the file */ if (nread_file) { - lprintf(" => read %lld bytes from the file (block)\n", nread_file); + lprintf(" => read %"PRId64" bytes from the file (block)\n", nread_file); if (fread(&buf->content[npreview], nread_file, 1, this->file) != 1) { xine_log(this->stream->xine, XINE_LOG_MSG, _("input_rip: reading of saved data failed: %s\n"), @@ -267,10 +267,10 @@ static buf_element_t *rip_plugin_read_block(input_plugin_t *this_gen, fifo_buffe if (nread_orig + nwrite) { /* read from main input plugin */ if (buf) { - lprintf(" => read %lld bytes from input plugin (block)\n", nread_orig + nwrite); + lprintf(" => read %"PRId64" bytes from input plugin (block)\n", nread_orig + nwrite); retlen = this->main_input_plugin->read(this->main_input_plugin, &buf->content[npreview + nread_file], nread_orig + nwrite); } else { - lprintf(" => read block of %lld bytes from input plugin (block)\n", nread_orig + nwrite); + lprintf(" => read block of %"PRId64" bytes from input plugin (block)\n", nread_orig + nwrite); buf = this->main_input_plugin->read_block(this->main_input_plugin, fifo, nread_orig + nwrite); if (buf) retlen = buf->size; else { @@ -279,7 +279,7 @@ static buf_element_t *rip_plugin_read_block(input_plugin_t *this_gen, fifo_buffe } } if (retlen != nread_orig + nwrite) { - lprintf(CLR_FAIL " => returned %lld" CLR_RST "\n", retlen); + lprintf(CLR_FAIL " => returned %"PRId64"" CLR_RST "\n", retlen); return NULL; } @@ -293,7 +293,7 @@ static buf_element_t *rip_plugin_read_block(input_plugin_t *this_gen, fifo_buffe return NULL; } this->savepos += nwrite; - lprintf(" => saved %lld bytes\n", nwrite); + lprintf(" => saved %"PRId64" bytes\n", nwrite); } else nwrite = 0; } @@ -307,7 +307,7 @@ static buf_element_t *rip_plugin_read_block(input_plugin_t *this_gen, fifo_buffe static off_t rip_seek_original(rip_input_plugin_t *this, off_t reqpos) { off_t pos; - lprintf(" => seeking original input plugin to %lld\n", reqpos); + lprintf(" => seeking original input plugin to %"PRId64"\n", reqpos); pos = this->main_input_plugin->seek(this->main_input_plugin, reqpos, SEEK_SET); if (pos == -1) { @@ -316,7 +316,7 @@ static off_t rip_seek_original(rip_input_plugin_t *this, off_t reqpos) { } #ifdef LOG if (pos != reqpos) { - lprintf(CLR_FAIL " => reqested position %lld differs from result position %lld" CLR_RST "\n", reqpos, pos); + lprintf(CLR_FAIL " => reqested position %"PRId64" differs from result position %"PRId64"" CLR_RST "\n", reqpos, pos); } #endif @@ -339,7 +339,7 @@ static off_t rip_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin) struct timeval time1, time2; double interval = 0; - lprintf("seek, offset %lld, origin %d (curpos %lld, savepos %lld)\n", offset, origin, this->curpos, this->savepos); + lprintf("seek, offset %"PRId64", origin %d (curpos %"PRId64", savepos %"PRId64")\n", offset, origin, this->curpos, this->savepos); switch (origin) { case SEEK_SET: newpos = offset; break; @@ -355,7 +355,7 @@ static off_t rip_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin) blocksize = 0; if (newpos < this->savepos) { - lprintf(" => virtual seeking from %lld to %lld\n", this->curpos, newpos); + lprintf(" => virtual seeking from %"PRId64" to %"PRId64"\n", this->curpos, newpos); /* don't seek into preview area */ if (this->preview && newpos < this->preview_size) { @@ -366,7 +366,7 @@ static off_t rip_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin) if (this->regular) { if (reqpos != this->savepos) { - lprintf(" => seeking file to %lld\n", reqpos); + lprintf(" => seeking file to %"PRId64"\n", reqpos); if (fseeko(this->file, reqpos, SEEK_SET) != 0) { xine_log(this->stream->xine, XINE_LOG_MSG, _("input_rip: seeking failed: %s\n"), strerror(errno)); return -1; @@ -382,9 +382,9 @@ static off_t rip_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin) } if (this->curpos < this->savepos) { - lprintf(" => seeking to end: %lld\n", this->savepos); + lprintf(" => seeking to end: %"PRId64"\n", this->savepos); if (this->regular) { - lprintf(" => seeking file to end: %lld\n", this->savepos); + lprintf(" => seeking file to end: %"PRId64"\n", this->savepos); if (fseeko(this->file, this->savepos, SEEK_SET) != 0) { xine_log(this->stream->xine, XINE_LOG_MSG, _("input_rip: seeking failed: %s\n"), strerror(errno)); return -1; @@ -425,7 +425,7 @@ static off_t rip_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin) + (double)(time2.tv_usec - time1.tv_usec) / 1000000; } - lprintf(" => new position %lld\n", this->curpos); + lprintf(" => new position %"PRId64"\n", this->curpos); return this->curpos; } @@ -449,7 +449,7 @@ static off_t rip_plugin_get_current_pos(input_plugin_t *this_gen) { pos = this->main_input_plugin->get_current_pos(this->main_input_plugin); if (pos != this->curpos) { - lprintf(CLR_FAIL "position: computed = %lld, input plugin = %lld" CLR_RST "\n", this->curpos, pos); + lprintf(CLR_FAIL "position: computed = %"PRId64", input plugin = %"PRId64"" CLR_RST "\n", this->curpos, pos); } #endif @@ -660,7 +660,7 @@ input_plugin_t *_x_rip_plugin_get_instance (xine_stream_t *stream, const char *f free(this); return NULL; } - lprintf(" => saved %lld bytes (preview)\n", this->preview_size); + lprintf(" => saved %"PRId64" bytes (preview)\n", this->preview_size); this->savepos = this->preview_size; } diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index 809204af9..fa33da9e1 100644 --- a/src/xine-engine/metronom.c +++ b/src/xine-engine/metronom.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: metronom.c,v 1.143 2006/01/27 22:35:07 dsalt Exp $ + * $Id: metronom.c,v 1.144 2007/02/20 00:34:57 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -524,7 +524,7 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) { img->vpts = this->video_vpts + this->av_offset; if (this->video_mode == VIDEO_PREDICTION_MODE) { - lprintf("video vpts for %10lld : %10lld (duration:%d drift:%" PRId64 " step:%" PRId64 ")\n", + lprintf("video vpts for %10"PRId64" : %10"PRId64" (duration:%d drift:%" PRId64 " step:%" PRId64 ")\n", pts, this->video_vpts, img->duration, this->video_drift, this->video_drift_step ); if (this->video_drift * this->video_drift_step > 0) { @@ -681,7 +681,7 @@ static int64_t metronom_got_audio_samples (metronom_t *this, int64_t pts, this->audio_samples += nsamples; this->vpts_offset += nsamples * this->audio_drift_step / AUDIO_SAMPLE_NUM; - lprintf("audio vpts for %10lld : %10lld\n", pts, vpts); + lprintf("audio vpts for %10"PRId64" : %10"PRId64"\n", pts, vpts); pthread_mutex_unlock (&this->lock); diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 210bcf26e..229a9ad37 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -200,7 +200,7 @@ static int _osd_show (osd_object_t *osd, int64_t vpts, int unscaled ) { int x, y, required; uint8_t *c; - lprintf("osd=%p vpts=%lld\n", osd, vpts); + lprintf("osd=%p vpts=%"PRId64"\n", osd, vpts); this->stream->xine->port_ticket->acquire(this->stream->xine->port_ticket, 1); @@ -347,7 +347,7 @@ static int _osd_hide (osd_object_t *osd, int64_t vpts) { osd_renderer_t *this = osd->renderer; video_overlay_manager_t *ovl_manager; - lprintf("osd=%p vpts=%lld\n",osd, vpts); + lprintf("osd=%p vpts=%"PRId64"\n",osd, vpts); if( osd->handle < 0 ) return 0; diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 8f6b82faa..fee75ec76 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.162 2006/12/03 19:23:16 miguelfreitas Exp $ + * $Id: video_decoder.c,v 1.163 2007/02/20 00:34:58 dgp85 Exp $ * */ @@ -308,7 +308,7 @@ static void *video_decoder_loop (void *stream_gen) { break; case BUF_CONTROL_NEWPTS: - lprintf ("new pts %lld\n", buf->disc_off); + lprintf ("new pts %"PRId64"\n", buf->disc_off); if (stream->video_decoder_plugin) { running_ticket->acquire(running_ticket, 0); -- cgit v1.2.3 From 2dcf8f38edd30609269a6fd2607757fb127635de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Feb 2007 00:36:08 +0000 Subject: const++ CVS patchset: 8609 CVS date: 2007/02/20 00:36:08 --- src/xine-engine/xine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 600169121..f49a988c9 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.341 2007/02/19 23:20:19 dgp85 Exp $ + * $Id: xine.c,v 1.342 2007/02/20 00:37:02 dgp85 Exp $ */ /* @@ -1535,8 +1535,8 @@ static void config_save_cb (void *this_gen, xine_cfg_entry_t *entry) { } void xine_init (xine_t *this) { - static char *demux_strategies[] = {"default", "reverse", "content", - "extension", NULL}; + static const char *demux_strategies[] = {"default", "reverse", "content", + "extension", NULL}; /* initialize color conversion tables and functions */ init_yuv_conversion(); -- cgit v1.2.3 From 484c1150d9efa76f11e4f6fbaf953f10948cddb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Feb 2007 00:43:06 +0000 Subject: Again changes so to accept the strict case (constants). CVS patchset: 8610 CVS date: 2007/02/20 00:43:06 --- src/xine-engine/xine_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index afbd15051..0dd48081e 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_interface.c,v 1.101 2007/02/03 16:31:55 dsalt Exp $ + * $Id: xine_interface.c,v 1.102 2007/02/20 00:43:06 dgp85 Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -136,7 +136,7 @@ int xine_config_register_range (xine_t *self, int xine_config_register_enum (xine_t *self, const char *key, int def_value, - char **values, + const char **values, const char *description, const char *help, int exp_level, -- cgit v1.2.3 From 2f2f62ae7c066e01b8d14b4ffc52ac86a9871d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Feb 2007 01:02:47 +0000 Subject: Avoid casts as they are now unnecessary. CVS patchset: 8615 CVS date: 2007/02/20 01:02:47 --- src/xine-engine/post.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index 521fae9e5..739a50f0a 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: post.h,v 1.24 2006/12/25 18:43:38 dgp85 Exp $ + * $Id: post.h,v 1.25 2007/02/20 01:02:47 dgp85 Exp $ * * post plugin definitions * @@ -380,7 +380,7 @@ static xine_post_api_parameter_t temp_p[] = { #define PARAM_ITEM( param_type, var, enumv, min, max, readonly, descr ) \ { param_type, #var, sizeof(temp_s.var), \ - (char *)&temp_s.var-(char *)&temp_s, enumv, min, max, readonly, descr }, + &temp_s.var-&temp_s, enumv, min, max, readonly, descr }, #define END_PARAM_DESCR( name ) \ { POST_PARAM_TYPE_LAST, NULL, 0, 0, NULL, 0, 0, 1, NULL } \ -- cgit v1.2.3 From 1806b4fbeee52df73f7a431adc2279264c17cead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Feb 2007 01:13:08 +0000 Subject: Revert, got the wrong warning line. CVS patchset: 8617 CVS date: 2007/02/20 01:13:08 --- src/xine-engine/post.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index 739a50f0a..bcdc3c54b 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: post.h,v 1.25 2007/02/20 01:02:47 dgp85 Exp $ + * $Id: post.h,v 1.26 2007/02/20 01:13:08 dgp85 Exp $ * * post plugin definitions * @@ -380,7 +380,7 @@ static xine_post_api_parameter_t temp_p[] = { #define PARAM_ITEM( param_type, var, enumv, min, max, readonly, descr ) \ { param_type, #var, sizeof(temp_s.var), \ - &temp_s.var-&temp_s, enumv, min, max, readonly, descr }, + (char*)&temp_s.var-(char*)&temp_s, enumv, min, max, readonly, descr }, #define END_PARAM_DESCR( name ) \ { POST_PARAM_TYPE_LAST, NULL, 0, 0, NULL, 0, 0, 1, NULL } \ -- cgit v1.2.3 From d6a20a1e70a3334750e3d166461523d343a57dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 Feb 2007 15:49:16 +0000 Subject: Revert the const mark on xine_config_register_enum, as that breaks C++ frontends (like Kaffeine). Thanks to Christoph Pfister for reporting. This change introduces a few warnings of incompatible pointers internally in configfile.c. These are non-fatal (in C) and they just tell the compiler to handle more stuff as const internally without changing the function interface. CVS patchset: 8620 CVS date: 2007/02/22 15:49:16 --- src/xine-engine/configfile.c | 4 ++-- src/xine-engine/configfile.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index cdbcae4fb..28b44fd51 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.c,v 1.84 2007/02/20 00:01:19 dgp85 Exp $ + * $Id: configfile.c,v 1.85 2007/02/22 15:49:16 dgp85 Exp $ * * config object (was: file) management - implementation * @@ -717,7 +717,7 @@ static int config_parse_enum (const char *str, const char **values) { static int config_register_enum (config_values_t *this, const char *key, int def_value, - const char **values, + char **values, const char *description, const char *help, int exp_level, diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h index 3fb1124b4..859214d1c 100644 --- a/src/xine-engine/configfile.h +++ b/src/xine-engine/configfile.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.h,v 1.41 2007/02/20 00:01:19 dgp85 Exp $ + * $Id: configfile.h,v 1.42 2007/02/22 15:49:16 dgp85 Exp $ * * config file management * @@ -131,7 +131,7 @@ struct config_values_s { int (*register_enum) (config_values_t *self, const char *key, int def_value, - const char **values, + char **values, const char *description, const char *help, int exp_level, -- cgit v1.2.3 From 32a2731bd211c57df9f18f140646b03956231e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 Feb 2007 16:04:45 +0000 Subject: This one should have been with the previous commit. CVS patchset: 8621 CVS date: 2007/02/22 16:04:45 --- src/xine-engine/xine_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 0dd48081e..1861df7c0 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_interface.c,v 1.102 2007/02/20 00:43:06 dgp85 Exp $ + * $Id: xine_interface.c,v 1.103 2007/02/22 16:04:45 dgp85 Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -136,7 +136,7 @@ int xine_config_register_range (xine_t *self, int xine_config_register_enum (xine_t *self, const char *key, int def_value, - const char **values, + char **values, const char *description, const char *help, int exp_level, -- cgit v1.2.3 From 58b8867f0e7e20ae37cb8343bcb8ea912a0d1ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 3 Mar 2007 14:12:50 +0000 Subject: Free the FreeType object when freeing the OSD object, should solve a possible memory leak. CVS patchset: 8641 CVS date: 2007/03/03 14:12:50 --- src/xine-engine/osd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 229a9ad37..3d4f9dabf 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -1481,7 +1481,14 @@ static void osd_free_object (osd_object_t *osd_to_close) { while( osd ) { if ( osd == osd_to_close ) { free( osd->area ); - if( osd->ft2 ) free( osd->ft2 ); + + if( osd->ft2 ) { + if ( osd->ft2->library ) + FT_Done_FreeType(osd->ft2->library); + + free( osd->ft2 ); + } + osd_free_encoding(osd); if( last ) -- cgit v1.2.3 From 47ac04e99dbcebf8d7d1f8e7f96ee20d8fe66317 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 3 Mar 2007 22:59:37 +0000 Subject: Fix a build error, introduced in the previous commit, which bites when building without Freetype support. CVS patchset: 8642 CVS date: 2007/03/03 22:59:37 --- src/xine-engine/osd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/xine-engine') diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 3d4f9dabf..b33d81f6e 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -1482,12 +1482,14 @@ static void osd_free_object (osd_object_t *osd_to_close) { if ( osd == osd_to_close ) { free( osd->area ); +#ifdef HAVE_FT2 if( osd->ft2 ) { if ( osd->ft2->library ) FT_Done_FreeType(osd->ft2->library); free( osd->ft2 ); } +#endif osd_free_encoding(osd); -- cgit v1.2.3 From e7b7ee301659be9bf81f0f86310fb31e8a154e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 10 Mar 2007 00:57:30 +0000 Subject: When hstrerror() is found in libresolv, link it where it is used. Patch by Albert Lee. CVS patchset: 8660 CVS date: 2007/03/10 00:57:30 --- src/xine-engine/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index 2b317d2aa..97fb6a033 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -28,7 +28,7 @@ libxine_la_DEPENDENCIES = $(XINEUTILS_LIB) \ $(pthread_dep) $(LIBXINEPOSIX) libxine_la_LIBADD = $(THREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL) $(ZLIB_LIBS) \ -lm $(XINEUTILS_LIB) $(LIBICONV) $(FT2_LIBS) $(FONTCONFIG_LIBS) \ - $(LIBXINEPOSIX) $(RT_LIBS) + $(LIBXINEPOSIX) $(RT_LIBS) $(NET_LIBS) libxine_la_LDFLAGS = \ -version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) \ -- cgit v1.2.3 From 63f41055e2031631c01aee2539fa1a6027513078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 Mar 2007 17:37:17 +0000 Subject: Instead of rewriting the install and uninstall rules for headers, simply change their class to xineinclude, and set xineincludedir in Makefile.common. CVS patchset: 8737 CVS date: 2007/03/22 17:37:17 --- src/xine-engine/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index 97fb6a033..acda9424e 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -35,7 +35,7 @@ libxine_la_LDFLAGS = \ $(def_ldflags) -include_HEADERS = buffer.h metronom.h configfile.h vo_scale.h \ +xineinclude_HEADERS = buffer.h metronom.h configfile.h vo_scale.h \ audio_out.h resample.h video_out.h xine_internal.h spu_decoder.h \ video_overlay.h osd.h scratch.h xine_plugin.h xineintl.h \ plugin_catalog.h audio_decoder.h video_decoder.h post.h \ -- cgit v1.2.3 From 62b1bb0c213c37b58e5a7bb8359f41168c34f817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 Mar 2007 20:44:58 +0000 Subject: Fix crosscompile to use build and host definition from autoconf, rather than using hacksaround. Also replace the whole pthread check with an improved macro originally written for XCB, this way it's not going to try linking the fake -lpthread on Darwin, and it also does not force a -I/usr/local/include on FreeBSD. The new macro respects the same variables set by ports, so that it's even more transparent to FreeBSD users. CVS patchset: 8739 CVS date: 2007/03/22 20:44:58 --- src/xine-engine/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index acda9424e..ecd1968f2 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -26,7 +26,7 @@ EXTRA_DIST = lrb.c lrb.h accel_xvmc.h libxine_la_DEPENDENCIES = $(XINEUTILS_LIB) \ $(pthread_dep) $(LIBXINEPOSIX) -libxine_la_LIBADD = $(THREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL) $(ZLIB_LIBS) \ +libxine_la_LIBADD = $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL) $(ZLIB_LIBS) \ -lm $(XINEUTILS_LIB) $(LIBICONV) $(FT2_LIBS) $(FONTCONFIG_LIBS) \ $(LIBXINEPOSIX) $(RT_LIBS) $(NET_LIBS) -- cgit v1.2.3 From f365c4d88b2110300e6f4b050c69f4ebea935e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 25 Mar 2007 23:09:42 +0000 Subject: Fix amp muting when level is still at 100. Patch by Reinhard Nissl. CVS patchset: 8747 CVS date: 2007/03/25 23:09:42 --- src/xine-engine/audio_out.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 90a139010..a3cf4d8ea 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.208 2006/12/25 15:07:52 dgp85 Exp $ + * $Id: audio_out.c,v 1.209 2007/03/25 23:09:42 dgp85 Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe @@ -1760,13 +1760,15 @@ static int ao_set_property (xine_audio_port_t *this_gen, int property, int value this->amp_factor = (double) value / 100.0; - this->do_amp = (this->amp_factor != 1.0); + this->do_amp = (this->amp_factor != 1.0 || this->amp_mute); ret = this->amp_factor*100; break; case AO_PROP_AMP_MUTE: ret = this->amp_mute = value; + + this->do_amp = (this->amp_factor != 1.0 || this->amp_mute); break; case AO_PROP_EQ_30HZ: -- cgit v1.2.3 From 0f40cfbc8e2ce03b42ce2cf732388b9e8cf50e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 26 Mar 2007 11:48:00 +0000 Subject: Send an event when the amp value or amp mute change. Patch by reinhard Nissl. Also bump the libtool version info. CVS patchset: 8749 CVS date: 2007/03/26 11:48:00 --- src/xine-engine/xine_interface.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 1861df7c0..e58d9ed61 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_interface.c,v 1.103 2007/02/22 16:04:45 dgp85 Exp $ + * $Id: xine_interface.c,v 1.104 2007/03/26 11:48:01 dgp85 Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -341,6 +341,24 @@ int xine_port_send_gui_data (xine_video_port_t *vo, type, data); } +static void send_audio_amp_event_internal(xine_stream_t *stream) +{ + xine_event_t event; + xine_audio_level_data_t data; + + data.left + = data.right + = stream->audio_out->get_property (stream->audio_out, AO_PROP_AMP); + data.mute + = stream->audio_out->get_property (stream->audio_out, AO_PROP_AMP_MUTE); + + event.type = XINE_EVENT_AUDIO_AMP_LEVEL; + event.data = &data; + event.data_length = sizeof (data); + + xine_event_send(stream, &event); +} + void xine_set_param (xine_stream_t *stream, int param, int value) { /* Avoid crashing */ if ( ! stream ) { @@ -412,15 +430,21 @@ void xine_set_param (xine_stream_t *stream, int param, int value) { case XINE_PARAM_AUDIO_AMP_LEVEL: stream->xine->port_ticket->acquire(stream->xine->port_ticket, 0); - if (stream->audio_out) - stream->audio_out->set_property (stream->audio_out, AO_PROP_AMP, value); + if (stream->audio_out) { + int old_value = stream->audio_out->get_property (stream->audio_out, AO_PROP_AMP); + if (old_value != stream->audio_out->set_property (stream->audio_out, AO_PROP_AMP, value)) + send_audio_amp_event_internal(stream); + } stream->xine->port_ticket->release(stream->xine->port_ticket, 0); break; case XINE_PARAM_AUDIO_AMP_MUTE: stream->xine->port_ticket->acquire(stream->xine->port_ticket, 0); - if (stream->audio_out) - stream->audio_out->set_property (stream->audio_out, AO_PROP_AMP_MUTE, value); + if (stream->audio_out) { + int old_value = stream->audio_out->get_property (stream->audio_out, AO_PROP_AMP_MUTE); + if (old_value != stream->audio_out->set_property (stream->audio_out, AO_PROP_AMP_MUTE, value)) + send_audio_amp_event_internal(stream); + } stream->xine->port_ticket->release(stream->xine->port_ticket, 0); break; -- cgit v1.2.3 From 50cddc72b09abfac690caa55daf88a5daa5dbdd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 1 Apr 2007 00:52:36 +0000 Subject: Reorder and use bitmasks to reduce the holes in the structure. This is a private structure so it's not part of the ABI. CVS patchset: 8780 CVS date: 2007/04/01 00:52:36 --- src/xine-engine/audio_out.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index a3cf4d8ea..cd87c2947 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.209 2007/03/25 23:09:42 dgp85 Exp $ + * $Id: audio_out.c,v 1.210 2007/04/01 00:52:36 dgp85 Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe @@ -204,36 +204,45 @@ typedef struct { /* private stuff */ ao_driver_t *driver; pthread_mutex_t driver_lock; - int driver_open; - pthread_mutex_t driver_action_lock; /* protects num_driver_actions */ + + uint32_t driver_open:1; + uint32_t audio_loop_running:1; + uint32_t audio_thread_created:1; + uint32_t grab_only:1; /* => do not start thread, frontend will consume samples */ + uint32_t do_resample:1; + uint32_t do_compress:1; + uint32_t do_amp:1; + uint32_t amp_mute:1; + uint32_t do_equ:1; + int num_driver_actions; /* number of threads, that wish to call * functions needing driver_lock */ + pthread_mutex_t driver_action_lock; /* protects num_driver_actions */ + metronom_clock_t *clock; xine_t *xine; xine_list_t *streams; pthread_mutex_t streams_lock; - int audio_loop_running; - int grab_only; /* => do not start thread, frontend will consume samples */ pthread_t audio_thread; - int audio_thread_created; int64_t audio_step; /* pts per 32 768 samples (sample = #bytes/2) */ int32_t frames_per_kpts; /* frames per 1024/90000 sec */ - ao_format_t input, output; /* format conversion done at audio_out.c */ - double frame_rate_factor; - double output_frame_excess; /* used to keep track of 'half' frames */ - int av_sync_method_conf; resample_sync_t resample_sync_info; - int resample_sync_method; /* fix sound card clock drift by resampling */ double resample_sync_factor; /* correct buffer length by this factor * to sync audio hardware to (dxr3) clock */ + int resample_sync_method; /* fix sound card clock drift by resampling */ + + int gap_tolerance; + + ao_format_t input, output; /* format conversion done at audio_out.c */ + double frame_rate_factor; + double output_frame_excess; /* used to keep track of 'half' frames */ + int resample_conf; uint32_t force_rate; /* force audio output rate to this value if non-zero */ - int do_resample; - int gap_tolerance; audio_fifo_t *free_fifo; audio_fifo_t *out_fifo; int64_t last_audio_vpts; @@ -247,22 +256,18 @@ typedef struct { int64_t passthrough_offset; int flush_audio_driver; + int discard_buffers; pthread_mutex_t flush_audio_driver_lock; pthread_cond_t flush_audio_driver_reached; - int discard_buffers; /* some built-in audio filters */ - int do_compress; double compression_factor; /* current compression */ double compression_factor_max; /* user limit on compression */ - int do_amp; - int amp_mute; double amp_factor; /* 10-band equalizer */ - int do_equ; int eq_gain[EQ_BANDS]; int eq_preamp; int eq_i; -- cgit v1.2.3 From a8b440d0846010d613fee8093bc922b0dff98a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 1 Apr 2007 01:03:06 +0000 Subject: Reorder and use bitmasks to reduce the holes in the structure. This is a private structure so it's not part of the ABI. CVS patchset: 8781 CVS date: 2007/04/01 01:03:06 --- src/xine-engine/video_out.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index f6788d6b2..2a3ee1980 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.227 2007/01/16 16:00:26 miguelfreitas Exp $ + * $Id: video_out.c,v 1.228 2007/04/01 01:03:06 dgp85 Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -93,11 +93,20 @@ typedef struct { vo_frame_t *last_frame; vo_frame_t *img_backup; - int redraw_needed; + + uint32_t video_loop_running:1; + uint32_t video_opened:1; + + uint32_t overlay_enabled:1; + + uint32_t warn_threshold_event_sent:1; + + /* do we true real-time output or is this a grab only instance ? */ + uint32_t grab_only:1; + + uint32_t redraw_needed:3; int discard_frames; - int video_loop_running; - int video_opened; pthread_t video_thread; int num_frames_delivered; @@ -108,17 +117,12 @@ typedef struct { int warn_skipped_threshold; int warn_discarded_threshold; int warn_threshold_exceeded; - int warn_threshold_event_sent; /* pts value when decoder delivered last video frame */ int64_t last_delivery_pts; video_overlay_manager_t *overlay_source; - int overlay_enabled; - - /* do we true real-time output or is this a grab only instance ? */ - int grab_only; extra_info_t *extra_info_base; /* used to free mem chunk */ @@ -600,7 +604,7 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { */ send_event = (this->warn_threshold_exceeded == 5 && !this->warn_threshold_event_sent); - this->warn_threshold_event_sent += send_event; + this->warn_threshold_event_sent = send_event; pthread_mutex_lock(&this->streams_lock); for (ite = xine_list_front(this->streams); ite; -- cgit v1.2.3 From 6ff7b823ea37c8baa725fad659b06b23e1d92d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 2 Apr 2007 20:44:04 +0200 Subject: Migrate all .cvsignore files to .hgignore. --HG-- rename : .cvsignore => .hgignore rename : doc/.cvsignore => doc/.hgignore rename : doc/faq/.cvsignore => doc/faq/.hgignore rename : doc/hackersguide/.cvsignore => doc/hackersguide/.hgignore rename : doc/man/.cvsignore => doc/man/.hgignore rename : doc/man/en/.cvsignore => doc/man/en/.hgignore rename : include/.cvsignore => include/.hgignore rename : intl/.cvsignore => intl/.hgignore rename : lib/.cvsignore => lib/.hgignore rename : m4/.cvsignore => m4/.hgignore rename : misc/.cvsignore => misc/.hgignore rename : misc/fonts/.cvsignore => misc/fonts/.hgignore rename : po/.cvsignore => po/.hgignore rename : src/.cvsignore => src/.hgignore rename : src/audio_out/.cvsignore => src/audio_out/.hgignore rename : src/combined/.cvsignore => src/combined/.hgignore rename : src/demuxers/.cvsignore => src/demuxers/.hgignore rename : src/dxr3/.cvsignore => src/dxr3/.hgignore rename : src/input/.cvsignore => src/input/.hgignore rename : src/input/dvb/.cvsignore => src/input/dvb/.hgignore rename : src/input/libdvdnav/.cvsignore => src/input/libdvdnav/.hgignore rename : src/input/libreal/.cvsignore => src/input/libreal/.hgignore rename : src/input/librtsp/.cvsignore => src/input/librtsp/.hgignore rename : src/input/vcd/.cvsignore => src/input/vcd/.hgignore rename : src/input/vcd/libcdio/.cvsignore => src/input/vcd/libcdio/.hgignore rename : src/input/vcd/libcdio/MSWindows/.cvsignore => src/input/vcd/libcdio/MSWindows/.hgignore rename : src/input/vcd/libcdio/cdio/.cvsignore => src/input/vcd/libcdio/cdio/.hgignore rename : src/input/vcd/libcdio/image/.cvsignore => src/input/vcd/libcdio/image/.hgignore rename : src/input/vcd/libvcd/.cvsignore => src/input/vcd/libvcd/.hgignore rename : src/input/vcd/libvcd/libvcd/.cvsignore => src/input/vcd/libvcd/libvcd/.hgignore rename : src/liba52/.cvsignore => src/liba52/.hgignore rename : src/libdts/.cvsignore => src/libdts/.hgignore rename : src/libfaad/.cvsignore => src/libfaad/.hgignore rename : src/libfaad/codebook/.cvsignore => src/libfaad/codebook/.hgignore rename : src/libffmpeg/.cvsignore => src/libffmpeg/.hgignore rename : src/libffmpeg/libavcodec/.cvsignore => src/libffmpeg/libavcodec/.hgignore rename : src/libffmpeg/libavcodec/alpha/.cvsignore => src/libffmpeg/libavcodec/alpha/.hgignore rename : src/libffmpeg/libavcodec/armv4l/.cvsignore => src/libffmpeg/libavcodec/armv4l/.hgignore rename : src/libffmpeg/libavcodec/i386/.cvsignore => src/libffmpeg/libavcodec/i386/.hgignore rename : src/libffmpeg/libavcodec/libpostproc/.cvsignore => src/libffmpeg/libavcodec/libpostproc/.hgignore rename : src/libffmpeg/libavcodec/mlib/.cvsignore => src/libffmpeg/libavcodec/mlib/.hgignore rename : src/libffmpeg/libavcodec/ppc/.cvsignore => src/libffmpeg/libavcodec/ppc/.hgignore rename : src/libffmpeg/libavcodec/sparc/.cvsignore => src/libffmpeg/libavcodec/sparc/.hgignore rename : src/libffmpeg/libavutil/.cvsignore => src/libffmpeg/libavutil/.hgignore rename : src/libflac/.cvsignore => src/libflac/.hgignore rename : src/liblpcm/.cvsignore => src/liblpcm/.hgignore rename : src/libmad/.cvsignore => src/libmad/.hgignore rename : src/libmpeg2/.cvsignore => src/libmpeg2/.hgignore rename : src/libmpeg2new/.cvsignore => src/libmpeg2new/.hgignore rename : src/libmpeg2new/include/.cvsignore => src/libmpeg2new/include/.hgignore rename : src/libmpeg2new/libmpeg2/.cvsignore => src/libmpeg2new/libmpeg2/.hgignore rename : src/libmusepack/.cvsignore => src/libmusepack/.hgignore rename : src/libmusepack/musepack/.cvsignore => src/libmusepack/musepack/.hgignore rename : src/libreal/.cvsignore => src/libreal/.hgignore rename : src/libspeex/.cvsignore => src/libspeex/.hgignore rename : src/libspucc/.cvsignore => src/libspucc/.hgignore rename : src/libspucmml/.cvsignore => src/libspucmml/.hgignore rename : src/libspudec/.cvsignore => src/libspudec/.hgignore rename : src/libspudvb/.cvsignore => src/libspudvb/.hgignore rename : src/libsputext/.cvsignore => src/libsputext/.hgignore rename : src/libtheora/.cvsignore => src/libtheora/.hgignore rename : src/libvorbis/.cvsignore => src/libvorbis/.hgignore rename : src/libw32dll/.cvsignore => src/libw32dll/.hgignore rename : src/libw32dll/DirectShow/.cvsignore => src/libw32dll/DirectShow/.hgignore rename : src/libw32dll/dmo/.cvsignore => src/libw32dll/dmo/.hgignore rename : src/libw32dll/qtx/.cvsignore => src/libw32dll/qtx/.hgignore rename : src/libw32dll/qtx/qtxsdk/.cvsignore => src/libw32dll/qtx/qtxsdk/.hgignore rename : src/libw32dll/wine/.cvsignore => src/libw32dll/wine/.hgignore rename : src/libxineadec/.cvsignore => src/libxineadec/.hgignore rename : src/libxineadec/gsm610/.cvsignore => src/libxineadec/gsm610/.hgignore rename : src/libxineadec/nosefart/.cvsignore => src/libxineadec/nosefart/.hgignore rename : src/libxinevdec/.cvsignore => src/libxinevdec/.hgignore rename : src/post/.cvsignore => src/post/.hgignore rename : src/post/audio/.cvsignore => src/post/audio/.hgignore rename : src/post/deinterlace/.cvsignore => src/post/deinterlace/.hgignore rename : src/post/deinterlace/plugins/.cvsignore => src/post/deinterlace/plugins/.hgignore rename : src/post/goom/.cvsignore => src/post/goom/.hgignore rename : src/post/mosaico/.cvsignore => src/post/mosaico/.hgignore rename : src/post/planar/.cvsignore => src/post/planar/.hgignore rename : src/post/visualizations/.cvsignore => src/post/visualizations/.hgignore rename : src/video_out/.cvsignore => src/video_out/.hgignore rename : src/video_out/libdha/.cvsignore => src/video_out/libdha/.hgignore rename : src/video_out/libdha/bin/.cvsignore => src/video_out/libdha/bin/.hgignore rename : src/video_out/libdha/kernelhelper/.cvsignore => src/video_out/libdha/kernelhelper/.hgignore rename : src/video_out/libdha/oth/.cvsignore => src/video_out/libdha/oth/.hgignore rename : src/video_out/libdha/sysdep/.cvsignore => src/video_out/libdha/sysdep/.hgignore rename : src/video_out/macosx/.cvsignore => src/video_out/macosx/.hgignore rename : src/video_out/vidix/.cvsignore => src/video_out/vidix/.hgignore rename : src/video_out/vidix/drivers/.cvsignore => src/video_out/vidix/drivers/.hgignore rename : src/xine-engine/.cvsignore => src/xine-engine/.hgignore rename : src/xine-utils/.cvsignore => src/xine-utils/.hgignore rename : win32/.cvsignore => win32/.hgignore rename : win32/include/.cvsignore => win32/include/.hgignore --- src/xine-engine/.cvsignore | 6 ------ src/xine-engine/.hgignore | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 src/xine-engine/.cvsignore create mode 100644 src/xine-engine/.hgignore (limited to 'src/xine-engine') diff --git a/src/xine-engine/.cvsignore b/src/xine-engine/.cvsignore deleted file mode 100644 index 7d926a554..000000000 --- a/src/xine-engine/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/src/xine-engine/.hgignore b/src/xine-engine/.hgignore new file mode 100644 index 000000000..7d926a554 --- /dev/null +++ b/src/xine-engine/.hgignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.libs +.deps +*.lo +*.la -- cgit v1.2.3