summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xine.h.tmpl.in27
-rw-r--r--src/xine-engine/xine.c22
-rw-r--r--src/xine-engine/xine_internal.h43
3 files changed, 73 insertions, 19 deletions
diff --git a/include/xine.h.tmpl.in b/include/xine.h.tmpl.in
index 3cded1ba8..6112a99cf 100644
--- a/include/xine.h.tmpl.in
+++ b/include/xine.h.tmpl.in
@@ -28,7 +28,7 @@
\endverbatim
*/
/*
- * $Id: xine.h.tmpl.in,v 1.44 2001/10/05 13:41:53 f1rmb Exp $
+ * $Id: xine.h.tmpl.in,v 1.45 2001/10/07 16:57:02 guenter Exp $
*
*/
@@ -1371,6 +1371,31 @@ void xine_send_event(xine_t *self, event_t *event, void *data);
/** @} end of event_group */
+/**
+ * snapshot function
+ *
+ * returns:
+ * width, height : size of image (be aware that u,v may be subsampled)
+ * ratio_code : aspect ratio of the frame
+ * format : subsampling format YUV 4:2:0 or 4:2:2
+ * y : lumiance information
+ * u,v : subsample color information
+ */
+void xine_get_current_frame (xine_t *self, int *width, int *height,
+ int *ratio_code, int *format,
+ uint8_t **y, uint8_t **u,
+ uint8_t **v);
+
+
+#define XINE_IMGFMT_YV12 0x32315659
+#define XINE_IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y')
+
+#define XINE_ASPECT_RATIO_SQUARE 1
+#define XINE_ASPECT_RATIO_4_3 2
+#define XINE_ASPECT_RATIO_ANAMORPHIC 3
+#define XINE_ASPECT_RATIO_211_1 4
+#define XINE_ASPECT_RATIO_DONT_TOUCH 42
+
/** @} end of xine_api */
#ifdef __cplusplus
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 40c6911a8..3d32d0f4d 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.64 2001/10/07 15:13:09 guenter Exp $
+ * $Id: xine.c,v 1.65 2001/10/07 16:57:02 guenter Exp $
*
* top-level xine functions
*
@@ -648,3 +648,23 @@ int xine_set_audio_property(xine_t *this, int property, int value) {
return ~value;
}
+void xine_get_current_frame (xine_t *this, int *width, int *height,
+ int *ratio_code, int *format,
+ uint8_t **y, uint8_t **u, uint8_t **v) {
+
+ vo_frame_t *frame;
+
+ frame = this->video_out->get_last_frame (this->video_out);
+
+ *width = frame->width;
+ *height = frame->height;
+
+ *ratio_code = frame->ratio;
+ *format = frame->format;
+
+ *y = frame->base[0];
+ *u = frame->base[1];
+ *v = frame->base[2];
+
+}
+
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index ebc659d32..55ca7a996 100644
--- a/src/xine-engine/xine_internal.h
+++ b/src/xine-engine/xine_internal.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_internal.h,v 1.46 2001/10/05 01:56:57 miguelfreitas Exp $
+ * $Id: xine_internal.h,v 1.47 2001/10/07 16:57:02 guenter Exp $
*
*/
@@ -483,36 +483,45 @@ char **xine_list_audio_output_plugins ();
ao_driver_t *xine_load_audio_output_plugin(config_values_t *config, char *id);
-/**
- * @defgroup eventgroup Sending events
- * Event dispatcher mechanism
- * @{
+/*
+ * sending events
+ * event dispatcher mechanism
*/
-/**
- * \fn xine_register_event_listener(xine_t *this, event_listener_t listener)
- * \brief registers an event listener callback.
- * \return 0 if the listener was registerd, non-zero if it could not.
+/*
+ * register an event listener callback.
+ * returns 0 if the listener was registerd, non-zero if it could not.
*/
int xine_register_event_listener(xine_t *this, event_listener_t listener);
-/**
- * \fn xine_remove_event_listener(event_listener_t listener)
- * \brief Attempts to remove a registered event listener.
- * \return 0 if the listener was removes, non-zero if it wasn't (e.g. not found).
+/*
+ * attempt to remove a registered event listener.
+ * returns 0 if the listener was removed, non-zero if not (e.g. not found).
*/
int xine_remove_event_listener(xine_t *this, event_listener_t listener);
-/**
- * \fn xine_send_event(event_t *event)
- * \brief sends an event to all listeners.
+/*
+ * send an event to all listeners.
*/
void xine_send_event(xine_t *this, event_t *event, void *data);
-/** @} end of eventgroup */
+/*
+ * snapshot function
+ *
+ * returns:
+ * width, height : size of image (be aware that u,v may be subsampled)
+ * ratio_code : aspect ratio of the frame
+ * format : subsampling format YUV 4:2:0 or 4:2:2
+ * y : lumiance information
+ * u,v : subsample color information
+ */
+void xine_get_current_frame (xine_t *this, int *width, int *height,
+ int *ratio_code, int *format,
+ uint8_t **y, uint8_t **u,
+ uint8_t **v);
#ifdef __cplusplus
}