alphablend.h   alphablend.h 
skipping to change at line 42 skipping to change at line 42
int buffer_size; int buffer_size;
int disable_exact_blending; int disable_exact_blending;
int offset_x, offset_y; int offset_x, offset_y;
} alphablend_t; } alphablend_t;
void _x_alphablend_init(alphablend_t *extra_data, xine_t *xine) XINE_PROTEC TED; void _x_alphablend_init(alphablend_t *extra_data, xine_t *xine) XINE_PROTEC TED;
void _x_alphablend_free(alphablend_t *extra_data) XINE_PROTECTED; void _x_alphablend_free(alphablend_t *extra_data) XINE_PROTECTED;
#if !SUPPORT_ATTRIBUTE_PACKED
#pragma pack(8)
#endif
typedef struct { /* CLUT == Color LookUp Table */ typedef struct { /* CLUT == Color LookUp Table */
uint8_t cb; uint8_t cb;
uint8_t cr; uint8_t cr;
uint8_t y; uint8_t y;
uint8_t foo; uint8_t foo;
} XINE_PACKED clut_t; } XINE_PACKED clut_t;
#if !SUPPORT_ATTRIBUTE_PACKED
#pragma pack()
#endif
#define XX44_PALETTE_SIZE 32 #define XX44_PALETTE_SIZE 32
typedef struct { typedef struct {
unsigned size; unsigned size;
unsigned max_used; unsigned max_used;
uint32_t cluts[XX44_PALETTE_SIZE]; uint32_t cluts[XX44_PALETTE_SIZE];
/* cache palette entries for both colors and hili_colors */ /* cache palette entries for both colors and hili_colors */
int lookup_cache[OVL_PALETTE_SIZE*2]; int lookup_cache[OVL_PALETTE_SIZE*2];
} xx44_palette_t; } xx44_palette_t;
 End of changes. 2 change blocks. 
8 lines changed or deleted 0 lines changed or added


 audio_decoder.h   audio_decoder.h 
skipping to change at line 26 skipping to change at line 26
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
* *
* xine audio decoder plugin interface * xine audio decoder plugin interface
*/ */
#ifndef HAVE_AUDIO_DECODER_H #ifndef HAVE_AUDIO_DECODER_H
#define HAVE_AUDIO_DECODER_H #define HAVE_AUDIO_DECODER_H
#include <xine/os_types.h>
#include <xine/buffer.h>
#ifdef XINE_COMPILE #ifdef XINE_COMPILE
# include <inttypes.h> # include <xine/plugin_catalog.h>
# include "buffer.h"
#else
# include <xine/os_types.h>
# include <xine/buffer.h>
#endif #endif
#define AUDIO_DECODER_IFACE_VERSION 15 #define AUDIO_DECODER_IFACE_VERSION 16
/* /*
* generic xine audio decoder plugin interface * generic xine audio decoder plugin interface
*/ */
typedef struct audio_decoder_class_s audio_decoder_class_t; typedef struct audio_decoder_class_s audio_decoder_class_t;
typedef struct audio_decoder_s audio_decoder_t; typedef struct audio_decoder_s audio_decoder_t;
struct audio_decoder_class_s { struct audio_decoder_class_s {
/* /*
* open a new instance of this plugin class * open a new instance of this plugin class
*/ */
audio_decoder_t* (*open_plugin) (audio_decoder_class_t *this, xine_stream _t *stream); audio_decoder_t* (*open_plugin) (audio_decoder_class_t *this, xine_stream _t *stream);
/* /**
* return short, human readable identifier for this plugin class * @brief short human readable identifier for this plugin class
*/ */
char* (*get_identifier) (audio_decoder_class_t *this); const char *identifier;
/* /**
* return human readable (verbose = 1 line) description for * @brief human readable (verbose = 1 line) description for this plugin c
* this plugin class lass
*
* The description is passed to gettext() to internationalise.
*/ */
char* (*get_description) (audio_decoder_class_t *this); const char *description;
/**
* @brief Optional non-standard catalog to use with dgettext() for descri
ption.
*/
const char *text_domain;
/* /*
* free all class-related resources * free all class-related resources
*/ */
void (*dispose) (audio_decoder_class_t *this); void (*dispose) (audio_decoder_class_t *this);
}; };
#define default_audio_decoder_class_dispose (void (*) (audio_decoder_class_
t *this))free
struct audio_decoder_s { struct audio_decoder_s {
/* /*
* decode data from buf and feed decoded samples to * decode data from buf and feed decoded samples to
* audio output * audio output
*/ */
void (*decode_data) (audio_decoder_t *this, buf_element_t *buf); void (*decode_data) (audio_decoder_t *this, buf_element_t *buf);
/* /*
* reset decoder after engine flush (prepare for new * reset decoder after engine flush (prepare for new
skipping to change at line 93 skipping to change at line 100
* inform decoder that a time reference discontinuity has happened. * inform decoder that a time reference discontinuity has happened.
* that is, it must forget any currently held pts value * that is, it must forget any currently held pts value
*/ */
void (*discontinuity) (audio_decoder_t *this); void (*discontinuity) (audio_decoder_t *this);
/* /*
* close down, free all resources * close down, free all resources
*/ */
void (*dispose) (audio_decoder_t *this); void (*dispose) (audio_decoder_t *this);
void *node; /* used by plugin loader */ /**
* @brief Pointer to the loaded plugin node.
*
* Used by the plugins loader. It's an opaque type when using the
* structure outside of xine's build.
*/
#ifdef XINE_COMPILE
plugin_node_t *node;
#else
void *node;
#endif
}; };
#endif #endif
 End of changes. 9 change blocks. 
15 lines changed or deleted 34 lines changed or added


 audio_out.h   audio_out.h 
skipping to change at line 27 skipping to change at line 27
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/ */
#ifndef HAVE_AUDIO_OUT_H #ifndef HAVE_AUDIO_OUT_H
#define HAVE_AUDIO_OUT_H #define HAVE_AUDIO_OUT_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if defined(XINE_COMPILE)
#include <inttypes.h>
#include "metronom.h"
#include "configfile.h"
#include "xineutils.h"
#else
#include <xine/os_types.h> #include <xine/os_types.h>
#include <xine/metronom.h> #include <xine/metronom.h>
#include <xine/configfile.h> #include <xine/configfile.h>
#include <xine/xineutils.h> #include <xine/xineutils.h>
#ifdef XINE_COMPILE
# include <xine/plugin_catalog.h>
#endif #endif
#define AUDIO_OUT_IFACE_VERSION 8 #define AUDIO_OUT_IFACE_VERSION 9
/* /*
* ao_driver_s contains the driver every audio output * ao_driver_s contains the driver every audio output
* driver plugin has to implement. * driver plugin has to implement.
*/ */
typedef struct ao_driver_s ao_driver_t; typedef struct ao_driver_s ao_driver_t;
struct ao_driver_s { struct ao_driver_s {
skipping to change at line 127 skipping to change at line 124
int (*set_property) (ao_driver_t *, int property, int value); int (*set_property) (ao_driver_t *, int property, int value);
/* /*
* misc control operations on the audio device. * misc control operations on the audio device.
* *
* See AO_CTRL_* below. * See AO_CTRL_* below.
*/ */
int (*control) (ao_driver_t *, int cmd, /* arg */ ...); int (*control) (ao_driver_t *, int cmd, /* arg */ ...);
/**
* @brief Pointer to the loaded plugin node.
*
* Used by the plugins loader. It's an opaque type when using the
* structure outside of xine's build.
*/
#ifdef XINE_COMPILE
plugin_node_t *node;
#else
void *node; void *node;
#endif
}; };
typedef struct ao_format_s ao_format_t; typedef struct ao_format_s ao_format_t;
struct ao_format_s { struct ao_format_s {
uint32_t bits; uint32_t bits;
uint32_t rate; uint32_t rate;
int mode; int mode;
}; };
skipping to change at line 238 skipping to change at line 245
typedef struct audio_driver_class_s audio_driver_class_t; typedef struct audio_driver_class_s audio_driver_class_t;
struct audio_driver_class_s { struct audio_driver_class_s {
/* /*
* open a new instance of this plugin class * open a new instance of this plugin class
*/ */
ao_driver_t* (*open_plugin) (audio_driver_class_t *, const void *data); ao_driver_t* (*open_plugin) (audio_driver_class_t *, const void *data);
/* /**
* return short, human readable identifier for this plugin class * @brief short human readable identifier for this plugin class
*/ */
char* (*get_identifier) (audio_driver_class_t *); const char *identifier;
/* /**
* return human readable (verbose = 1 line) description for * @brief human readable (verbose = 1 line) description for this plugin c
* this plugin class lass
*
* The description is passed to gettext() to internationalise.
*/ */
char* (*get_description) (audio_driver_class_t *); const char *description;
/**
* @brief Optional non-standard catalog to use with dgettext() for descri
ption.
*/
const char *text_domain;
/* /*
* free all class-related resources * free all class-related resources
*/ */
void (*dispose) (audio_driver_class_t *); void (*dispose) (audio_driver_class_t *);
}; };
/* #define default_audio_driver_class_dispose (void (*) (audio_driver_class_t
* this initiates the audio_out sync routines *this))free
* found in ./src/xine-engine/audio_out.c
/**
* @brief Initialise the audio_out sync routines
*
* @internal
*/ */
xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, int g rab_only) XINE_MALLOC XINE_PROTECTED; xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, int g rab_only) XINE_MALLOC;
/* /*
* audio output modes + capabilities * audio output modes + capabilities
*/ */
#define AO_CAP_NOCAP 0x00000000 /* driver has no capabilities */ #define AO_CAP_NOCAP 0x00000000 /* driver has no capabilities */
#define AO_CAP_MODE_A52 0x00000001 /* driver supports A/52 output */ #define AO_CAP_MODE_A52 0x00000001 /* driver supports A/52 output */
#define AO_CAP_MODE_AC5 0x00000002 /* driver supports AC5 output */ #define AO_CAP_MODE_AC5 0x00000002 /* driver supports AC5 output */
/* 1 sample == 2 bytes (C) */ /* 1 sample == 2 bytes (C) */
#define AO_CAP_MODE_MONO 0x00000004 /* driver supports mono output */ #define AO_CAP_MODE_MONO 0x00000004 /* driver supports mono output */
skipping to change at line 327 skipping to change at line 343
#define AO_PROP_EQ_500HZ 11 /* equalizer */ #define AO_PROP_EQ_500HZ 11 /* equalizer */
#define AO_PROP_EQ_1000HZ 12 /* equalizer */ #define AO_PROP_EQ_1000HZ 12 /* equalizer */
#define AO_PROP_EQ_2000HZ 13 /* equalizer */ #define AO_PROP_EQ_2000HZ 13 /* equalizer */
#define AO_PROP_EQ_4000HZ 14 /* equalizer */ #define AO_PROP_EQ_4000HZ 14 /* equalizer */
#define AO_PROP_EQ_8000HZ 15 /* equalizer */ #define AO_PROP_EQ_8000HZ 15 /* equalizer */
#define AO_PROP_EQ_16000HZ 16 /* equalizer */ #define AO_PROP_EQ_16000HZ 16 /* equalizer */
#define AO_PROP_CLOSE_DEVICE 17 /* force closing audio device */ #define AO_PROP_CLOSE_DEVICE 17 /* force closing audio device */
#define AO_PROP_AMP_MUTE 18 /* amplifier mute */ #define AO_PROP_AMP_MUTE 18 /* amplifier mute */
#define AO_PROP_NUM_STREAMS 19 /* read-only */ #define AO_PROP_NUM_STREAMS 19 /* read-only */
#define AO_PROP_CLOCK_SPEED 20 /* inform audio_out that speed has change d */ #define AO_PROP_CLOCK_SPEED 20 /* inform audio_out that speed has change d */
#define AO_NUM_PROPERTIES 21 #define AO_PROP_BUFS_TOTAL 21 /* read-only */
#define AO_PROP_BUFS_FREE 22 /* read-only */
#define AO_NUM_PROPERTIES 23
/* audio device control ops */ /* audio device control ops */
#define AO_CTRL_PLAY_PAUSE 0 #define AO_CTRL_PLAY_PAUSE 0
#define AO_CTRL_PLAY_RESUME 1 #define AO_CTRL_PLAY_RESUME 1
#define AO_CTRL_FLUSH_BUFFERS 2 #define AO_CTRL_FLUSH_BUFFERS 2
/* above that value audio frames are discarded */ /* above that value audio frames are discarded */
#define AO_MAX_GAP 15000 #define AO_MAX_GAP 15000
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 12 change blocks. 
19 lines changed or deleted 40 lines changed or added


 buffer.h   buffer.h 
