summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/xine.h58
-rw-r--r--include/xine/alphablend.h1
-rw-r--r--include/xine/attributes.h32
-rw-r--r--include/xine/input_plugin.h83
-rw-r--r--include/xine/xineutils.h2
5 files changed, 94 insertions, 82 deletions
diff --git a/include/xine.h b/include/xine.h
index 47580fd5d..ba022c389 100644
--- a/include/xine.h
+++ b/include/xine.h
@@ -398,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.
*/
@@ -411,18 +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,
- int *interlaced,
- int *crop_left, int *crop_right,
- int *crop_top, int *crop_bottom) 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,
- int *interlaced,
- int *crop_left, int *crop_right,
- int *crop_top, int *crop_bottom) 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')
@@ -1081,7 +1101,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.
@@ -1105,12 +1125,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
@@ -1181,7 +1201,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.
@@ -1205,12 +1225,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
@@ -1267,7 +1287,7 @@ typedef struct {
* 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 usefull for single frame capture (e.g. thumbs)
+ * However, it's useful for single frame capture (e.g. thumbs)
*/
int supported_formats;
@@ -1561,7 +1581,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,
@@ -1957,8 +1977,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/attributes.h b/include/xine/attributes.h
index c339e7113..29bb9f28f 100644
--- a/include/xine/attributes.h
+++ b/include/xine/attributes.h
@@ -34,6 +34,26 @@
#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
+# 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 */
@@ -77,16 +97,16 @@
# define XINE_FORMAT_PRINTF_ARG(fmt)
#endif
-#ifdef SUPPORT_ATTRIBUTE_PACKED
-# define XINE_PACKED __attribute__((packed))
-#else
-# define XINE_PACKED
-#endif
-
#ifdef SUPPORT_ATTRIBUTE_MALLOC
# define XINE_MALLOC __attribute__((__malloc__))
#else
# define XINE_MALLOC
#endif
+#ifdef SUPPORT_ATTRIBUTE_PACKED
+# define XINE_PACKED __attribute__((__packed__))
+#else
+# define XINE_PACKED
+#endif
+
#endif /* ATTRIBUTE_H_ */
diff --git a/include/xine/input_plugin.h b/include/xine/input_plugin.h
index 95fc65c4e..2ee9c6e74 100644
--- a/include/xine/input_plugin.h
+++ b/include/xine/input_plugin.h
@@ -347,65 +347,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/xineutils.h b/include/xine/xineutils.h
index 7eb0acdd8..dbe5199dd 100644
--- a/include/xine/xineutils.h
+++ b/include/xine/xineutils.h
@@ -603,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;