diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 33 | ||||
-rw-r--r-- | include/audio_out.h | 97 | ||||
-rw-r--r-- | include/video_out.h | 273 |
3 files changed, 2 insertions, 401 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 9f16758c9..78923b1e5 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -4,8 +4,8 @@ EXTRA_DIST = xine.h.tmpl.in -include_HEADERS = audio_out.h video_out.h xine.h - +includedir = $(prefix)/include +include_HEADERS = xine.h xine.h: xine.h.tmpl @echo "creating xine.h"; \ @@ -17,35 +17,6 @@ xine.h: xine.h.tmpl debug: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(includedir)/xine - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ - if test "$$p" != "xine.h"; then \ - echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p"; \ - $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p; \ - else \ - echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \ - $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \ - fi; \ - done - - -## -## Remove them -## -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - list='$(include_HEADERS)'; for p in $$list; do \ - if test "$$p" != "xine.h"; then \ - rm -f $(DESTDIR)$(includedir)/xine/$$p; \ - else \ - rm -f $(DESTDIR)$(includedir)/$$p; \ - fi; \ - done - - mostlyclean-generic: -rm -f *~ \#* .*~ .\#* diff --git a/include/audio_out.h b/include/audio_out.h deleted file mode 100644 index 3e0118325..000000000 --- a/include/audio_out.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2000-2001 the xine project - * - * This file is part of xine, a unix video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: audio_out.h,v 1.1 2001/04/18 22:36:42 f1rmb Exp $ - */ -#ifndef HAVE_AUDIO_OUT_H -#define HAVE_AUDIO_OUT_H - -#include <inttypes.h> - -/* - * audio output modes Used as Bitfield in AC3 decoder - */ - -#define AO_MODE_AC3 1 -#define AO_MODE_MONO 2 /* 1 sample == 2 bytes */ -#define AO_MODE_STEREO 4 /* 1 sample == 4 bytes */ -#define AO_MODE_4CHANNEL 8 /* 1 sample == 8 bytes */ -#define AO_MODE_5CHANNEL 16 /* 1 sample == 10 bytes */ - -typedef struct ao_functions_s -{ - - /* - * find out if desired output mode is supported by - * this driver - */ - - int (*is_mode_supported) (int mode); - - /* - * init device - buffer will be flushed(!) - * return value: <=0 : failure, 1 : ok - */ - - int (*open)(uint32_t bits, uint32_t rate, int mode); - - /* - * write audio data to output buffer - may block - * audio driver must sync sample playback with metronom - */ - - void (*write_audio_data)(int16_t* audio_data, uint32_t num_samples, - uint32_t pts); - - /* - * close the audio driver - */ - - void (*close)(void); - -} ao_functions_t; - -/* - * available drivers: - */ - -#define AO_DRIVER_UNSET -1 -#define AO_DRIVER_NULL 0 -#define AO_DRIVER_OSS 1 -#if defined(HAVE_ALSA) -# define AO_DRIVER_ALSA 2 -# if defined(HAVE_ESD) -# define AO_DRIVER_ESD 3 -# endif -#else /* no ALSA */ -# if defined(HAVE_ESD) -# define AO_DRIVER_ESD 2 -# endif -#endif - -/* - * find right device driver, init it - */ - -ao_functions_t *ao_init(char *driver_name) ; - -char *ao_get_available_drivers (); - -#endif - diff --git a/include/video_out.h b/include/video_out.h deleted file mode 100644 index 8e733bde2..000000000 --- a/include/video_out.h +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright (C) 2000-2001 the xine project - * - * This file is part of xine, a unix video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: video_out.h,v 1.6 2001/04/23 22:43:59 f1rmb Exp $ - * - * - * xine version of video_out.h - * - */ - -#ifndef HAVE_VIDEO_OUT_H -#define HAVE_VIDEO_OUT_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <inttypes.h> -#include <pthread.h> -#include <X11/Xlib.h> - -#if defined(XINE_COMPILE) -#include "configfile.h" -#include "metronom.h" -#else -#include "xine/configfile.h" -#include "xine/metronom.h" -#endif - -#define VIDEO_OUT_PLUGIN_IFACE_VERSION 1 - -typedef struct vo_frame_s vo_frame_t; -typedef struct vo_driver_s vo_driver_t ; -typedef struct vo_instance_s vo_instance_t; -typedef struct img_buf_fifo_s img_buf_fifo_t; - -/* public part, video drivers may add private fields */ -struct vo_frame_s { - struct vo_frame_s *next; - - uint32_t PTS; - int bFrameBad; /* e.g. frame skipped or based on skipped frame */ - uint8_t *base[3]; - int nType; /* I, B or P frame */ - - int bDisplayLock, bDecoderLock, bDriverLock; - pthread_mutex_t mutex; /* so the various locks will be serialized */ - - int nID; /* debugging purposes only */ - - vo_instance_t *instance; - - /* - * member functions - */ - - /* this frame is no longer used by decoder */ - void (*free) (vo_frame_t *vo_img); - - /* tell video driver to copy/convert a slice of this frame */ - void (*copy) (vo_frame_t *vo_img, uint8_t **src); - - /* tell video driver that the decoder starts a new field */ - void (*field) (vo_frame_t *vo_img, int which_field); - - /* append this frame to the display queue, - returns number of frames to skip if decoder is late */ - int (*draw) (vo_frame_t *vo_img); - - /* this frame is no longer used by the video driver */ - void (*displayed) (vo_frame_t *vo_img); - - /* free memory/resources for this frame */ - void (*dispose) (vo_frame_t *vo_img); -}; - - -struct vo_instance_s { - - uint32_t (*get_capabilities) (vo_instance_t *this); /* for constants see below */ - - /* open display driver for video output */ - void (*open) (vo_instance_t *this); - - /* - * get_frame - allocate an image buffer from display driver - * - * params : width == width of video to display. - * height == height of video to display. - * ratio == aspect ration information - * format == FOURCC descriptor of image format - * duration == frame duration in 1/90000 sec - */ - vo_frame_t* (*get_frame) (vo_instance_t *this, uint32_t width, - uint32_t height, int ratio_code, - int format, uint32_t duration); - - /* video driver is no longer used by decoder => close */ - void (*close) (vo_instance_t *this); - - /* called on xine exit */ - void (*exit) (vo_instance_t *this); - - /* get/set driver properties, flags see below */ - int (*get_property) (vo_instance_t *this, int nProperty); - - /* set a property - returns value on succ, ~value otherwise*/ - int (*set_property) (vo_instance_t *this, - int nProperty, int value); - void (*get_property_min_max) (vo_instance_t *this, - int nProperty, int *min, int *max); - - /* - * handle events for video window (e.g. expose) - * parameter will typically be something like a pointer - * to an XEvent structure for X11 drivers, but - * may be something different for, say, fb drivers - */ - void (*handle_event) (vo_instance_t *this, void *event) ; - - /* - * get whatever is usefull to contact the window/video output - * (mostly usefull for the gui if it wants to access - * the video output window) - */ - void* (*get_window) (vo_instance_t *this); - - /* private stuff */ - - vo_driver_t *driver; - metronom_t *metronom; - - img_buf_fifo_t *free_img_buf_queue; - img_buf_fifo_t *display_img_buf_queue; - - int video_loop_running; - pthread_t video_thread; - - uint32_t pts_per_half_frame; - uint32_t pts_per_frame; - - int num_frames_delivered; - int num_frames_skipped; - int num_frames_discarded; - -} ; - -/* constants for the get/set property functions */ - -#define VO_PROP_WINDOW_VISIBLE 0 -#define VO_PROP_CURSOR_VISIBLE 1 -#define VO_PROP_FULLSCREEN 2 -#define VO_PROP_INTERLACED 3 -#define VO_PROP_ASPECT_RATIO 4 -#define VO_PROP_HUE 5 -#define VO_PROP_SATURATION 6 -#define VO_PROP_CONTRAST 7 -#define VO_PROP_BRIGHTNESS 8 -#define VO_PROP_COLORKEY 9 -#define VO_NUM_PROPERTIES 10 - -/* image formats that can be supported by display drivers: */ - -#define IMGFMT_YV12 0x32315659 -#define IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y') -#define IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8)) - -/* possible ratios for the VO_PROP_ASPECT_RATIO call */ - -#define ASPECT_AUTO 0 -#define ASPECT_ANAMORPHIC 1 /* 16:9 */ -#define ASPECT_FULL 2 /* 4:3 */ -#define ASPECT_DVB 3 /* 1:2 */ - -/* video driver capabilities */ - -/* driver copies image (i.e. converts it to - rgb buffers in the private fields of image buffer) */ -#define VO_CAP_COPIES_IMAGE 0x00000001 - -#define VO_CAP_RGB 0x00000002 /* driver can handle 24bit rgb pictures */ -#define VO_CAP_YV12 0x00000004 /* driver can handle YUV 4:2:0 pictures */ -#define VO_CAP_YUY2 0x00000008 /* driver can handle YUY2 pictures */ - -#define VO_CAP_HUE 0x00000010 /* driver can set HUE value */ -#define VO_CAP_SATURATION 0x00000020 /* driver can set SATURATION value */ -#define VO_CAP_BRIGHTNESS 0x00000040 /* driver can set BRIGHTNESS value */ -#define VO_CAP_CONTRAST 0x00000080 /* driver can set CONTRAST value */ -#define VO_CAP_COLORKEY 0x00000100 /* driver can set COLORKEY value */ - -/* - * vo_driver_s contains the function every display driver - * has to implement. The vo_new_instance function (see below) - * should then be used to construct a vo_instance using this - * driver. Some of the function pointers will be copied - * directly into vo_instance_s, others will be called - * from generic vo functions. - */ - - -struct vo_driver_s { - - uint32_t (*get_capabilities) (vo_driver_t *this); /* for constants see below */ - - /* - * allocate an vo_frame_t struct, - * the driver must supply the copy, field and dispose functions - */ - vo_frame_t* (*alloc_frame) (vo_driver_t *this); - - - /* - * check if the given image fullfills the format specified - * (re-)allocate memory if necessary - */ - void (*update_frame_format) (vo_driver_t *this, vo_frame_t *img, - uint32_t width, uint32_t height, - int ratio_code, int format); - - /* display a given frame */ - void (*display_frame) (vo_driver_t *this, vo_frame_t *vo_img); - - int (*get_property) (vo_driver_t *this, int property); - int (*set_property) (vo_driver_t *this, - int property, int value); - void (*get_property_min_max) (vo_driver_t *this, - int property, int *min, int *max); - - void (*handle_event) (vo_driver_t *this, void *event) ; - void* (*get_window) (vo_driver_t *this); - - /* set logo visibility */ - void (*set_logo_mode) (vo_driver_t *this, int show_logo); - - void (*exit) (vo_driver_t *this); -}; - - -/* - * build a video_out_instance from - * a given video driver - */ - -vo_instance_t *vo_new_instance (vo_driver_t *driver, metronom_t *metronom) ; - -/* - * init a video driver. The driver is selected either - * by auto-detection or (if given) by the driver_name - */ - -vo_instance_t *vo_init (char *driver_name); - -/* returns a list of available drivers */ - -char *vo_get_available_drivers (); - -#endif |