skipping to change at line 43 skipping to change at line 43
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <pthread.h> #include <pthread.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef XINE_COMPILE #include <xine/os_types.h>
# include <inttypes.h> #include <xine/attributes.h>
# include "attributes.h"
#else
# include <xine/os_types.h>
# include <xine/attributes.h>
#endif
#define BUF_MAX_CALLBACKS 5 #define BUF_MAX_CALLBACKS 5
/* /**
* buffer types * @defgroup buffer_types Buffer Types
* *
* a buffer type ID describes the contents of a buffer * a buffer type ID describes the contents of a buffer
* it consists of three fields: * it consists of three fields:
* *
* buf_type = 0xMMDDCCCC * buf_type = 0xMMDDCCCC
* *
* MM : major buffer type (CONTROL, VIDEO, AUDIO, SPU) * MM : major buffer type (CONTROL, VIDEO, AUDIO, SPU)
* DD : decoder selection (e.g. MPEG, OPENDIVX ... for VIDEO) * DD : decoder selection (e.g. MPEG, OPENDIVX ... for VIDEO)
* CCCC : channel number or other subtype information for the decoder * CCCC : channel number or other subtype information for the decoder
*/ */
/*@{*/
#define BUF_MAJOR_MASK 0xFF000000 #define BUF_MAJOR_MASK 0xFF000000
#define BUF_DECODER_MASK 0x00FF0000 #define BUF_DECODER_MASK 0x00FF0000
/* control buffer types */ /**
* @defgroup buffer_ctrl Control buffer types
*/
/*@{*/
#define BUF_CONTROL_BASE 0x01000000 #define BUF_CONTROL_BASE 0x01000000
#define BUF_CONTROL_START 0x01000000 #define BUF_CONTROL_START 0x01000000
#define BUF_CONTROL_END 0x01010000 #define BUF_CONTROL_END 0x01010000
#define BUF_CONTROL_QUIT 0x01020000 #define BUF_CONTROL_QUIT 0x01020000
#define BUF_CONTROL_DISCONTINUITY 0x01030000 /* former AVSYNC_RESET */ #define BUF_CONTROL_DISCONTINUITY 0x01030000 /**< former AVSYNC_RESET */
#define BUF_CONTROL_NOP 0x01040000 #define BUF_CONTROL_NOP 0x01040000
#define BUF_CONTROL_AUDIO_CHANNEL 0x01050000 #define BUF_CONTROL_AUDIO_CHANNEL 0x01050000
#define BUF_CONTROL_SPU_CHANNEL 0x01060000 #define BUF_CONTROL_SPU_CHANNEL 0x01060000
#define BUF_CONTROL_NEWPTS 0x01070000 #define BUF_CONTROL_NEWPTS 0x01070000
#define BUF_CONTROL_RESET_DECODER 0x01080000 #define BUF_CONTROL_RESET_DECODER 0x01080000
#define BUF_CONTROL_HEADERS_DONE 0x01090000 #define BUF_CONTROL_HEADERS_DONE 0x01090000
#define BUF_CONTROL_FLUSH_DECODER 0x010a0000 #define BUF_CONTROL_FLUSH_DECODER 0x010a0000
#define BUF_CONTROL_RESET_TRACK_MAP 0x010b0000 #define BUF_CONTROL_RESET_TRACK_MAP 0x010b0000
/*@}*/
/* video buffer types: (please keep in sync with buffer_types.c) */ /**
* @defgroup buffer_video Video buffer types
* @note (please keep in sync with buffer_types.c)
*/
/*@{*/
#define BUF_VIDEO_BASE 0x02000000 #define BUF_VIDEO_BASE 0x02000000
#define BUF_VIDEO_UNKNOWN 0x02ff0000 /* no decoder should handle this one */ #define BUF_VIDEO_UNKNOWN 0x02ff0000 /**< no decoder should handle thi s one */
#define BUF_VIDEO_MPEG 0x02000000 #define BUF_VIDEO_MPEG 0x02000000
#define BUF_VIDEO_MPEG4 0x02010000 #define BUF_VIDEO_MPEG4 0x02010000
#define BUF_VIDEO_CINEPAK 0x02020000 #define BUF_VIDEO_CINEPAK 0x02020000
#define BUF_VIDEO_SORENSON_V1 0x02030000 #define BUF_VIDEO_SORENSON_V1 0x02030000
#define BUF_VIDEO_MSMPEG4_V2 0x02040000 #define BUF_VIDEO_MSMPEG4_V2 0x02040000
#define BUF_VIDEO_MSMPEG4_V3 0x02050000 #define BUF_VIDEO_MSMPEG4_V3 0x02050000
#define BUF_VIDEO_MJPEG 0x02060000 #define BUF_VIDEO_MJPEG 0x02060000
#define BUF_VIDEO_IV50 0x02070000 #define BUF_VIDEO_IV50 0x02070000
#define BUF_VIDEO_IV41 0x02080000 #define BUF_VIDEO_IV41 0x02080000
#define BUF_VIDEO_IV32 0x02090000 #define BUF_VIDEO_IV32 0x02090000
skipping to change at line 147 skipping to change at line 149
#define BUF_VIDEO_YV12 0x02310000 #define BUF_VIDEO_YV12 0x02310000
#define BUF_VIDEO_SEGA 0x02320000 #define BUF_VIDEO_SEGA 0x02320000
#define BUF_VIDEO_RV20 0x02330000 #define BUF_VIDEO_RV20 0x02330000
#define BUF_VIDEO_RV30 0x02340000 #define BUF_VIDEO_RV30 0x02340000
#define BUF_VIDEO_MVI2 0x02350000 #define BUF_VIDEO_MVI2 0x02350000
#define BUF_VIDEO_UCOD 0x02360000 #define BUF_VIDEO_UCOD 0x02360000
#define BUF_VIDEO_WMV9 0x02370000 #define BUF_VIDEO_WMV9 0x02370000
#define BUF_VIDEO_INTERPLAY 0x02380000 #define BUF_VIDEO_INTERPLAY 0x02380000
#define BUF_VIDEO_RV40 0x02390000 #define BUF_VIDEO_RV40 0x02390000
#define BUF_VIDEO_PSX_MDEC 0x023A0000 #define BUF_VIDEO_PSX_MDEC 0x023A0000
#define BUF_VIDEO_YUV_FRAMES 0x023B0000 /* uncompressed YUV, delivered by v4l input plugin */ #define BUF_VIDEO_YUV_FRAMES 0x023B0000 /**< uncompressed YUV, delivered by v4l input plugin */
#define BUF_VIDEO_HUFFYUV 0x023C0000 #define BUF_VIDEO_HUFFYUV 0x023C0000
#define BUF_VIDEO_IMAGE 0x023D0000 #define BUF_VIDEO_IMAGE 0x023D0000
#define BUF_VIDEO_THEORA 0x023E0000 #define BUF_VIDEO_THEORA 0x023E0000
#define BUF_VIDEO_4XM 0x023F0000 #define BUF_VIDEO_4XM 0x023F0000
#define BUF_VIDEO_I420 0x02400000 #define BUF_VIDEO_I420 0x02400000
#define BUF_VIDEO_VP4 0x02410000 #define BUF_VIDEO_VP4 0x02410000
#define BUF_VIDEO_VP5 0x02420000 #define BUF_VIDEO_VP5 0x02420000
#define BUF_VIDEO_VP6 0x02430000 #define BUF_VIDEO_VP6 0x02430000
#define BUF_VIDEO_VMD 0x02440000 #define BUF_VIDEO_VMD 0x02440000
#define BUF_VIDEO_MSZH 0x02450000 #define BUF_VIDEO_MSZH 0x02450000
#define BUF_VIDEO_ZLIB 0x02460000 #define BUF_VIDEO_ZLIB 0x02460000
#define BUF_VIDEO_8BPS 0x02470000 #define BUF_VIDEO_8BPS 0x02470000
#define BUF_VIDEO_ASV1 0x02480000 #define BUF_VIDEO_ASV1 0x02480000
#define BUF_VIDEO_ASV2 0x02490000 #define BUF_VIDEO_ASV2 0x02490000
#define BUF_VIDEO_BITPLANE 0x024A0000 /* Amiga typical picture and anim #define BUF_VIDEO_BITPLANE 0x024A0000 /**< Amiga typical picture and an
ation format */ imation format */
#define BUF_VIDEO_BITPLANE_BR1 0x024B0000 /* the same with Bytrun compressi #define BUF_VIDEO_BITPLANE_BR1 0x024B0000 /**< the same with Bytrun compres
on 1 */ sion 1 */
#define BUF_VIDEO_FLV1 0x024C0000 #define BUF_VIDEO_FLV1 0x024C0000
#define BUF_VIDEO_H264 0x024D0000 #define BUF_VIDEO_H264 0x024D0000
#define BUF_VIDEO_MJPEG_B 0x024E0000 #define BUF_VIDEO_MJPEG_B 0x024E0000
#define BUF_VIDEO_H261 0x024F0000 #define BUF_VIDEO_H261 0x024F0000
#define BUF_VIDEO_AASC 0x02500000 #define BUF_VIDEO_AASC 0x02500000
#define BUF_VIDEO_LOCO 0x02510000 #define BUF_VIDEO_LOCO 0x02510000
#define BUF_VIDEO_QDRW 0x02520000 #define BUF_VIDEO_QDRW 0x02520000
#define BUF_VIDEO_QPEG 0x02530000 #define BUF_VIDEO_QPEG 0x02530000
#define BUF_VIDEO_ULTI 0x02540000 #define BUF_VIDEO_ULTI 0x02540000
#define BUF_VIDEO_WNV1 0x02550000 #define BUF_VIDEO_WNV1 0x02550000
skipping to change at line 193 skipping to change at line 195
#define BUF_VIDEO_NUV 0x025F0000 #define BUF_VIDEO_NUV 0x025F0000
#define BUF_VIDEO_KMVC 0x02600000 #define BUF_VIDEO_KMVC 0x02600000
#define BUF_VIDEO_FLASHSV 0x02610000 #define BUF_VIDEO_FLASHSV 0x02610000
#define BUF_VIDEO_CAVS 0x02620000 #define BUF_VIDEO_CAVS 0x02620000
#define BUF_VIDEO_VP6F 0x02630000 #define BUF_VIDEO_VP6F 0x02630000
#define BUF_VIDEO_THEORA_RAW 0x02640000 #define BUF_VIDEO_THEORA_RAW 0x02640000
#define BUF_VIDEO_VC1 0x02650000 #define BUF_VIDEO_VC1 0x02650000
#define BUF_VIDEO_VMNC 0x02660000 #define BUF_VIDEO_VMNC 0x02660000
#define BUF_VIDEO_SNOW 0x02670000 #define BUF_VIDEO_SNOW 0x02670000
#define BUF_VIDEO_VP8 0x02680000 #define BUF_VIDEO_VP8 0x02680000
/*@}*/
/* audio buffer types: (please keep in sync with buffer_types.c) */ /**
* @defgroup buffer_audio Audio buffer types
* @note (please keep in sync with buffer_types.c)
*/
/*@{*/
#define BUF_AUDIO_BASE 0x03000000 #define BUF_AUDIO_BASE 0x03000000
#define BUF_AUDIO_UNKNOWN 0x03ff0000 /* no decoder should handle this one */ #define BUF_AUDIO_UNKNOWN 0x03ff0000 /**< no decoder should handle thi s one */
#define BUF_AUDIO_A52 0x03000000 #define BUF_AUDIO_A52 0x03000000
#define BUF_AUDIO_MPEG 0x03010000 #define BUF_AUDIO_MPEG 0x03010000
#define BUF_AUDIO_LPCM_BE 0x03020000 #define BUF_AUDIO_LPCM_BE 0x03020000
#define BUF_AUDIO_LPCM_LE 0x03030000 #define BUF_AUDIO_LPCM_LE 0x03030000
#define BUF_AUDIO_WMAV1 0x03040000 #define BUF_AUDIO_WMAV1 0x03040000
#define BUF_AUDIO_DTS 0x03050000 #define BUF_AUDIO_DTS 0x03050000
#define BUF_AUDIO_MSADPCM 0x03060000 #define BUF_AUDIO_MSADPCM 0x03060000
#define BUF_AUDIO_MSIMAADPCM 0x03070000 #define BUF_AUDIO_MSIMAADPCM 0x03070000
#define BUF_AUDIO_MSGSM 0x03080000 #define BUF_AUDIO_MSGSM 0x03080000
#define BUF_AUDIO_VORBIS 0x03090000 #define BUF_AUDIO_VORBIS 0x03090000
skipping to change at line 266 skipping to change at line 272
#define BUF_AUDIO_TRUESPEECH 0x03390000 #define BUF_AUDIO_TRUESPEECH 0x03390000
#define BUF_AUDIO_TTA 0x033A0000 #define BUF_AUDIO_TTA 0x033A0000
#define BUF_AUDIO_SMACKER 0x033B0000 #define BUF_AUDIO_SMACKER 0x033B0000
#define BUF_AUDIO_FLVADPCM 0x033C0000 #define BUF_AUDIO_FLVADPCM 0x033C0000
#define BUF_AUDIO_WAVPACK 0x033D0000 #define BUF_AUDIO_WAVPACK 0x033D0000
#define BUF_AUDIO_MP3ADU 0x033E0000 #define BUF_AUDIO_MP3ADU 0x033E0000
#define BUF_AUDIO_AMR_NB 0x033F0000 #define BUF_AUDIO_AMR_NB 0x033F0000
#define BUF_AUDIO_AMR_WB 0x03400000 #define BUF_AUDIO_AMR_WB 0x03400000
#define BUF_AUDIO_EAC3 0x03410000 #define BUF_AUDIO_EAC3 0x03410000
#define BUF_AUDIO_AAC_LATM 0x03420000 #define BUF_AUDIO_AAC_LATM 0x03420000
/*@}*/
/* spu buffer types: */ /**
* @defgroup buffer_spu SPU buffer types
*/
/*@{*/
#define BUF_SPU_BASE 0x04000000 #define BUF_SPU_BASE 0x04000000
#define BUF_SPU_DVD 0x04000000 #define BUF_SPU_DVD 0x04000000
#define BUF_SPU_TEXT 0x04010000 #define BUF_SPU_TEXT 0x04010000
#define BUF_SPU_CC 0x04020000 #define BUF_SPU_CC 0x04020000
#define BUF_SPU_DVB 0x04030000 #define BUF_SPU_DVB 0x04030000
#define BUF_SPU_SVCD 0x04040000 #define BUF_SPU_SVCD 0x04040000
#define BUF_SPU_CVD 0x04050000 #define BUF_SPU_CVD 0x04050000
#define BUF_SPU_OGM 0x04060000 #define BUF_SPU_OGM 0x04060000
#define BUF_SPU_CMML 0x04070000 #define BUF_SPU_CMML 0x04070000
#define BUF_SPU_HDMV 0x04080000 #define BUF_SPU_HDMV 0x04080000
/*@}*/
/* demuxer block types: */ /**
* @defgroup buffer_demux Demuxer block types
*/
/*@{*/
#define BUF_DEMUX_BLOCK 0x05000000 #define BUF_DEMUX_BLOCK 0x05000000
/*@}*/
/*@}*/
typedef struct extra_info_s extra_info_t; typedef struct extra_info_s extra_info_t;
/* /**
* extra_info_t is used to pass information from input or demuxer plugins * @brief Structure to pass information from input or demuxer plugins
* to output frames (past decoder). new data must be added after the existi * to output frames (past decoder).
ng *
* fields for backward compatibility. * New data must be added after the existing fields to not break ABI
* (backward compatibility).
*/ */
struct extra_info_s { struct extra_info_s {
int input_normpos; /* remember where this buf came from int input_normpos; /**< remember where this buf came fr
in om in
* the input source (0..65535). can * the input source (0..65535). ca
be n be
* either time or offset based. */ * either time or offset based. */
int input_time; /* time offset in miliseconds from int input_time; /**< time offset in miliseconds from
* beginning of stream */ * beginning of stream */
uint32_t frame_number; /* number of current frame if known uint32_t frame_number; /**< number of current frame if know
*/ n */
int seek_count; /* internal engine use */ int seek_count; /**< internal engine use */
int64_t vpts; /* set on output layers only */ int64_t vpts; /**< set on output layers only */
int invalid; /* do not use this extra info to upd int invalid; /**< do not use this extra info to u
ate anything */ pdate anything */
int total_time; /* duration in miliseconds of the st int total_time; /**< duration in miliseconds of the
ream */ stream */
}; };
#define BUF_NUM_DEC_INFO 5 #define BUF_NUM_DEC_INFO 5
typedef struct buf_element_s buf_element_t; typedef struct buf_element_s buf_element_t;
struct buf_element_s { struct buf_element_s {
buf_element_t *next; buf_element_t *next;
unsigned char *mem; unsigned char *mem;
unsigned char *content; /* start of raw content in mem (without header etc) */ unsigned char *content; /**< start of raw content in mem (withou t header etc) */
int32_t size ; /* size of _content_ int32_t size ; /**< size of _content_
*/ */
int32_t max_size; /* size of pre-allocated memory pointed int32_t max_size; /**< size of pre-allocated memory pointe
to by "mem" */ d to by "mem" */
uint32_t type; int64_t pts; /**< presentation time stamp, used for a
int64_t pts; /* presentation time stamp, used for a/v /v sync */
sync */ int64_t disc_off; /**< discontinuity offset
int64_t disc_off; /* discontinuity offset */
*/
extra_info_t *extra_info; /* extra info will be passed to frames */ extra_info_t *extra_info; /**< extra info will be passed to frame s */
uint32_t decoder_flags; /* stuff like keyframe, is_header .. . see below */ uint32_t decoder_flags; /**< stuff like keyframe, is_header ... see below */
/* additional decoder flags and other dec-spec. stu ff */ /** additional decoder flags and other dec-spec. stuff */
uint32_t decoder_info[BUF_NUM_DEC_INFO]; uint32_t decoder_info[BUF_NUM_DEC_INFO];
/* pointers to dec-spec. stuff */ /** pointers to dec-spec. stuff */
void *decoder_info_ptr[BUF_NUM_DEC_INFO]; void *decoder_info_ptr[BUF_NUM_DEC_INFO];
void (*free_buffer) (buf_element_t *buf); void (*free_buffer) (buf_element_t *buf);
void *source; /* pointer to source of this buffer for * void *source; /**< pointer to source of this buffer for
/ * free_buffer
/* free_buffer * */
/
uint32_t type;
} ; } ;
/* keyframe should be set whenever possible (that is, when demuxer /** keyframe should be set whenever possible (that is, when demuxer
* knows about frames and keyframes). */ * knows about frames and keyframes). */
#define BUF_FLAG_KEYFRAME 0x0001 #define BUF_FLAG_KEYFRAME 0x0001
/* frame start/end. BUF_FLAG_FRAME_END is sent on last buf of a frame */ /** frame start/end. BUF_FLAG_FRAME_END is sent on last buf of a frame */
#define BUF_FLAG_FRAME_START 0x0002 #define BUF_FLAG_FRAME_START 0x0002
#define BUF_FLAG_FRAME_END 0x0004 #define BUF_FLAG_FRAME_END 0x0004
/* any out-of-band data needed to initialize decoder must have /** any out-of-band data needed to initialize decoder must have
* this flag set. */ * this flag set. */
#define BUF_FLAG_HEADER 0x0008 #define BUF_FLAG_HEADER 0x0008
/* preview buffers are normal data buffers that must not produce any /** preview buffers are normal data buffers that must not produce any
* output in decoders (may be used to sneak details about the stream * output in decoders (may be used to sneak details about the stream
* to come). */ * to come). */
#define BUF_FLAG_PREVIEW 0x0010 #define BUF_FLAG_PREVIEW 0x0010
/* set when user stop the playback */ /** set when user stop the playback */
#define BUF_FLAG_END_USER 0x0020 #define BUF_FLAG_END_USER 0x0020
/* set when stream finished naturaly */ /** set when stream finished naturaly */
#define BUF_FLAG_END_STREAM 0x0040 #define BUF_FLAG_END_STREAM 0x0040
/* decoder_info[0] carries the frame step (1/90000). */ /** decoder_info[0] carries the frame step (1/90000). */
#define BUF_FLAG_FRAMERATE 0x0080 #define BUF_FLAG_FRAMERATE 0x0080
/* hint to metronom that seeking has occurred */ /** hint to metronom that seeking has occurred */
#define BUF_FLAG_SEEK 0x0100 #define BUF_FLAG_SEEK 0x0100
/* special information inside, see below. */ /** special information inside, see below. */
#define BUF_FLAG_SPECIAL 0x0200 #define BUF_FLAG_SPECIAL 0x0200
/* header use standard xine_bmiheader or xine_waveformatex structs. /** header use standard xine_bmiheader or xine_waveformatex structs.
* xine_waveformatex is actually optional since the most important * xine_waveformatex is actually optional since the most important
* information for audio init is available from decoder_info[]. * information for audio init is available from decoder_info[].
* note: BUF_FLAG_HEADER must also be set. */ * note: BUF_FLAG_HEADER must also be set. */
#define BUF_FLAG_STDHEADER 0x0400 #define BUF_FLAG_STDHEADER 0x0400
/* decoder_info[1] carries numerator for display aspect ratio /** decoder_info[1] carries numerator for display aspect ratio
* decoder_info[2] carries denominator for display aspect ratio */ * decoder_info[2] carries denominator for display aspect ratio */
#define BUF_FLAG_ASPECT 0x0800 #define BUF_FLAG_ASPECT 0x0800
/* represent the state of gapless_switch at the time buf was enqueued */ /* represent the state of gapless_switch at the time buf was enqueued */
#define BUF_FLAG_GAPLESS_SW 0x1000 #define BUF_FLAG_GAPLESS_SW 0x1000
/* Amount of audio padding added by encoder (mp3, aac). These empty /* Amount of audio padding added by encoder (mp3, aac). These empty
* audio frames are causing a gap when switching between mp3 files. * audio frames are causing a gap when switching between mp3 files.
* decoder_info[1] carries amount of audio frames padded at the * decoder_info[1] carries amount of audio frames padded at the
* beginning of the buffer * beginning of the buffer
* decoder_info[2] carries amount of audio frames padded at the end of * decoder_info[2] carries amount of audio frames padded at the end of
* the buffer */ * the buffer */
#define BUF_FLAG_AUDIO_PADDING 0x2000 #define BUF_FLAG_AUDIO_PADDING 0x2000
/* Special buffer types: /**
* \defgroup buffer_special Special buffer types:
* Sometimes there is a need to relay special information from a demuxer * Sometimes there is a need to relay special information from a demuxer
* to a video decoder. For example, some file types store palette data in * to a video decoder. For example, some file types store palette data in
* the file header independant of the video data. The special buffer type * the file header independant of the video data. The special buffer type
* offers a way to communicate this or any other custom, format-specific * offers a way to communicate this or any other custom, format-specific
* data to the decoder. * data to the decoder.
* *
* The interface was designed in a way that did not require an API * The interface was designed in a way that did not require an API
* version bump. To send a special buffer type, set a buffer's flags field * version bump. To send a special buffer type, set a buffer's flags field
* to BUF_FLAG_SPECIAL. Set the buffer's decoder_info[1] field to a * to BUF_FLAG_SPECIAL. Set the buffer's decoder_info[1] field to a
* number according to one of the special buffer subtypes defined below. * number according to one of the special buffer subtypes defined below.
* The second and third decoder_info[] fields are defined according to * The second and third decoder_info[] fields are defined according to
* your buffer type's requirements. * your buffer type's requirements.
* *
* Finally, remember to set the buffer's size to 0. This way, if a special * Finally, remember to set the buffer's size to 0. This way, if a special
* buffer is sent to a decode that does not know how to handle it, the * buffer is sent to a decode that does not know how to handle it, the
* buffer will fall through to the case where the buffer's data content * buffer will fall through to the case where the buffer's data content
* is accumulated and no harm will be done. * is accumulated and no harm will be done.
*/ */
/*@{*/
/* these are the types of special buffers */ /**
/*
* In a BUF_SPECIAL_PALETTE buffer: * In a BUF_SPECIAL_PALETTE buffer:
* decoder_info[1] = BUF_SPECIAL_PALETTE * decoder_info[1] = BUF_SPECIAL_PALETTE
* decoder_info[2] = number of entries in palette table * decoder_info[2] = number of entries in palette table
* decoder_info_ptr[2] = pointer to palette table * decoder_info_ptr[2] = pointer to palette table
* This buffer type is used to provide a file- and decoder-independent * This buffer type is used to provide a file- and decoder-independent
* facility to transport RGB color palettes from demuxers to decoders. * facility to transport RGB color palettes from demuxers to decoders.
* A palette table is an array of palette_entry_t structures. A decoder * A palette table is an array of palette_entry_t structures. A decoder
* should not count on this array to exist for the duration of the * should not count on this array to exist for the duration of the
* program's execution and should copy, manipulate, and store the palette * program's execution and should copy, manipulate, and store the palette
* data privately if it needs the palette information. * data privately if it needs the palette information.
*/ */
#define BUF_SPECIAL_PALETTE 1 #define BUF_SPECIAL_PALETTE 1
/* special buffer type 2 used to be defined but is now available for use */ /* special buffer type 2 used to be defined but is now available for use */
/* /**
* In a BUF_SPECIAL_ASPECT buffer: * In a BUF_SPECIAL_ASPECT buffer:
* decoder_info[1] = BUF_SPECIAL_ASPECT * decoder_info[1] = BUF_SPECIAL_ASPECT
* decoder_info[2] = MPEG2 aspect ratio code * decoder_info[2] = MPEG2 aspect ratio code
* decoder_info[3] = stream scale prohibitions * decoder_info[3] = stream scale prohibitions
* This buffer is used to force mpeg decoders to use a certain aspect. * This buffer is used to force mpeg decoders to use a certain aspect.
* Currently xine-dvdnav uses this, because it has more accurate informatio n * Currently xine-dvdnav uses this, because it has more accurate informatio n
* about the aspect from the dvd ifo-data. * about the aspect from the dvd ifo-data.
* The stream scale prohibitions are also delivered, with bit 0 meaning * The stream scale prohibitions are also delivered, with bit 0 meaning
* "deny letterboxing" and bit 1 meaning "deny pan&scan" * "deny letterboxing" and bit 1 meaning "deny pan&scan"
*/ */
#define BUF_SPECIAL_ASPECT 3 #define BUF_SPECIAL_ASPECT 3
/* /**
* In a BUF_SPECIAL_DECODER_CONFIG buffer: * In a BUF_SPECIAL_DECODER_CONFIG buffer:
* decoder_info[1] = BUF_SPECIAL_DECODER_CONFIG * decoder_info[1] = BUF_SPECIAL_DECODER_CONFIG
* decoder_info[2] = data size * decoder_info[2] = data size
* decoder_info_ptr[2] = pointer to data * decoder_info_ptr[2] = pointer to data
* This buffer is used to pass config information from .mp4 files * This buffer is used to pass config information from .mp4 files
* (atom esds) to decoders. both mpeg4 and aac streams use that. * (atom esds) to decoders. both mpeg4 and aac streams use that.
*/ */
#define BUF_SPECIAL_DECODER_CONFIG 4 #define BUF_SPECIAL_DECODER_CONFIG 4
/* /**
* In a BUF_SPECIAL_STSD_ATOM buffer: * In a BUF_SPECIAL_STSD_ATOM buffer:
* decoder_info[1] = BUF_SPECIAL_STSD_ATOM * decoder_info[1] = BUF_SPECIAL_STSD_ATOM
* decoder_info[2] = size of the ImageDescription atom, minus the * decoder_info[2] = size of the ImageDescription atom, minus the
* four length bytes at the beginning * four length bytes at the beginning
* decoder_info_ptr[2] = pointer to ImageDescription atom, starting with * decoder_info_ptr[2] = pointer to ImageDescription atom, starting with
* the codec fourcc * the codec fourcc
* Some Quicktime decoders need information contained within the * Some Quicktime decoders need information contained within the
* ImageDescription atom inside a Quicktime file's stsd atom. This * ImageDescription atom inside a Quicktime file's stsd atom. This
* special buffer carries the ImageDescription atom from the QT demuxer * special buffer carries the ImageDescription atom from the QT demuxer
* to an A/V decoder. * to an A/V decoder.
*/ */
#define BUF_SPECIAL_STSD_ATOM 5 #define BUF_SPECIAL_STSD_ATOM 5
/* /**
* In a BUF_SPECIAL_LPCM_CONFIG buffer: * In a BUF_SPECIAL_LPCM_CONFIG buffer:
* decoder_info[1] = BUF_SPECIAL_LPCM_CONFIG * decoder_info[1] = BUF_SPECIAL_LPCM_CONFIG
* decoder_info[2] = config data * decoder_info[2] = config data
* lpcm data encoded into mpeg2 streams have a format configuration * lpcm data encoded into mpeg2 streams have a format configuration
* byte in every frame. this is used to detect the sample rate, * byte in every frame. this is used to detect the sample rate,
* number of bits and channels. * number of bits and channels.
*/ */
#define BUF_SPECIAL_LPCM_CONFIG 6 #define BUF_SPECIAL_LPCM_CONFIG 6
/* /**
* In a BUF_SPECIAL_CHARSET_ENCODING buffer: * In a BUF_SPECIAL_CHARSET_ENCODING buffer:
* decoder_info[1] = BUF_SPECIAL_CHARSET_ENCODING * decoder_info[1] = BUF_SPECIAL_CHARSET_ENCODING
* decoder_info[2] = size of charset encoding string * decoder_info[2] = size of charset encoding string
* decoder_info_ptr[2] = pointer to charset encoding string * decoder_info_ptr[2] = pointer to charset encoding string
* This is used mostly with subtitle buffers when encoding is * This is used mostly with subtitle buffers when encoding is
* known at demuxer level (take precedence over xine config * known at demuxer level (take precedence over xine config
* settings such as subtitles.separate.src_encoding) * settings such as subtitles.separate.src_encoding)
*/ */
#define BUF_SPECIAL_CHARSET_ENCODING 7 #define BUF_SPECIAL_CHARSET_ENCODING 7
/* /**
* In a BUF_SPECIAL_SPU_DVD_SUBTYPE: * In a BUF_SPECIAL_SPU_DVD_SUBTYPE:
* decoder_info[1] = BUF_SPECIAL_SPU_DVD_SUBTYPE * decoder_info[1] = BUF_SPECIAL_SPU_DVD_SUBTYPE
* decoder_info[2] = subtype * decoder_info[2] = subtype
* decoder_info[3] = * decoder_info[3] =
* This buffer is pass SPU subtypes from DVDs * This buffer is pass SPU subtypes from DVDs
*/ */
#define BUF_SPECIAL_SPU_DVD_SUBTYPE 8 #define BUF_SPECIAL_SPU_DVD_SUBTYPE 8
#define SPU_DVD_SUBTYPE_CLUT 1 #define SPU_DVD_SUBTYPE_CLUT 1
#define SPU_DVD_SUBTYPE_PACKAGE 2 #define SPU_DVD_SUBTYPE_PACKAGE 2
#define SPU_DVD_SUBTYPE_VOBSUB_PACKAGE 3 #define SPU_DVD_SUBTYPE_VOBSUB_PACKAGE 3
#define SPU_DVD_SUBTYPE_NAV 4 #define SPU_DVD_SUBTYPE_NAV 4
/* In a BUF_SPECIAL_SPU_DVB_DESCRIPTOR /**
* In a BUF_SPECIAL_SPU_DVB_DESCRIPTOR
* decoder_info[1] = BUF_SPECIAL_SPU_DVB_DESCRIPTOR * decoder_info[1] = BUF_SPECIAL_SPU_DVB_DESCRIPTOR
* decoder_info[2] = size of spu_dvb_descriptor_t * decoder_info[2] = size of spu_dvb_descriptor_t
* decoder_info_ptr[2] = pointer to spu_dvb_descriptor_t, or NULL * decoder_info_ptr[2] = pointer to spu_dvb_descriptor_t, or NULL
* decoder_info[3] = * decoder_info[3] =
* *
* This buffer is used to tell a DVBSUB decoder when the stream * This buffer is used to tell a DVBSUB decoder when the stream
* changes. For more information on how to write a DVBSUB decoder, * changes. For more information on how to write a DVBSUB decoder,
* see the comment at the top of src/demuxers/demux_ts.c * see the comment at the top of src/demuxers/demux_ts.c
**/ **/
#define BUF_SPECIAL_SPU_DVB_DESCRIPTOR 9 #define BUF_SPECIAL_SPU_DVB_DESCRIPTOR 9
/* /**
* In a BUF_SPECIAL_RV_CHUNK_TABLE: * In a BUF_SPECIAL_RV_CHUNK_TABLE:
* decoder_info[1] = BUF_SPECIAL_RV_CHUNK_TABLE * decoder_info[1] = BUF_SPECIAL_RV_CHUNK_TABLE
* decoder_info[2] = number of entries in chunk table * decoder_info[2] = number of entries in chunk table
* decoder_info_ptr[2] = pointer to the chunk table * decoder_info_ptr[2] = pointer to the chunk table
* *
* This buffer transports the chunk table associated to each RealVideo fram e. * This buffer transports the chunk table associated to each RealVideo fram e.
*/ */
#define BUF_SPECIAL_RV_CHUNK_TABLE 10 #define BUF_SPECIAL_RV_CHUNK_TABLE 10
/*@}*/
typedef struct spu_dvb_descriptor_s spu_dvb_descriptor_t; typedef struct spu_dvb_descriptor_s spu_dvb_descriptor_t;
struct spu_dvb_descriptor_s struct spu_dvb_descriptor_s
{ {
char lang[4]; char lang[4];
long comp_page_id; long comp_page_id;
long aux_page_id; long aux_page_id;
} ; } ;
typedef struct palette_entry_s palette_entry_t; typedef struct palette_entry_s palette_entry_t;
skipping to change at line 613 skipping to change at line 632
int buffer_pool_buf_size; int buffer_pool_buf_size;
void *buffer_pool_base; /*used to free mem chunk */ void *buffer_pool_base; /*used to free mem chunk */
void (*alloc_cb[BUF_MAX_CALLBACKS])(fifo_buffer_t *fifo, void * data_cb); void (*alloc_cb[BUF_MAX_CALLBACKS])(fifo_buffer_t *fifo, void * data_cb);
void (*put_cb[BUF_MAX_CALLBACKS])(fifo_buffer_t *fifo, buf_elem ent_t *buf, void *data_cb); void (*put_cb[BUF_MAX_CALLBACKS])(fifo_buffer_t *fifo, buf_elem ent_t *buf, void *data_cb);
void (*get_cb[BUF_MAX_CALLBACKS])(fifo_buffer_t *fifo, buf_elem ent_t *buf, void *data_cb); void (*get_cb[BUF_MAX_CALLBACKS])(fifo_buffer_t *fifo, buf_elem ent_t *buf, void *data_cb);
void *alloc_cb_data[BUF_MAX_CALLBACKS]; void *alloc_cb_data[BUF_MAX_CALLBACKS];
void *put_cb_data[BUF_MAX_CALLBACKS]; void *put_cb_data[BUF_MAX_CALLBACKS];
void *get_cb_data[BUF_MAX_CALLBACKS]; void *get_cb_data[BUF_MAX_CALLBACKS];
} ; } ;
/* /**
* allocate and initialize new (empty) fifo buffer, * @brief Allocate and initialise new (empty) FIFO buffers.
* init buffer pool for it: * @param num_buffer Number of buffers to allocate.
* allocate num_buffers of buf_size bytes each * @param buf_size Size of each buffer.
* @internal Only used by video and audio decoder loops.
*/ */
fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size) XINE _MALLOC;
fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size) XINE /**
_MALLOC XINE_PROTECTED; * @brief Allocate and initialise new dummy FIFO buffers.
fifo_buffer_t *_x_dummy_fifo_buffer_new (int num_buffers, uint32_t buf_size * @param num_buffer Number of dummy buffers to allocate.
) XINE_MALLOC XINE_PROTECTED; * @param buf_size Size of each buffer.
* @internal Only used by video and audio decoder loops.
*/
fifo_buffer_t *_x_dummy_fifo_buffer_new (int num_buffers, uint32_t buf_size
) XINE_MALLOC;
/* return BUF_VIDEO_xxx given the fourcc /**
* fourcc_int must be read in machine endianness * @brief Returns the \ref buffer_video "BUF_VIDEO_xxx" for the given fourc
c.
* @param fourcc_int 32-bit FOURCC value in machine endianness
* @sa _x_formattag_to_buf_audio
*
* example: fourcc_int = *(uint32_t *)fourcc_char; * example: fourcc_int = *(uint32_t *)fourcc_char;
*/ */
uint32_t _x_fourcc_to_buf_video( uint32_t fourcc_int ) XINE_PROTECTED; uint32_t _x_fourcc_to_buf_video( uint32_t fourcc_int ) XINE_PROTECTED;
/* return codec name given BUF_VIDEO_xxx */ /**
* @brief Returns video codec name given the buffer type.
* @param buf_type One of the \ref buffer_video "BUF_VIDEO_xxx" values.
* @sa _x_buf_audio_name
*/
const char * _x_buf_video_name( uint32_t buf_type ) XINE_PROTECTED; const char * _x_buf_video_name( uint32_t buf_type ) XINE_PROTECTED;
/* return BUF_AUDIO_xxx given the formattag */ /**
* @brief Returns the \ref buffer_audio "BUF_AUDIO_xxx" for the given forma
ttag.
* @param formattagg 32-bit format tag value in machine endianness
* @sa _x_fourcc_to_buf_video
*/
uint32_t _x_formattag_to_buf_audio( uint32_t formattag ) XINE_PROTECTED; uint32_t _x_formattag_to_buf_audio( uint32_t formattag ) XINE_PROTECTED;
/* return codec name given BUF_AUDIO_xxx */ /**
* @brief Returns audio codec name given the buffer type.
* @param buf_type One of the \ref buffer_audio "BUF_AUDIO_xxx" values.
* @sa _x_buf_video_name
*/
const char * _x_buf_audio_name( uint32_t buf_type ) XINE_PROTECTED; const char * _x_buf_audio_name( uint32_t buf_type ) XINE_PROTECTED;
#ifndef SUPPORT_ATTRIBUTE_PACKED /**
/* no attribute packed? let's try with pragma pack as a last resort */ * @brief xine version of BITMAPINFOHEADER.
#pragma pack(2) * @note Should be safe to compile on 64bits machines.
#endif * @note Will always use machine endian format, so demuxers reading
/* this is xine version of BITMAPINFOHEADER * stuff from win32 formats must use the function below.
* - should be safe to compile on 64bits machines
* - will always use machine endian format, so demuxers reading
* stuff from win32 formats must use the function below.
*/ */
typedef struct XINE_PACKED { typedef struct XINE_PACKED {
int32_t biSize; int32_t biSize;
int32_t biWidth; int32_t biWidth;
int32_t biHeight; int32_t biHeight;
int16_t biPlanes; int16_t biPlanes;
int16_t biBitCount; int16_t biBitCount;
uint32_t biCompression; uint32_t biCompression;
int32_t biSizeImage; int32_t biSizeImage;
int32_t biXPelsPerMeter; int32_t biXPelsPerMeter;
int32_t biYPelsPerMeter; int32_t biYPelsPerMeter;
int32_t biClrUsed; int32_t biClrUsed;
int32_t biClrImportant; int32_t biClrImportant;
} xine_bmiheader; } xine_bmiheader;
/* this is xine version of WAVEFORMATEX /**
* (the same comments from xine_bmiheader) * @brief xine version of WAVEFORMATEX.
* @note The same comments from xine_bmiheader applies.
*/ */
typedef struct XINE_PACKED { typedef struct XINE_PACKED {
int16_t wFormatTag; int16_t wFormatTag;
int16_t nChannels; int16_t nChannels;
int32_t nSamplesPerSec; int32_t nSamplesPerSec;
int32_t nAvgBytesPerSec; int32_t nAvgBytesPerSec;
int16_t nBlockAlign; int16_t nBlockAlign;
int16_t wBitsPerSample; int16_t wBitsPerSample;
int16_t cbSize; int16_t cbSize;
} xine_waveformatex; } xine_waveformatex;
#ifndef SUPPORT_ATTRIBUTE_PACKED
#pragma pack()
#endif
/* convert xine_bmiheader struct from little endian */ /** Convert xine_bmiheader struct from little endian */
void _x_bmiheader_le2me( xine_bmiheader *bih ) XINE_PROTECTED; void _x_bmiheader_le2me( xine_bmiheader *bih ) XINE_PROTECTED;
/* convert xine_waveformatex struct from little endian */ /** Convert xine_waveformatex struct from little endian */
void _x_waveformatex_le2me( xine_waveformatex *wavex ) XINE_PROTECTED; void _x_waveformatex_le2me( xine_waveformatex *wavex ) XINE_PROTECTED;
static __inline int _x_is_fourcc(void *ptr, void *tag) { static __inline int _x_is_fourcc(const void *ptr, const void *tag) {
return memcmp(ptr, tag, 4) == 0; return memcmp(ptr, tag, 4) == 0;
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 66 change blocks. 
117 lines changed or deleted 152 lines changed or added


 configfile.h   configfile.h 
skipping to change at line 32 skipping to change at line 32
#ifndef HAVE_CONFIGFILE_H #ifndef HAVE_CONFIGFILE_H
#define HAVE_CONFIGFILE_H #define HAVE_CONFIGFILE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <pthread.h> #include <pthread.h>
#ifdef XINE_COMPILE #include <xine.h>
# include "xine.h"
#else
# include <xine.h>
#endif
#define CONFIG_FILE_VERSION 2 #define CONFIG_FILE_VERSION 2
/* /**
* config entries above this experience * config entries above this experience
* level must never be changed from MRL * level must never be changed from MRL
*/ */
#define XINE_CONFIG_SECURITY 30 #define XINE_CONFIG_SECURITY 30
typedef struct cfg_entry_s cfg_entry_t; typedef struct cfg_entry_s cfg_entry_t;
typedef struct config_values_s config_values_t; typedef struct config_values_s config_values_t;
struct cfg_entry_s { struct cfg_entry_s {
cfg_entry_t *next; cfg_entry_t *next;
config_values_t *config; config_values_t *config;
char *key; char *key;
int type; int type;
/* type unknown */ /** user experience level */
int exp_level;
/** type unknown */
char *unknown_value; char *unknown_value;
/* type string */ /** type string */
char *str_value; char *str_value;
char *str_default; char *str_default;
/* common to range, enum, num, bool: */ /** common to range, enum, num, bool: */
int num_value; int num_value;
int num_default; int num_default;
/* type range specific: */ /** type range specific: */
int range_min; int range_min;
int range_max; int range_max;
/* type enum specific: */ /** type enum specific: */
char **enum_values; char **enum_values;
/* help info for the user */ /** help info for the user */
char *description; char *description;
char *help; char *help;
/* user experience level */ /** callback function and data for live changeable values */
int exp_level;
/* callback function and data for live changeable values */
xine_config_cb_t callback; xine_config_cb_t callback;
void *callback_data; void *callback_data;
}; };
struct config_values_s { struct config_values_s {
/* /*
* register config values * register config values
* *
* these functions return the current value of the * these functions return the current value of the
skipping to change at line 155 skipping to change at line 150
int (*register_bool) (config_values_t *self, int (*register_bool) (config_values_t *self,
const char *key, const char *key,
int def_value, int def_value,
const char *description, const char *description,
const char *help, const char *help,
int exp_level, int exp_level,
xine_config_cb_t changed_cb, xine_config_cb_t changed_cb,
void *cb_data); void *cb_data);
/* convenience function to update range, enum, num and bool values */ void (*register_entry) (config_values_t *self, cfg_entry_t* entry);
/** convenience function to update range, enum, num and bool values */
void (*update_num) (config_values_t *self, const char *key, int value); void (*update_num) (config_values_t *self, const char *key, int value);
/* convenience function to update string values */ /** convenience function to update string values */
void (*update_string) (config_values_t *self, const char *key, const char *value); void (*update_string) (config_values_t *self, const char *key, const char *value);
/* small utility function for enum handling */ /** small utility function for enum handling */
int (*parse_enum) (const char *str, const char **values); int (*parse_enum) (const char *str, const char **values);
/* /**
* lookup config entries * @brief lookup config entries
* *
* remember to call the changed_cb if it exists * remember to call the changed_cb if it exists
* and you changed the value of this item * and you changed the value of this item
*/ */
cfg_entry_t* (*lookup_entry) (config_values_t *self, const char *key); cfg_entry_t* (*lookup_entry) (config_values_t *self, const char *key);
/* /**
* unregister callback function * unregister entry callback function
*/ */
void (*unregister_callback) (config_values_t *self, const char *key); void (*unregister_callback) (config_values_t *self, const char *key);
/* /**
* dispose of all config entries in memory * dispose of all config entries in memory
*/ */
void (*dispose) (config_values_t *self); void (*dispose) (config_values_t *self);
/* /**
* callback called when a new config entry is registered
*/
void (*set_new_entry_callback) (config_values_t *self, xine_config_cb_t n
ew_entry_cb, void *cb_data);
/**
* unregister the callback
*/
void (*unset_new_entry_callback) (config_values_t *self);
/**
* serialize a config entry.
* return a base64 null terminated string.
*/
char* (*get_serialized_entry) (config_values_t *self, const char *key);
/**
* deserialize a config entry.
* value is a base 64 encoded string
* return the key of the serialized entry
*/
char* (*register_serialized_entry) (config_values_t *self, const char *va
lue);
/**
* config values are stored here: * config values are stored here:
*/ */
cfg_entry_t *first, *last, *cur; cfg_entry_t *first, *last, *cur;
/* /**
* new entry callback
*/
xine_config_cb_t new_entry_cb;
void *new_entry_cbdata;
/**
* mutex for modification to the config * mutex for modification to the config
*/ */
pthread_mutex_t config_lock; pthread_mutex_t config_lock;
/* /**
* current config file's version number * current config file's version number
*/ */
int current_version; int current_version;
}; };
/* /**
* allocate and init a new xine config object * @brief allocate and init a new xine config object
* @internal
*/ */
config_values_t *_x_config_init (void) XINE_MALLOC XINE_PROTECTED; config_values_t *_x_config_init (void) XINE_MALLOC;
/* /**
* interpret stream_setup part of mrls for config value changes * @brief interpret stream_setup part of mrls for config value changes
* @internal
*/ */
int _x_config_change_opt(config_values_t *config, const char *opt) XINE_PRO TECTED; int _x_config_change_opt(config_values_t *config, const char *opt);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 22 change blocks. 
34 lines changed or deleted 64 lines changed or added


 demux.h   demux.h 
skipping to change at line 24 skipping to change at line 24
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/ */
#ifndef HAVE_DEMUX_H #ifndef HAVE_DEMUX_H
#define HAVE_DEMUX_H #define HAVE_DEMUX_H
#include <xine/input_plugin.h>
#include <xine/buffer.h>
#include <xine/xine_internal.h>
#ifdef XINE_COMPILE #ifdef XINE_COMPILE
# include "input/input_plugin.h" # include <xine/plugin_catalog.h>
# include "buffer.h"
# include "xine_internal.h"
#else
# include <xine/input_plugin.h>
# include <xine/buffer.h>
# include <xine/xine_internal.h>
#endif #endif
#define DEMUXER_PLUGIN_IFACE_VERSION 26 #define DEMUXER_PLUGIN_IFACE_VERSION 27
#define DEMUX_OK 0 #define DEMUX_OK 0
#define DEMUX_FINISHED 1 #define DEMUX_FINISHED 1
#define DEMUX_CANNOT_HANDLE 0 #define DEMUX_CANNOT_HANDLE 0
#define DEMUX_CAN_HANDLE 1 #define DEMUX_CAN_HANDLE 1
#define METHOD_BY_CONTENT 1 #define METHOD_BY_CONTENT 1
#define METHOD_BY_EXTENSION 2 #define METHOD_BY_MRL 2
#define METHOD_EXPLICIT 3 #define METHOD_EXPLICIT 3
typedef struct demux_class_s demux_class_t ; typedef struct demux_class_s demux_class_t ;
typedef struct demux_plugin_s demux_plugin_t; typedef struct demux_plugin_s demux_plugin_t;
struct demux_class_s { struct demux_class_s {
/* /*
* open a new instance of this plugin class * open a new instance of this plugin class
*/ */
demux_plugin_t* (*open_plugin) (demux_class_t *this, xine_stream_t *strea m, input_plugin_t *input); demux_plugin_t* (*open_plugin) (demux_class_t *this, xine_stream_t *strea m, input_plugin_t *input);
/* /**
* return human readable (verbose = 1 line) description for this plugin * @brief short human readable identifier for this plugin class
*/ */
const char* (*get_description) (demux_class_t *this); const char *identifier;
/* /**
* return human readable identifier for this plugin * @brief human readable (verbose = 1 line) description for this plugin c
lass
*
* The description is passed to gettext() to internationalise.
*/ */
const char *description;
const char* (*get_identifier) (demux_class_t *this); /**
* @brief Optional non-standard catalog to use with dgettext() for descri
ption.
*/
const char *text_domain;
/* /**
* return MIME types supported for this plugin * @brief MIME types supported for this plugin
*/ */
const char* (*get_mimetypes) (demux_class_t *this); const char* mimetypes;
/* /**
* return ' ' seperated list of file extensions this * @brief space separated list of file extensions this demuxer is
* demuxer is likely to handle * likely to handle
* (will be used to filter media files in *
* file selection dialogs) * (will be used to filter media files in file selection dialogs)
*/ */
const char* extensions;
const char* (*get_extensions) (demux_class_t *this);
/* /*
* close down, free all resources * close down, free all resources
*/ */
void (*dispose) (demux_class_t *this); void (*dispose) (demux_class_t *this);
}; };
#define default_demux_class_dispose (void (*) (demux_class_t *this))free
/* /*
* any demux plugin must implement these functions * any demux plugin must implement these functions
*/ */
struct demux_plugin_s { struct demux_plugin_s {
/* /*
* send headers, followed by BUF_CONTROL_HEADERS_DONE down the * send headers, followed by BUF_CONTROL_HEADERS_DONE down the
* fifos, then return. do not start demux thread (yet) * fifos, then return. do not start demux thread (yet)
*/ */
skipping to change at line 171 skipping to change at line 176
* request optional data from input plugin. * request optional data from input plugin.
*/ */
int (*get_optional_data) (demux_plugin_t *this, void *data, int data_type ); int (*get_optional_data) (demux_plugin_t *this, void *data, int data_type );
/* /*
* "backwards" link to plugin class * "backwards" link to plugin class
*/ */
demux_class_t *demux_class; demux_class_t *demux_class;
void *node; /* used by plugin loader */ /**
* @brief Pointer to the loaded plugin node.
*
* Used by the plugins loader. It's an opaque type when using the
* structure outside of xine's build.
*/
#ifdef XINE_COMPILE
plugin_node_t *node;
#else
void *node;
#endif
} ; } ;
#define default_demux_plugin_dispose (void (*) (demux_plugin_t *this))free
/* /*
* possible capabilites a demux plugin can have: * possible capabilites a demux plugin can have:
*/ */
#define DEMUX_CAP_NOCAP 0x00000000 #define DEMUX_CAP_NOCAP 0x00000000
/* /*
* DEMUX_CAP_AUDIOLANG: * DEMUX_CAP_AUDIOLANG:
* DEMUX_CAP_SPULANG: * DEMUX_CAP_SPULANG:
* demux plugin knows something about audio/spu languages, * demux plugin knows something about audio/spu languages,
* e.g. knows that audio stream #0 is english, * e.g. knows that audio stream #0 is english,
 End of changes. 16 change blocks. 
27 lines changed or deleted 45 lines changed or added


 input_plugin.h   input_plugin.h 
skipping to change at line 26 skipping to change at line 26
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/ */
#ifndef HAVE_INPUT_PLUGIN_H #ifndef HAVE_INPUT_PLUGIN_H
#define HAVE_INPUT_PLUGIN_H #define HAVE_INPUT_PLUGIN_H
#include <sys/types.h> #include <sys/types.h>
#include <xine/os_types.h>
#include <xine/xineutils.h>
#include <xine/buffer.h>
#include <xine/configfile.h>
#ifdef XINE_COMPILE #ifdef XINE_COMPILE
# include <inttypes.h> # include <xine/plugin_catalog.h>
# include "xineutils.h"
# include "buffer.h"
# include "configfile.h"
#else
# include <xine/os_types.h>
# include <xine/xineutils.h>
# include <xine/buffer.h>
# include <xine/configfile.h>
#endif #endif
#define INPUT_PLUGIN_IFACE_VERSION 17 #define INPUT_PLUGIN_IFACE_VERSION 18
typedef struct input_class_s input_class_t ; typedef struct input_class_s input_class_t ;
typedef struct input_plugin_s input_plugin_t; typedef struct input_plugin_s input_plugin_t;
struct input_class_s { struct input_class_s {
/* /*
* create a new instance of this plugin class * create a new instance of this plugin class
* return NULL if the plugin does'nt handle the given mrl * return NULL if the plugin does'nt handle the given mrl
*/ */
input_plugin_t* (*get_instance) (input_class_t *this, xine_stream_t *stre am, const char *mrl); input_plugin_t* (*get_instance) (input_class_t *this, xine_stream_t *stre am, const char *mrl);
/* /**
* return short, human readable identifier for this plugin class * @brief short human readable identifier for this plugin class
* The returned string should not be malloc'd as it is not freed.
*/ */
const char* (*get_identifier) (input_class_t *this); const char *identifier;
/* /**
* return human readable (verbose = 1 line) description for * @brief human readable (verbose = 1 line) description for this plugin c
* this plugin class lass
*
* The description is passed to gettext() to internationalise.
*/ */
const char* (*get_description) (input_class_t *this); const char *description;
/**
* @brief Optional non-standard catalog to use with dgettext() for descri
ption.
*/
const char *text_domain;
/* /*
* ls function, optional: may be NULL * ls function, optional: may be NULL
* return value: NULL => filename is a file, **char=> filename is a dir * return value: NULL => filename is a file, **char=> filename is a dir
*/ */
xine_mrl_t ** (*get_dir) (input_class_t *this, const char *filename, int *nFiles); xine_mrl_t ** (*get_dir) (input_class_t *this, const char *filename, int *nFiles);
/* /*
* generate autoplay list, optional: may be NULL * generate autoplay list, optional: may be NULL
* return value: list of MRLs * return value: list of MRLs
*/ */
char ** (*get_autoplay_list) (input_class_t *this, int *num_files); const char * const * (*get_autoplay_list) (input_class_t *this, int *num_ files);
/* /*
* close down, free all resources * close down, free all resources
*/ */
void (*dispose) (input_class_t *this); void (*dispose) (input_class_t *this);
/* /*
* eject/load the media (if possible), optional: may be NULL * eject/load the media (if possible), optional: may be NULL
* *
* returns 0 for temporary failures * returns 0 for temporary failures
*/ */
int (*eject_media) (input_class_t *this); int (*eject_media) (input_class_t *this);
}; };
#define default_input_class_dispose (void (*) (input_class_t *this))free
struct input_plugin_s { struct input_plugin_s {
/* /*
* open the stream * open the stream
* return 0 if an error occured * return 0 if an error occured
*/ */
int (*open) (input_plugin_t *this); int (*open) (input_plugin_t *this);
/* /*
* return capabilities of the current playable entity. See * return capabilities of the current playable entity. See
skipping to change at line 119 skipping to change at line 123
* make a best-effort attempt to seek, e.g. at least * make a best-effort attempt to seek, e.g. at least
* relative forward seeking should work. * relative forward seeking should work.
*/ */
uint32_t (*get_capabilities) (input_plugin_t *this); uint32_t (*get_capabilities) (input_plugin_t *this);
/* /*
* read nlen bytes, return number of bytes read * read nlen bytes, return number of bytes read
* Should block until some bytes available for read; * Should block until some bytes available for read;
* a return value of 0 indicates no data available * a return value of 0 indicates no data available
*/ */
off_t (*read) (input_plugin_t *this, char *buf, off_t nlen); off_t (*read) (input_plugin_t *this, void *buf, off_t nlen);
/* /*
* read one block, return newly allocated block (or NULL on failure) * read one block, return newly allocated block (or NULL on failure)
* for blocked input sources len must be == blocksize * for blocked input sources len must be == blocksize
* the fifo parameter is only used to get access to the buffer_pool_alloc function * the fifo parameter is only used to get access to the buffer_pool_alloc function
*/ */
buf_element_t *(*read_block)(input_plugin_t *this, fifo_buffer_t *fifo, o ff_t len); buf_element_t *(*read_block)(input_plugin_t *this, fifo_buffer_t *fifo, o ff_t len);
/* /*
* seek position, return new position * seek position, return new position
skipping to change at line 214 skipping to change at line 218
* close stream, free instance resources * close stream, free instance resources
*/ */
void (*dispose) (input_plugin_t *this); void (*dispose) (input_plugin_t *this);
/* /*
* "backward" link to input plugin class struct * "backward" link to input plugin class struct
*/ */
input_class_t *input_class; input_class_t *input_class;
void *node; /* used by plugin loader */ /**
* @brief Pointer to the loaded plugin node.
*
* Used by the plugins loader. It's an opaque type when using the
* structure outside of xine's build.
*/
#ifdef XINE_COMPILE
plugin_node_t *node;
#else
void *node;
#endif
}; };
/* /*
* possible capabilites an input plugin can have: * possible capabilites an input plugin can have:
*/ */
#define INPUT_CAP_NOCAP 0x00000000 #define INPUT_CAP_NOCAP 0x00000000
/* /*
* INPUT_CAP_SEEKABLE: * INPUT_CAP_SEEKABLE:
 End of changes. 11 change blocks. 
21 lines changed or deleted 37 lines changed or added


 io_helper.h   io_helper.h 
skipping to change at line 97 skipping to change at line 97
int _x_io_tcp_connect_finish(xine_stream_t *stream, int fd, int timeout_mse c) XINE_PROTECTED; int _x_io_tcp_connect_finish(xine_stream_t *stream, int fd, int timeout_mse c) XINE_PROTECTED;
/* /*
* read from tcp socket checking demux_action_pending * read from tcp socket checking demux_action_pending
* *
* network input plugins should use this function in order to * network input plugins should use this function in order to
* not freeze the engine. * not freeze the engine.
* *
* aborts with zero if no data is available and *abort is set * aborts with zero if no data is available and *abort is set
*/ */
off_t _x_io_tcp_read (xine_stream_t *stream, int s, char *buf, off_t todo) XINE_PROTECTED; off_t _x_io_tcp_read (xine_stream_t *stream, int s, void *buf, off_t todo) XINE_PROTECTED;
/* /*
* write to a tcp socket checking demux_action_pending * write to a tcp socket checking demux_action_pending
* *
* network input plugins should use this function in order to * network input plugins should use this function in order to
* not freeze the engine. * not freeze the engine.
* *
* aborts with zero if no data is available and *abort is set * aborts with zero if no data is available and *abort is set
*/ */
off_t _x_io_tcp_write (xine_stream_t *stream, int s, char *buf, off_t todo) XINE_PROTECTED; off_t _x_io_tcp_write (xine_stream_t *stream, int s, void *buf, off_t todo) XINE_PROTECTED;
/* /*
* read from a file descriptor checking demux_action_pending * read from a file descriptor checking demux_action_pending
* *
* the fifo input plugin should use this function in order to * the fifo input plugin should use this function in order to
* not freeze the engine. * not freeze the engine.
* *
* aborts with zero if no data is available and *abort is set * aborts with zero if no data is available and *abort is set
*/ */
off_t _x_io_file_read (xine_stream_t *stream, int fd, char *buf, off_t todo ) XINE_PROTECTED; off_t _x_io_file_read (xine_stream_t *stream, int fd, void *buf, off_t todo ) XINE_PROTECTED;
/* /*
* write to a file descriptor checking demux_action_pending * write to a file descriptor checking demux_action_pending
* *
* the fifo input plugin should use this function in order to * the fifo input plugin should use this function in order to
* not freeze the engine. * not freeze the engine.
* *
* aborts with zero if *abort is set * aborts with zero if *abort is set
*/ */
off_t _x_io_file_write (xine_stream_t *stream, int fd, char *buf, off_t tod o) XINE_PROTECTED; off_t _x_io_file_write (xine_stream_t *stream, int fd, void *buf, off_t tod o) XINE_PROTECTED;
/* /*
* read a string from socket, return string length (same as strlen) * read a string from socket, return string length (same as strlen)
* the string is always '\0' terminated but given buffer size is never exce eded * the string is always '\0' terminated but given buffer size is never exce eded
* that is, _x_io_tcp_read_line(,,,X) <= (X-1) ; X > 0 * that is, _x_io_tcp_read_line(,,,X) <= (X-1) ; X > 0
*/ */
int _x_io_tcp_read_line(xine_stream_t *stream, int sock, char *str, int siz e) XINE_PROTECTED; int _x_io_tcp_read_line(xine_stream_t *stream, int sock, char *str, int siz e) XINE_PROTECTED;
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 metronom.h   metronom.h 
skipping to change at line 49 skipping to change at line 49
#ifndef HAVE_METRONOM_H #ifndef HAVE_METRONOM_H
#define HAVE_METRONOM_H #define HAVE_METRONOM_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <pthread.h> #include <pthread.h>
#ifdef XINE_COMPILE #include <xine/video_out.h>
# include "video_out.h" #include <xine.h>
# include "xine.h"
#else
# include <xine/video_out.h>
# include <xine.h>
#endif
typedef struct metronom_s metronom_t ; typedef struct metronom_s metronom_t ;
typedef struct metronom_clock_s metronom_clock_t; typedef struct metronom_clock_s metronom_clock_t;
typedef struct scr_plugin_s scr_plugin_t; typedef struct scr_plugin_s scr_plugin_t;
/* metronom prebuffer can be adjusted with XINE_PARAM_METRONOM_PREBUFFER. /* metronom prebuffer can be adjusted with XINE_PARAM_METRONOM_PREBUFFER.
* it sets how much the first video/audio frame should be delayed to * it sets how much the first video/audio frame should be delayed to
* have some prebuffering at the output layers. reducing this value (about * have some prebuffering at the output layers. reducing this value (about
* 1/8 sec) may result in faster seeking (good to simulate play backwards, * 1/8 sec) may result in faster seeking (good to simulate play backwards,
* for example). * for example).
skipping to change at line 332 skipping to change at line 327
*/ */
#define CLOCK_SCR_ADJUSTABLE 1 #define CLOCK_SCR_ADJUSTABLE 1
/* /*
* SCR (system clock reference) plugins * SCR (system clock reference) plugins
*/ */
struct scr_plugin_s struct scr_plugin_s
{ {
int interface_version;
int (*get_priority) (scr_plugin_t *self); int (*get_priority) (scr_plugin_t *self);
/* /*
* set/get clock speed * set/get clock speed
* *
* for speed constants see xine_internal.h * for speed constants see xine_internal.h
* returns actual speed * returns actual speed
*/ */
int (*set_fine_speed) (scr_plugin_t *self, int speed); int (*set_fine_speed) (scr_plugin_t *self, int speed);
void (*adjust) (scr_plugin_t *self, int64_t vpts); void (*adjust) (scr_plugin_t *self, int64_t vpts);
void (*start) (scr_plugin_t *self, int64_t start_vpts); void (*start) (scr_plugin_t *self, int64_t start_vpts);
int64_t (*get_current) (scr_plugin_t *self); int64_t (*get_current) (scr_plugin_t *self);
void (*exit) (scr_plugin_t *self); void (*exit) (scr_plugin_t *self);
metronom_clock_t *clock; metronom_clock_t *clock;
int interface_version;
}; };
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 3 change blocks. 
9 lines changed or deleted 4 lines changed or added


 osd.h   osd.h 
skipping to change at line 30 skipping to change at line 30
* OSD stuff (text and graphic primitives) * OSD stuff (text and graphic primitives)
*/ */
#ifndef HAVE_OSD_H #ifndef HAVE_OSD_H
#define HAVE_OSD_H #define HAVE_OSD_H
#ifdef HAVE_ICONV #ifdef HAVE_ICONV
# include <iconv.h> # include <iconv.h>
#endif #endif
#ifdef XINE_COMPILE #include <xine/video_overlay.h>
# include "video_overlay.h"
# ifdef __OSD_C__
# include "alphablend.h"
# endif
#else
# include <xine/video_overlay.h>
#endif
typedef struct osd_object_s osd_object_t; typedef struct osd_object_s osd_object_t;
typedef struct osd_renderer_s osd_renderer_t; typedef struct osd_renderer_s osd_renderer_t;
typedef struct osd_font_s osd_font_t; typedef struct osd_font_s osd_font_t;
typedef struct osd_ft2context_s osd_ft2context_t; typedef struct osd_ft2context_s osd_ft2context_t;
struct osd_object_s { struct osd_object_s {
osd_object_t *next; osd_object_t *next;
osd_renderer_t *renderer; osd_renderer_t *renderer;
int width, height; /* work area dimentions */ int width, height; /* work area dimentions */
uint8_t *area; /* work area */ uint8_t *area; /* work area */
int area_touched; /* work area was used for painting */
int display_x,display_y; /* where to display it in screen */ int display_x,display_y; /* where to display it in screen */
/* video output area within osd extent */
int video_window_x, video_window_y;
int video_window_width, video_window_height;
/* extent of reference coordinate system */
int extent_width, extent_height;
/* clipping box inside work area */ /* clipping box inside work area */
int x1, y1; int x1, y1;
int x2, y2; int x2, y2;
uint32_t color[OVL_PALETTE_SIZE]; /* color lookup table */ uint32_t color[OVL_PALETTE_SIZE]; /* color lookup table */
uint8_t trans[OVL_PALETTE_SIZE]; /* mixer key table */ uint8_t trans[OVL_PALETTE_SIZE]; /* mixer key table */
int32_t handle;
#ifdef HAVE_ICONV #ifdef HAVE_ICONV
iconv_t cd; /* iconv handle of encoding */ iconv_t cd; /* iconv handle of encoding */
char *encoding; /* name of encoding */ char *encoding; /* name of encoding */
#endif #endif
osd_font_t *font; osd_font_t *font;
osd_ft2context_t *ft2; osd_ft2context_t *ft2;
/* this holds an optional ARGB overlay, which
* is only be used by supported video_out modules.
* right now this is only vdpau */
argb_layer_t *argb_layer;
int32_t handle;
}; };
/* this one is public */ /* this one is public */
struct xine_osd_s { struct xine_osd_s {
osd_object_t osd; osd_object_t osd;
}; };
struct osd_renderer_s { struct osd_renderer_s {
xine_stream_t *stream;
/* /*
* open a new osd object. this will allocated an empty (all zero) drawing * open a new osd object. this will allocated an empty (all zero) drawing
* area where graphic primitives may be used. * area where graphic primitives may be used.
* It is ok to specify big width and height values. The render will keep * It is ok to specify big width and height values. The render will keep
* track of the smallest changed area to not generate too big overlays. * track of the smallest changed area to not generate too big overlays.
* A default palette is initialized (i sugest keeping color 0 as transpar ent * A default palette is initialized (i sugest keeping color 0 as transpar ent
* for the sake of simplicity) * for the sake of simplicity)
*/ */
osd_object_t* (*new_object) (osd_renderer_t *this, int width, int height) ; osd_object_t* (*new_object) (osd_renderer_t *this, int width, int height) ;
skipping to change at line 213 skipping to change at line 221
* the object is not changed. there may be subsequent drawing on it. * the object is not changed. there may be subsequent drawing on it.
* overlay is blended at output (screen) resolution. * overlay is blended at output (screen) resolution.
*/ */
int (*show_unscaled) (osd_object_t *osd, int64_t vpts ); int (*show_unscaled) (osd_object_t *osd, int64_t vpts );
/* /*
* see xine.h for defined XINE_OSD_CAP_ values. * see xine.h for defined XINE_OSD_CAP_ values.
*/ */
uint32_t (*get_capabilities) (osd_object_t *osd); uint32_t (*get_capabilities) (osd_object_t *osd);
/*
* define extent of reference coordinate system for video
* resolution independent osds. both sizes must be > 0 to
* take effect. otherwise, video resolution will be used.
*/
void (*set_extent) (osd_object_t *osd, int extent_width, int extent_heigh
t);
/*
* set an argb buffer to be blended into video
* the buffer must exactly match the osd dimensions
* and stay valid while the osd is on screen. pass
* a NULL pointer to safely remove the buffer from
* the osd layer. only the dirty area will be
* updated on screen. for convinience the whole
* osd object will be considered dirty when setting
* a different buffer pointer.
* see also XINE_OSD_CAP_ARGB_LAYER
*/
void (*set_argb_buffer) (osd_object_t *osd, uint32_t *argb_buffer,
int dirty_x, int dirty_y, int dirty_width, int d
irty_height);
/*
* osd video window defines an area withing osd extent where the
* video shall be scaled to while an osd is displayed on screen.
* both width and height must be > 0 to take effect.
*/
void (*set_video_window) (osd_object_t *osd,
int window_x, int window_y, int window_width, i
nt window_height);
/* private stuff */ /* private stuff */
pthread_mutex_t osd_mutex; pthread_mutex_t osd_mutex;
video_overlay_event_t event; video_overlay_event_t event;
osd_object_t *osds; /* instances of osd */ osd_object_t *osds; /* instances of osd */
osd_font_t *fonts; /* loaded fonts */ osd_font_t *fonts; /* loaded fonts */
int textpalette; /* default textpalette */ int textpalette; /* default textpalette */
xine_stream_t *stream;
}; };
/* /*
* initialize the osd rendering engine * initialize the osd rendering engine
*/ */
osd_renderer_t *_x_osd_renderer_init( xine_stream_t *stream ) XINE_MALLOC; osd_renderer_t *_x_osd_renderer_init( xine_stream_t *stream ) XINE_MALLOC;
/* /*
* The size of a text palette * The size of a text palette
*/ */
skipping to change at line 263 skipping to change at line 298
* Defined palettes for rendering osd text * Defined palettes for rendering osd text
* (more can be added later) * (more can be added later)
*/ */
#define NUMBER_OF_TEXT_PALETTES 4 #define NUMBER_OF_TEXT_PALETTES 4
#define TEXTPALETTE_WHITE_BLACK_TRANSPARENT 0 #define TEXTPALETTE_WHITE_BLACK_TRANSPARENT 0
#define TEXTPALETTE_WHITE_NONE_TRANSPARENT 1 #define TEXTPALETTE_WHITE_NONE_TRANSPARENT 1
#define TEXTPALETTE_WHITE_NONE_TRANSLUCID 2 #define TEXTPALETTE_WHITE_NONE_TRANSLUCID 2
#define TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3 #define TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3
#ifdef __OSD_C__
/* This text descriptions are used for config screen */
static const char *textpalettes_str[NUMBER_OF_TEXT_PALETTES+1] = {
"white-black-transparent",
"white-none-transparent",
"white-none-translucid",
"yellow-black-transparent",
NULL};
/*
Palette entries as used by osd fonts:
0: not used by font, always transparent
1: font background, usually transparent, may be used to implement
translucid boxes where the font will be printed.
2-5: transition between background and border (usually only alpha
value changes).
6: font border. if the font is to be displayed without border this
will probably be adjusted to font background or near.
7-9: transition between border and foreground
10: font color (foreground)
*/
/*
The palettes below were made by hand, ie, i just throw
values that seemed to do the transitions i wanted.
This can surelly be improved a lot. [Miguel]
*/
static const clut_t textpalettes_color[NUMBER_OF_TEXT_PALETTES][TEXT_PALETT
E_SIZE] = {
/* white, black border, transparent */
{
CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*1*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*2*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*3*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*4*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*5*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*6*/
CLUT_Y_CR_CB_INIT(0x40, 0x80, 0x80), /*7*/
CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*8*/
CLUT_Y_CR_CB_INIT(0xc0, 0x80, 0x80), /*9*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*10*/
},
/* white, no border, transparent */
{
CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*1*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*2*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*3*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*4*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*5*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*6*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*7*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*8*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*9*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*10*/
},
/* white, no border, translucid */
{
CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*1*/
CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*2*/
CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*3*/
CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*4*/
CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*5*/
CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*6*/
CLUT_Y_CR_CB_INIT(0xa0, 0x80, 0x80), /*7*/
CLUT_Y_CR_CB_INIT(0xc0, 0x80, 0x80), /*8*/
CLUT_Y_CR_CB_INIT(0xe0, 0x80, 0x80), /*9*/
CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*10*/
},
/* yellow, black border, transparent */
{
CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*1*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*2*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*3*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*4*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*5*/
CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*6*/
CLUT_Y_CR_CB_INIT(0x40, 0x84, 0x60), /*7*/
CLUT_Y_CR_CB_INIT(0x70, 0x88, 0x40), /*8*/
CLUT_Y_CR_CB_INIT(0xb0, 0x8a, 0x20), /*9*/
CLUT_Y_CR_CB_INIT(0xff, 0x90, 0x00), /*10*/
},
};
static const uint8_t textpalettes_trans[NUMBER_OF_TEXT_PALETTES][TEXT_PALET
TE_SIZE] = {
{0, 0, 3, 6, 8, 10, 12, 14, 15, 15, 15 },
{0, 0, 0, 0, 0, 0, 2, 6, 9, 12, 15 },
{0, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15 },
{0, 0, 3, 6, 8, 10, 12, 14, 15, 15, 15 },
};
#endif /* __OSD_C__ */
#endif #endif
 End of changes. 9 change blocks. 
112 lines changed or deleted 50 lines changed or added


 plugin_catalog.h   plugin_catalog.h 
skipping to change at line 26 skipping to change at line 26
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
* *
* xine-internal header: Definitions for plugin lists * xine-internal header: Definitions for plugin lists
*/ */
#ifndef _PLUGIN_CATALOG_H #ifndef _PLUGIN_CATALOG_H
#define _PLUGIN_CATALOG_H #define _PLUGIN_CATALOG_H
#ifdef XINE_COMPILE #include <xine/xine_plugin.h>
# include "xine_plugin.h" #include <xine/xineutils.h>
# include "xineutils.h"
#else
# include <xine/xine_plugin.h>
# include <xine/xineutils.h>
#endif
#define DECODER_MAX 128 #define DECODER_MAX 128
#define PLUGIN_MAX 256 #define PLUGIN_MAX 256
/* the engine takes this many plugins for one stream type */ /* the engine takes this many plugins for one stream type */
#define PLUGINS_PER_TYPE 10 #define PLUGINS_PER_TYPE 10
#define CACHE_CATALOG_VERSION 2
#define CACHE_CATALOG_FILE ".xine/catalog.cache"
#define CACHE_CATALOG_DIR ".xine"
typedef struct { typedef struct {
char *filename; char *filename;
off_t filesize; off_t filesize;
time_t filemtime; time_t filemtime;
int ref; /* count number of classes */
void *lib_handle; void *lib_handle;
int ref; /* count number of classes */
int no_unload; /* set if the file can't be unloaded */ int no_unload; /* set if the file can't be unloaded */
} plugin_file_t ; } plugin_file_t ;
typedef struct { typedef struct {
plugin_file_t *file; plugin_file_t *file;
plugin_info_t *info; plugin_info_t *info;
void *plugin_class; void *plugin_class;
xine_list_t *config_entry_list;
int ref; /* count intances of plugins */ int ref; /* count intances of plugins */
int priority; int priority;
} plugin_node_t ; } plugin_node_t ;
struct plugin_catalog_s { struct plugin_catalog_s {
xine_sarray_t *plugin_lists[PLUGIN_TYPE_MAX]; xine_sarray_t *plugin_lists[PLUGIN_TYPE_MAX];
xine_sarray_t *cache_list; xine_sarray_t *cache_list;
xine_list_t *file_list; xine_list_t *file_list;
skipping to change at line 83 skipping to change at line 75
/* memory block for the decoder priority config entry descriptions */ /* memory block for the decoder priority config entry descriptions */
char *prio_desc[DECODER_MAX]; char *prio_desc[DECODER_MAX];
pthread_mutex_t lock; pthread_mutex_t lock;
int plugin_count; int plugin_count;
int decoder_count; int decoder_count;
}; };
typedef struct plugin_catalog_s plugin_catalog_t; typedef struct plugin_catalog_s plugin_catalog_t;
/*
* load plugins into catalog
*
* all input+demux plugins will be fully loaded+initialized
* decoder plugins are loaded on demand
* video/audio output plugins have special load/probe functions
*/
void _x_scan_plugins (xine_t *this) XINE_PROTECTED;
/*
* dispose all currently loaded plugins (shutdown)
*/
void _x_dispose_plugins (xine_t *this) XINE_PROTECTED;
#endif #endif
 End of changes. 6 change blocks. 
27 lines changed or deleted 4 lines changed or added


 post.h   post.h 
skipping to change at line 26 skipping to change at line 26
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
* *
* post plugin definitions * post plugin definitions
*/ */
#ifndef XINE_POST_H #ifndef XINE_POST_H
#define XINE_POST_H #define XINE_POST_H
#include <xine.h>
#include <xine/video_out.h>
#include <xine/audio_out.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#ifdef XINE_COMPILE #ifdef XINE_COMPILE
# include "xine.h" # include <xine/plugin_catalog.h>
# include "video_out.h"
# include "audio_out.h"
# include "xine_internal.h"
# include "xineutils.h"
#else
# include <xine.h>
# include <xine/video_out.h>
# include <xine/audio_out.h>
# include <xine/xine_internal.h>
# include <xine/xineutils.h>
#endif #endif
#define POST_PLUGIN_IFACE_VERSION 9 #define POST_PLUGIN_IFACE_VERSION 10
typedef struct post_class_s post_class_t; typedef struct post_class_s post_class_t;
typedef struct post_plugin_s post_plugin_t; typedef struct post_plugin_s post_plugin_t;
typedef struct post_in_s post_in_t; typedef struct post_in_s post_in_t;
typedef struct post_out_s post_out_t; typedef struct post_out_s post_out_t;
struct post_class_s { struct post_class_s {
/* /*
* open a new instance of this plugin class * open a new instance of this plugin class
*/ */
post_plugin_t* (*open_plugin) (post_class_t *this, int inputs, post_plugin_t* (*open_plugin) (post_class_t *this, int inputs,
xine_audio_port_t **audio_target, xine_audio_port_t **audio_target,
xine_video_port_t **video_target); xine_video_port_t **video_target);
/* /**
* return short, human readable identifier for this plugin class * @brief short human readable identifier for this plugin class
*/ */
char* (*get_identifier) (post_class_t *this); const char *identifier;
/* /**
* return human readable (verbose = 1 line) description for * @brief human readable (verbose = 1 line) description for this plugin c
* this plugin class lass
*
* The description is passed to gettext() to internationalise.
*/ */
char* (*get_description) (post_class_t *this); const char *description;
/**
* @brief Optional non-standard catalog to use with dgettext() for descri
ption.
*/
const char *text_domain;
/* /*
* free all class-related resources * free all class-related resources
*/ */
void (*dispose) (post_class_t *this); void (*dispose) (post_class_t *this);
}; };
#define default_post_class_dispose (void (*) (post_class_t *this))free
struct post_plugin_s { struct post_plugin_s {
/* public part of the plugin */ /* public part of the plugin */
xine_post_t xine_post; xine_post_t xine_post;
/* /*
* the connections announced by the plugin * the connections announced by the plugin
* the plugin must fill these with xine_post_{in,out}_t on init * the plugin must fill these with xine_post_{in,out}_t on init
*/ */
xine_list_t *input; xine_list_t *input;
xine_list_t *output; xine_list_t *output;
/* /*
* close down, free all resources * close down, free all resources
*/ */
void (*dispose) (post_plugin_t *this); void (*dispose) (post_plugin_t *this);
/* has dispose been called */
int dispose_pending;
/* plugins don't have to init the stuff below */ /* plugins don't have to init the stuff below */
/* /*
* the running ticket * the running ticket
* *
* the plugin must assure to check for ticket revocation in * the plugin must assure to check for ticket revocation in
* intervals of finite length; this means that you must release * intervals of finite length; this means that you must release
* the ticket before any operation that might block; * the ticket before any operation that might block;
* note that all port functions are safe in this respect * note that all port functions are safe in this respect
* *
skipping to change at line 116 skipping to change at line 117
xine_ticket_t *running_ticket; xine_ticket_t *running_ticket;
/* this is needed by the engine to decrement the reference counter /* this is needed by the engine to decrement the reference counter
* on disposal of the plugin, but since this is useful, we expose it */ * on disposal of the plugin, but since this is useful, we expose it */
xine_t *xine; xine_t *xine;
/* used when the user requests a list of all inputs/outputs */ /* used when the user requests a list of all inputs/outputs */
const char **input_ids; const char **input_ids;
const char **output_ids; const char **output_ids;
/* used by plugin loader */ /**
void *node; * @brief Pointer to the loaded plugin node.
*
* Used by the plugins loader. It's an opaque type when using the
* structure outside of xine's build.
*/
#ifdef XINE_COMPILE
plugin_node_t *node;
#else
void *node;
#endif
/* has dispose been called */
int dispose_pending;
}; };
/* helper function to initialize a post_plugin_t */ /* helper function to initialize a post_plugin_t */
void _x_post_init(post_plugin_t *post, int num_audio_inputs, int num_video_ inputs) XINE_PROTECTED; void _x_post_init(post_plugin_t *post, int num_audio_inputs, int num_video_ inputs) XINE_PROTECTED;
struct post_in_s { struct post_in_s {
/* public part of the input */ /* public part of the input */
xine_post_in_t xine_in; xine_post_in_t xine_in;
skipping to change at line 177 skipping to change at line 190
/* if you want to decide yourself, whether a given frame should /* if you want to decide yourself, whether a given frame should
* be intercepted, fill in this function; get_frame() acts as * be intercepted, fill in this function; get_frame() acts as
* a template method and asks your function; return a boolean; * a template method and asks your function; return a boolean;
* the default is to intercept all frames */ * the default is to intercept all frames */
int (*intercept_frame)(post_video_port_t *self, vo_frame_t *frame); int (*intercept_frame)(post_video_port_t *self, vo_frame_t *frame);
/* the new frame function pointers */ /* the new frame function pointers */
vo_frame_t *new_frame; vo_frame_t *new_frame;
/* if you want to decide yourself, whether the preprocessing functions
* should still be routed when draw is intercepted, fill in this
* function; _x_post_intercept_video_frame() acts as a template method
* and asks your function; return a boolean; the default is _not_ to
* route preprocessing functions when draw is intercepted */
int (*route_preprocessing_procs)(post_video_port_t *self, vo_frame_t *fra
me);
/* if you want to decide yourself, whether the overlay manager should /* if you want to decide yourself, whether the overlay manager should
* be intercepted, fill in this function; get_overlay_manager() acts as * be intercepted, fill in this function; get_overlay_manager() acts as
* a template method and asks your function; return a boolean; * a template method and asks your function; return a boolean;
* the default is _not_ to intercept the overlay manager */ * the default is _not_ to intercept the overlay manager */
int (*intercept_ovl)(post_video_port_t *self); int (*intercept_ovl)(post_video_port_t *self);
/* the new public overlay manager with replaced function pointers */ /* the new public overlay manager with replaced function pointers */
video_overlay_manager_t *new_manager; video_overlay_manager_t *new_manager;
/* the original manager to call its functions from inside yours */ /* the original manager to call its functions from inside yours */
skipping to change at line 286 skipping to change at line 306
/* helper structure for intercepting audio port calls */ /* helper structure for intercepting audio port calls */
typedef struct post_audio_port_s post_audio_port_t; typedef struct post_audio_port_s post_audio_port_t;
struct post_audio_port_s { struct post_audio_port_s {
/* the new public port with replaced function pointers */ /* the new public port with replaced function pointers */
xine_audio_port_t new_port; xine_audio_port_t new_port;
/* the original port to call its functions from inside yours */ /* the original port to call its functions from inside yours */
xine_audio_port_t *original_port; xine_audio_port_t *original_port;
/* usage counter: how many objects are floating around that need
* these pointers to exist */
int usage_count;
pthread_mutex_t usage_lock;
/* the stream we are being fed by; NULL means no stream is connected; /* the stream we are being fed by; NULL means no stream is connected;
* this may be an anonymous stream */ * this may be an anonymous stream */
xine_stream_t *stream; xine_stream_t *stream;
/* some values remembered by port->open() */ pthread_mutex_t usage_lock;
/* usage counter: how many objects are floating around that need
* these pointers to exist */
int usage_count;
/* some values remembered by (port->open) () */
uint32_t bits; uint32_t bits;
uint32_t rate; uint32_t rate;
uint32_t mode; uint32_t mode;
/* point to a mutex here, if you need some synchronization */ /* point to a mutex here, if you need some synchronization */
pthread_mutex_t *port_lock; pthread_mutex_t *port_lock;
/* backward reference so that you have access to the post plugin /* backward reference so that you have access to the post plugin
* when the call only gives you the port */ * when the call only gives you the port */
post_plugin_t *post; post_plugin_t *post;
 End of changes. 13 change blocks. 
30 lines changed or deleted 53 lines changed or added


 refcounter.h   refcounter.h 
skipping to change at line 27 skipping to change at line 27
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/ */
#ifndef HAVE_REFCOUNTER_H #ifndef HAVE_REFCOUNTER_H
#define HAVE_REFCOUNTER_H #define HAVE_REFCOUNTER_H
#include <pthread.h> #include <pthread.h>
typedef struct { typedef struct {
pthread_mutex_t lock; pthread_mutex_t lock;
int count;
void* object; /* referenced object */ void* object; /* referenced object */
void (*destructor)(void *); /* object destructor */ void (*destructor)(void *); /* object destructor */
int count;
} refcounter_t; } refcounter_t;
typedef void (*refcounter_destructor)(void*); typedef void (*refcounter_destructor)(void*);
refcounter_t* _x_new_refcounter(void *object, refcounter_destructor destruc tor) XINE_MALLOC XINE_PROTECTED; refcounter_t* _x_new_refcounter(void *object, refcounter_destructor destruc tor) XINE_MALLOC XINE_PROTECTED;
int _x_refcounter_inc(refcounter_t *refcounter) XINE_PROTECTED; int _x_refcounter_inc(refcounter_t *refcounter) XINE_PROTECTED;
int _x_refcounter_dec(refcounter_t *refcounter) XINE_PROTECTED; int _x_refcounter_dec(refcounter_t *refcounter) XINE_PROTECTED;
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added


 spu_decoder.h   spu_decoder.h 
skipping to change at line 27 skipping to change at line 27
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with GNU Make; see the file COPYING. If not, write to * along with GNU Make; see the file COPYING. If not, write to
* the Free Software Foundation, * the Free Software Foundation,
* *
*/ */
#ifndef HAVE_SPU_API_H #ifndef HAVE_SPU_API_H
#define HAVE_SPU_API_H #define HAVE_SPU_API_H
#include <xine/os_types.h>
#include <xine/buffer.h>
#ifdef XINE_COMPILE #ifdef XINE_COMPILE
# include <inttypes.h> # include <xine/plugin_catalog.h>
# include "buffer.h"
#else
# include <xine/os_types.h>
# include <xine/buffer.h>
#endif #endif
#define SPU_DECODER_IFACE_VERSION 16 #define SPU_DECODER_IFACE_VERSION 17
/* /*
* generic xine spu decoder plugin interface * generic xine spu decoder plugin interface
*/ */
typedef struct spu_decoder_class_s spu_decoder_class_t; typedef struct spu_decoder_class_s spu_decoder_class_t;
typedef struct spu_decoder_s spu_decoder_t; typedef struct spu_decoder_s spu_decoder_t;
struct spu_decoder_class_s { struct spu_decoder_class_s {
/* /*
* open a new instance of this plugin class * open a new instance of this plugin class
*/ */
spu_decoder_t* (*open_plugin) (spu_decoder_class_t *this, xine_stream_t * stream); spu_decoder_t* (*open_plugin) (spu_decoder_class_t *this, xine_stream_t * stream);
/* /**
* return short, human readable identifier for this plugin class * @brief short human readable identifier for this plugin class
*/ */
char* (*get_identifier) (spu_decoder_class_t *this); const char *identifier;
/* /**
* return human readable (verbose = 1 line) description for * @brief human readable (verbose = 1 line) description for this plugin c
* this plugin class lass
*
* The description is passed to gettext() to internationalise.
*/ */
char* (*get_description) (spu_decoder_class_t *this); const char *description;
/**
* @brief Optional non-standard catalog to use with dgettext() for descri
ption.
*/
const char *text_domain;
/* /*
* free all class-related resources * free all class-related resources
*/ */
void (*dispose) (spu_decoder_class_t *this); void (*dispose) (spu_decoder_class_t *this);
}; };
#define default_spu_decoder_class_dispose (void (*) (spu_decoder_class_t *t
his))free
struct spu_decoder_s { struct spu_decoder_s {
/* /*
* decode data from buf and feed the overlay to overlay manager * decode data from buf and feed the overlay to overlay manager
*/ */
void (*decode_data) (spu_decoder_t *this, buf_element_t *buf); void (*decode_data) (spu_decoder_t *this, buf_element_t *buf);
/* /*
* reset decoder after engine flush (prepare for new * reset decoder after engine flush (prepare for new
* SPU data not related to recently decoded data) * SPU data not related to recently decoded data)
skipping to change at line 113 skipping to change at line 120
/* /*
* When the SPU decoder also handles menu overlays for user inter- * When the SPU decoder also handles menu overlays for user inter-
* action, you can set a menu button here. The typical example for * action, you can set a menu button here. The typical example for
* this is DVD menus. * this is DVD menus.
* This function pointer may be NULL, if the plugin does not have * This function pointer may be NULL, if the plugin does not have
* such functionality. * such functionality.
*/ */
void (*set_button) (spu_decoder_t *this_gen, int32_t button, int32_t mode ); void (*set_button) (spu_decoder_t *this_gen, int32_t button, int32_t mode );
void *node; /* used by plugin loader */ /**
* @brief Pointer to the loaded plugin node.
*
* Used by the plugins loader. It's an opaque type when using the
* structure outside of xine's build.
*/
#ifdef XINE_COMPILE
plugin_node_t *node;
#else
void *node;
#endif
}; };
/* SPU decoders differ from video and audio decoders in one significant /* SPU decoders differ from video and audio decoders in one significant
* way: unlike audio and video, SPU streams are not continuous; * way: unlike audio and video, SPU streams are not continuous;
* this results in another difference, programmers have to consider: * this results in another difference, programmers have to consider:
* while both audio and video decoders are automatically blocked in * while both audio and video decoders are automatically blocked in
* their get_buffer()/get_frame() methods when the output cannot take * their get_buffer()/get_frame() methods when the output cannot take
* any more data, this does not work for SPU, because it could take * any more data, this does not work for SPU, because it could take
* minutes before the next free slot becomes available and we must not * minutes before the next free slot becomes available and we must not
* block the decoder thread for that long; * block the decoder thread for that long;
 End of changes. 9 change blocks. 
14 lines changed or deleted 34 lines changed or added


 video_decoder.h   video_decoder.h 
skipping to change at line 26 skipping to change at line 26
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
* *
* xine video decoder plugin interface * xine video decoder plugin interface
*/ */
#ifndef HAVE_VIDEO_DECODER_H #ifndef HAVE_VIDEO_DECODER_H
#define HAVE_VIDEO_DECODER_H #define HAVE_VIDEO_DECODER_H
#include <xine/os_types.h>
#include <xine/buffer.h>
#ifdef XINE_COMPILE #ifdef XINE_COMPILE
# include <inttypes.h> # include <xine/plugin_catalog.h>
# include "buffer.h"
#else
# include <xine/os_types.h>
# include <xine/buffer.h>
#endif #endif
#define VIDEO_DECODER_IFACE_VERSION 18 #define VIDEO_DECODER_IFACE_VERSION 19
/* /*
* generic xine video decoder plugin interface * generic xine video decoder plugin interface
*/ */
typedef struct video_decoder_class_s video_decoder_class_t; typedef struct video_decoder_class_s video_decoder_class_t;
typedef struct video_decoder_s video_decoder_t; typedef struct video_decoder_s video_decoder_t;
struct video_decoder_class_s { struct video_decoder_class_s {
/* /*
* open a new instance of this plugin class * open a new instance of this plugin class
*/ */
video_decoder_t* (*open_plugin) (video_decoder_class_t *this, xine_stream _t *stream); video_decoder_t* (*open_plugin) (video_decoder_class_t *this, xine_stream _t *stream);
/* /**
* return short, human readable identifier for this plugin class * @brief short human readable identifier for this plugin class
*/ */
char* (*get_identifier) (video_decoder_class_t *this); const char *identifier;
/* /**
* return human readable (verbose = 1 line) description for * @brief human readable (verbose = 1 line) description for this plugin c
* this plugin class lass
*
* The description is passed to gettext() to internationalise.
*/ */
char* (*get_description) (video_decoder_class_t *this); const char *description;
/**
* @brief Optional non-standard catalog to use with dgettext() for descri
ption.
*/
const char *text_domain;
/* /*
* free all class-related resources * free all class-related resources
*/ */
void (*dispose) (video_decoder_class_t *this); void (*dispose) (video_decoder_class_t *this);
}; };
#define default_video_decoder_class_dispose (void (*) (video_decoder_class_
t *this))free
struct video_decoder_s { struct video_decoder_s {
/* /*
* decode data from buf and feed decoded frames to * decode data from buf and feed decoded frames to
* video output * video output
*/ */
void (*decode_data) (video_decoder_t *this, buf_element_t *buf); void (*decode_data) (video_decoder_t *this, buf_element_t *buf);
/* /*
* reset decoder after engine flush (prepare for new * reset decoder after engine flush (prepare for new
skipping to change at line 97 skipping to change at line 104
/* /*
* flush out any frames that are still stored in the decoder * flush out any frames that are still stored in the decoder
*/ */
void (*flush) (video_decoder_t *this); void (*flush) (video_decoder_t *this);
/* /*
* close down, free all resources * close down, free all resources
*/ */
void (*dispose) (video_decoder_t *this); void (*dispose) (video_decoder_t *this);
void *node; /*used by plugin loader */ /**
* @brief Pointer to the loaded plugin node.
*
* Used by the plugins loader. It's an opaque type when using the
* structure outside of xine's build.
*/
#ifdef XINE_COMPILE
plugin_node_t *node;
#else
void *node;
#endif
}; };
#endif #endif
 End of changes. 9 change blocks. 
15 lines changed or deleted 34 lines changed or added


 video_out.h   video_out.h 
skipping to change at line 41 skipping to change at line 41
#ifndef HAVE_VIDEO_OUT_H #ifndef HAVE_VIDEO_OUT_H
#define HAVE_VIDEO_OUT_H #define HAVE_VIDEO_OUT_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <pthread.h> #include <pthread.h>
#include <xine.h>
#include <xine/buffer.h>
#ifdef XINE_COMPILE #ifdef XINE_COMPILE
# include "xine.h" # include <xine/plugin_catalog.h>
# include "buffer.h"
#else
# include <xine.h>
# include <xine/buffer.h>
#endif #endif
typedef struct vo_frame_s vo_frame_t; typedef struct vo_frame_s vo_frame_t;
typedef struct vo_driver_s vo_driver_t; typedef struct vo_driver_s vo_driver_t;
typedef struct video_driver_class_s video_driver_class_t; typedef struct video_driver_class_s video_driver_class_t;
typedef struct vo_overlay_s vo_overlay_t; typedef struct vo_overlay_s vo_overlay_t;
typedef struct video_overlay_manager_s video_overlay_manager_t; typedef struct video_overlay_manager_s video_overlay_manager_t;
/* public part, video drivers may add private fields /* public part, video drivers may add private fields
* *
* Remember that adding new functions to this structure requires * Remember that adding new functions to this structure requires
* adaption of the post plugin decoration layer. Be sure to look into * adaption of the post plugin decoration layer. Be sure to look into
* src/xine-engine/post.[ch]. * src/xine-engine/post.[ch].
*/ */
struct vo_frame_s { struct vo_frame_s {
/* /*
* member functions * member functions
*/ */
/* Provide a copy of the frame's image in an image format already known t
o xine. data's member */
/* have already been intialized to frame's content on entry, so it's usua
lly only necessary to */
/* change format and img_size. In case img is set, it will point to a mem
ory block of suitable */
/* size (size has been determined by a previous call with img == NULL). i
mg content and img_size */
/* must adhere to the specification of _x_get_current_frame_data(). */
/* Currently this is needed for all image formats except XINE_IMGFMT_YV12
and XINE_IMGFMT_YUY2. */
void (*proc_provide_standard_frame_data) (vo_frame_t *vo_img, xine_curren
t_frame_data_t *data);
/* Duplicate picture data and acceleration specific data of a frame. */ /* Duplicate picture data and acceleration specific data of a frame. */
/* if the image format isn't already known by Xine. Currently this is nee ded */ /* if the image format isn't already known by Xine. Currently this is nee ded */
/* For all image formats except XINE_IMGFMT_YV12 and XINE_IMGFMT_YUY2 */ /* For all image formats except XINE_IMGFMT_YV12 and XINE_IMGFMT_YUY2 */
void (*proc_duplicate_frame_data) (vo_frame_t *vo_img, vo_frame_t *src); void (*proc_duplicate_frame_data) (vo_frame_t *vo_img, vo_frame_t *src);
/* tell video driver to copy/convert the whole of this frame, may be NULL */ /* tell video driver to copy/convert the whole of this frame, may be NULL */
/* at least one of proc_frame() and proc_slice() MUST set the variable pr oc_called to 1 */ /* at least one of proc_frame() and proc_slice() MUST set the variable pr oc_called to 1 */
void (*proc_frame) (vo_frame_t *vo_img); void (*proc_frame) (vo_frame_t *vo_img);
/* tell video driver to copy/convert a slice of this frame, may be NULL * / /* tell video driver to copy/convert a slice of this frame, may be NULL * /
skipping to change at line 125 skipping to change at line 132
int repeat_first_field; int repeat_first_field;
/* note: progressive_frame is set wrong on many mpeg2 streams. for /* note: progressive_frame is set wrong on many mpeg2 streams. for
* that reason, this flag should be interpreted as a "hint". * that reason, this flag should be interpreted as a "hint".
*/ */
int progressive_frame; int progressive_frame;
int picture_coding_type; int picture_coding_type;
/* cropping to be done */ /* cropping to be done */
int crop_left, crop_right, crop_top, crop_bottom; int crop_left, crop_right, crop_top, crop_bottom;
int lock_counter;
pthread_mutex_t mutex; /* protect access to lock_count */
/* extra info coming from input or demuxers */ /* extra info coming from input or demuxers */
extra_info_t *extra_info; extra_info_t *extra_info;
/* additional information to be able to duplicate frames: */ /* additional information to be able to duplicate frames: */
int width, height; int width, height;
double ratio; /* aspect ratio */ double ratio; /* aspect ratio */
int format; /* IMGFMT_YV12 or IMGFMT_YUY2 */ int format; /* IMGFMT_YV12 or IMGFMT_YUY2 */
int drawn; /* used by decoder, frame has a lready been drawn */ int drawn; /* used by decoder, frame has a lready been drawn */
int flags; /* remember the frame flags */ int flags; /* remember the frame flags */
skipping to change at line 148 skipping to change at line 158
void *accel_data; void *accel_data;
/* "backward" references to where this frame originates from */ /* "backward" references to where this frame originates from */
xine_video_port_t *port; xine_video_port_t *port;
vo_driver_t *driver; vo_driver_t *driver;
xine_stream_t *stream; xine_stream_t *stream;
/* displacement for overlays */ /* displacement for overlays */
int overlay_offset_x, overlay_offset_y; int overlay_offset_x, overlay_offset_y;
/* pointer to the next frame in display order, used by some vo deint */
struct vo_frame_s *future_frame;
/* /*
* that part is used only by video_out.c for frame management * that part is used only by video_out.c for frame management
* obs: changing anything here will require recompiling vo drivers * obs: changing anything here will require recompiling vo drivers
*/ */
struct vo_frame_s *next; struct vo_frame_s *next;
int lock_counter;
pthread_mutex_t mutex; /* protect access to lock_count */
int id; /* debugging - track this frame */ int id; /* debugging - track this frame */
int is_first; int is_first;
}; };
/* /*
* Remember that adding new functions to this structure requires * Remember that adding new functions to this structure requires
* adaption of the post plugin decoration layer. Be sure to look into * adaption of the post plugin decoration layer. Be sure to look into
* src/xine-engine/post.[ch]. * src/xine-engine/post.[ch].
*/ */
skipping to change at line 187 skipping to change at line 198
* params : width == width of video to display. * params : width == width of video to display.
* height == height of video to display. * height == height of video to display.
* ratio == aspect ration information * ratio == aspect ration information
* format == FOURCC descriptor of image format * format == FOURCC descriptor of image format
* flags == field/prediction flags * flags == field/prediction flags
*/ */
vo_frame_t* (*get_frame) (xine_video_port_t *self, uint32_t width, vo_frame_t* (*get_frame) (xine_video_port_t *self, uint32_t width,
uint32_t height, double ratio, uint32_t height, double ratio,
int format, int flags); int format, int flags);
/* create a new grab video frame */
xine_grab_video_frame_t* (*new_grab_video_frame) (xine_video_port_t *self
);
/* retrieves the last displayed frame (useful for taking snapshots) */ /* retrieves the last displayed frame (useful for taking snapshots) */
vo_frame_t* (*get_last_frame) (xine_video_port_t *self); vo_frame_t* (*get_last_frame) (xine_video_port_t *self);
/* overlay stuff */ /* overlay stuff */
void (*enable_ovl) (xine_video_port_t *self, int ovl_enable); void (*enable_ovl) (xine_video_port_t *self, int ovl_enable);
/* get overlay manager */ /* get overlay manager */
video_overlay_manager_t* (*get_overlay_manager) (xine_video_port_t *self) ; video_overlay_manager_t* (*get_overlay_manager) (xine_video_port_t *self) ;
/* flush video_out fifo */ /* flush video_out fifo */
void (*flush) (xine_video_port_t *self); void (*flush) (xine_video_port_t *self);
/* trigger immediate drawing */
void (*trigger_drawing) (xine_video_port_t *self);
/* Get/Set video property /* Get/Set video property
* *
* See VO_PROP_* bellow * See VO_PROP_* bellow
*/ */
int (*get_property) (xine_video_port_t *self, int property); int (*get_property) (xine_video_port_t *self, int property);
int (*set_property) (xine_video_port_t *self, int property, int value); int (*set_property) (xine_video_port_t *self, int property, int value);
/* return true if port is opened for this stream, stream can be anonymous */ /* return true if port is opened for this stream, stream can be anonymous */
int (*status) (xine_video_port_t *self, xine_stream_t *stream, int (*status) (xine_video_port_t *self, xine_stream_t *stream,
int *width, int *height, int64_t *img_duration); int *width, int *height, int64_t *img_duration);
skipping to change at line 247 skipping to change at line 264
#define VO_PROP_ZOOM_Y 13 #define VO_PROP_ZOOM_Y 13
#define VO_PROP_DISCARD_FRAMES 14 /* not used by drivers */ #define VO_PROP_DISCARD_FRAMES 14 /* not used by drivers */
#define VO_PROP_WINDOW_WIDTH 15 /* read-only */ #define VO_PROP_WINDOW_WIDTH 15 /* read-only */
#define VO_PROP_WINDOW_HEIGHT 16 /* read-only */ #define VO_PROP_WINDOW_HEIGHT 16 /* read-only */
#define VO_PROP_BUFS_IN_FIFO 17 /* read-only */ #define VO_PROP_BUFS_IN_FIFO 17 /* read-only */
#define VO_PROP_NUM_STREAMS 18 /* read-only */ #define VO_PROP_NUM_STREAMS 18 /* read-only */
#define VO_PROP_OUTPUT_WIDTH 19 /* read-only */ #define VO_PROP_OUTPUT_WIDTH 19 /* read-only */
#define VO_PROP_OUTPUT_HEIGHT 20 /* read-only */ #define VO_PROP_OUTPUT_HEIGHT 20 /* read-only */
#define VO_PROP_OUTPUT_XOFFSET 21 /* read-only */ #define VO_PROP_OUTPUT_XOFFSET 21 /* read-only */
#define VO_PROP_OUTPUT_YOFFSET 22 /* read-only */ #define VO_PROP_OUTPUT_YOFFSET 22 /* read-only */
#define VO_NUM_PROPERTIES 23 #define VO_PROP_SHARPNESS 24
#define VO_PROP_NOISE_REDUCTION 25
#define VO_PROP_BUFS_TOTAL 26 /* read-only */
#define VO_PROP_BUFS_FREE 27 /* read-only */
#define VO_NUM_PROPERTIES 28
/* number of colors in the overlay palette. Currently limited to 256 /* number of colors in the overlay palette. Currently limited to 256
at most, because some alphablend functions use an 8-bit index into at most, because some alphablend functions use an 8-bit index into
the palette. This should probably be classified as a bug. */ the palette. This should probably be classified as a bug. */
#define OVL_PALETTE_SIZE 256 #define OVL_PALETTE_SIZE 256
#define OVL_MAX_OPACITY 0x0f #define OVL_MAX_OPACITY 0x0f
/* number of recent frames to keep in memory /* number of recent frames to keep in memory
these frames are needed by some deinterlace algorithms these frames are needed by some deinterlace algorithms
skipping to change at line 269 skipping to change at line 290
*/ */
#define VO_NUM_RECENT_FRAMES 2 #define VO_NUM_RECENT_FRAMES 2
/* get_frame flags */ /* get_frame flags */
#define VO_TOP_FIELD 1 #define VO_TOP_FIELD 1
#define VO_BOTTOM_FIELD 2 #define VO_BOTTOM_FIELD 2
#define VO_BOTH_FIELDS (VO_TOP_FIELD | VO_BOTTOM_FIELD) #define VO_BOTH_FIELDS (VO_TOP_FIELD | VO_BOTTOM_FIELD)
#define VO_PAN_SCAN_FLAG 4 #define VO_PAN_SCAN_FLAG 4
#define VO_INTERLACED_FLAG 8 #define VO_INTERLACED_FLAG 8
#define VO_NEW_SEQUENCE_FLAG 16 /* set after MPEG2 Sequence Header Code (us ed by XvMC) */ #define VO_NEW_SEQUENCE_FLAG 16 /* set after MPEG2 Sequence Header Code (us ed by XvMC) */
#define VO_CHROMA_422 32 /* used by VDPAU, default is chroma_420 */
#define VO_STILL_IMAGE 64
/* video driver capabilities */ /* video driver capabilities */
#define VO_CAP_YV12 0x00000001 /* driver can handle YUV 4 :2:0 pictures */ #define VO_CAP_YV12 0x00000001 /* driver can handle YUV 4 :2:0 pictures */
#define VO_CAP_YUY2 0x00000002 /* driver can handle YUY2 pictures */ #define VO_CAP_YUY2 0x00000002 /* driver can handle YUY2 pictures */
#define VO_CAP_XVMC_MOCOMP 0x00000004 /* driver can use XvMC mot ion compensation */ #define VO_CAP_XVMC_MOCOMP 0x00000004 /* driver can use XvMC mot ion compensation */
#define VO_CAP_XVMC_IDCT 0x00000008 /* driver can use XvMC idc t acceleration */ #define VO_CAP_XVMC_IDCT 0x00000008 /* driver can use XvMC idc t acceleration */
#define VO_CAP_UNSCALED_OVERLAY 0x00000010 /* driver can blend overla y at output resolution */ #define VO_CAP_UNSCALED_OVERLAY 0x00000010 /* driver can blend overla y at output resolution */
#define VO_CAP_CROP 0x00000020 /* driver can crop */ #define VO_CAP_CROP 0x00000020 /* driver can crop */
#define VO_CAP_XXMC 0x00000040 /* driver can use extended XvMC */ #define VO_CAP_XXMC 0x00000040 /* driver can use extended XvMC */
#define VO_CAP_VDPAU_H264 0x00000080 /* driver can use VDPAU fo
r H264 */
#define VO_CAP_VDPAU_MPEG12 0x00000100 /* driver can use VDPAU fo
r mpeg1/2 */
#define VO_CAP_VDPAU_VC1 0x00000200 /* driver can use VDPAU fo
r VC1 */
#define VO_CAP_VDPAU_MPEG4 0x00000400 /* driver can use VDPAU fo
r mpeg4-part2 */
#define VO_CAP_HUE 0x00010000
#define VO_CAP_SATURATION 0x00020000
#define VO_CAP_CONTRAST 0x00040000
#define VO_CAP_BRIGHTNESS 0x00080000
#define VO_CAP_COLORKEY 0x00100000
#define VO_CAP_AUTOPAINT_COLORKEY 0x00200000
#define VO_CAP_ZOOM_X 0x00400000
#define VO_CAP_ZOOM_Y 0x00800000
#define VO_CAP_CUSTOM_EXTENT_OVERLAY 0x01000000 /* driver can blend custom
extent overlay to output extent */
#define VO_CAP_ARGB_LAYER_OVERLAY 0x02000000 /* driver supports true co
lor overlay */
#define VO_CAP_VIDEO_WINDOW_OVERLAY 0x04000000 /* driver can scale video
to an area within overlay */
#define VO_CAP_GAMMA 0x08000000
#define VO_CAP_SHARPNESS 0x10000000
#define VO_CAP_NOISE_REDUCTION 0x20000000
/* /*
* vo_driver_s contains the functions every display driver * vo_driver_s contains the functions every display driver
* has to implement. The vo_new_port function (see below) * has to implement. The vo_new_port function (see below)
* should then be used to construct a vo_port using this * should then be used to construct a vo_port using this
* driver. Some of the function pointers will be copied * driver. Some of the function pointers will be copied
* directly into xine_video_port_s, others will be called * directly into xine_video_port_s, others will be called
* from generic vo functions. * from generic vo functions.
*/ */
#define VIDEO_OUT_DRIVER_IFACE_VERSION 21 #define VIDEO_OUT_DRIVER_IFACE_VERSION 22
struct vo_driver_s { struct vo_driver_s {
uint32_t (*get_capabilities) (vo_driver_t *self); /* for constants see ab ove */ uint32_t (*get_capabilities) (vo_driver_t *self); /* for constants see ab ove */
/* /*
* allocate an vo_frame_t struct, * allocate an vo_frame_t struct,
* the driver must supply the copy, field and dispose functions * the driver must supply the copy, field and dispose functions
*/ */
vo_frame_t* (*alloc_frame) (vo_driver_t *self); vo_frame_t* (*alloc_frame) (vo_driver_t *self);
skipping to change at line 351 skipping to change at line 392
*/ */
int (*gui_data_exchange) (vo_driver_t *self, int data_type, int (*gui_data_exchange) (vo_driver_t *self, int data_type,
void *data); void *data);
/* check if a redraw is needed (due to resize) /* check if a redraw is needed (due to resize)
* this is only used for still frames, normal video playback * this is only used for still frames, normal video playback
* must call that inside display_frame() function. * must call that inside display_frame() function.
*/ */
int (*redraw_needed) (vo_driver_t *self); int (*redraw_needed) (vo_driver_t *self);
/* Create a new grab video frame */
xine_grab_video_frame_t* (*new_grab_video_frame)(vo_driver_t *self);
/* /*
* free all resources, close driver * free all resources, close driver
*/ */
void (*dispose) (vo_driver_t *self); void (*dispose) (vo_driver_t *self);
void *node; /* needed by plugin_loader */ /**
* @brief Pointer to the loaded plugin node.
*
* Used by the plugins loader. It's an opaque type when using the
* structure outside of xine's build.
*/
#ifdef XINE_COMPILE
plugin_node_t *node;
#else
void *node;
#endif
}; };
struct video_driver_class_s { struct video_driver_class_s {
/* /*
* open a new instance of this plugin class * open a new instance of this plugin class
*/ */
vo_driver_t* (*open_plugin) (video_driver_class_t *self, const void *visu al); vo_driver_t* (*open_plugin) (video_driver_class_t *self, const void *visu al);
/* /**
* return short, human readable identifier for this plugin class * @brief short human readable identifier for this plugin class
*/ */
char* (*get_identifier) (video_driver_class_t *self); const char *identifier;
/* /**
* return human readable (verbose = 1 line) description for * @brief human readable (verbose = 1 line) description for this plugin c
* this plugin class lass
*
* The description is passed to gettext() to internationalise.
*/ */
char* (*get_description) (video_driver_class_t *self); const char *description;
/**
* @brief Optional non-standard catalog to use with dgettext() for descri
ption.
*/
const char *text_domain;
/* /*
* free all class-related resources * free all class-related resources
*/ */
void (*dispose) (video_driver_class_t *self); void (*dispose) (video_driver_class_t *self);
}; };
#define default_video_driver_class_dispose (void (*) (video_driver_class_t
*this))free
typedef struct rle_elem_s { typedef struct rle_elem_s {
uint16_t len; uint16_t len;
uint16_t color; uint16_t color;
} rle_elem_t; } rle_elem_t;
typedef struct argb_layer_s {
pthread_mutex_t mutex;
uint32_t *buffer;
/* dirty area */
int x1, y1;
int x2, y2;
int ref_count;
} argb_layer_t;
struct vo_overlay_s { struct vo_overlay_s {
rle_elem_t *rle; /* rle code buffer */ rle_elem_t *rle; /* rle code buffer */
int data_size; /* useful for deciding realloc */ int data_size; /* useful for deciding realloc */
int num_rle; /* number of active rle codes */ int num_rle; /* number of active rle codes */
int x; /* x start of subpicture area */ int x; /* x start of subpicture area */
int y; /* y start of subpicture area */ int y; /* y start of subpicture area */
int width; /* width of subpicture area */ int width; /* width of subpicture area */
int height; /* height of subpicture area */ int height; /* height of subpicture area */
/* area within osd extent to scale video to */
int video_window_x;
int video_window_y;
int video_window_width;
int video_window_height;
/* extent of reference coordinate system */
int extent_width;
int extent_height;
uint32_t color[OVL_PALETTE_SIZE]; /* color lookup table */ uint32_t color[OVL_PALETTE_SIZE]; /* color lookup table */
uint8_t trans[OVL_PALETTE_SIZE]; /* mixer key table */ uint8_t trans[OVL_PALETTE_SIZE]; /* mixer key table */
int rgb_clut; /* true if clut was converted to rgb */ int rgb_clut; /* true if clut was converted to rgb */
/* define a highlight area with different colors */ /* define a highlight area with different colors */
int hili_top; int hili_top;
int hili_bottom; int hili_bottom;
int hili_left; int hili_left;
int hili_right; int hili_right;
uint32_t hili_color[OVL_PALETTE_SIZE]; uint32_t hili_color[OVL_PALETTE_SIZE];
uint8_t hili_trans[OVL_PALETTE_SIZE]; uint8_t hili_trans[OVL_PALETTE_SIZE];
int hili_rgb_clut; /* true if clut was converted to rgb */ int hili_rgb_clut; /* true if clut was converted to rgb */
int unscaled; /* true if it should be blended unscaled */ int unscaled; /* true if it should be blended unscaled */
argb_layer_t *argb_layer;
}; };
void set_argb_layer_ptr(argb_layer_t **dst, argb_layer_t *src);
/* API to video_overlay manager /* API to video_overlay manager
* *
* Remember that adding new functions to this structure requires * Remember that adding new functions to this structure requires
* adaption of the post plugin decoration layer. Be sure to look into * adaption of the post plugin decoration layer. Be sure to look into
* src/xine-engine/post.[ch]. * src/xine-engine/post.[ch].
*/ */
struct video_overlay_manager_s { struct video_overlay_manager_s {
void (*init) (video_overlay_manager_t *this_gen); void (*init) (video_overlay_manager_t *this_gen);
void (*dispose) (video_overlay_manager_t *this_gen); void (*dispose) (video_overlay_manager_t *this_gen);
skipping to change at line 439 skipping to change at line 524
int32_t (*add_event) (video_overlay_manager_t *this_gen, void *event); int32_t (*add_event) (video_overlay_manager_t *this_gen, void *event);
void (*flush_events) (video_overlay_manager_t *this_gen ); void (*flush_events) (video_overlay_manager_t *this_gen );
int (*redraw_needed) (video_overlay_manager_t *this_gen, int64_t vpts ); int (*redraw_needed) (video_overlay_manager_t *this_gen, int64_t vpts );
void (*multiple_overlay_blend) (video_overlay_manager_t *this_gen, int64_ t vpts, void (*multiple_overlay_blend) (video_overlay_manager_t *this_gen, int64_ t vpts,
vo_driver_t *output, vo_frame_t *vo_img, int enabled); vo_driver_t *output, vo_frame_t *vo_img, int enabled);
}; };
/* /**
* build a video_out_port from * @brief Build a video output port from a given video driver.
* a given video driver *
* @internal
*/ */
xine_video_port_t *_x_vo_new_port (xine_t *xine, vo_driver_t *driver, int g rabonly) XINE_MALLOC XINE_PROTECTED; xine_video_port_t *_x_vo_new_port (xine_t *xine, vo_driver_t *driver, int g rabonly) XINE_MALLOC;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 25 change blocks. 
21 lines changed or deleted 124 lines changed or added


 video_overlay.h   video_overlay.h 
