diff options
| author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-01-05 21:54:16 +0000 | 
|---|---|---|
| committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-01-05 21:54:16 +0000 | 
| commit | 3517e658ee37cb82ba28a4e05fc708bba9e82af6 (patch) | |
| tree | 87b06c4615628418db6f829a663d8bca06173b1f | |
| parent | bb5d65d9f49e148de4f3b402d7a87956b05f5a4a (diff) | |
| download | xine-lib-3517e658ee37cb82ba28a4e05fc708bba9e82af6.tar.gz xine-lib-3517e658ee37cb82ba28a4e05fc708bba9e82af6.tar.bz2 | |
updates for closed caption decoder
CVS patchset: 1344
CVS date: 2002/01/05 21:54:16
| -rw-r--r-- | include/xine.h.tmpl.in | 7 | ||||
| -rw-r--r-- | misc/fonts/Makefile.am | 7 | ||||
| -rw-r--r-- | src/liba52/xine_decoder.c | 8 | ||||
| -rw-r--r-- | src/libdivx4/xine_decoder.c | 10 | ||||
| -rw-r--r-- | src/libdts/xine_decoder.c | 6 | ||||
| -rw-r--r-- | src/libffmpeg/xine_decoder.c | 6 | ||||
| -rw-r--r-- | src/liblpcm/xine_decoder.c | 6 | ||||
| -rw-r--r-- | src/libmad/xine_decoder.c | 6 | ||||
| -rw-r--r-- | src/libmpeg2/decode.c | 48 | ||||
| -rw-r--r-- | src/libmpeg2/mpeg2.h | 9 | ||||
| -rw-r--r-- | src/libmpeg2/xine_decoder.c | 8 | ||||
| -rw-r--r-- | src/libvfill/xine_decoder.c | 4 | ||||
| -rw-r--r-- | src/libvorbis/xine_decoder.c | 6 | ||||
| -rw-r--r-- | src/libw32dll/w32codec.c | 21 | ||||
| -rw-r--r-- | src/xine-engine/events.h | 21 | ||||
| -rw-r--r-- | src/xine-engine/load_plugins.c | 6 | ||||
| -rw-r--r-- | src/xine-engine/osd.c | 19 | ||||
| -rw-r--r-- | src/xine-engine/osd.h | 10 | ||||
| -rw-r--r-- | src/xine-engine/xine_internal.h | 4 | 
19 files changed, 159 insertions, 53 deletions
| diff --git a/include/xine.h.tmpl.in b/include/xine.h.tmpl.in index f02c51c0d..3b83ef708 100644 --- a/include/xine.h.tmpl.in +++ b/include/xine.h.tmpl.in @@ -28,7 +28,7 @@   \endverbatim   */  /* - * $Id: xine.h.tmpl.in,v 1.71 2001/12/27 14:30:29 f1rmb Exp $ + * $Id: xine.h.tmpl.in,v 1.72 2002/01/05 21:54:16 miguelfreitas Exp $   *   */ @@ -1707,6 +1707,11 @@ struct osd_renderer_s {     */    void (*close) (osd_renderer_t *self); +  /* +   * clear an osd object +   */ +  void (*clear) (osd_object_t *osd ); +    };  osd_renderer_t *xine_get_osd_renderer (xine_t *self); diff --git a/misc/fonts/Makefile.am b/misc/fonts/Makefile.am index 1c64c22da..135dabb4a 100644 --- a/misc/fonts/Makefile.am +++ b/misc/fonts/Makefile.am @@ -3,9 +3,10 @@ data_DATA = mono-16.xinefont.gz  sans-16.xinefont.gz  serif-16.xinefont.gz \  	mono-20.xinefont.gz  sans-20.xinefont.gz  serif-20.xinefont.gz     \  	mono-24.xinefont.gz  sans-24.xinefont.gz  serif-24.xinefont.gz     \  	mono-32.xinefont.gz  sans-32.xinefont.gz  serif-32.xinefont.gz     \ -	cetus-16.xinefont.gz  cetus-24.xinefont.gz \ -	cetus-20.xinefont.gz  cetus-32.xinefont.gz - +	cetus-16.xinefont.gz cetus-20.xinefont.gz cetus-24.xinefont.gz     \ +	cetus-32.xinefont.gz cc-16.xinefont.gz    cc-20.xinefont.gz        \ +	cc-24.xinefont.gz    cc-32.xinefont.gz    cci-16.xinefont.gz       \ +	cci-20.xinefont.gz   cci-24.xinefont.gz   cci-32.xinefont.gz  #  # font used for osd diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c index 58b1cbf8a..52910aada 100644 --- a/src/liba52/xine_decoder.c +++ b/src/liba52/xine_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: xine_decoder.c,v 1.15 2001/12/11 15:30:05 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.16 2002/01/05 21:54:17 miguelfreitas Exp $   *   * stuff needed to turn liba52 into a xine decoder plugin   */ @@ -553,11 +553,12 @@ static char *a52dec_get_id(void) {    return "a/52dec";  } -audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *cfg) { +audio_decoder_t *init_audio_decoder_plugin (int iface_version, xine_t *xine) {    a52dec_decoder_t *this ; +  config_values_t *cfg; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "liba52: plugin doesn't support plugin API version %d.\n"  	    "liba52: this means there's a version mismatch between xine and this "  	    "liba52: decoder plugin.\nInstalling current plugins should help.\n", @@ -565,6 +566,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *      return NULL;    } +  cfg = xine->config;    this = (a52dec_decoder_t *) malloc (sizeof (a52dec_decoder_t));    memset(this, 0, sizeof (a52dec_decoder_t)); diff --git a/src/libdivx4/xine_decoder.c b/src/libdivx4/xine_decoder.c index 57ae983eb..ce63350b6 100644 --- a/src/libdivx4/xine_decoder.c +++ b/src/libdivx4/xine_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: xine_decoder.c,v 1.15 2001/12/29 04:32:36 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.16 2002/01/05 21:54:17 miguelfreitas Exp $   *   * xine decoder plugin using divx4   * @@ -466,14 +466,15 @@ static char *divx4_get_id(void) {  /* This is pretty generic. I took the liberty to increase the     priority over that of libffmpeg :-) */ -video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *cfg) { +video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {    divx4_decoder_t *this ;    char *libdecore_name;    void *libdecore_handle;    decoreFunc libdecore_func = 0; +  config_values_t *cfg; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "divx4: plugin doesn't support plugin API version %d.\n"  	    "divx4: this means there's a version mismatch between xine and this "  	    "divx4: decoder plugin.\nInstalling current plugins should help.\n", @@ -481,7 +482,8 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *      return NULL;    } - +  cfg = xine->config; +      /* Try to dlopen libdivxdecore, then look for decore function        if it fails, print a message and return 0 so that xine ignores       us from then on. */ diff --git a/src/libdts/xine_decoder.c b/src/libdts/xine_decoder.c index efb482eab..c8849ffbc 100644 --- a/src/libdts/xine_decoder.c +++ b/src/libdts/xine_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: xine_decoder.c,v 1.12 2002/01/03 22:53:27 jcdutton Exp $ + * $Id: xine_decoder.c,v 1.13 2002/01/05 21:54:17 miguelfreitas Exp $   *   * 04-09-2001 DTS passtrough  (C) Joachim Koenig    * 09-12-2001 DTS passthrough inprovements (C) James Courtier-Dutton @@ -214,11 +214,11 @@ static char *dts_get_id(void) {    return "dts";  } -audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *cfg) { +audio_decoder_t *init_audio_decoder_plugin (int iface_version, xine_t *xine) {    dts_decoder_t *this ; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "libdts: plugin doesn't support plugin API version %d.\n"  	    "libdts: this means there's a version mismatch between xine and this "  	    "libdts: decoder plugin.\nInstalling current plugins should help.\n", diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index a7c06f19d..9fec027f4 100644 --- a/src/libffmpeg/xine_decoder.c +++ b/src/libffmpeg/xine_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: xine_decoder.c,v 1.21 2001/12/27 20:07:25 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.22 2002/01/05 21:54:17 miguelfreitas Exp $   *   * xine decoder plugin using ffmpeg   * @@ -359,11 +359,11 @@ static char *ff_get_id(void) {  } -video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *cfg) { +video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {    ff_decoder_t *this ; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "ffmpeg: plugin doesn't support plugin API version %d.\n"  	    "ffmpeg: this means there's a version mismatch between xine and this "  	    "ffmpeg: decoder plugin.\nInstalling current plugins should help.\n", diff --git a/src/liblpcm/xine_decoder.c b/src/liblpcm/xine_decoder.c index a1d67b106..a333695d2 100644 --- a/src/liblpcm/xine_decoder.c +++ b/src/liblpcm/xine_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: xine_decoder.c,v 1.17 2001/12/11 15:30:05 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.18 2002/01/05 21:54:17 miguelfreitas Exp $   *    * 31-8-2001 Added LPCM rate sensing.   *   (c) 2001 James Courtier-Dutton James@superbug.demon.co.uk @@ -150,11 +150,11 @@ static char *lpcm_get_id(void) {    return "lpcm";  } -audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *cfg) { +audio_decoder_t *init_audio_decoder_plugin (int iface_version, xine_t *xine) {    lpcm_decoder_t *this ; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "liblpcm: plugin doesn't support plugin API version %d.\n"  	    "liblpcm: this means there's a version mismatch between xine and this "  	    "liblpcm: decoder plugin.\nInstalling current plugins should help.\n", diff --git a/src/libmad/xine_decoder.c b/src/libmad/xine_decoder.c index 1999c982b..fb6cc03b8 100644 --- a/src/libmad/xine_decoder.c +++ b/src/libmad/xine_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: xine_decoder.c,v 1.11 2001/12/25 11:41:04 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.12 2002/01/05 21:54:17 miguelfreitas Exp $   *   * stuff needed to turn libmad into a xine decoder plugin   */ @@ -258,11 +258,11 @@ static char *mad_get_id(void) {    return "mad";  } -audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *cfg) { +audio_decoder_t *init_audio_decoder_plugin (int iface_version, xine_t *xine) {    mad_decoder_t *this ; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "libmad: plugin doesn't support plugin API version %d.\n"  	    "libmad: this means there's a version mismatch between xine and this "  	    "libmad: decoder plugin.\nInstalling current plugins should help.\n", diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index 98cc87268..bc7ad7758 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -33,6 +33,8 @@  #include "mpeg2.h"  #include "mpeg2_internal.h"  #include "xineutils.h" +#include "xine_internal.h" +#include "events.h"  #define BUFFER_SIZE (224 * 1024) @@ -179,6 +181,10 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code,  	break; +    case 0xb2: /* user data code */ +        process_userdata(mpeg2dec, buffer); +        break; +      case 0xb3:	/* sequence_header_code */  	if (header_process_sequence_header (picture, buffer)) {    	    printf ("libmpeg2: bad sequence header\n"); @@ -186,10 +192,16 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code,  	} else if (mpeg2dec->is_sequence_needed   	    || (picture->frame_width != picture->coded_picture_width)  	    || (picture->frame_height != picture->coded_picture_height)) { - +            xine_frame_change_event_t notify_event; +              	    printf ("mpeg2dec: frame size has changed to from %d x %d to %d x %d\n",  		    picture->frame_width, picture->frame_height,  		    picture->coded_picture_width, picture->coded_picture_height); +	     +	    notify_event.event.type = XINE_EVENT_FRAME_CHANGE; +	    notify_event.width = picture->coded_picture_width; +	    notify_event.height = picture->coded_picture_height; +	    xine_send_event(mpeg2dec->xine, ¬ify_event.event);  	    if (picture->forward_reference_frame)   	      picture->forward_reference_frame->free (picture->forward_reference_frame); @@ -468,12 +480,19 @@ void mpeg2_find_sequence_header (mpeg2dec_t * mpeg2dec,        }        if (mpeg2dec->is_sequence_needed) { +        xine_frame_change_event_t notify_event; +	  	mpeg2dec->is_sequence_needed = 0;  	picture->frame_width  = picture->coded_picture_width;  	picture->frame_height = picture->coded_picture_height;  	printf ("mpeg2dec: frame size %d x %d\n",  		picture->frame_width, picture->frame_height); +             +	notify_event.event.type = XINE_EVENT_FRAME_CHANGE; +	notify_event.width = picture->coded_picture_width; +	notify_event.height = picture->coded_picture_height; +	xine_send_event(mpeg2dec->xine, ¬ify_event.event);        }      } else if (code == 0xb5) {	/* extension_start_code */        if (header_process_extension (picture, mpeg2dec->chunk_buffer)) { @@ -484,3 +503,30 @@ void mpeg2_find_sequence_header (mpeg2dec_t * mpeg2dec,    }  } +/* Find the end of the userdata field in an MPEG-2 stream */ +static uint8_t *find_end(uint8_t *buffer) +{ +  uint8_t *current = buffer; +  while(1) { +    if (current[0] == 0 && current[1] == 0 && current[2] == 1) +      break; +    current++; +  } +  return current; +} + +static void process_userdata(mpeg2dec_t *mpeg2dec, uint8_t *buffer) +{ +  /* check if user data denotes closed captions */ +  if (buffer[0] == 'C' && buffer[1] == 'C') { +    xine_closed_caption_event_t event; +    uint8_t *end = find_end(buffer); + +    event.event.type = XINE_EVENT_CLOSED_CAPTION; +    event.buffer = &buffer[2]; +    event.buf_len = end - &buffer[2]; +    event.pts = mpeg2dec->pts; +    event.scr = mpeg2dec->scr; +    xine_send_event(mpeg2dec->xine, &event.event); +  } +} diff --git a/src/libmpeg2/mpeg2.h b/src/libmpeg2/mpeg2.h index 32ea7a72e..f1a09b5dd 100644 --- a/src/libmpeg2/mpeg2.h +++ b/src/libmpeg2/mpeg2.h @@ -44,13 +44,11 @@ typedef struct mpeg2dec_s {      uint8_t code;      uint32_t pts, scr; - +     +    xine_t *xine;  } mpeg2dec_t ; - - -  /* initialize mpegdec with a opaque user pointer */  void mpeg2_init (mpeg2dec_t * mpeg2dec,   		 vo_instance_t * output); @@ -65,5 +63,6 @@ int mpeg2_decode_data (mpeg2dec_t * mpeg2dec,  void mpeg2_find_sequence_header (mpeg2dec_t * mpeg2dec,  				 uint8_t * data_start, uint8_t * data_end); -  void mpeg2_flush (mpeg2dec_t * mpeg2dec); + +void process_userdata(mpeg2dec_t *mpeg2dec, uint8_t *buffer); diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_decoder.c index da55cab88..2f6a338bb 100644 --- a/src/libmpeg2/xine_decoder.c +++ b/src/libmpeg2/xine_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: xine_decoder.c,v 1.19 2001/12/24 00:45:03 guenter Exp $ + * $Id: xine_decoder.c,v 1.20 2002/01/05 21:54:17 miguelfreitas Exp $   *   * stuff needed to turn libmpeg2 into a xine decoder plugin   */ @@ -105,11 +105,11 @@ static char *mpeg2dec_get_id(void) {    return "mpeg2dec";  } -video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *cfg) { +video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {    mpeg2dec_decoder_t *this ; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "libmpeg2: plugin doesn't support plugin API version %d.\n"  	    "libmpeg2: this means there's a version mismatch between xine and this "  	    "libmpeg2: decoder plugin.\nInstalling current plugins should help.\n", @@ -129,6 +129,8 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *    this->video_decoder.get_identifier      = mpeg2dec_get_id;    this->video_decoder.priority            = 1; +  this->mpeg2.xine = xine; +    return (video_decoder_t *) this;  } diff --git a/src/libvfill/xine_decoder.c b/src/libvfill/xine_decoder.c index 286dbb580..237576e11 100644 --- a/src/libvfill/xine_decoder.c +++ b/src/libvfill/xine_decoder.c @@ -121,11 +121,11 @@ static char *videofill_get_id(void) {    return "videofill";  } -video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *cfg) { +video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {    videofill_decoder_t *this ; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "videofill: plugin doesn't support plugin API version %d.\n"  	    "videofill: this means there's a version mismatch between xine and this "  	    "videofill: decoder plugin.\nInstalling current plugins should help.\n", diff --git a/src/libvorbis/xine_decoder.c b/src/libvorbis/xine_decoder.c index 8e3c5dff2..cd0517e29 100644 --- a/src/libvorbis/xine_decoder.c +++ b/src/libvorbis/xine_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: xine_decoder.c,v 1.4 2001/12/11 15:30:06 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.5 2002/01/05 21:54:17 miguelfreitas Exp $   *   * (ogg/)vorbis audio decoder plugin (libvorbis wrapper) for xine   */ @@ -232,11 +232,11 @@ static char *vorbis_get_id(void) {    return "vorbis";  } -audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *cfg) { +audio_decoder_t *init_audio_decoder_plugin (int iface_version, xine_t *xine) {    vorbis_decoder_t *this ; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "libvorbis: plugin doesn't support plugin API version %d.\n"  	    "libvorbis: this means there's a version mismatch between xine and this "  	    "libvorbis: decoder plugin.\nInstalling current plugins should help.\n", diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index df6465960..fedba9391 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.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: w32codec.c,v 1.52 2001/12/27 20:07:25 miguelfreitas Exp $ + * $Id: w32codec.c,v 1.53 2002/01/05 21:54:17 miguelfreitas Exp $   *   * routines for using w32 codecs   * DirectShow support by Miguel Freitas (Nov/2001) @@ -94,7 +94,7 @@ typedef struct w32v_decoder_s {    void             *img_buffer;    int               size;    long		    outfmt; - +      /* profiler */    int		   prof_rgb2yuv; @@ -675,8 +675,9 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {        if(ret) {  	printf("w32codec: Error decompressing frame, err=%ld\n", (long)ret);   	img->bad_frame = 1; -      } else +      } else {  	img->bad_frame = 0; +      }        if (img->copy) {  	int height = abs(this->o_bih.biHeight); @@ -1115,11 +1116,12 @@ static char *w32a_get_id(void) {    return "vfw (win32) audio decoder";  } -video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *cfg) { +video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {    w32v_decoder_t *this ; +  config_values_t *cfg; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "w32codec: plugin doesn't support plugin API version %d.\n"  	    "w32codec: this means there's a version mismatch between xine and this "  	    "w32codec: decoder plugin.\nInstalling current input plugins should help.\n", @@ -1127,7 +1129,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *      return NULL;    } - +  cfg = xine->config;    win32_def_path = cfg->register_string (cfg, "codec.win32_path", "/usr/lib/win32",  					 "path to win32 codec dlls",  					 NULL, NULL, NULL); @@ -1149,12 +1151,12 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *    return (video_decoder_t *) this;  } -audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *cfg) { +audio_decoder_t *init_audio_decoder_plugin (int iface_version, xine_t *xine) {    w32a_decoder_t *this ; - +  config_values_t *cfg; -  if (iface_version != 4) { +  if (iface_version != 5) {      printf( "w32codec: plugin doesn't support plugin API version %d.\n"  	    "w32codec: this means there's a version mismatch between xine and this "  	    "w32codec: decoder plugin.\nInstalling current input plugins should help.\n", @@ -1163,6 +1165,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *      return NULL;    } +  cfg = xine->config;    win32_def_path = cfg->register_string (cfg, "codec.win32_path", "/usr/lib/win32",  					 "path to win32 codec dlls",  					 NULL, NULL, NULL); diff --git a/src/xine-engine/events.h b/src/xine-engine/events.h index 807fb66b4..2cdf32a88 100644 --- a/src/xine-engine/events.h +++ b/src/xine-engine/events.h @@ -58,6 +58,8 @@ extern "C" {  #define XINE_EVENT_INPUT_ANGLE_NEXT     20  #define XINE_EVENT_INPUT_ANGLE_PREVIOUS 21  #define XINE_EVENT_SPU_FORCEDISPLAY	22 +#define XINE_EVENT_FRAME_CHANGE         23 +#define XINE_EVENT_CLOSED_CAPTION       24  /*   * generic event type. @@ -105,6 +107,25 @@ typedef struct {    int              handled;  } xine_next_mrl_event_t; +/* + * notify frame change + */ +typedef struct { +  xine_event_t     event; +  int              width; +  int              height; +} xine_frame_change_event_t; + +/* + * closed caption + */ +typedef struct { +  xine_event_t     event; +  uint8_t          *buffer; +  uint32_t         buf_len; +  uint32_t         pts; +  uint32_t         scr; +} xine_closed_caption_event_t;  #ifdef __cplusplus  } diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 00bc05b43..cde800de7 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.64 2002/01/02 18:16:07 jkeil Exp $ + * $Id: load_plugins.c,v 1.65 2002/01/05 21:54:17 miguelfreitas Exp $   *   *   * Load input/demux/audio_out/video_out/codec plugins @@ -571,7 +571,7 @@ void load_decoder_plugins (xine_t *this,  	      video_decoder_t *vdp;  	      int              streamtype; -	      vdp = (video_decoder_t *) initplug(iface_version, config); +	      vdp = (video_decoder_t *) initplug(iface_version, this);  	      if (vdp) {  		vdp->metronom = this->metronom; @@ -596,7 +596,7 @@ void load_decoder_plugins (xine_t *this,  	      audio_decoder_t *adp;  	      int              streamtype; -	      adp = (audio_decoder_t *) initplug(iface_version, config); +	      adp = (audio_decoder_t *) initplug(iface_version, this);  	      if (adp) {  		for (streamtype = 0; streamtype<DECODER_PLUGIN_MAX; streamtype++) diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 58fc4d5f8..9263674ad 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -279,6 +279,24 @@ static int osd_hide (osd_object_t *osd, uint32_t vpts) {    return 1;  } + +/* + * clear an osd object, so that it can be used for rendering a new image + */ + +static void osd_clear (osd_object_t *osd) { +#ifdef LOG_DEBUG +  printf("osd_clear\n"); +#endif + +  memset(osd->area, 0, osd->width * osd->height); +  osd->x1 = osd->width; +  osd->y1 = osd->height; +  osd->x2 = 0; +  osd->y2 = 0; +} + +  /*   * Bresenham line implementation on osd object   */ @@ -849,6 +867,7 @@ osd_renderer_t *osd_renderer_init( video_overlay_instance_t *video_overlay, conf    this->get_palette        = osd_get_palette;    this->set_position       = osd_set_position;    this->set_font           = osd_set_font; +  this->clear              = osd_clear;    this->line               = osd_line;    this->filled_rect        = osd_filled_rect;    this->render_text        = osd_render_text; diff --git a/src/xine-engine/osd.h b/src/xine-engine/osd.h index a55b791bd..177b9d817 100644 --- a/src/xine-engine/osd.h +++ b/src/xine-engine/osd.h @@ -18,7 +18,7 @@   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA   *   * OSD stuff (text and graphic primitives) - * $Id: osd.h,v 1.5 2001/12/13 23:15:02 guenter Exp $ + * $Id: osd.h,v 1.6 2002/01/05 21:54:17 miguelfreitas Exp $   */  #ifndef HAVE_OSD_H @@ -33,6 +33,7 @@ typedef struct osd_object_s osd_object_t;  typedef struct osd_renderer_s osd_renderer_t;  typedef struct osd_font_s osd_font_t; +/* WARNING: this should be kept in sync with include/xine.h.tmpl.in */  struct osd_renderer_s {    /* @@ -123,7 +124,12 @@ struct osd_renderer_s {     * osd objects are closed     */    void (*close) (osd_renderer_t *this); -   + +  /* +   * clear an osd object +   */ +  void (*clear) (osd_object_t *osd ); +        /* private stuff */    pthread_mutex_t             osd_mutex; diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index a4f960136..9ffcadd4c 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.67 2001/12/27 14:30:30 f1rmb Exp $ + * $Id: xine_internal.h,v 1.68 2002/01/05 21:54:17 miguelfreitas Exp $   *   */ @@ -55,7 +55,7 @@ extern "C" {  #define INPUT_PLUGIN_MAX       50  #define DEMUXER_PLUGIN_MAX     50  #define DECODER_PLUGIN_MAX     256 -#define DECODER_PLUGIN_IFACE_VERSION      4 +#define DECODER_PLUGIN_IFACE_VERSION      5  #define AUDIO_OUT_PLUGIN_MAX   50  #define VIDEO_OUT_PLUGIN_MAX   50  #define XINE_MAX_EVENT_LISTENERS 50 | 
