00001 /* 00002 * FILE: display.h 00003 * AUTHOR: Colin Perkins <csp@csperkins.org> 00004 * Martin Benes <martinbenesh@gmail.com> 00005 * Lukas Hejtmanek <xhejtman@ics.muni.cz> 00006 * Petr Holub <hopet@ics.muni.cz> 00007 * Milos Liska <xliska@fi.muni.cz> 00008 * Jiri Matela <matela@ics.muni.cz> 00009 * Dalibor Matura <255899@mail.muni.cz> 00010 * Ian Wesley-Smith <iwsmith@cct.lsu.edu> 00011 * 00012 * Copyright (c) 2001-2003 University of Southern California 00013 * Copyright (c) 2005-2010 CESNET z.s.p.o. 00014 * 00015 * Redistribution and use in source and binary forms, with or without 00016 * modification, is permitted provided that the following conditions 00017 * are met: 00018 * 00019 * 1. Redistributions of source code must retain the above copyright 00020 * notice, this list of conditions and the following disclaimer. 00021 * 00022 * 2. Redistributions in binary form must reproduce the above copyright 00023 * notice, this list of conditions and the following disclaimer in the 00024 * documentation and/or other materials provided with the distribution. 00025 * 00026 * 3. All advertising materials mentioning features or use of this software 00027 * must display the following acknowledgement: 00028 * 00029 * This product includes software developed by the University of Southern 00030 * California Information Sciences Institute. This product also includes 00031 * software developed by CESNET z.s.p.o. 00032 * 00033 * 4. Neither the name of the University, Institute, CESNET nor the names of 00034 * its contributors may be used to endorse or promote products derived from 00035 * this software without specific prior written permission. 00036 * 00037 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS 00038 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, 00039 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00040 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 00041 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 00042 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00043 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00044 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00045 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00046 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00047 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00048 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00049 * 00050 * $Revision: 1.4 $ 00051 * $Date: 2009/12/11 15:29:39 $ 00052 * 00053 */ 00054 00055 #ifndef _VIDEO_DISPLAY_H 00056 #define _VIDEO_DISPLAY_H 00057 00058 /* 00059 * Interface to probing the valid display types. 00060 * 00061 */ 00062 00063 typedef uint32_t display_id_t; 00064 00065 typedef enum { 00066 DS_176x144, /* Quarter CIF */ 00067 DS_352x288, /* CIF */ 00068 DS_702x576, /* Super CIF */ 00069 DS_1280x720, /* SMPTE 296M */ 00070 DS_1920x1080, /* SMPTE 274M */ 00071 DS_NONE, 00072 } display_size_t; 00073 00074 typedef enum { 00075 DC_YUV, 00076 DC_RGB, 00077 DC_NONE, 00078 } display_colour_t; 00079 00080 typedef struct { 00081 display_size_t size; 00082 display_colour_t colour_mode; 00083 int num_images; /* Maximum displayable images, -1 = unlimited */ 00084 } display_format_t; 00085 00086 typedef struct { 00087 display_id_t id; 00088 const char *name; /* Single word name */ 00089 const char *description; 00090 display_format_t *formats; /* Array of supported formats */ 00091 unsigned int num_formats; /* Size of the array */ 00092 } display_type_t; 00093 00094 int display_init_devices(void); 00095 void display_free_devices(void); 00096 int display_get_device_count(void); 00097 display_type_t *display_get_device_details(int index); 00098 display_id_t display_get_null_device_id(void); 00099 00100 /* 00101 * Interface to initialize displays, and playout video 00102 * 00103 */ 00104 00105 struct display; 00106 00107 struct display *display_init(display_id_t id, char *fmt); 00108 void display_done(struct display *d); 00109 char *display_get_frame(struct display *d); 00110 void display_put_frame(struct display *d, char *frame); 00111 display_colour_t display_get_colour_mode(struct display *d); 00112 00113 #endif /* _VIDEO_DISPLAY_H */
1.6.1