skipping to change at line 24 skipping to change at line 24
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/ */
#ifndef HAVE_VIDEO_OVERLAY_H #ifndef HAVE_VIDEO_OVERLAY_H
#define HAVE_VIDEO_OVERLAY_H #define HAVE_VIDEO_OVERLAY_H
#ifdef XINE_COMPILE #include <xine/xine_internal.h>
# include "xine_internal.h"
#else
# include <xine/xine_internal.h>
#endif
#ifdef __GNUC__ #ifdef __GNUC__
#define CLUT_Y_CR_CB_INIT(_y,_cr,_cb) {y: (_y), cr: (_cr), cb: (_cb)} #define CLUT_Y_CR_CB_INIT(_y,_cr,_cb) {y: (_y), cr: (_cr), cb: (_cb)}
#else #else
#define CLUT_Y_CR_CB_INIT(_y,_cr,_cb) { (_cb), (_cr), (_y) } #define CLUT_Y_CR_CB_INIT(_y,_cr,_cb) { (_cb), (_cr), (_y) }
#endif #endif
#define MAX_OBJECTS 50 #define MAX_OBJECTS 50
#define MAX_EVENTS 50 #define MAX_EVENTS 50
#define MAX_SHOWING 16 #define MAX_SHOWING (5 + 16)
#define OVERLAY_EVENT_NULL 0 #define OVERLAY_EVENT_NULL 0
#define OVERLAY_EVENT_SHOW 1 #define OVERLAY_EVENT_SHOW 1
#define OVERLAY_EVENT_HIDE 2 #define OVERLAY_EVENT_HIDE 2
#define OVERLAY_EVENT_MENU_BUTTON 3 #define OVERLAY_EVENT_MENU_BUTTON 3
#define OVERLAY_EVENT_FREE_HANDLE 8 /* Frees a handle, previous alloca ted via get_handle */ #define OVERLAY_EVENT_FREE_HANDLE 8 /* Frees a handle, previous alloca ted via get_handle */
/* number of colors in the overlay palette. Currently limited to 256
at most, because some alphablend functions use an 8-bit index into
the palette. This should probably be classified as a bug. */
/* FIXME: Also defines in video_out.h */
#define OVL_PALETTE_SIZE 256
typedef struct vo_buttons_s {
int32_t type; /* 0:Button not valid,
1:Button Valid, no auto_action,
2:Button Valid, auto_action.
*/
/* The following clipping coordinates are relative to the left upper corn
er
* of the OVERLAY, not of the target FRAME. Please do not mix them up! */
int32_t hili_top;
int32_t hili_bottom;
int32_t hili_left;
int32_t hili_right;
int32_t up;
int32_t down;
int32_t left;
int32_t right;
uint32_t select_color[OVL_PALETTE_SIZE];
uint8_t select_trans[OVL_PALETTE_SIZE];
xine_event_t select_event;
uint32_t active_color[OVL_PALETTE_SIZE];
uint8_t active_trans[OVL_PALETTE_SIZE];
xine_event_t active_event;
int32_t hili_rgb_clut; /* true if clut was converted to rg
b*/
/* FIXME: Probably not needed ^^^ *
/
} vo_buttons_t;
typedef struct video_overlay_object_s { typedef struct video_overlay_object_s {
int32_t handle; /* Used to match Show and Hide events. */ int32_t handle; /* Used to match Show and Hide events. */
uint32_t object_type; /* 0=Subtitle, 1=Menu */ uint32_t object_type; /* 0=Subtitle, 1=Menu */
int64_t pts; /* Needed for Menu button compares */ int64_t pts; /* Needed for Menu button compares */
vo_overlay_t *overlay; /* The image data. */ vo_overlay_t *overlay; /* The image data. */
uint32_t palette_type; /* 1 Y'CrCB, 2 R'G'B' */
uint32_t *palette; /* If NULL, no palette contained in this even t. */ uint32_t *palette; /* If NULL, no palette contained in this even t. */
int32_t buttonN; /* Current highlighed button. 0 means no in uint32_t palette_type; /* 1 Y'CrCB, 2 R'G'B' */
fo on which button to higlight */
/* -1 means don't
use this button info. */
vo_buttons_t button[32]; /* Info regarding each button on the overlay
*/
} video_overlay_object_t; } video_overlay_object_t;
/* This will hold all details of an event item, needed for event queue to f unction */ /* This will hold all details of an event item, needed for event queue to f unction */
typedef struct video_overlay_event_s { typedef struct video_overlay_event_s {
uint32_t event_type; /* Show SPU, Show OSD, Hide etc. */
int64_t vpts; /* Time when event will action. 0 means action now */ int64_t vpts; /* Time when event will action. 0 means action now */
/* Once video_out blend_yuv etc. can take rle_elem_t with Colour, blend and length information. /* Once video_out blend_yuv etc. can take rle_elem_t with Colour, blend and length information.
* we can remove clut and blend from this structure. * we can remove clut and blend from this structure.
* This will allow for many more colours for OSD. * This will allow for many more colours for OSD.
*/ */
uint32_t event_type; /* Show SPU, Show OSD, Hide etc. */
video_overlay_object_t object; /* The image data. */ video_overlay_object_t object; /* The image data. */
} video_overlay_event_t; } video_overlay_event_t;
video_overlay_manager_t *_x_video_overlay_new_manager(xine_t *) XINE_MALLOC XINE_PROTECTED; video_overlay_manager_t *_x_video_overlay_new_manager(xine_t *) XINE_MALLOC XINE_PROTECTED;
#endif #endif
 End of changes. 7 change blocks. 
