summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/xine.h150
-rw-r--r--include/xine/alphablend.h1
-rw-r--r--include/xine/array.h2
-rw-r--r--include/xine/attributes.h41
-rw-r--r--include/xine/audio_out.h2
-rw-r--r--include/xine/broadcaster.h2
-rw-r--r--include/xine/buffer.h4
-rw-r--r--include/xine/configfile.h2
-rw-r--r--include/xine/input_plugin.h90
-rw-r--r--include/xine/list.h2
-rw-r--r--include/xine/metronom.h4
-rw-r--r--include/xine/osd.h2
-rw-r--r--include/xine/pool.h2
-rw-r--r--include/xine/refcounter.h2
-rw-r--r--include/xine/ring_buffer.h2
-rw-r--r--include/xine/scratch.h2
-rw-r--r--include/xine/sorted_array.h2
-rw-r--r--include/xine/video_out.h2
-rw-r--r--include/xine/video_overlay.h2
-rw-r--r--include/xine/xine_internal.h23
-rw-r--r--include/xine/xineutils.h20
21 files changed, 211 insertions, 148 deletions
diff --git a/include/xine.h b/include/xine.h
index 035f4ef7f..f3c79a7b4 100644
--- a/include/xine.h
+++ b/include/xine.h
@@ -158,6 +158,7 @@ void xine_close_video_driver (xine_t *self, xine_video_port_t *driver) XINE_PRO
#define XINE_VISUAL_TYPE_CACA 8
#define XINE_VISUAL_TYPE_MACOSX 9
#define XINE_VISUAL_TYPE_XCB 11
+#define XINE_VISUAL_TYPE_RAW 12
/*
* free all resources, close all plugins, close engine.
@@ -236,22 +237,6 @@ int xine_open (xine_stream_t *stream, const char *mrl) 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_PROTECTED;
-
-/* 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
* xine_stream_t stays valid for new xine_open or xine_play
*/
@@ -413,8 +398,13 @@ int xine_get_param (xine_stream_t *stream, int param) XINE_PROTECTED;
* image data into a too small buffer.
*
* xine_get_current_frame_alloc() takes care of allocating
- * a buffer on it's own, so image data can be retrieved by
+ * a buffer on its own, so image data can be retrieved by
* a single call without the need to pause the stream.
+ *
+ * xine_get_current_frame_data() passes the parameters of the
+ * previously mentioned functions plus further information in
+ * a structure and can work like the _s or _alloc function
+ * respectively depending on the passed flags.
*
* all functions return 1 on success, 0 failure.
*/
@@ -426,12 +416,33 @@ int xine_get_current_frame (xine_stream_t *stream,
int xine_get_current_frame_s (xine_stream_t *stream,
int *width, int *height,
int *ratio_code, int *format,
- uint8_t *img, int *size) XINE_PROTECTED;
+ uint8_t *img, int *img_size) XINE_PROTECTED;
int xine_get_current_frame_alloc (xine_stream_t *stream,
int *width, int *height,
int *ratio_code, int *format,
- uint8_t **img, int *size) XINE_PROTECTED;
+ uint8_t **img, int *img_size) XINE_PROTECTED;
+
+typedef struct {
+
+ int width;
+ int height;
+ int crop_left;
+ int crop_right;
+ int crop_top;
+ int crop_bottom;
+ int ratio_code;
+ int interlaced;
+ int format;
+ int img_size;
+ uint8_t *img;
+} xine_current_frame_data_t;
+
+#define XINE_FRAME_DATA_ALLOCATE_IMG (1<<0)
+
+int xine_get_current_frame_data (xine_stream_t *stream,
+ xine_current_frame_data_t *data,
+ int flags) XINE_PROTECTED;
/* xine image formats */
#define XINE_IMGFMT_YV12 (('2'<<24)|('1'<<16)|('V'<<8)|'Y')
@@ -511,20 +522,6 @@ int xine_get_next_audio_frame (xine_audio_port_t *port,
void xine_free_audio_frame (xine_audio_port_t *port, xine_audio_frame_t *frame) 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;
-
-/* TODO: xine_get_audio_frame */
-
#endif
@@ -1053,6 +1050,8 @@ const char *xine_get_post_plugin_description (xine_t *self,
/* get lists of available audio and video output plugins */
const char *const *xine_list_audio_output_plugins (xine_t *self) XINE_PROTECTED;
const char *const *xine_list_video_output_plugins (xine_t *self) XINE_PROTECTED;
+/* typemask is (1ULL << XINE_VISUAL_TYPE_FOO) | ... */
+const char *const *xine_list_video_output_plugins_typed (xine_t *self, uint64_t typemask) XINE_PROTECTED;
/* get list of available demultiplexor plugins */
const char *const *xine_list_demuxer_plugins(xine_t *self) XINE_PROTECTED;
@@ -1107,7 +1106,7 @@ typedef struct {
*
* this will be called by the video driver to find out
* how big the video output area size will be for a
- * given video size. The ui should _not_ adjust it's
+ * given video size. The ui should _not_ adjust its
* video out area, just do some calculations and return
* the size. This will be called for every frame, ui
* implementation should be fast.
@@ -1131,12 +1130,12 @@ typedef struct {
* frame output callback
*
* this will be called by the video driver for every frame
- * it's about to draw. ui can adapt it's size if necessary
+ * it's about to draw. ui can adapt its size if necessary
* here.
* note: the ui doesn't have to adjust itself to this
* size, this is just to be taken as a hint.
* ui must return the actual size of the video output
- * area and the video output driver will do it's best
+ * area and the video output driver will do its best
* to adjust the video frames to that size (while
* preserving aspect ratio and stuff).
* dest_x, dest_y: offset inside window
@@ -1207,7 +1206,7 @@ typedef struct {
*
* this will be called by the video driver to find out
* how big the video output area size will be for a
- * given video size. The ui should _not_ adjust it's
+ * given video size. The ui should _not_ adjust its
* video out area, just do some calculations and return
* the size. This will be called for every frame, ui
* implementation should be fast.
@@ -1231,12 +1230,12 @@ typedef struct {
* frame output callback
*
* this will be called by the video driver for every frame
- * it's about to draw. ui can adapt it's size if necessary
+ * it's about to draw. ui can adapt its size if necessary
* here.
* note: the ui doesn't have to adjust itself to this
* size, this is just to be taken as a hint.
* ui must return the actual size of the video output
- * area and the video output driver will do it's best
+ * area and the video output driver will do its best
* to adjust the video frames to that size (while
* preserving aspect ratio and stuff).
* dest_x, dest_y: offset inside window
@@ -1262,6 +1261,73 @@ typedef struct {
} xcb_visual_t;
+/**************************************************
+ * XINE_VO_RAW struct definitions
+ *************************************************/
+/* frame_format definitions */
+#define XINE_VORAW_YV12 1
+#define XINE_VORAW_YUY2 2
+#define XINE_VORAW_RGB 4
+
+/* maximum number of overlays the raw driver can handle */
+#define XINE_VORAW_MAX_OVL 16
+
+/* raw_overlay_t struct used in raw_overlay_cb callback */
+typedef struct {
+ uint8_t *ovl_rgba;
+ int ovl_w, ovl_h; /* overlay's width and height */
+ int ovl_x, ovl_y; /* overlay's top-left display position */
+} raw_overlay_t;
+
+/* this is the visual data struct any raw gui
+ * must supply to the xine_open_video_driver call
+ * ("data" parameter)
+ */
+typedef struct {
+ void *user_data;
+
+ /* OR'ed frame_format
+ * Unsupported frame formats are converted to rgb.
+ * XINE_VORAW_RGB is always assumed by the driver, even if not set.
+ * So a frontend must at least support rgb.
+ * Be aware that rgb requires more cpu than yuv,
+ * so avoid its usage for video playback.
+ * However, it's useful for single frame capture (e.g. thumbs)
+ */
+ int supported_formats;
+
+ /* raw output callback
+ * this will be called by the video driver for every frame
+ *
+ * If frame_format==XINE_VORAW_YV12, data0 points to frame_width*frame_height Y values
+ * data1 points to (frame_width/2)*(frame_height/2) U values
+ * data2 points to (frame_width/2)*(frame_height/2) V values
+ *
+ * If frame_format==XINE_VORAW_YUY2, data0 points to frame_width*frame_height*2 YU/Y²V values
+ * data1 is NULL
+ * data2 is NULL
+ *
+ * If frame_format==XINE_VORAW_RGB, data0 points to frame_width*frame_height*3 RGB values
+ * data1 is NULL
+ * data2 is NULL
+ */
+ void (*raw_output_cb) (void *user_data, int frame_format,
+ int frame_width, int frame_height,
+ double frame_aspect,
+ void *data0, void *data1, void *data2);
+
+ /* raw overlay callback
+ * this will be called by the video driver for every new overlay state
+ * overlays_array points to an array of num_ovl raw_overlay_t
+ * Note that num_ovl can be 0, meaning "end of overlay display"
+ * num_ovl is at most XINE_VORAW_MAX_OVL */
+ void (*raw_overlay_cb) (void *user_data, int num_ovl,
+ raw_overlay_t *overlays_array);
+} raw_visual_t;
+/**********************************************
+ * end of vo_raw defs
+ *********************************************/
+
/*
* this is the visual data struct any fb gui
* may supply to the xine_open_video_driver call
@@ -1520,7 +1586,7 @@ int xine_config_lookup_entry (xine_t *self, const char *key,
/*
* update a config entry (which was returned from lookup_entry() )
*
- * xine will make a deep copy of the data in the entry into it's internal
+ * xine will make a deep copy of the data in the entry into its internal
* config database.
*/
void xine_config_update_entry (xine_t *self,
@@ -1916,8 +1982,8 @@ typedef struct {
* This is the mechanism to report async errors from engine.
*
* If frontend knows about the XINE_MSG_xxx type it may safely
- * ignore the 'explanation' field and provide it's own custom
- * dialog to the 'parameters'.
+ * ignore the 'explanation' field and provide its own custom
+ * dialogue to the 'parameters'.
*
* right column specifies the usual parameters.
*/
diff --git a/include/xine/alphablend.h b/include/xine/alphablend.h
index f8c9ad540..f20d2e33e 100644
--- a/include/xine/alphablend.h
+++ b/include/xine/alphablend.h
@@ -46,7 +46,6 @@ typedef struct { /* CLUT == Color LookUp Table */
uint8_t foo;
} XINE_PACKED clut_t;
-
#define XX44_PALETTE_SIZE 32
typedef struct {
diff --git a/include/xine/array.h b/include/xine/array.h
index ae2093823..44f3c7632 100644
--- a/include/xine/array.h
+++ b/include/xine/array.h
@@ -27,7 +27,7 @@
typedef struct xine_array_s xine_array_t;
/* Constructor */
-xine_array_t *xine_array_new(size_t initial_size) XINE_PROTECTED;
+xine_array_t *xine_array_new(size_t initial_size) XINE_MALLOC XINE_PROTECTED;
/* Destructor */
void xine_array_delete(xine_array_t *array) XINE_PROTECTED;
diff --git a/include/xine/attributes.h b/include/xine/attributes.h
index b25c76572..3819818d5 100644
--- a/include/xine/attributes.h
+++ b/include/xine/attributes.h
@@ -34,6 +34,27 @@
#ifdef XINE_COMPILE
# include "configure.h"
+#else
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95 )
+# define SUPPORT_ATTRIBUTE_PACKED 1
+# endif
+
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3 )
+# define SUPPORT_ATTRIBUTE_DEPRECATED 1
+# define SUPPORT_ATTRIBUTE_FORMAT 1
+# define SUPPORT_ATTRIBUTE_FORMAT_ARG 1
+# define SUPPORT_ATTRIBUTE_MALLOC 1
+# define SUPPORT_ATTRIBUTE_UNUSED 1
+# define SUPPORT_ATTRIBUTE_CONST 1
+# endif
+
+# if __GNUC__ >= 4
+# define SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT 1
+# if __ELF__
+# define SUPPORT_ATTRIBUTE_VISIBILITY_PROTECTED 1
+# endif
+# define SUPPORT_ATTRIBUTE_SENTINEL 1
+# endif
#endif
/* Export protected only for libxine functions */
@@ -51,6 +72,12 @@
# define XINE_SENTINEL
#endif
+#ifdef SUPPORT_ATTRIBUTE_DEPRECATED
+# define XINE_DEPRECATED __attribute__((__deprecated__))
+#else
+# define XINE_DEPRECATED
+#endif
+
#ifndef __attr_unused
# ifdef SUPPORT_ATTRIBUTE_UNUSED
# define __attr_unused __attribute__((__unused__))
@@ -71,16 +98,22 @@
# define XINE_FORMAT_PRINTF_ARG(fmt)
#endif
+#ifdef SUPPORT_ATTRIBUTE_MALLOC
+# define XINE_MALLOC __attribute__((__malloc__))
+#else
+# define XINE_MALLOC
+#endif
+
#ifdef SUPPORT_ATTRIBUTE_PACKED
-# define XINE_PACKED __attribute__((packed))
+# define XINE_PACKED __attribute__((__packed__))
#else
# define XINE_PACKED
#endif
-#ifdef SUPPORT_ATTRIBUTE_MALLOC
-# define XINE_MALLOC __attribute__((__malloc__))
+#ifdef SUPPORT_ATTRIBUTE_CONST
+# define XINE_CONST __attribute__((__const__))
#else
-# define XINE_MALLOC
+# define XINE_CONST
#endif
#endif /* ATTRIBUTE_H_ */
diff --git a/include/xine/audio_out.h b/include/xine/audio_out.h
index 25e5deb68..8b8316882 100644
--- a/include/xine/audio_out.h
+++ b/include/xine/audio_out.h
@@ -274,7 +274,7 @@ struct audio_driver_class_s {
*
* @internal
*/
-xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, int grab_only);
+xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, int grab_only) XINE_MALLOC;
/*
* audio output modes + capabilities
diff --git a/include/xine/broadcaster.h b/include/xine/broadcaster.h
index 093fb4af0..0c6a291eb 100644
--- a/include/xine/broadcaster.h
+++ b/include/xine/broadcaster.h
@@ -33,7 +33,7 @@ extern "C" {
typedef struct broadcaster_s broadcaster_t;
-broadcaster_t *_x_init_broadcaster(xine_stream_t *stream, int port) XINE_PROTECTED;
+broadcaster_t *_x_init_broadcaster(xine_stream_t *stream, int port) XINE_MALLOC XINE_PROTECTED;
void _x_close_broadcaster(broadcaster_t *this) XINE_PROTECTED;
int _x_get_broadcaster_port(broadcaster_t *this) XINE_PROTECTED;
diff --git a/include/xine/buffer.h b/include/xine/buffer.h
index a53b99db3..11d9e3730 100644
--- a/include/xine/buffer.h
+++ b/include/xine/buffer.h
@@ -626,7 +626,7 @@ struct fifo_buffer_s
* @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);
+fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size) XINE_MALLOC;
/**
* @brief Allocate and initialise new dummy FIFO buffers.
@@ -634,7 +634,7 @@ fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size);
* @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);
+fifo_buffer_t *_x_dummy_fifo_buffer_new (int num_buffers, uint32_t buf_size) XINE_MALLOC;
/**
diff --git a/include/xine/configfile.h b/include/xine/configfile.h
index e8f2c070e..f2deb1aa6 100644
--- a/include/xine/configfile.h
+++ b/include/xine/configfile.h
@@ -227,7 +227,7 @@ struct config_values_s {
* @brief allocate and init a new xine config object
* @internal
*/
-config_values_t *_x_config_init (void);
+config_values_t *_x_config_init (void) XINE_MALLOC;
/**
* @brief interpret stream_setup part of mrls for config value changes
diff --git a/include/xine/input_plugin.h b/include/xine/input_plugin.h
index 95fc65c4e..2a75d7f9b 100644
--- a/include/xine/input_plugin.h
+++ b/include/xine/input_plugin.h
@@ -321,6 +321,13 @@ struct input_plugin_s {
#define INPUT_OPTIONAL_DATA_SPULANG 3
#define INPUT_OPTIONAL_DATA_PREVIEW 7
+/* buffer is a const char **; the string is freed by the input plugin. */
+#define INPUT_OPTIONAL_DATA_MIME_TYPE 8
+/* buffer is unused; true if the demuxer should be determined by the MIME type */
+#define INPUT_OPTIONAL_DATA_DEMUX_MIME_TYPE 9
+/* buffer is a const char **; the string is static or freed by the input plugin. */
+#define INPUT_OPTIONAL_DATA_DEMUXER 10
+
#define MAX_MRL_ENTRIES 255
#define MAX_PREVIEW_SIZE 4096
@@ -347,65 +354,38 @@ struct input_plugin_s {
/*
* Freeing/zeroing all of entries of given mrl.
*/
-#define MRL_ZERO(m) { \
- if((m)) { \
- if((m)->origin) \
- free((m)->origin); \
- if((m)->mrl) \
- free((m)->mrl); \
- if((m)->link) \
- free((m)->link); \
- (m)->origin = NULL; \
- (m)->mrl = NULL; \
- (m)->link = NULL; \
- (m)->type = 0; \
- (m)->size = (off_t) 0; \
- } \
-}
+#define MRL_ZERO(m) { \
+ if((m)) { \
+ free((m)->origin); \
+ free((m)->mrl); \
+ free((m)->link); \
+ (m)->origin = NULL; \
+ (m)->mrl = NULL; \
+ (m)->link = NULL; \
+ (m)->type = 0; \
+ (m)->size = (off_t) 0; \
+ } \
+ }
/*
* Duplicate two mrls entries (s = source, d = destination).
*/
-#define MRL_DUPLICATE(s, d) { \
- _x_assert((s) != NULL); \
- _x_assert((d) != NULL); \
- \
- if((s)->origin) { \
- if((d)->origin) { \
- (d)->origin = (char *) realloc((d)->origin, strlen((s)->origin) + 1); \
- sprintf((d)->origin, "%s", (s)->origin); \
- } \
- else \
- (d)->origin = strdup((s)->origin); \
- } \
- else \
- (d)->origin = NULL; \
- \
- if((s)->mrl) { \
- if((d)->mrl) { \
- (d)->mrl = (char *) realloc((d)->mrl, strlen((s)->mrl) + 1); \
- sprintf((d)->mrl, "%s", (s)->mrl); \
- } \
- else \
- (d)->mrl = strdup((s)->mrl); \
- } \
- else \
- (d)->mrl = NULL; \
- \
- if((s)->link) { \
- if((d)->link) { \
- (d)->link = (char *) realloc((d)->link, strlen((s)->link) + 1); \
- sprintf((d)->link, "%s", (s)->link); \
- } \
- else \
- (d)->link = strdup((s)->link); \
- } \
- else \
- (d)->link = NULL; \
- \
- (d)->type = (s)->type; \
- (d)->size = (s)->size; \
-}
+#define MRL_DUPLICATE(s, d) { \
+ _x_assert((s) != NULL); \
+ _x_assert((d) != NULL); \
+ \
+ free((d)->origin); \
+ (d)->origin = (s)->origin ? strdup((s)->origin) : NULL; \
+ \
+ free((d)->mrl); \
+ (d)->mrl = (s)->mrl ? strdup((s)->mrl) : NULL; \
+ \
+ free((d)->link); \
+ (d)->link = (s)->link ? strdup((s)->link) : NULL; \
+ \
+ (d)->type = (s)->type; \
+ (d)->size = (s)->size; \
+ }
/*
* Duplicate two arrays of mrls (s = source, d = destination).
diff --git a/include/xine/list.h b/include/xine/list.h
index e00e30d6c..f05ed2b0e 100644
--- a/include/xine/list.h
+++ b/include/xine/list.h
@@ -48,7 +48,7 @@ typedef struct xine_list_s xine_list_t;
typedef void* xine_list_iterator_t;
/* Constructor */
-xine_list_t *xine_list_new(void) XINE_PROTECTED;
+xine_list_t *xine_list_new(void) XINE_MALLOC XINE_PROTECTED;
/* Destructor */
void xine_list_delete(xine_list_t *list) XINE_PROTECTED;
diff --git a/include/xine/metronom.h b/include/xine/metronom.h
index df08a0058..28ca7d62d 100644
--- a/include/xine/metronom.h
+++ b/include/xine/metronom.h
@@ -218,7 +218,7 @@ struct metronom_s {
#define METRONOM_VPTS_OFFSET 6
#define METRONOM_PREBUFFER 7
-metronom_t *_x_metronom_init (int have_video, int have_audio, xine_t *xine) XINE_PROTECTED;
+metronom_t *_x_metronom_init (int have_video, int have_audio, xine_t *xine) XINE_MALLOC XINE_PROTECTED;
/* FIXME: reorder this structure on the next cleanup to remove the dummies */
struct metronom_clock_s {
@@ -314,7 +314,7 @@ struct metronom_clock_s {
#endif
};
-metronom_clock_t *_x_metronom_clock_init(xine_t *xine) XINE_PROTECTED;
+metronom_clock_t *_x_metronom_clock_init(xine_t *xine) XINE_MALLOC XINE_PROTECTED;
/*
* clock options
diff --git a/include/xine/osd.h b/include/xine/osd.h
index 4e34030ee..de924a1ae 100644
--- a/include/xine/osd.h
+++ b/include/xine/osd.h
@@ -219,7 +219,7 @@ struct osd_renderer_s {
/*
* initialize the osd rendering engine
*/
-osd_renderer_t *_x_osd_renderer_init( xine_stream_t *stream );
+osd_renderer_t *_x_osd_renderer_init( xine_stream_t *stream ) XINE_MALLOC;
/*
diff --git a/include/xine/pool.h b/include/xine/pool.h
index 918da82a2..2667b7fdc 100644
--- a/include/xine/pool.h
+++ b/include/xine/pool.h
@@ -36,7 +36,7 @@ xine_pool_t *xine_pool_new(size_t object_size,
void (create_object)(void *object),
void (prepare_object)(void *object),
void (return_object)(void *object),
- void (delete_object)(void *object)) XINE_PROTECTED;
+ void (delete_object)(void *object)) XINE_MALLOC XINE_PROTECTED;
/* Deletes a pool */
void xine_pool_delete(xine_pool_t *pool) XINE_PROTECTED;
diff --git a/include/xine/refcounter.h b/include/xine/refcounter.h
index a662a974e..8683bfb3f 100644
--- a/include/xine/refcounter.h
+++ b/include/xine/refcounter.h
@@ -35,7 +35,7 @@ typedef struct {
typedef void (*refcounter_destructor)(void*);
-refcounter_t* _x_new_refcounter(void *object, refcounter_destructor destructor) XINE_PROTECTED;
+refcounter_t* _x_new_refcounter(void *object, refcounter_destructor destructor) XINE_MALLOC XINE_PROTECTED;
int _x_refcounter_inc(refcounter_t *refcounter) XINE_PROTECTED;
diff --git a/include/xine/ring_buffer.h b/include/xine/ring_buffer.h
index efcffd3b7..5f104dc77 100644
--- a/include/xine/ring_buffer.h
+++ b/include/xine/ring_buffer.h
@@ -22,7 +22,7 @@
typedef struct xine_ring_buffer_s xine_ring_buffer_t;
/* Creates a new ring buffer */
-xine_ring_buffer_t *xine_ring_buffer_new(size_t size) XINE_PROTECTED;
+xine_ring_buffer_t *xine_ring_buffer_new(size_t size) XINE_MALLOC XINE_PROTECTED;
/* Deletes a ring buffer */
void xine_ring_buffer_delete(xine_ring_buffer_t *ring_buffer) XINE_PROTECTED;
diff --git a/include/xine/scratch.h b/include/xine/scratch.h
index c0e591d31..1029276e3 100644
--- a/include/xine/scratch.h
+++ b/include/xine/scratch.h
@@ -51,6 +51,6 @@ struct scratch_buffer_s {
pthread_mutex_t lock;
};
-scratch_buffer_t *_x_new_scratch_buffer (int num_lines) XINE_PROTECTED;
+scratch_buffer_t *_x_new_scratch_buffer (int num_lines) XINE_MALLOC XINE_PROTECTED;
#endif
diff --git a/include/xine/sorted_array.h b/include/xine/sorted_array.h
index a1894eca3..c6fdd1c25 100644
--- a/include/xine/sorted_array.h
+++ b/include/xine/sorted_array.h
@@ -63,7 +63,7 @@ typedef struct xine_sarray_s xine_sarray_t;
typedef int (*xine_sarray_comparator_t)(void*, void*);
/* Constructor */
-xine_sarray_t *xine_sarray_new(size_t initial_size, xine_sarray_comparator_t comparator) XINE_PROTECTED;
+xine_sarray_t *xine_sarray_new(size_t initial_size, xine_sarray_comparator_t comparator) XINE_MALLOC XINE_PROTECTED;
/* Destructor */
void xine_sarray_delete(xine_sarray_t *sarray) XINE_PROTECTED;
diff --git a/include/xine/video_out.h b/include/xine/video_out.h
index 0bdd0f557..6952362ff 100644
--- a/include/xine/video_out.h
+++ b/include/xine/video_out.h
@@ -475,7 +475,7 @@ struct video_overlay_manager_s {
*
* @internal
*/
-xine_video_port_t *_x_vo_new_port (xine_t *xine, vo_driver_t *driver, int grabonly);
+xine_video_port_t *_x_vo_new_port (xine_t *xine, vo_driver_t *driver, int grabonly) XINE_MALLOC;
#ifdef __cplusplus
}
diff --git a/include/xine/video_overlay.h b/include/xine/video_overlay.h
index b45f5149e..27cae6440 100644
--- a/include/xine/video_overlay.h
+++ b/include/xine/video_overlay.h
@@ -59,6 +59,6 @@ typedef struct video_overlay_event_s {
video_overlay_object_t object; /* The image data. */
} video_overlay_event_t;
-video_overlay_manager_t *_x_video_overlay_new_manager(xine_t *) XINE_PROTECTED;
+video_overlay_manager_t *_x_video_overlay_new_manager(xine_t *) XINE_MALLOC XINE_PROTECTED;
#endif
diff --git a/include/xine/xine_internal.h b/include/xine/xine_internal.h
index 805c569a3..b876030ee 100644
--- a/include/xine/xine_internal.h
+++ b/include/xine/xine_internal.h
@@ -98,6 +98,9 @@ struct xine_s {
#ifdef XINE_ENGINE_INTERNAL
xine_ticket_t *port_ticket;
pthread_mutex_t log_lock;
+
+ xine_log_cb_t log_cb;
+ void *log_cb_user_data;
#endif
};
@@ -377,26 +380,6 @@ int _x_message(xine_stream_t *stream, int type, ...) XINE_SENTINEL XINE_PROTECTE
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 *mrl) 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, const char *last_demux_name, input_plugin_t *input) XINE_PROTECTED;
-input_plugin_t *_x_rip_plugin_get_instance (xine_stream_t *stream, const char *filename) XINE_PROTECTED;
-input_plugin_t *_x_cache_plugin_get_instance (xine_stream_t *stream, int readahead_size) XINE_PROTECTED;
-void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input) XINE_PROTECTED;
-void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux) XINE_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 */
void _x_extra_info_reset( extra_info_t *extra_info ) XINE_PROTECTED;
diff --git a/include/xine/xineutils.h b/include/xine/xineutils.h
index 8ef64b143..3a215970e 100644
--- a/include/xine/xineutils.h
+++ b/include/xine/xineutils.h
@@ -113,7 +113,7 @@ extern "C" {
#define MM_SSE MM_ACCEL_X86_SSE
#define MM_SSE2 MM_ACCEL_X86_SSE2
-uint32_t xine_mm_accel (void) XINE_PROTECTED;
+uint32_t xine_mm_accel (void) XINE_CONST XINE_PROTECTED;
#if defined(ARCH_X86) || defined(ARCH_X86_64)
@@ -587,12 +587,6 @@ typedef union {
extern void *(* xine_fast_memcpy)(void *to, const void *from, size_t len) XINE_PROTECTED;
-#ifdef HAVE_XINE_INTERNAL_H
-/* Benchmark available memcpy methods */
-void xine_probe_fast_memcpy(xine_t *xine) XINE_PROTECTED;
-#endif
-
-
/*
* Debug stuff
*/
@@ -609,7 +603,7 @@ void xine_profiler_print_results (void) XINE_PROTECTED;
* Allocate and clean memory size_t 'size', then return the pointer
* to the allocated memory.
*/
-void *xine_xmalloc(size_t size) XINE_MALLOC 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;
@@ -628,6 +622,7 @@ const char *xine_get_homedir(void) XINE_PROTECTED;
/*
* Get other xine directories.
*/
+const char *xine_get_pluginroot(void) XINE_PROTECTED;
const char *xine_get_plugindir(void) XINE_PROTECTED;
const char *xine_get_fontdir(void) XINE_PROTECTED;
const char *xine_get_localedir(void) XINE_PROTECTED;
@@ -649,6 +644,13 @@ void xine_usec_sleep(unsigned usec) XINE_PROTECTED;
#define xine_strsep(STRINGP, DELIM) strsep((STRINGP), (DELIM))
#define xine_setenv(NAME, VAL, XX) setenv((NAME), (VAL), (XX))
+/**
+ * append to a string, reallocating
+ * normally, updates & returns *dest
+ * on error, *dest is unchanged & NULL is returned.
+ */
+char *xine_strcat_realloc (char **dest, char *append) XINE_PROTECTED;
+
/*
* Color Conversion Utility Functions
* The following data structures and functions facilitate the conversion
@@ -929,7 +931,7 @@ void xine_xprintf(xine_t *xine, int verbose, const char *fmt, ...);
/**
* get encoding of current locale
*/
-char *xine_get_system_encoding(void) XINE_PROTECTED;
+char *xine_get_system_encoding(void) XINE_MALLOC XINE_PROTECTED;
/*
* guess default encoding for the subtitles