49 lines changed or deleted 4 lines changed or added


 vo_scale.h   vo_scale.h 
skipping to change at line 32 skipping to change at line 32
* keeps video scaling information * keeps video scaling information
*/ */
#ifndef HAVE_VO_SCALE_H #ifndef HAVE_VO_SCALE_H
#define HAVE_VO_SCALE_H #define HAVE_VO_SCALE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifdef XINE_COMPILE #include <xine/configfile.h>
# include "configfile.h"
#else
# include <xine/configfile.h>
#endif
typedef struct { typedef struct {
int x, y; int x, y;
int w, h; int w, h;
} vo_scale_rect_t; } vo_scale_rect_t;
struct vo_scale_s { struct vo_scale_s {
/* true if driver supports frame zooming */ /* true if driver supports frame zooming */
int support_zoom; int support_zoom;
skipping to change at line 97 skipping to change at line 93
/* /*
* "gui" size / offset: * "gui" size / offset:
* what gui told us about where to display the video * what gui told us about where to display the video
* units: screen pixels * units: screen pixels
*/ */
int gui_x, gui_y; int gui_x, gui_y;
int gui_width, gui_height; int gui_width, gui_height;
int gui_win_x, gui_win_y; int gui_win_x, gui_win_y;
/* */
int force_redraw;
/* /*
* video + display pixel aspect * video + display pixel aspect
* One pixel of height 1 has this width * One pixel of height 1 has this width
* This may be corrected by the driver in order to fit the video seamless ly * This may be corrected by the driver in order to fit the video seamless ly
*/ */
double gui_pixel_aspect; double gui_pixel_aspect;
double video_pixel_aspect; double video_pixel_aspect;
/* /*
* "output" size: * "output" size:
* *
* this is finally the ideal size "fitted" into the * this is finally the ideal size "fitted" into the
* gui size while maintaining the aspect ratio * gui size while maintaining the aspect ratio
* units: screen pixels * units: screen pixels
*/ */
int output_width; int output_width;
int output_height; int output_height;
int output_xoffset; int output_xoffset;
int output_yoffset; int output_yoffset;
/* */
int force_redraw;
/* gui callbacks */ /* gui callbacks */
void *user_data; void *user_data;
void (*frame_output_cb) (void *user_data, void (*frame_output_cb) (void *user_data,
int video_width, int video_height, int video_width, int video_height,
double video_pixel_aspect, double video_pixel_aspect,
int *dest_x, int *dest_y, int *dest_x, int *dest_y,
int *dest_width, int *dest_height, int *dest_width, int *dest_height,
double *dest_pixel_aspect, double *dest_pixel_aspect,
int *win_x, int *win_y); int *win_x, int *win_y);
skipping to change at line 183 skipping to change at line 179
*/ */
void _x_vo_scale_translate_gui2video(vo_scale_t *self, void _x_vo_scale_translate_gui2video(vo_scale_t *self,
int x, int y, int x, int y,
int *vid_x, int *vid_y) XINE_PROTECTED; int *vid_x, int *vid_y) XINE_PROTECTED;
/* /*
* Returns description of a given ratio code * Returns description of a given ratio code
*/ */
char *_x_vo_scale_aspect_ratio_name(int a) XINE_PROTECTED; extern const char _x_vo_scale_aspect_ratio_name_table[][8] XINE_PROTECTED;
/* /*
* initialize rescaling struct * initialize rescaling struct
*/ */
void _x_vo_scale_init(vo_scale_t *self, int support_zoom, void _x_vo_scale_init(vo_scale_t *self, int support_zoom,
int scaling_disabled, config_values_t *config ) XINE_P ROTECTED; int scaling_disabled, config_values_t *config ) XINE_P ROTECTED;
#ifdef __cplusplus #ifdef __cplusplus
} }
 End of changes. 4 change blocks. 
9 lines changed or deleted 5 lines changed or added


 xine.h   xine.h 
skipping to change at line 38 skipping to change at line 38
* (2) as a rule of thumb, never free() or realloc() any pointers * (2) as a rule of thumb, never free() or realloc() any pointers
* returned by the xine engine (unless stated otherwise) * returned by the xine engine (unless stated otherwise)
* or, in other words: * or, in other words:
* do not free() stuff you have not malloc()ed * do not free() stuff you have not malloc()ed
* (3) xine is multi-threaded, make sure your programming environment * (3) xine is multi-threaded, make sure your programming environment
* can handle this. * can handle this.
* for x11-related stuff this means that you either have to properly * for x11-related stuff this means that you either have to properly
* use xlockdisplay() or use two seperate connections to the x-server * use xlockdisplay() or use two seperate connections to the x-server
* *
*/ */
/*_x_ Lines formatted like this one are xine-lib developer comments. */
/*_x_ They will be removed from the installed version of this header. */
#ifndef HAVE_XINE_H #ifndef HAVE_XINE_H
#define HAVE_XINE_H #define HAVE_XINE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#endif #endif
#ifdef XINE_COMPILE
#include <inttypes.h>
#include "attributes.h"
#else
#include <xine/os_types.h> #include <xine/os_types.h>
#include <xine/attributes.h> #include <xine/attributes.h>
#endif #include <xine/version.h>
/* This enables some experimental features. These are not part of the /* This enables some experimental features. These are not part of the
* official libxine API, so use them only, if you absolutely need them. * official libxine API, so use them only, if you absolutely need them.
* Although we make efforts to keep even this part of the API as stable * Although we make efforts to keep even this part of the API as stable
* as possible, this is not guaranteed. Incompatible changes can occur. * as possible, this is not guaranteed. Incompatible changes can occur.
*/ */
/* #define XINE_ENABLE_EXPERIMENTAL_FEATURES */ /* #define XINE_ENABLE_EXPERIMENTAL_FEATURES */
/* This disables some deprecated features. These are still part of the /* This disables some deprecated features. These are still part of the
* official libxine API and you may still use them. During the current * official libxine API and you may still use them. During the current
skipping to change at line 87 skipping to change at line 85
/********************************************************************* /*********************************************************************
* xine opaque data types * * xine opaque data types *
*********************************************************************/ *********************************************************************/
typedef struct xine_s xine_t; typedef struct xine_s xine_t;
typedef struct xine_stream_s xine_stream_t; typedef struct xine_stream_s xine_stream_t;
typedef struct xine_audio_port_s xine_audio_port_t; typedef struct xine_audio_port_s xine_audio_port_t;
typedef struct xine_video_port_s xine_video_port_t; typedef struct xine_video_port_s xine_video_port_t;
#ifndef XINE_DISABLE_DEPRECATED_FEATURES
/* convenience types: simple player UIs might want to call ports drivers */
typedef xine_audio_port_t xine_ao_driver_t XINE_DEPRECATED;
typedef xine_video_port_t xine_vo_driver_t XINE_DEPRECATED;
#endif
/********************************************************************* /*********************************************************************
* global engine handling * * global engine handling *
*********************************************************************/ *********************************************************************/
/* /*
* version information * version information
*/ */
/* dynamic info from actually linked libxine */ /* dynamic info from actually linked libxine */
const char *xine_get_version_string (void) XINE_PROTECTED; const char *xine_get_version_string (void) XINE_PROTECTED;
void xine_get_version (int *major, int *minor, int *sub) XINE_PROTECTED; void xine_get_version (int *major, int *minor, int *sub) XINE_PROTECTED;
/* compare given version to libxine version, /* compare given version to libxine version,
return 1 if compatible, 0 otherwise */ return 1 if compatible, 0 otherwise */
int xine_check_version (int major, int minor, int sub) XINE_PROTECTED; int xine_check_version (int major, int minor, int sub) XINE_PROTECTED;
/* static info - which libxine release this header came from */
#define XINE_MAJOR_VERSION 1
#define XINE_MINOR_VERSION 1
#define XINE_SUB_VERSION 20
#define XINE_VERSION "1.1.20.1"
/* /*
* pre-init the xine engine * pre-init the xine engine
* *
* will first malloc and init a xine_t, create an empty config * will first malloc and init a xine_t, create an empty config
* system, then scan through all installed plugins and add them * system, then scan through all installed plugins and add them
* to an internal list for later use. * to an internal list for later use.
* *
* to fully init the xine engine, you have to load config values * to fully init the xine engine, you have to load config values
* (either using your own storage method and calling * (either using your own storage method and calling
* xine_config_register_entry, or by using the xine_load_config * xine_config_register_entry, or by using the xine_load_config
* utility function - see below) and then call xine_init * utility function - see below) and then call xine_init
* *
* the only proper way to shut down the xine engine is to * the only proper way to shut down the xine engine is to
* call xine_exit() - do not try to free() the xine pointer * call xine_exit() - do not try to free() the xine pointer
* yourself and do not try to access any internal data structures * yourself and do not try to access any internal data structures
*/ */
xine_t *xine_new (void) XINE_PROTECTED; xine_t *xine_new (void) XINE_PROTECTED;
/* allow the setting of some flags before xine_init
* FIXME-ABI: this is currently GLOBAL
*/
void xine_set_flags (xine_t *, int) XINE_PROTECTED __attribute__((weak));
#define XINE_FLAG_NO_WRITE_CACHE 1
/* /*
* post_init the xine engine * post_init the xine engine
*/ */
void xine_init (xine_t *self) XINE_PROTECTED; void xine_init (xine_t *self) XINE_PROTECTED;
/* /*
* helper functions to find and init audio/video drivers * helper functions to find and init audio/video drivers
* from xine's plugin collection * from xine's plugin collection
* *
* id : identifier of the driver, may be NULL for auto-detection * id : identifier of the driver, may be NULL for auto-detection
skipping to change at line 252 skipping to change at line 244
* start_pos: 0..65535 * start_pos: 0..65535
* start_time: milliseconds * start_time: milliseconds
* if both start position parameters are != 0 start_pos will be used * if both start position parameters are != 0 start_pos will be used
* for non-seekable streams both values will be ignored * for non-seekable streams both values will be ignored
* *
* returns 1 if OK, 0 on error (use xine_get_error for details) * returns 1 if OK, 0 on error (use xine_get_error for details)
*/ */
int xine_play (xine_stream_t *stream, int start_pos, int start_time) XINE_ PROTECTED; int xine_play (xine_stream_t *stream, int start_pos, int start_time) XINE_ PROTECTED;
/* /*
* set xine to a trick mode for fast forward, backwards playback,
* low latency seeking. Please note that this works only with some
* input plugins. mode constants see below.
*
* returns 1 if OK, 0 on error (use xine_get_error for details)
*/
int xine_trick_mode (xine_stream_t *stream, int mode, int value) XINE_PROT
ECTED XINE_DEPRECATED;
/* trick modes */
#define XINE_TRICK_MODE_OFF 0
#define XINE_TRICK_MODE_SEEK_TO_POSITION 1
#define XINE_TRICK_MODE_SEEK_TO_TIME 2
#define XINE_TRICK_MODE_FAST_FORWARD 3
#define XINE_TRICK_MODE_FAST_REWIND 4
/*
* stop stream playback * stop stream playback
* xine_stream_t stays valid for new xine_open or xine_play * xine_stream_t stays valid for new xine_open or xine_play
*/ */
void xine_stop (xine_stream_t *stream) XINE_PROTECTED; void xine_stop (xine_stream_t *stream) XINE_PROTECTED;
/* /*
* stop stream playback, free all stream-related resources * stop stream playback, free all stream-related resources
* xine_stream_t stays valid for new xine_open * xine_stream_t stays valid for new xine_open
*/ */
void xine_close (xine_stream_t *stream) XINE_PROTECTED; void xine_close (xine_stream_t *stream) XINE_PROTECTED;
skipping to change at line 374 skipping to change at line 350
#define XINE_PARAM_VO_SATURATION 0x01000003 /* 0..65535 */ #define XINE_PARAM_VO_SATURATION 0x01000003 /* 0..65535 */
#define XINE_PARAM_VO_CONTRAST 0x01000004 /* 0..65535 */ #define XINE_PARAM_VO_CONTRAST 0x01000004 /* 0..65535 */
#define XINE_PARAM_VO_BRIGHTNESS 0x01000005 /* 0..65535 */ #define XINE_PARAM_VO_BRIGHTNESS 0x01000005 /* 0..65535 */
#define XINE_PARAM_VO_GAMMA 0x0100000c /* 0..65535 */ #define XINE_PARAM_VO_GAMMA 0x0100000c /* 0..65535 */
#define XINE_PARAM_VO_ZOOM_X 0x01000008 /* percent */ #define XINE_PARAM_VO_ZOOM_X 0x01000008 /* percent */
#define XINE_PARAM_VO_ZOOM_Y 0x0100000d /* percent */ #define XINE_PARAM_VO_ZOOM_Y 0x0100000d /* percent */
#define XINE_PARAM_VO_PAN_SCAN 0x01000009 /* bool */ #define XINE_PARAM_VO_PAN_SCAN 0x01000009 /* bool */
#define XINE_PARAM_VO_TVMODE 0x0100000a /* ??? */ #define XINE_PARAM_VO_TVMODE 0x0100000a /* ??? */
#define XINE_PARAM_VO_WINDOW_WIDTH 0x0100000f /* readonly */ #define XINE_PARAM_VO_WINDOW_WIDTH 0x0100000f /* readonly */
#define XINE_PARAM_VO_WINDOW_HEIGHT 0x01000010 /* readonly */ #define XINE_PARAM_VO_WINDOW_HEIGHT 0x01000010 /* readonly */
#define XINE_PARAM_VO_SHARPNESS 0x01000018 /* 0..65535
*/
#define XINE_PARAM_VO_NOISE_REDUCTION 0x01000019 /* 0..65535
*/
#define XINE_PARAM_VO_CROP_LEFT 0x01000020 /* crop frame pixels */ #define XINE_PARAM_VO_CROP_LEFT 0x01000020 /* crop frame pixels */
#define XINE_PARAM_VO_CROP_RIGHT 0x01000021 /* crop frame pixels */ #define XINE_PARAM_VO_CROP_RIGHT 0x01000021 /* crop frame pixels */
#define XINE_PARAM_VO_CROP_TOP 0x01000022 /* crop frame pixels */ #define XINE_PARAM_VO_CROP_TOP 0x01000022 /* crop frame pixels */
#define XINE_PARAM_VO_CROP_BOTTOM 0x01000023 /* crop frame pixels */ #define XINE_PARAM_VO_CROP_BOTTOM 0x01000023 /* crop frame pixels */
#define XINE_VO_ZOOM_STEP 100 #define XINE_VO_ZOOM_STEP 100
#define XINE_VO_ZOOM_MAX 400 #define XINE_VO_ZOOM_MAX 400
#define XINE_VO_ZOOM_MIN -85 #define XINE_VO_ZOOM_MIN -85
/* possible ratios for XINE_PARAM_VO_ASPECT_RATIO */ /* possible ratios for XINE_PARAM_VO_ASPECT_RATIO */
skipping to change at line 480 skipping to change at line 458
int xine_get_current_frame_data (xine_stream_t *stream, int xine_get_current_frame_data (xine_stream_t *stream,
xine_current_frame_data_t *data, xine_current_frame_data_t *data,
int flags) XINE_PROTECTED; int flags) XINE_PROTECTED;
/* xine image formats */ /* xine image formats */
#define XINE_IMGFMT_YV12 (('2'<<24)|('1'<<16)|('V'<<8)|'Y') #define XINE_IMGFMT_YV12 (('2'<<24)|('1'<<16)|('V'<<8)|'Y')
#define XINE_IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y') #define XINE_IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y')
#define XINE_IMGFMT_XVMC (('C'<<24)|('M'<<16)|('v'<<8)|'X') #define XINE_IMGFMT_XVMC (('C'<<24)|('M'<<16)|('v'<<8)|'X')
#define XINE_IMGFMT_XXMC (('C'<<24)|('M'<<16)|('x'<<8)|'X') #define XINE_IMGFMT_XXMC (('C'<<24)|('M'<<16)|('x'<<8)|'X')
#define XINE_IMGFMT_VDPAU (('A'<<24)|('P'<<16)|('D'<<8)|'V')
/* get current xine's virtual presentation timestamp (1/90000 sec) /* get current xine's virtual presentation timestamp (1/90000 sec)
* note: this is mostly internal data. * note: this is mostly internal data.
* one can use vpts with xine_osd_show() and xine_osd_hide(). * one can use vpts with xine_osd_show() and xine_osd_hide().
*/ */
int64_t xine_get_current_vpts(xine_stream_t *stream) XINE_PROTECTED; int64_t xine_get_current_vpts(xine_stream_t *stream) XINE_PROTECTED;
/*
* Continuous video frame grabbing feature.
*
* In opposite to the 'xine_get_current_frame' based snapshot function this
grabbing
* feature allow continuous grabbing of last or next displayed video frame.
* Grabbed video frames are returned in simple three byte RGB format.
*
* Depending on the capabilities of the used video output driver video imag
e data is
* taken as close as possible at the end of the video processing chain. Thu
s a returned
* video image could contain the blended OSD data, is deinterlaced, cropped
and scaled
* and video properties like hue, sat could be applied.
* If a video output driver does not have a decent grabbing implementation
then there
* is a generic fallback feature that grabs the video frame as they are tak
en from the video
* display queue (like the xine_get_current_frame' function).
* In this case color correct conversation to a RGB image incorporating sou
rce cropping
* and scaling to the requested grab size is also supported.
*
* The caller must first request a new video grab frame using the public 'x
ine_new_grab_video_frame'
* function. Then the caller should populate the frame with the wanted sour
ce cropping, grab image
* size and control flags. After that grab requests could be done by callin
g the supplied grab() feature
* of the frame. At the end a call to the supplied dispose() feature of the
frame releases all needed
* resources.
* The caller should have acquired a port ticket while calling these featur
es.
*
*/
#define HAVE_XINE_GRAB_VIDEO_FRAME 1
/*
* frame structure used for grabbing video frames of format RGB.
*/
typedef struct xine_grab_video_frame_s xine_grab_video_frame_t;
struct xine_grab_video_frame_s {
/*
* grab last/next displayed image.
* returns 0 if grab is successful, 1 on timeout and -1 on error
*/
int (*grab) (xine_grab_video_frame_t *self);
/*
* free all resources.
*/
void (*dispose) (xine_grab_video_frame_t *self);
/*
* Cropping of source image. Has to be specified by caller.
*/
int crop_left;
int crop_right;
int crop_top;
int crop_bottom;
/*
* Parameters of returned RGB image.
* Caller can specify wanted frame size giving width and/or height a valu
e > 0.
* In this case the grabbed image is scaled to the requested size.
* Otherwise the grab function returns the actual size of the grabbed ima
ge
* in width/height without scaling the image.
*/
int width, height; /* requested/returned size of image */
uint8_t *img; /* returned RGB image data taking three bytes per pixe
l */
int64_t vpts; /* virtual presentation timestamp (1/90000 sec) of ret
urned frame */
int timeout; /* Max. time to wait for next displayed frame in milli
seconds */
int flags; /* Controlling flags. See XINE_GRAB_VIDEO_FRAME_FLAGS_
* definitions */
};
#define XINE_GRAB_VIDEO_FRAME_FLAGS_CONTINUOUS 0x01 /* optimize resourc
e allocation for continuous frame grabbing */
#define XINE_GRAB_VIDEO_FRAME_FLAGS_WAIT_NEXT 0x02 /* wait for next di
splay frame instead of using last displayed frame */
#define XINE_GRAB_VIDEO_FRAME_DEFAULT_TIMEOUT 500
/*
* Allocate new grab video frame. Returns NULL on error.
*/
xine_grab_video_frame_t* xine_new_grab_video_frame (xine_stream_t *stream)
XINE_PROTECTED;
/********************************************************************* /*********************************************************************
* media processing * * media processing *
*********************************************************************/ *********************************************************************/
#ifdef XINE_ENABLE_EXPERIMENTAL_FEATURES #ifdef XINE_ENABLE_EXPERIMENTAL_FEATURES
/* /*
* access to decoded audio and video frames from a stream * access to decoded audio and video frames from a stream
* these functions are intended to provide the basis for * these functions are intended to provide the basis for
* re-encoding and other video processing applications * re-encoding and other video processing applications
skipping to change at line 512 skipping to change at line 567
* framegrab port is guaranteed to never miss a frame. * framegrab port is guaranteed to never miss a frame.
* *
*/ */
xine_video_port_t *xine_new_framegrab_video_port (xine_t *self) XINE_PROTEC TED; xine_video_port_t *xine_new_framegrab_video_port (xine_t *self) XINE_PROTEC TED;
typedef struct { typedef struct {
int64_t vpts; /* timestamp 1/90000 sec for a/v sync */ int64_t vpts; /* timestamp 1/90000 sec for a/v sync */
int64_t duration; int64_t duration;
double aspect_ratio;
int width, height; int width, height;
int colorspace; /* XINE_IMGFMT_* */ int colorspace; /* XINE_IMGFMT_* */
double aspect_ratio;
int pos_stream; /* bytes from stream start */ int pos_stream; /* bytes from stream start */
int pos_time; /* milliseconds */ int pos_time; /* milliseconds */
int frame_number; /* frame number (may be unknown) */
uint8_t *data; uint8_t *data;
void *xine_frame; /* used internally by xine engine */ void *xine_frame; /* used internally by xine engine */
int frame_number; /* frame number (may be unknown) */
} xine_video_frame_t; } xine_video_frame_t;
int xine_get_next_video_frame (xine_video_port_t *port, int xine_get_next_video_frame (xine_video_port_t *port,
xine_video_frame_t *frame) XINE_PROTECTED; xine_video_frame_t *frame) XINE_PROTECTED;
void xine_free_video_frame (xine_video_port_t *port, xine_video_frame_t *fr ame) XINE_PROTECTED; void xine_free_video_frame (xine_video_port_t *port, xine_video_frame_t *fr ame) XINE_PROTECTED;
xine_audio_port_t *xine_new_framegrab_audio_port (xine_t *self) XINE_PROTEC TED; xine_audio_port_t *xine_new_framegrab_audio_port (xine_t *self) XINE_PROTEC TED;
typedef struct { typedef struct {
int64_t vpts; /* timestamp 1/90000 sec for a/v sync */ int64_t vpts; /* timestamp 1/90000 sec for a/v sync */
int num_samples; int num_samples;
int sample_rate; int sample_rate;
int num_channels; int num_channels;
int bits_per_sample; /* per channel */ int bits_per_sample; /* per channel */
off_t pos_stream; /* bytes from stream start */
int pos_time; /* milliseconds */
uint8_t *data; uint8_t *data;
void *xine_frame; /* used internally by xine engine */ void *xine_frame; /* used internally by xine engine */
off_t pos_stream; /* bytes from stream start */
int pos_time; /* milliseconds */
} xine_audio_frame_t; } xine_audio_frame_t;
int xine_get_next_audio_frame (xine_audio_port_t *port, int xine_get_next_audio_frame (xine_audio_port_t *port,
xine_audio_frame_t *frame) XINE_PROTECTED; xine_audio_frame_t *frame) XINE_PROTECTED;
void xine_free_audio_frame (xine_audio_port_t *port, xine_audio_frame_t *fr ame) XINE_PROTECTED; void xine_free_audio_frame (xine_audio_port_t *port, xine_audio_frame_t *fr ame) XINE_PROTECTED;
/*
* maybe future aproach:
*/
int xine_get_video_frame (xine_stream_t *stream,
int timestamp, /* msec */
int *width, int *height,
int *ratio_code,
int *duration, /* msec */
int *format,
uint8_t *img) XINE_PROTECTED XINE_DEPRECATED;
/* TODO: xine_get_audio_frame */
#endif #endif
/********************************************************************* /*********************************************************************
* post plugin handling * * post plugin handling *
*********************************************************************/ *********************************************************************/
/* /*
* post effect plugin functions * post effect plugin functions
* *
* after the data leaves the decoder it can pass an arbitrary tree * after the data leaves the decoder it can pass an arbitrary tree
skipping to change at line 622 skipping to change at line 663
*/ */
xine_post_t *xine_post_init(xine_t *xine, const char *name, xine_post_t *xine_post_init(xine_t *xine, const char *name,
int inputs, int inputs,
xine_audio_port_t **audio_target, xine_audio_port_t **audio_target,
xine_video_port_t **video_target) XINE_PROTECTED ; xine_video_port_t **video_target) XINE_PROTECTED ;
/* get a list of all available post plugins */ /* get a list of all available post plugins */
const char *const *xine_list_post_plugins(xine_t *xine) XINE_PROTECTED; const char *const *xine_list_post_plugins(xine_t *xine) XINE_PROTECTED;
/* get a list of all post plugins of one type */ /* get a list of all post plugins of one type */
const char *const *xine_list_post_plugins_typed(xine_t *xine, int type) XIN E_PROTECTED; const char *const *xine_list_post_plugins_typed(xine_t *xine, uint32_t type ) XINE_PROTECTED;
/* /*
* post plugin input/output * post plugin input/output
* *
* These structures encapsulate inputs/outputs for post plugins * These structures encapsulate inputs/outputs for post plugins
* to transfer arbitrary data. Frontends can also provide inputs * to transfer arbitrary data. Frontends can also provide inputs
* and outputs and connect them to post plugins to exchange data * and outputs and connect them to post plugins to exchange data
* with them. * with them.
*/ */
typedef struct xine_post_in_s xine_post_in_t; typedef struct xine_post_in_s xine_post_in_t;
typedef struct xine_post_out_s xine_post_out_t; typedef struct xine_post_out_s xine_post_out_t;
struct xine_post_in_s { struct xine_post_in_s {
/* the name identifying this input */ /* the name identifying this input */
const char *name; const char *name;
/* the datatype of this input, use one of XINE_POST_DATA_* here */
int type;
/* the data pointer; input is directed to this memory location, /* the data pointer; input is directed to this memory location,
* so you simply access the pointer to access the input data */ * so you simply access the pointer to access the input data */
void *data; void *data;
/* the datatype of this input, use one of XINE_POST_DATA_* here */
int type;
}; };
struct xine_post_out_s { struct xine_post_out_s {
/* the name identifying this output */ /* the name identifying this output */
const char *name; const char *name;
/* the datatype of this output, use one of XINE_POST_DATA_* here */
int type;
/* the data pointer; output should be directed to this memory location, /* the data pointer; output should be directed to this memory location,
* so in the easy case you simply write through the pointer */ * so in the easy case you simply write through the pointer */
void *data; void *data;
/* this function is called, when the output should be redirected /* this function is called, when the output should be redirected
* to another input, you sould set the data pointer to direct * to another input, you sould set the data pointer to direct
* any output to this new input; * any output to this new input;
* a special situation is, when this function is called with a NULL * a special situation is, when this function is called with a NULL
* argument: in this case you should disconnect the data pointer * argument: in this case you should disconnect the data pointer
* from any output and if necessary to avoid writing to some stray * from any output and if necessary to avoid writing to some stray
* memory you should make it point to some dummy location, * memory you should make it point to some dummy location,
* returns 1 on success, 0 on failure; * returns 1 on success, 0 on failure;
* if you do not implement rewiring, set this to NULL */ * if you do not implement rewiring, set this to NULL */
int (*rewire) (xine_post_out_t *self, void *data); int (*rewire) (xine_post_out_t *self, void *data);
/* the datatype of this output, use one of XINE_POST_DATA_* here */
int type;
}; };
/* get a list of all inputs of a post plugin */ /* get a list of all inputs of a post plugin */
const char *const *xine_post_list_inputs(xine_post_t *self) XINE_PROTECTED; const char *const *xine_post_list_inputs(xine_post_t *self) XINE_PROTECTED;
/* get a list of all outputs of a post plugin */ /* get a list of all outputs of a post plugin */
const char *const *xine_post_list_outputs(xine_post_t *self) XINE_PROTECTED ; const char *const *xine_post_list_outputs(xine_post_t *self) XINE_PROTECTED ;
/* retrieve one specific input of a post plugin */ /* retrieve one specific input of a post plugin */
xine_post_in_t *xine_post_input(xine_post_t *self, const char *name) XINE_P ROTECTED; xine_post_in_t *xine_post_input(xine_post_t *self, const char *name) XINE_P ROTECTED;
skipping to change at line 769 skipping to change at line 810
#define XINE_POST_DATA_DOUBLE 4 #define XINE_POST_DATA_DOUBLE 4
/* parameters api (used by frontends) /* parameters api (used by frontends)
* input->data is xine_post_api_t* (see below) * input->data is xine_post_api_t* (see below)
*/ */
#define XINE_POST_DATA_PARAMETERS 5 #define XINE_POST_DATA_PARAMETERS 5
/* defines a single parameter entry. */ /* defines a single parameter entry. */
typedef struct { typedef struct {
int type; /* POST_PARAM_TYPE_xxx */ int type; /* POST_PARAM_TYPE_xxx */
char *name; /* name of this parameter */ const char *name; /* name of this parameter */
int size; /* sizeof(parameter) */ int size; /* sizeof(parameter) */
int offset; /* offset in bytes from struct ptr */ int offset; /* offset in bytes from struct ptr */
char **enum_values; /* enumeration (first=0) or NULL */ char **enum_values; /* enumeration (first=0) or NULL */
double range_min; /* minimum value */ double range_min; /* minimum value */
double range_max; /* maximum value */ double range_max; /* maximum value */
int readonly; /* 0 = read/write, 1=read-only */ int readonly; /* 0 = read/write, 1=read-only */
char *description; /* user-friendly description */ const char *description; /* user-friendly description */
} xine_post_api_parameter_t; } xine_post_api_parameter_t;
/* description of parameters struct (params). */ /* description of parameters struct (params). */
typedef struct { typedef struct {
int struct_size; /* sizeof(params) */ int struct_size; /* sizeof(params) */
xine_post_api_parameter_t *parameter; /* list of parameters */ xine_post_api_parameter_t *parameter; /* list of parameters */
} xine_post_api_descr_t; } xine_post_api_descr_t;
typedef struct { typedef struct {
/* /*
skipping to change at line 887 skipping to change at line 928
* (use -1 for current channel) * (use -1 for current channel)
* *
* lang must point to a buffer of at least XINE_LANG_MAX bytes * lang must point to a buffer of at least XINE_LANG_MAX bytes
* *
* returns 1 on success, 0 on failure * returns 1 on success, 0 on failure
*/ */
int xine_get_audio_lang (xine_stream_t *stream, int channel, int xine_get_audio_lang (xine_stream_t *stream, int channel,
char *lang) XINE_PROTECTED; char *lang) XINE_PROTECTED;
int xine_get_spu_lang (xine_stream_t *stream, int channel, int xine_get_spu_lang (xine_stream_t *stream, int channel,
char *lang) XINE_PROTECTED; char *lang) XINE_PROTECTED;
/*_x_ increasing this number means an incompatible ABI breakage! */
#define XINE_LANG_MAX 32 #define XINE_LANG_MAX 32
/* /*
* get position / length information * get position / length information
* *
* depending of the nature and system layer of the stream, * depending of the nature and system layer of the stream,
* some or all of this information may be unavailable or incorrect * some or all of this information may be unavailable or incorrect
* (e.g. live network streams may not have a valid length) * (e.g. live network streams may not have a valid length)
* *
* returns 1 on success, 0 on failure (data was not updated, * returns 1 on success, 0 on failure (data was not updated,
skipping to change at line 1019 skipping to change at line 1061
* by some of these functions are pointers to statically * by some of these functions are pointers to statically
* alloced internal xine memory chunks. * alloced internal xine memory chunks.
* they're only valid between xine function calls * they're only valid between xine function calls
* and should never be free()d. * and should never be free()d.
*/ */
typedef struct { typedef struct {
char *origin; /* file plugin: path */ char *origin; /* file plugin: path */
char *mrl; /* <type>://<location> */ char *mrl; /* <type>://<location> */
char *link; char *link;
uint32_t type; /* see below */
off_t size; /* size of this source, may be 0 */ off_t size; /* size of this source, may be 0 */
uint32_t type; /* see below */
} xine_mrl_t; } xine_mrl_t;
/* mrl types */ /* mrl types */
#define XINE_MRL_TYPE_unknown (0 << 0) #define XINE_MRL_TYPE_unknown (0 << 0)
#define XINE_MRL_TYPE_dvd (1 << 0) #define XINE_MRL_TYPE_dvd (1 << 0)
#define XINE_MRL_TYPE_vcd (1 << 1) #define XINE_MRL_TYPE_vcd (1 << 1)
#define XINE_MRL_TYPE_net (1 << 2) #define XINE_MRL_TYPE_net (1 << 2)
#define XINE_MRL_TYPE_rtp (1 << 3) #define XINE_MRL_TYPE_rtp (1 << 3)
#define XINE_MRL_TYPE_stdin (1 << 4) #define XINE_MRL_TYPE_stdin (1 << 4)
#define XINE_MRL_TYPE_cda (1 << 5) #define XINE_MRL_TYPE_cda (1 << 5)
skipping to change at line 1063 skipping to change at line 1105
*/ */
xine_mrl_t **xine_get_browse_mrls (xine_t *self, xine_mrl_t **xine_get_browse_mrls (xine_t *self,
const char *plugin_id, const char *plugin_id,
const char *start_mrl, const char *start_mrl,
int *num_mrls) XINE_PROTECTED; int *num_mrls) XINE_PROTECTED;
/* get a list of plugins that support the autoplay feature */ /* get a list of plugins that support the autoplay feature */
const char *const *xine_get_autoplay_input_plugin_ids (xine_t *self) XINE_P ROTECTED; const char *const *xine_get_autoplay_input_plugin_ids (xine_t *self) XINE_P ROTECTED;
/* get autoplay MRL list from input plugin named <plugin_id> */ /* get autoplay MRL list from input plugin named <plugin_id> */
char **xine_get_autoplay_mrls (xine_t *self, const char * const *xine_get_autoplay_mrls (xine_t *self,
const char *plugin_id, const char *plugin_id,
int *num_mrls) XINE_PROTECTED; int *num_mrls) XINE_PROTECTED;
/* get a list of file extensions for file types supported by xine /* get a list of file extensions for file types supported by xine
* the list is separated by spaces * the list is separated by spaces
* *
* the pointer returned can be free()ed when no longer used */ * the pointer returned can be free()ed when no longer used */
char *xine_get_file_extensions (xine_t *self) XINE_PROTECTED; char *xine_get_file_extensions (xine_t *self) XINE_PROTECTED;
/* get a list of mime types supported by xine /* get a list of mime types supported by xine
* *
* the pointer returned can be free()ed when no longer used */ * the pointer returned can be free()ed when no longer used */
skipping to change at line 1128 skipping to change at line 1170
const char *const *xine_list_audio_decoder_plugins(xine_t *self) XINE_PROTE CTED; const char *const *xine_list_audio_decoder_plugins(xine_t *self) XINE_PROTE CTED;
const char *const *xine_list_video_decoder_plugins(xine_t *self) XINE_PROTE CTED; const char *const *xine_list_video_decoder_plugins(xine_t *self) XINE_PROTE CTED;
/* unload unused plugins */ /* unload unused plugins */
void xine_plugins_garbage_collector(xine_t *self) XINE_PROTECTED; void xine_plugins_garbage_collector(xine_t *self) XINE_PROTECTED;
/********************************************************************* /*********************************************************************
* visual specific gui <-> xine engine communication * * visual specific gui <-> xine engine communication *
*********************************************************************/ *********************************************************************/
#ifndef XINE_DISABLE_DEPRECATED_FEATURES
/* talk to video output driver - old method */
int xine_gui_send_vo_data (xine_stream_t *self,
int type, void *data) XINE_PROTECTED XINE_DEPR
ECATED;
#endif
/* new (preferred) method to talk to video driver. */ /* new (preferred) method to talk to video driver. */
int xine_port_send_gui_data (xine_video_port_t *vo, int xine_port_send_gui_data (xine_video_port_t *vo,
int type, void *data) XINE_PROTECTED; int type, void *data) XINE_PROTECTED;
typedef struct { typedef struct {
/* area of that drawable to be used by video */ /* area of that drawable to be used by video */
int x,y,w,h; int x,y,w,h;
} x11_rectangle_t; } x11_rectangle_t;
skipping to change at line 1482 skipping to change at line 1518
#define CHECK_KERNEL 0 #define CHECK_KERNEL 0
#define CHECK_MTRR 1 #define CHECK_MTRR 1
#define CHECK_CDROM 2 #define CHECK_CDROM 2
#define CHECK_DVDROM 3 #define CHECK_DVDROM 3
#define CHECK_DMA 4 #define CHECK_DMA 4
#define CHECK_X 5 #define CHECK_X 5
#define CHECK_XV 6 #define CHECK_XV 6
struct xine_health_check_s { struct xine_health_check_s {
int status;
const char* cdrom_dev; const char* cdrom_dev;
const char* dvd_dev; const char* dvd_dev;
char* msg; const char* msg;
char* title; const char* title;
char* explanation; const char* explanation;
int status;
}; };
typedef struct xine_health_check_s xine_health_check_t; typedef struct xine_health_check_s xine_health_check_t;
xine_health_check_t* xine_health_check(xine_health_check_t*, int check_num) XINE_PROTECTED; xine_health_check_t* xine_health_check(xine_health_check_t*, int check_num) XINE_PROTECTED;
/********************************************************************* /*********************************************************************
* configuration system * * configuration system *
*********************************************************************/ *********************************************************************/
/* /*
skipping to change at line 1523 skipping to change at line 1559
typedef struct xine_cfg_entry_s xine_cfg_entry_t; typedef struct xine_cfg_entry_s xine_cfg_entry_t;
typedef void (*xine_config_cb_t) (void *user_data, typedef void (*xine_config_cb_t) (void *user_data,
xine_cfg_entry_t *entry); xine_cfg_entry_t *entry);
struct xine_cfg_entry_s { struct xine_cfg_entry_s {
const char *key; /* unique id (example: gui.logo_mrl) */ const char *key; /* unique id (example: gui.logo_mrl) */
int type; int type;
/* user experience level */
int exp_level; /* 0 => beginner,
10 => advanced user,
20 => expert */
/* type unknown */ /* type unknown */
char *unknown_value; char *unknown_value;
/* type string */ /* type string */
char *str_value; char *str_value;
char *str_default; char *str_default;
#ifndef XINE_DISABLE_DEPRECATED_FEATURES
char *str_sticky;
#else
void *dummy;
#endif
/* common to range, enum, num, bool; /* common to range, enum, num, bool;
* num_value is also used by string to indicate what's required: * num_value is also used by string to indicate what's required:
* plain string, file name, device name, directory name * plain string, file name, device name, directory name
*/ */
int num_value; int num_value;
int num_default; int num_default;
/* type range specific: */ /* type range specific: */
int range_min; int range_min;
skipping to change at line 1556 skipping to change at line 1592
/* type enum specific: */ /* type enum specific: */
char **enum_values; char **enum_values;
/* help info for the user (UTF-8) /* help info for the user (UTF-8)
* the help string must be word wrapped by the frontend. * the help string must be word wrapped by the frontend.
* it might contain \n to mark paragraph breaks. * it might contain \n to mark paragraph breaks.
*/ */
const char *description; const char *description;
const char *help; const char *help;
/* user experience level */
int exp_level; /* 0 => beginner,
10 => advanced user,
20 => expert */
/* callback function and data for live changeable values */ /* callback function and data for live changeable values */
/* some config entries will take effect immediately, although they /* some config entries will take effect immediately, although they
* do not have a callback registered; such values will have some * do not have a callback registered; such values will have some
* non-NULL dummy value in callback_data; so if you want to check, * non-NULL dummy value in callback_data; so if you want to check,
* if a config change will require restarting xine, check for * if a config change will require restarting xine, check for
* callback_data == NULL */ * callback_data == NULL */
xine_config_cb_t callback; xine_config_cb_t callback;
void *callback_data; void *callback_data;
}; };
skipping to change at line 1802 skipping to change at line 1833
#define XINE_EVENT_VDR_PLUGINSTARTED 354 #define XINE_EVENT_VDR_PLUGINSTARTED 354
#define XINE_EVENT_VDR_DISCONTINUITY 355 #define XINE_EVENT_VDR_DISCONTINUITY 355
/* events generated from post plugins */ /* events generated from post plugins */
#define XINE_EVENT_POST_TVTIME_FILMMODE_CHANGE 400 #define XINE_EVENT_POST_TVTIME_FILMMODE_CHANGE 400
/* /*
* xine event struct * xine event struct
*/ */
typedef struct { typedef struct {
int type; /* event type (constants see abo ve) */
xine_stream_t *stream; /* stream this event belongs to */ xine_stream_t *stream; /* stream this event belongs to */
void *data; /* contents depending on type */ void *data; /* contents depending on type */
int data_length; int data_length;
int type; /* event type (constants see abo
ve) */
/* you do not have to provide this, it will be filled in by xine_event_se nd() */ /* you do not have to provide this, it will be filled in by xine_event_se nd() */
struct timeval tv; /* timestamp of event creation * / struct timeval tv; /* timestamp of event creation * /
} xine_event_t; } xine_event_t;
/* /*
* input event dynamic data * input event dynamic data
*/ */
typedef struct { typedef struct {
xine_event_t event; xine_event_t event;
uint8_t button; /* Generally 1 = left, 2 = mid, 3 = right */ uint8_t button; /* Generally 1 = left, 2 = mid, 3 = right */
skipping to change at line 2080 skipping to change at line 2112
#define XINE_MSG_NETWORK_UNREACHABLE 4 /* none */ #define XINE_MSG_NETWORK_UNREACHABLE 4 /* none */
#define XINE_MSG_CONNECTION_REFUSED 5 /* (host name) */ #define XINE_MSG_CONNECTION_REFUSED 5 /* (host name) */
#define XINE_MSG_FILE_NOT_FOUND 6 /* (file name or mrl) */ #define XINE_MSG_FILE_NOT_FOUND 6 /* (file name or mrl) */
#define XINE_MSG_READ_ERROR 7 /* (device/file/mrl) */ #define XINE_MSG_READ_ERROR 7 /* (device/file/mrl) */
#define XINE_MSG_LIBRARY_LOAD_ERROR 8 /* (library/decoder) */ #define XINE_MSG_LIBRARY_LOAD_ERROR 8 /* (library/decoder) */
#define XINE_MSG_ENCRYPTED_SOURCE 9 /* none */ #define XINE_MSG_ENCRYPTED_SOURCE 9 /* none */
#define XINE_MSG_SECURITY 10 /* (security message) */ #define XINE_MSG_SECURITY 10 /* (security message) */
#define XINE_MSG_AUDIO_OUT_UNAVAILABLE 11 /* none */ #define XINE_MSG_AUDIO_OUT_UNAVAILABLE 11 /* none */
#define XINE_MSG_PERMISSION_ERROR 12 /* (file name or mrl) */ #define XINE_MSG_PERMISSION_ERROR 12 /* (file name or mrl) */
#define XINE_MSG_FILE_EMPTY 13 /* file is empty */ #define XINE_MSG_FILE_EMPTY 13 /* file is empty */
#define XINE_MSG_AUTHENTICATION_NEEDED 14 /* (mrl, likely http) */
/* opaque xine_event_queue_t */ /* opaque xine_event_queue_t */
typedef struct xine_event_queue_s xine_event_queue_t; typedef struct xine_event_queue_s xine_event_queue_t;
/* /*
* register a new event queue * register a new event queue
* *
* you have to receive messages from this queue regularly * you have to receive messages from this queue regularly
* *
* use xine_event_dispose_queue to unregister and free the queue * use xine_event_dispose_queue to unregister and free the queue
skipping to change at line 2152 skipping to change at line 2185
/* white text, black border, transparent background */ /* white text, black border, transparent background */
#define XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT 0 #define XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT 0
/* white text, noborder, transparent background */ /* white text, noborder, transparent background */
#define XINE_TEXTPALETTE_WHITE_NONE_TRANSPARENT 1 #define XINE_TEXTPALETTE_WHITE_NONE_TRANSPARENT 1
/* white text, no border, translucid background */ /* white text, no border, translucid background */
#define XINE_TEXTPALETTE_WHITE_NONE_TRANSLUCID 2 #define XINE_TEXTPALETTE_WHITE_NONE_TRANSLUCID 2
/* yellow text, black border, transparent background */ /* yellow text, black border, transparent background */
#define XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3 #define XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3
#define XINE_OSD_CAP_FREETYPE2 0x0001 /* freetype2 support compiled in #define XINE_OSD_CAP_FREETYPE2 0x0001 /* freetype2 support compiled in
*/ */
#define XINE_OSD_CAP_UNSCALED 0x0002 /* unscaled overlays supp. by vo drv #define XINE_OSD_CAP_UNSCALED 0x0002 /* unscaled overlays supp. by vo
*/ drv */
#define XINE_OSD_CAP_CUSTOM_EXTENT 0x0004 /* hardware scaled to match video
output window */
#define XINE_OSD_CAP_ARGB_LAYER 0x0008 /* supports ARGB true color pixma
ps */
#define XINE_OSD_CAP_VIDEO_WINDOW 0x0010 /* can scale video to an area wit
hin osd extent */
typedef struct xine_osd_s xine_osd_t; typedef struct xine_osd_s xine_osd_t;
xine_osd_t *xine_osd_new (xine_stream_t *self, int x, int y, xine_osd_t *xine_osd_new (xine_stream_t *self, int x, int y,
int width, int height) XINE_PROTECTED; int width, int height) XINE_PROTECTED;
uint32_t xine_osd_get_capabilities (xine_osd_t *self) XINE_PROTECTED; uint32_t xine_osd_get_capabilities (xine_osd_t *self) XINE_PROTECTED;
void xine_osd_draw_point (xine_osd_t *self, int x, int y, int col or) XINE_PROTECTED; void xine_osd_draw_point (xine_osd_t *self, int x, int y, int col or) XINE_PROTECTED;
void xine_osd_draw_line (xine_osd_t *self, int x1, int y1, void xine_osd_draw_line (xine_osd_t *self, int x1, int y1,
int x2, int y2, int color) XINE_PROTECTE D; int x2, int y2, int color) XINE_PROTECTE D;
skipping to change at line 2218 skipping to change at line 2254
*/ */
void xine_osd_set_text_palette (xine_osd_t *self, void xine_osd_set_text_palette (xine_osd_t *self,
int palette_number, int palette_number,
int color_base ) XINE_PROTECTED; int color_base ) XINE_PROTECTED;
/* get palette (color and transparency) */ /* get palette (color and transparency) */
void xine_osd_get_palette (xine_osd_t *self, uint32_t *color, void xine_osd_get_palette (xine_osd_t *self, uint32_t *color,
uint8_t *trans) XINE_PROTECTED; uint8_t *trans) XINE_PROTECTED;
void xine_osd_set_palette (xine_osd_t *self, void xine_osd_set_palette (xine_osd_t *self,
const uint32_t *const color, const uint32_t *const color,
const uint8_t *const trans ) XINE_PROTEC TED; const uint8_t *const trans ) XINE_PROTEC TED;
/* /*
* close osd rendering engine * Set an ARGB buffer to be blended into video.
* loaded fonts are unloaded * The buffer must stay valid while the OSD is on screen.
* osd objects are closed * Pass a NULL pointer to safely remove the buffer from
* the OSD layer. Only the dirty area will be
* updated on screen. For convenience the whole
* OSD object will be considered dirty when setting
* a different buffer pointer.
* see also XINE_OSD_CAP_ARGB_LAYER
*/ */
void xine_osd_free (xine_osd_t *self) XINE_PROTECTED; void xine_osd_set_argb_buffer(xine_osd_t *self, uint32_t *argb_buffer,
int dirty_x, int dirty_y, int dirty_width, in
#ifndef XINE_DISABLE_DEPRECATED_FEATURES t dirty_height) XINE_PROTECTED;
/*********************************************************************
* TV-mode API, to make it possible to use nvtvd to view movies *
*********************************************************************/
/* These functions are just dummies to maintain API compatibility.
* You should use libnvtvsimple in your frontend instead. */
typedef enum {
XINE_TVSYSTEM_PAL = 0,
XINE_TVSYSTEM_NTSC
} xine_tvsystem XINE_DEPRECATED;
/* connect to nvtvd server and save current TV and X settings */
int xine_tvmode_init (xine_t *self) XINE_PROTECTED XINE_DEPRECATED;
/* Turn tvmode on/off (1/0)*/
int xine_tvmode_use(xine_t *self, int use_tvmode) XINE_PROTECTED XINE_DEPRE
CATED;
/* Set which tv system to use: XINE_TVSYSTEM_PAL or XINE_TVSYSTEM_NTSC */
void xine_tvmode_set_tvsystem(xine_t *self, xine_tvsystem system) XINE_PROT
ECTED XINE_DEPRECATED;
/* try to change TV state if enabled /*
* type select 'regular' (0) or 'TV' (1) state * define extent of reference coordinate system
* width frame width the mode should match best or 0 if unknown * for video resolution independent osds.
* height frame height the mode should match best or 0 if unknown * see also XINE_OSD_CAP_CUSTOM_EXTENT
* fps frame rate the mode should match best or 0 if unknown
* returns: finally selected state
*/ */
int xine_tvmode_switch (xine_t *self, int type, int width, int height, doub le fps) XINE_PROTECTED XINE_DEPRECATED; void xine_osd_set_extent(xine_osd_t *self, int extent_width, int extent_hei ght) XINE_PROTECTED;
/* adapt (maximum) output size to visible area if necessary and return pixe /*
l * define area within osd extent to output
* aspect and real frame rate if available * video to while osd is on screen
* see also XINE_OSD_CAP_VIDEO_WINDOW
*/ */
void xine_tvmode_size (xine_t *self, int *width, int *height, void xine_osd_set_video_window(xine_osd_t *self, int window_x, int window_y
double *pixelratio, double *fps) XINE_PROTECTED XINE_ , int window_width, int window_height) XINE_PROTECTED;
DEPRECATED;
/* restore old TV and X settings and close nvtvd connection */
void xine_tvmode_exit (xine_t *self) XINE_PROTECTED XINE_DEPRECATED;
#endif /*
* close osd rendering engine
* loaded fonts are unloaded
* osd objects are closed
*/
void xine_osd_free (xine_osd_t *self) XINE_PROTECTED;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 46 change blocks. 
139 lines changed or deleted 183 lines changed or added


 xine_buffer.h   xine_buffer.h 
skipping to change at line 53 skipping to change at line 53
* Here are some drawbacks (aka policies): * Here are some drawbacks (aka policies):
* - The user must not pass indexed buffers to xine_buffer_* * - The user must not pass indexed buffers to xine_buffer_*
* functions. * functions.
* - The pointers passed to xine_buffer_* functions may change * - The pointers passed to xine_buffer_* functions may change
* (eg during reallocation). The user must respect that. * (eg during reallocation). The user must respect that.
*/ */
#ifndef HAVE_XINE_BUFFER_H #ifndef HAVE_XINE_BUFFER_H
#define HAVE_XINE_BUFFER_H #define HAVE_XINE_BUFFER_H
#ifdef XINE_COMPILE #include <xine/os_types.h>
# include <inttypes.h>
#else
# include <xine/os_types.h>
#endif
/* /*
* returns an initialized pointer to a buffer. * returns an initialized pointer to a buffer.
* The buffer will be allocated in blocks of * The buffer will be allocated in blocks of
* chunk_size bytes. This will prevent permanent * chunk_size bytes. This will prevent permanent
* reallocation on slow growing buffers. * reallocation on slow growing buffers.
*/ */
void *xine_buffer_init(int chunk_size) XINE_PROTECTED; void *xine_buffer_init(int chunk_size) XINE_PROTECTED;
/* /*
 End of changes. 1 change blocks. 
5 lines changed or deleted 1 lines changed or added


 xine_internal.h   xine_internal.h 
skipping to change at line 32 skipping to change at line 32
#define HAVE_XINE_INTERNAL_H #define HAVE_XINE_INTERNAL_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* include public part of xine header * include public part of xine header
*/ */
#ifdef XINE_COMPILE #include <xine.h>
# include "xine.h" #include <xine/refcounter.h>
# include "refcounter.h" #include <xine/input_plugin.h>
# include "input/input_plugin.h" #include <xine/demux.h>
# include "demuxers/demux.h" #include <xine/video_out.h>
# include "video_out.h" #include <xine/audio_out.h>
# include "audio_out.h" #include <xine/metronom.h>
# include "metronom.h" #include <xine/osd.h>
# include "osd.h" #include <xine/xineintl.h>
# include "xineintl.h" #include <xine/plugin_catalog.h>
# include "plugin_catalog.h" #include <xine/video_decoder.h>
# include "video_decoder.h" #include <xine/audio_decoder.h>
# include "audio_decoder.h" #include <xine/spu_decoder.h>
# include "spu_decoder.h" #include <xine/scratch.h>
# include "scratch.h" #include <xine/broadcaster.h>
# include "broadcaster.h" #include <xine/io_helper.h>
# include "io_helper.h" #include <xine/info_helper.h>
# include "info_helper.h" #include <xine/alphablend.h>
# include "alphablend.h"
#else
# include <xine.h>
# include <xine/refcounter.h>
# include <xine/input_plugin.h>
# include <xine/demux.h>
# include <xine/video_out.h>
# include <xine/audio_out.h>
# include <xine/metronom.h>
# include <xine/osd.h>
# include <xine/xineintl.h>
# include <xine/plugin_catalog.h>
# include <xine/video_decoder.h>
# include <xine/audio_decoder.h>
# include <xine/spu_decoder.h>
# include <xine/scratch.h>
# include <xine/broadcaster.h>
# include <xine/io_helper.h>
# include <xine/info_helper.h>
# include <xine/alphablend.h>
#endif
#define XINE_MAX_EVENT_LISTENERS 50 #define XINE_MAX_EVENT_LISTENERS 50
#define XINE_MAX_EVENT_TYPES 100 #define XINE_MAX_EVENT_TYPES 100
#define XINE_MAX_TICKET_HOLDER_THREADS 64 #define XINE_MAX_TICKET_HOLDER_THREADS 64
/* used by plugin loader */ /* used by plugin loader */
#define XINE_VERSION_CODE XINE_MAJOR_VERSION*10000+XINE_MINO R_VERSION*100+XINE_SUB_VERSION #define XINE_VERSION_CODE XINE_MAJOR_VERSION*10000+XINE_MINO R_VERSION*100+XINE_SUB_VERSION
/* /*
* log constants * log constants
skipping to change at line 96 skipping to change at line 75
#define XINE_LOG_NUM 3 /* # of log buffers defined */ #define XINE_LOG_NUM 3 /* # of log buffers defined */
#define XINE_STREAM_INFO_MAX 99 #define XINE_STREAM_INFO_MAX 99
typedef struct xine_ticket_s xine_ticket_t; typedef struct xine_ticket_s xine_ticket_t;
/* /*
* the "big" xine struct, holding everything together * the "big" xine struct, holding everything together
*/ */
#ifndef XDG_BASEDIR_H
/* present here for internal convenience only */
typedef struct { void *reserved; } xdgHandle;
#endif
struct xine_s { struct xine_s {
config_values_t *config; config_values_t *config;
plugin_catalog_t *plugin_catalog; plugin_catalog_t *plugin_catalog;
int verbosity;
int demux_strategy; int demux_strategy;
char *save_path; char *save_path;
/* log output that may be presented to the user */ /* log output that may be presented to the user */
scratch_buffer_t *log_buffers[XINE_LOG_NUM]; scratch_buffer_t *log_buffers[XINE_LOG_NUM];
int verbosity;
xine_list_t *streams; xine_list_t *streams;
pthread_mutex_t streams_lock; pthread_mutex_t streams_lock;
metronom_clock_t *clock; metronom_clock_t *clock;
/** Handle for libxdg-basedir functions. */
xdgHandle basedir_handle;
#ifdef XINE_ENGINE_INTERNAL #ifdef XINE_ENGINE_INTERNAL
xine_ticket_t *port_ticket; xine_ticket_t *port_ticket;
pthread_mutex_t log_lock; pthread_mutex_t log_lock;
xine_log_cb_t log_cb; xine_log_cb_t log_cb;
void *log_cb_user_data; void *log_cb_user_data;
#endif #endif
}; };
/* FIXME-ABI Some global flag bits */
/* See xine_set_flags() */
#ifdef XINE_ENGINE_INTERNAL
extern int _x_flags XINE_PROTECTED;
#endif
/* /*
* xine thread tickets * xine thread tickets
*/ */
struct xine_ticket_s { struct xine_ticket_s {
/* the ticket owner must assure to check for ticket revocation in /* the ticket owner must assure to check for ticket revocation in
* intervals of finite length; this means that you must release * intervals of finite length; this means that you must release
* the ticket before any operation that might block * the ticket before any operation that might block
* *
skipping to change at line 170 skipping to change at line 163
/* behaves like acquire() but doesn't block the calling thread; when /* behaves like acquire() but doesn't block the calling thread; when
* the thread would have been blocked, 0 is returned otherwise 1 * the thread would have been blocked, 0 is returned otherwise 1
* this function acquires a ticket even if ticket revocation is active */ * this function acquires a ticket even if ticket revocation is active */
int (*acquire_nonblocking)(xine_ticket_t *self, int irrevocable); int (*acquire_nonblocking)(xine_ticket_t *self, int irrevocable);
/* behaves like release() but doesn't block the calling thread; should /* behaves like release() but doesn't block the calling thread; should
* be used in combination with acquire_nonblocking() */ * be used in combination with acquire_nonblocking() */
void (*release_nonblocking)(xine_ticket_t *self, int irrevocable); void (*release_nonblocking)(xine_ticket_t *self, int irrevocable);
int (*lock_port_rewiring)(xine_ticket_t *self, int ms_timeout);
void (*unlock_port_rewiring)(xine_ticket_t *self);
void (*dispose)(xine_ticket_t *self); void (*dispose)(xine_ticket_t *self);
pthread_mutex_t lock; pthread_mutex_t lock;
pthread_mutex_t revoke_lock; pthread_mutex_t revoke_lock;
pthread_cond_t issued; pthread_cond_t issued;
pthread_cond_t revoked; pthread_cond_t revoked;
int tickets_granted; int tickets_granted;
int irrevocable_tickets; int irrevocable_tickets;
int pending_revocations; int pending_revocations;
int atomic_revoke; int atomic_revoke;
pthread_t atomic_revoker_thread; pthread_t atomic_revoker_thread;
pthread_mutex_t port_rewiring_lock;
struct { struct {
int count; int count;
pthread_t holder; pthread_t holder;
} *holder_threads; } *holder_threads;
unsigned holder_thread_count; unsigned holder_thread_count;
#endif #endif
}; };
/* /*
* xine event queue * xine event queue
*/ */
struct xine_event_queue_s { struct xine_event_queue_s {
xine_list_t *events; xine_list_t *events;
pthread_mutex_t lock; pthread_mutex_t lock;
pthread_cond_t new_event; pthread_cond_t new_event;
pthread_cond_t events_processed; pthread_cond_t events_processed;
xine_stream_t *stream; xine_stream_t *stream;
pthread_t *listener_thread; pthread_t *listener_thread;
void *user_data;
xine_event_listener_cb_t callback; xine_event_listener_cb_t callback;
int callback_running; int callback_running;
void *user_data;
}; };
/* /*
* xine_stream - per-stream parts of the xine engine * xine_stream - per-stream parts of the xine engine
*/ */
struct xine_stream_s { struct xine_stream_s {
/* reference to xine context */ /* reference to xine context */
xine_t *xine; xine_t *xine;
/* metronom instance used by current stream */ /* metronom instance used by current stream */
metronom_t *metronom; metronom_t *metronom;
/* demuxers use input_plugin to read data */ /* demuxers use input_plugin to read data */
input_plugin_t *input_plugin; input_plugin_t *input_plugin;
/* current content detection method, see METHOD_BY_xxx */
int content_detection_method;
/* used by video decoders */ /* used by video decoders */
xine_video_port_t *video_out; xine_video_port_t *video_out;
/* demuxers send data to video decoders using this fifo */ /* demuxers send data to video decoders using this fifo */
fifo_buffer_t *video_fifo; fifo_buffer_t *video_fifo;
/* used by audio decoders */ /* used by audio decoders */
xine_audio_port_t *audio_out; xine_audio_port_t *audio_out;
/* demuxers send data to audio decoders using this fifo */ /* demuxers send data to audio decoders using this fifo */
skipping to change at line 256 skipping to change at line 250
vo_driver_t *video_driver; vo_driver_t *video_driver;
/* these definitely should be made private! */ /* these definitely should be made private! */
int audio_channel_auto; int audio_channel_auto;
int spu_decoder_streamtype; int spu_decoder_streamtype;
int spu_channel_user; int spu_channel_user;
int spu_channel_auto; int spu_channel_auto;
int spu_channel_letterbox; int spu_channel_letterbox;
int spu_channel; int spu_channel;
/* current content detection method, see METHOD_BY_xxx */
int content_detection_method;
#ifdef XINE_ENGINE_INTERNAL #ifdef XINE_ENGINE_INTERNAL
/* these are private variables, plugins must not access them */ /* these are private variables, plugins must not access them */
int status; int status;
/* lock controlling speed change access */ /* lock controlling speed change access */
pthread_mutex_t speed_change_lock; pthread_mutex_t speed_change_lock;
int ignore_speed_change; /* speed changes during uint32_t ignore_speed_change:1; /*< speed changes duri
stop can be disastrous */ ng stop can be disastrous */
uint32_t video_thread_created:1;
uint32_t audio_thread_created:1;
uint32_t first_frame_flag:2;
uint32_t demux_action_pending:1;
uint32_t demux_thread_created:1;
uint32_t demux_thread_running:1;
uint32_t slave_is_subtitle:1; /*< ... and will be au
tomaticaly disposed */
uint32_t emergency_brake:1; /*< something went rea
lly wrong and this stream must be
* stopped. usually d
ue some fatal error on output
* layers as they can
not call xine_stop. */
uint32_t early_finish_event:1; /*< do not wait fifos
get empty before sending event */
uint32_t gapless_switch:1; /*< next stream switch
will be gapless */
uint32_t keep_ao_driver_open:1;
input_class_t *eject_class; input_class_t *eject_class;
demux_plugin_t *demux_plugin; demux_plugin_t *demux_plugin;
/* vo_driver_t *video_driver;*/ /* vo_driver_t *video_driver;*/
pthread_t video_thread; pthread_t video_thread;
int video_thread_created;
video_decoder_t *video_decoder_plugin; video_decoder_t *video_decoder_plugin;
int video_decoder_streamtype;
extra_info_t *video_decoder_extra_info; extra_info_t *video_decoder_extra_info;
int video_decoder_streamtype;
int video_channel; int video_channel;
uint32_t audio_track_map[50];
int audio_track_map_entries;
int audio_decoder_streamtype;
pthread_t audio_thread; pthread_t audio_thread;
int audio_thread_created;
audio_decoder_t *audio_decoder_plugin; audio_decoder_t *audio_decoder_plugin;
int audio_decoder_streamtype;
extra_info_t *audio_decoder_extra_info; extra_info_t *audio_decoder_extra_info;
uint32_t audio_track_map[50];
int audio_track_map_entries;
uint32_t audio_type; uint32_t audio_type;
/* *_user: -2 => off /* *_user: -2 => off
-1 => auto (use *_auto value) -1 => auto (use *_auto value)
>=0 => respect the user's choice >=0 => respect the user's choice
*/ */
int audio_channel_user; int audio_channel_user;
/* int audio_channel_auto; */ /* int audio_channel_auto; */
/* spu_decoder_t *spu_decoder_plugin; */ /* spu_decoder_t *spu_decoder_plugin; */
/* int spu_decoder_streamtype; */ /* int spu_decoder_streamtype; */
skipping to change at line 315 skipping to change at line 324
/* stream meta information */ /* stream meta information */
/* NEVER access directly, use helpers (see info_helper.c) */ /* NEVER access directly, use helpers (see info_helper.c) */
pthread_mutex_t info_mutex; pthread_mutex_t info_mutex;
int stream_info_public[XINE_STREAM_INFO_MAX]; int stream_info_public[XINE_STREAM_INFO_MAX];
int stream_info[XINE_STREAM_INFO_MAX]; int stream_info[XINE_STREAM_INFO_MAX];
pthread_mutex_t meta_mutex; pthread_mutex_t meta_mutex;
char *meta_info_public[XINE_STREAM_INFO_MAX]; char *meta_info_public[XINE_STREAM_INFO_MAX];
char *meta_info[XINE_STREAM_INFO_MAX]; char *meta_info[XINE_STREAM_INFO_MAX];
/* seeking slowdown */ /* seeking slowdown */
int first_frame_flag;
pthread_mutex_t first_frame_lock; pthread_mutex_t first_frame_lock;
pthread_cond_t first_frame_reached; pthread_cond_t first_frame_reached;
/* wait for headers sent / stream decoding finished */ /* wait for headers sent / stream decoding finished */
pthread_mutex_t counter_lock; pthread_mutex_t counter_lock;
pthread_cond_t counter_changed; pthread_cond_t counter_changed;
int header_count_audio; int header_count_audio;
int header_count_video; int header_count_video;
int finished_count_audio; int finished_count_audio;
int finished_count_video; int finished_count_video;
/* event mechanism */ /* event mechanism */
xine_list_t *event_queues; xine_list_t *event_queues;
pthread_mutex_t event_queues_lock; pthread_mutex_t event_queues_lock;
/* demux thread stuff */ /* demux thread stuff */
pthread_t demux_thread; pthread_t demux_thread;
int demux_thread_created;
int demux_thread_running;
pthread_mutex_t demux_lock; pthread_mutex_t demux_lock;
int demux_action_pending; pthread_mutex_t demux_action_lock;
pthread_cond_t demux_resume; pthread_cond_t demux_resume;
pthread_mutex_t demux_mutex; /* used in _x_demux_... functions to synchronize order of pairwise A/V buffer operations */ pthread_mutex_t demux_mutex; /* used in _x_demux_... functions to synchronize order of pairwise A/V buffer operations */
extra_info_t *current_extra_info; extra_info_t *current_extra_info;
pthread_mutex_t current_extra_info_lock; pthread_mutex_t current_extra_info_lock;
int video_seek_count; int video_seek_count;
xine_post_out_t video_source; int delay_finish_event; /* delay event in 1/10 sec
xine_post_out_t audio_source; units. 0=>no delay, -1=>forever */
int slave_is_subtitle; /* ... and will be automati caly disposed */
int slave_affection; /* what operations need to be propagated down to the slave? */ int slave_affection; /* what operations need to be propagated down to the slave? */
int err; int err;
xine_post_out_t video_source;
xine_post_out_t audio_source;
broadcaster_t *broadcaster; broadcaster_t *broadcaster;
refcounter_t *refcounter; refcounter_t *refcounter;
int emergency_brake; /* something went really wron
g and this stream must be
* stopped. usually due some
fatal error on output
* layers as they cannot call
xine_stop. */
int early_finish_event; /* do not wait fifos get e
mpty before sending event */
int gapless_switch; /* next stream switch will
be gapless */
int delay_finish_event; /* delay event in 1/10 sec
units. 0=>no delay, -1=>forever */
int keep_ao_driver_open;
#endif #endif
}; };
/* when explicitly noted, some functions accept an anonymous stream, /* when explicitly noted, some functions accept an anonymous stream,
* which is a valid stream that does not want to be addressed. */ * which is a valid stream that does not want to be addressed. */
#define XINE_ANON_STREAM ((xine_stream_t *)-1) #define XINE_ANON_STREAM ((xine_stream_t *)-1)
typedef struct
{
int total;
int ready;
int avail;
}
xine_query_buffers_data_t;
typedef struct
{
xine_query_buffers_data_t vi;
xine_query_buffers_data_t ai;
xine_query_buffers_data_t vo;
xine_query_buffers_data_t ao;
}
xine_query_buffers_t;
/* /*
* private function prototypes: * private function prototypes:
*/ */
int _x_query_buffers(xine_stream_t *stream, xine_query_buffers_t *query) XI NE_PROTECTED;
int _x_query_buffer_usage(xine_stream_t *stream, int *num_video_buffers, in t *num_audio_buffers, int *num_video_frames, int *num_audio_frames) XINE_PR OTECTED; int _x_query_buffer_usage(xine_stream_t *stream, int *num_video_buffers, in t *num_audio_buffers, int *num_video_frames, int *num_audio_frames) XINE_PR OTECTED;
int _x_lock_port_rewiring(xine_t *xine, int ms_to_time_out) XINE_PROTECTED;
void _x_unlock_port_rewiring(xine_t *xine) XINE_PROTECTED;
int _x_lock_frontend(xine_stream_t *stream, int ms_to_time_out) XINE_PROTEC
TED;
void _x_unlock_frontend(xine_stream_t *stream) XINE_PROTECTED;
int _x_query_unprocessed_osd_events(xine_stream_t *stream) XINE_PROTECTED;
int _x_demux_seek(xine_stream_t *stream, off_t start_pos, int start_time, i
nt playing) XINE_PROTECTED;
int _x_continue_stream_processing(xine_stream_t *stream) XINE_PROTECTED;
void _x_trigger_relaxed_frame_drop_mode(xine_stream_t *stream) XINE_PROTECT
ED;
void _x_reset_relaxed_frame_drop_mode(xine_stream_t *stream) XINE_PROTECTED
;
void _x_handle_stream_end (xine_stream_t *stream, int non_user) XINE_P ROTECTED; void _x_handle_stream_end (xine_stream_t *stream, int non_user) XINE_P ROTECTED;
/* report message to UI. usually these are async errors */ /* report message to UI. usually these are async errors */
int _x_message(xine_stream_t *stream, int type, ...) XINE_SENTINEL XINE_PRO TECTED; int _x_message(xine_stream_t *stream, int type, ...) XINE_SENTINEL XINE_PRO TECTED;
/* flush the message queues */ /* flush the message queues */
void _x_flush_events_queues (xine_stream_t *stream) XINE_PROTECTED; void _x_flush_events_queues (xine_stream_t *stream) XINE_PROTECTED;
/* find and instantiate input and demux plugins */
input_plugin_t *_x_find_input_plugin (xine_stream_t *stream, const char *mr
l) XINE_PROTECTED;
demux_plugin_t *_x_find_demux_plugin (xine_stream_t *stream, input_plugin_t
*input) XINE_PROTECTED;
demux_plugin_t *_x_find_demux_plugin_by_name (xine_stream_t *stream, const
char *name, input_plugin_t *input) XINE_PROTECTED;
demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, cons
t char *last_demux_name, input_plugin_t *input) XINE_PROTECTED;
input_plugin_t *_x_rip_plugin_get_instance (xine_stream_t *stream, const ch
ar *filename) XINE_MALLOC XINE_PROTECTED;
input_plugin_t *_x_cache_plugin_get_instance (xine_stream_t *stream, int re
adahead_size) XINE_MALLOC XINE_PROTECTED;
void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input) XI
NE_PROTECTED;
void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux) XI
NE_PROTECTED;
/* create decoder fifos and threads */
int _x_video_decoder_init (xine_stream_t *stream) XINE_PROTECTED;
void _x_video_decoder_shutdown (xine_stream_t *stream) XINE_PROTECTED;
int _x_audio_decoder_init (xine_stream_t *stream) XINE_PROTECTED;
void _x_audio_decoder_shutdown (xine_stream_t *stream) XINE_PROTECTED;
/* extra_info operations */ /* extra_info operations */
void _x_extra_info_reset( extra_info_t *extra_info ) XINE_PROTECTED; void _x_extra_info_reset( extra_info_t *extra_info ) XINE_PROTECTED;
void _x_extra_info_merge( extra_info_t *dst, extra_info_t *src ) XINE_PROTE CTED; void _x_extra_info_merge( extra_info_t *dst, extra_info_t *src ) XINE_PROTE CTED;
void _x_get_current_info (xine_stream_t *stream, extra_info_t *extra_info, int size) XINE_PROTECTED; void _x_get_current_info (xine_stream_t *stream, extra_info_t *extra_info, int size) XINE_PROTECTED;
/* demuxer helper functions from demux.c */ /* demuxer helper functions from demux.c */
/* /*
skipping to change at line 432 skipping to change at line 439
*/ */
void _x_demux_flush_engine (xine_stream_t *stream) XINE_PROTECTED; void _x_demux_flush_engine (xine_stream_t *stream) XINE_PROTECTED;
void _x_demux_control_nop (xine_stream_t *stream, uint32_t flags) XINE_PROTECTED; void _x_demux_control_nop (xine_stream_t *stream, uint32_t flags) XINE_PROTECTED;
void _x_demux_control_newpts (xine_stream_t *stream, int64_t pts, uin t32_t flags) XINE_PROTECTED; void _x_demux_control_newpts (xine_stream_t *stream, int64_t pts, uin t32_t flags) XINE_PROTECTED;
void _x_demux_control_headers_done (xine_stream_t *stream) XINE_PROTECTED; void _x_demux_control_headers_done (xine_stream_t *stream) XINE_PROTECTED;
void _x_demux_control_start (xine_stream_t *stream) XINE_PROTECTED; void _x_demux_control_start (xine_stream_t *stream) XINE_PROTECTED;
void _x_demux_control_end (xine_stream_t *stream, uint32_t flags) XINE_PROTECTED; void _x_demux_control_end (xine_stream_t *stream, uint32_t flags) XINE_PROTECTED;
int _x_demux_start_thread (xine_stream_t *stream) XINE_PROTECTED; 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_stop_thread (xine_stream_t *stream) XINE_PROTECTED;
int _x_demux_read_header (input_plugin_t *input, unsigned char *b int _x_demux_read_header (input_plugin_t *input, void *buffer, of
uffer, off_t size) XINE_PROTECTED; f_t size) XINE_PROTECTED;
int _x_demux_check_extension (const char *mrl, const char *extensions 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; off_t _x_read_abort (xine_stream_t *stream, int fd, char *buf, off_t todo) XINE_PROTECTED;
int _x_action_pending (xine_stream_t *stream) XINE_PROTECTED; int _x_action_pending (xine_stream_t *stream) XINE_PROTECTED;
void _x_action_raise (xine_stream_t *stream) XINE_PROTECTED;
void _x_action_lower (xine_stream_t *stream) XINE_PROTECTED;
void _x_demux_send_data(fifo_buffer_t *fifo, uint8_t *data, int size, void _x_demux_send_data(fifo_buffer_t *fifo, uint8_t *data, int size,
int64_t pts, uint32_t type, uint32_t decoder_flags, int64_t pts, uint32_t type, uint32_t decoder_flags,
int input_normpos, int input_time, int total_time, int input_normpos, int input_time, int total_time,
uint32_t frame_number) XINE_PROTECTED; uint32_t frame_number) XINE_PROTECTED;
int _x_demux_read_send_data(fifo_buffer_t *fifo, input_plugin_t *input, int _x_demux_read_send_data(fifo_buffer_t *fifo, input_plugin_t *input,
int size, int64_t pts, uint32_t type, int size, int64_t pts, uint32_t type,
uint32_t decoder_flags, off_t input_normpos, uint32_t decoder_flags, off_t input_normpos,
int input_time, int total_time, int input_time, int total_time,
uint32_t frame_number) XINE_PROTECTED; uint32_t frame_number) XINE_PROTECTED;
 End of changes. 33 change blocks. 
105 lines changed or deleted 112 lines changed or added


 xine_plugin.h   xine_plugin.h 
skipping to change at line 53 skipping to change at line 53
/* this flag may be or'ed with type to prevent the plugin loader from unloa ding /* this flag may be or'ed with type to prevent the plugin loader from unloa ding
* the plugin * the plugin
*/ */
#define PLUGIN_NO_UNLOAD (1 << 6) #define PLUGIN_NO_UNLOAD (1 << 6)
#define PLUGIN_TYPE_MASK ((1 << 6) - 1) #define PLUGIN_TYPE_MASK ((1 << 6) - 1)
typedef struct { typedef struct {
uint8_t type; /* one of the PLUGIN_* constants above */ uint8_t type; /* one of the PLUGIN_* constants above */
uint8_t API; /* API version supporte d by this plugin */ uint8_t API; /* API version supporte d by this plugin */
char *id; /* a name that identifi es this plugin */ const char *id; /* a name that identifi es this plugin */
uint32_t version; /* version number, incr eased every release */ uint32_t version; /* version number, incr eased every release */
const void *special_info; /* plugin-type specific , see structs below */ const void *special_info; /* plugin-type specific , see structs below */
void *(*init)(xine_t *, void *); /* init the plugin clas s */ void *(*init)(xine_t *, void *); /* init the plugin clas s */
} plugin_info_t; } plugin_info_t;
/* special_info for a video output plugin */ /* special_info for a video output plugin */
typedef struct { typedef struct {
int priority; /* priority of this plu gin for auto-probing */ int priority; /* priority of this plu gin for auto-probing */
int visual_type; /* visual type supporte d by this plugin */ int visual_type; /* visual type supporte d by this plugin */
} vo_info_t; } vo_info_t;
/* special info for a audio output plugin */ /* special info for a audio output plugin */
typedef struct { typedef struct {
int priority; int priority;
} ao_info_t; } ao_info_t;
/* special_info for a decoder plugin */ /* special_info for a decoder plugin */
typedef struct { typedef struct {
uint32_t *supported_types; /* streamtypes this decoder c an handle */ const uint32_t *supported_types; /* streamtypes this dec oder can handle */
int priority; int priority;
} decoder_info_t; } decoder_info_t;
/* special info for a post plugin */ /* special info for a post plugin */
typedef struct { typedef struct {
uint32_t type; /* type of the post plu gin, use one of XINE_POST_TYPE_* */ uint32_t type; /* type of the post plu gin, use one of XINE_POST_TYPE_* */
} post_info_t; } post_info_t;
/* special info for a demuxer plugin */ /* special info for a demuxer plugin */
typedef struct { typedef struct {
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 xineutils.h   xineutils.h 
skipping to change at line 32 skipping to change at line 32
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdarg.h> #include <stdarg.h>
#include <pthread.h> #include <pthread.h>
#ifdef XINE_COMPILE #ifdef WIN32
# include <inttypes.h> # include <winsock.h>
# include "attributes.h"
# include "compat.h"
# include "xmlparser.h"
# include "xine_buffer.h"
# include "configfile.h"
# include "list.h"
# include "array.h"
# include "sorted_array.h"
# include "xine_mmx.h"
#else #else
# ifdef WIN32 # include <sys/time.h>
# include <winsock.h>
# else
# include <sys/time.h>
# endif
# include <xine/os_types.h>
# include <xine/attributes.h>
# include <xine/compat.h>
# include <xine/xmlparser.h>
# include <xine/xine_buffer.h>
# include <xine/configfile.h>
# include <xine/list.h>
# include <xine/array.h>
# include <xine/sorted_array.h>
# include <xine/xine_mmx.h>
#endif #endif
#include <xine/os_types.h>
#include <xine/attributes.h>
#include <xine/compat.h>
#include <xine/xmlparser.h>
#include <xine/xine_buffer.h>
#include <xine/configfile.h>
#include <xine/list.h>
#include <xine/array.h>
#include <xine/sorted_array.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
/* /*
* Mark exported data symbols for link engine library clients with older * Mark exported data symbols for link engine library clients with older
* Win32 compilers * Win32 compilers
*/ */
#if defined(WIN32) && !defined(XINE_LIBRARY_COMPILE) #if defined(WIN32) && !defined(XINE_LIBRARY_COMPILE)
# define DL_IMPORT __declspec(dllimport) # define DL_IMPORT __declspec(dllimport)
skipping to change at line 130 skipping to change at line 116
#define MM_MMXEXT MM_ACCEL_X86_MMXEXT #define MM_MMXEXT MM_ACCEL_X86_MMXEXT
#define MM_SSE MM_ACCEL_X86_SSE #define MM_SSE MM_ACCEL_X86_SSE
#define MM_SSE2 MM_ACCEL_X86_SSE2 #define MM_SSE2 MM_ACCEL_X86_SSE2
uint32_t xine_mm_accel (void) XINE_CONST XINE_PROTECTED; uint32_t xine_mm_accel (void) XINE_CONST XINE_PROTECTED;
/* Optimized/fast memcpy */ /* Optimized/fast memcpy */
extern void *(* xine_fast_memcpy)(void *to, const void *from, size_t len) X INE_PROTECTED; extern void *(* xine_fast_memcpy)(void *to, const void *from, size_t len) X INE_PROTECTED;
#ifdef HAVE_XINE_INTERNAL_H
/* Benchmark available memcpy methods */
void xine_probe_fast_memcpy(xine_t *xine) XINE_PROTECTED;
#endif
/* /*
* Debug stuff * Debug stuff
*/ */
/* /*
* profiling (unworkable in non DEBUG isn't defined) * profiling (unworkable in non DEBUG isn't defined)
*/ */
void xine_profiler_init (void) XINE_PROTECTED; void xine_profiler_init (void) XINE_PROTECTED;
int xine_profiler_allocate_slot (const char *label) XINE_PROTECTED; int xine_profiler_allocate_slot (const char *label) XINE_PROTECTED;
void xine_profiler_start_count (int id) XINE_PROTECTED; void xine_profiler_start_count (int id) XINE_PROTECTED;
void xine_profiler_stop_count (int id) XINE_PROTECTED; void xine_profiler_stop_count (int id) XINE_PROTECTED;
void xine_profiler_print_results (void) XINE_PROTECTED; void xine_profiler_print_results (void) XINE_PROTECTED;
/* /*
* Allocate and clean memory size_t 'size', then return the pointer * Allocate and clean memory size_t 'size', then return the pointer
* to the allocated memory. * to the allocated memory.
*/ */
void *xine_xmalloc(size_t size) XINE_MALLOC XINE_DEPRECATED XINE_PROTECTED; void *xine_xmalloc(size_t size) XINE_MALLOC XINE_DEPRECATED XINE_PROTECTED;
void *xine_xcalloc(size_t nmemb, size_t size) XINE_MALLOC XINE_PROTECTED;
/* /*
* Same as above, but memory is aligned to 'alignement'. * Copy blocks of memory.
* **base is used to return pointer to un-aligned memory, use
* this to free the mem chunk
*/ */
void *xine_xmalloc_aligned(size_t alignment, size_t size, void **base) XINE void *xine_memdup (const void *src, size_t length) XINE_MALLOC XINE_PROTECT
_PROTECTED; ED;
void *xine_memdup0 (const void *src, size_t length) XINE_MALLOC XINE_PROTEC
TED;
/* /*
* Get user home directory. * Get user home directory.
*/ */
const char *xine_get_homedir(void) XINE_PROTECTED; const char *xine_get_homedir(void) XINE_PROTECTED;
#if defined(WIN32) || defined(__CYGWIN__) #if defined(WIN32) || defined(__CYGWIN__)
/* /*
* Get other xine directories. * Get other xine directories.
*/ */
skipping to change at line 186 skipping to change at line 168
* Clean a string (remove spaces and '=' at the begin, * Clean a string (remove spaces and '=' at the begin,
* and '\n', '\r' and spaces at the end. * and '\n', '\r' and spaces at the end.
*/ */
char *xine_chomp (char *str) XINE_PROTECTED; char *xine_chomp (char *str) XINE_PROTECTED;
/* /*
* A thread-safe usecond sleep * A thread-safe usecond sleep
*/ */
void xine_usec_sleep(unsigned usec) XINE_PROTECTED; void xine_usec_sleep(unsigned usec) XINE_PROTECTED;
/*
* Some string functions
*/
void xine_strdupa(char *dest, char *src) XINE_PROTECTED XINE_DEPRECATED;
#define xine_strdupa(d, s) do {
\
(d) = NULL;
\
if((s) != NULL) {
\
(d) = (char *) alloca(strlen((s)) + 1);
\
strcpy((d), (s));
\
}
\
} while(0)
/* compatibility macros */ /* compatibility macros */
#define xine_strpbrk(S, ACCEPT) strpbrk((S), (ACCEPT)) #define xine_strpbrk(S, ACCEPT) strpbrk((S), (ACCEPT))
#define xine_strsep(STRINGP, DELIM) strsep((STRINGP), (DELIM)) #define xine_strsep(STRINGP, DELIM) strsep((STRINGP), (DELIM))
#define xine_setenv(NAME, VAL, XX) setenv((NAME), (VAL), (XX)) #define xine_setenv(NAME, VAL, XX) setenv((NAME), (VAL), (XX))
/** /**
* append to a string, reallocating * append to a string, reallocating
* normally, updates & returns *dest * normally, updates & returns *dest
* on error, *dest is unchanged & NULL is returned. * on error, *dest is unchanged & NULL is returned.
*/ */
skipping to change at line 341 skipping to change at line 310
(const unsigned char *y_src, int y_src_pitch, unsigned char *y_dst, int y _dst_pitch, (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dst, int y _dst_pitch,
const unsigned char *u_src, int u_src_pitch, unsigned char *u_dst, int u _dst_pitch, const unsigned char *u_src, int u_src_pitch, unsigned char *u_dst, int u _dst_pitch,
const unsigned char *v_src, int v_src_pitch, unsigned char *v_dst, int v _dst_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dst, int v _dst_pitch,
int width, int height) XINE_PROTECTED; int width, int height) XINE_PROTECTED;
extern void yuy2_to_yuy2 extern void yuy2_to_yuy2
(const unsigned char *src, int src_pitch, (const unsigned char *src, int src_pitch,
unsigned char *dst, int dst_pitch, unsigned char *dst, int dst_pitch,
int width, int height) XINE_PROTECTED; int width, int height) XINE_PROTECTED;
/* print a hexdump of the given data */ /* print a hexdump of the given data */
void xine_hexdump (const char *buf, int length) XINE_PROTECTED; void xine_hexdump (const void *buf, int length) XINE_PROTECTED;
/* /*
* Optimization macros for conditions * Optimization macros for conditions
* Taken from the FIASCO L4 microkernel sources * Taken from the FIASCO L4 microkernel sources
*/ */
#if !defined(__GNUC__) || __GNUC__ < 3 #if !defined(__GNUC__) || __GNUC__ < 3
# define EXPECT_TRUE(x) (x) # define EXPECT_TRUE(x) (x)
# define EXPECT_FALSE(x) (x) # define EXPECT_FALSE(x) (x)
#else #else
# define EXPECT_TRUE(x) __builtin_expect((x),1) # define EXPECT_TRUE(x) __builtin_expect((x),1)
skipping to change at line 529 skipping to change at line 498
* guess default encoding for the subtitles * guess default encoding for the subtitles
*/ */
const char *xine_guess_spu_encoding(void) XINE_PROTECTED; const char *xine_guess_spu_encoding(void) XINE_PROTECTED;
/* /*
* use the best clock reference (API compatible with gettimeofday) * use the best clock reference (API compatible with gettimeofday)
* note: it will be a monotonic clock, if available. * note: it will be a monotonic clock, if available.
*/ */
int xine_monotonic_clock(struct timeval *tv, struct timezone *tz) XINE_PROT ECTED; int xine_monotonic_clock(struct timeval *tv, struct timezone *tz) XINE_PROT ECTED;
/**
* Unknown FourCC reporting functions
*/
void _x_report_video_fourcc (xine_t *, const char *module, uint32_t) XINE_P
ROTECTED;
void _x_report_audio_format_tag (xine_t *, const char *module, uint32_t) XI
NE_PROTECTED;
/* don't harm following code */ /* don't harm following code */
#ifdef extern #ifdef extern
# undef extern # undef extern
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 10 change blocks. 
56 lines changed or deleted 28 lines changed or added


 xmllexer.h   xmllexer.h 
skipping to change at line 54 skipping to change at line 54
#define T_QUOTE 8 /* \" or \' */ #define T_QUOTE 8 /* \" or \' */
#define T_STRING 9 /* "string" */ #define T_STRING 9 /* "string" */
#define T_IDENT 10 /* identifier */ #define T_IDENT 10 /* identifier */
#define T_DATA 11 /* data */ #define T_DATA 11 /* data */
#define T_C_START 12 /* <!-- */ #define T_C_START 12 /* <!-- */
#define T_C_STOP 13 /* --> */ #define T_C_STOP 13 /* --> */
#define T_TI_START 14 /* <? */ #define T_TI_START 14 /* <? */
#define T_TI_STOP 15 /* ?> */ #define T_TI_STOP 15 /* ?> */
#define T_DOCTYPE_START 16 /* <!DOCTYPE */ #define T_DOCTYPE_START 16 /* <!DOCTYPE */
#define T_DOCTYPE_STOP 17 /* > */ #define T_DOCTYPE_STOP 17 /* > */
#define T_CDATA_START 18 /* <![CDATA[ */
#define T_CDATA_STOP 19 /* ]]> */
/* public structure */ /* public structure */
struct lexer struct lexer
{ {
const char * lexbuf; const char * lexbuf;
int lexbuf_size; int lexbuf_size;
int lexbuf_pos; int lexbuf_pos;
int lex_mode; int lex_mode;
int in_comment; int in_comment;
char *lex_malloc; char *lex_malloc;
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 xmlparser.h   xmlparser.h 
skipping to change at line 41 skipping to change at line 41
#endif #endif
/* parser modes */ /* parser modes */
#define XML_PARSER_CASE_INSENSITIVE 0 #define XML_PARSER_CASE_INSENSITIVE 0
#define XML_PARSER_CASE_SENSITIVE 1 #define XML_PARSER_CASE_SENSITIVE 1
/* return codes */ /* return codes */
#define XML_PARSER_OK 0 #define XML_PARSER_OK 0
#define XML_PARSER_ERROR 1 #define XML_PARSER_ERROR 1
/* xml_parser_build_tree_with_options flag bits */
#define XML_PARSER_RELAXED 1
#define XML_PARSER_MULTI_TEXT 2
/* node name for extra text chunks */
#define CDATA_MARKER "[CDATA]"
/* xml property */ /* xml property */
typedef struct xml_property_s { typedef struct xml_property_s {
char *name; char *name;
char *value; char *value;
struct xml_property_s *next; struct xml_property_s *next;
} xml_property_t; } xml_property_t;
/* xml node */ /* xml node */
/* .data contains any text which precedes any subtree elements;
* subtree elements may also contain only text; if so, name is "[CDATA]".
* e.g. <a>b<c />d</a>
* node1: .name="a" .data="b" .child=node2 .next=NULL
* node2: .name="c" .data=NULL .child=NULL .next=node3
* node3: .name="[CDATA]" .data="d" .child=NULL .next=NULL
* Adjacent text items are merged.
*/
typedef struct xml_node_s { typedef struct xml_node_s {
char *name; char *name;
char *data; char *data;
struct xml_property_s *props; struct xml_property_s *props;
struct xml_node_s *child; struct xml_node_s *child;
struct xml_node_s *next; struct xml_node_s *next;
} xml_node_t; } xml_node_t;
/* xml parser */ /* xml parser */
typedef struct xml_parser_s { typedef struct xml_parser_s {
skipping to change at line 70 skipping to change at line 85
int mode; int mode;
} xml_parser_t; } xml_parser_t;
void xml_parser_init(const char * buf, int size, int mode) XINE_DEPRECATED XINE_PROTECTED; void xml_parser_init(const char * buf, int size, int mode) XINE_DEPRECATED XINE_PROTECTED;
xml_parser_t *xml_parser_init_r(const char * buf, int size, int mode) XINE_ PROTECTED; xml_parser_t *xml_parser_init_r(const char * buf, int size, int mode) XINE_ PROTECTED;
void xml_parser_finalize_r(xml_parser_t *xml_parser) XINE_PROTECTED; void xml_parser_finalize_r(xml_parser_t *xml_parser) XINE_PROTECTED;
int xml_parser_build_tree(xml_node_t **root_node) XINE_DEPRECATED XINE_PROT ECTED; int xml_parser_build_tree(xml_node_t **root_node) XINE_DEPRECATED XINE_PROT ECTED;
int xml_parser_build_tree_r(xml_parser_t *xml_parser, xml_node_t **root_nod e) XINE_PROTECTED; int xml_parser_build_tree_r(xml_parser_t *xml_parser, xml_node_t **root_nod e) XINE_PROTECTED;
int xml_parser_build_tree_with_options(xml_node_t **root_node, int flags) X
INE_DEPRECATED XINE_PROTECTED;
int xml_parser_build_tree_with_options_r(xml_parser_t *xml_parser, xml_node
_t **root_node, int flags) XINE_PROTECTED;
void xml_parser_free_tree(xml_node_t *root_node) XINE_PROTECTED; void xml_parser_free_tree(xml_node_t *root_node) XINE_PROTECTED;
const char *xml_parser_get_property (const xml_node_t *node, const char *na me) XINE_PROTECTED; const char *xml_parser_get_property (const xml_node_t *node, const char *na me) XINE_PROTECTED;
int xml_parser_get_property_int (const xml_node_t *node, const char *name , int xml_parser_get_property_int (const xml_node_t *node, const char *name ,
int def_value) XINE_PROTECTED; int def_value) XINE_PROTECTED;
int xml_parser_get_property_bool (const xml_node_t *node, const char *name, int xml_parser_get_property_bool (const xml_node_t *node, const char *name,
int def_value) XINE_PROTECTED; int def_value) XINE_PROTECTED;
/* for output: /* for output:
* returns an escaped string (free() it when done) * returns an escaped string (free() it when done)
 End of changes. 3 change blocks. 
0 lines changed or deleted 20 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/