Search
lxdream.org :: lxdream/src/video.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/video.h
changeset 94:8d80d9c7cc7d
prev65:9f124c245fc6
next103:9b9cfc5855e0
author nkeynes
date Sun Feb 05 04:05:27 2006 +0000 (15 years ago)
permissions -rw-r--r--
last change Video code reshuffle to start getting real video happening.
Implement colourspace conversions
Various tweaks
file annotate diff log raw
nkeynes@31
     1
/**
nkeynes@94
     2
 * $Id: video.h,v 1.4 2006-02-05 04:05:27 nkeynes Exp $
nkeynes@31
     3
 *
nkeynes@31
     4
 * The PC side of the video support (responsible for actually displaying / 
nkeynes@31
     5
 * rendering frames)
nkeynes@31
     6
 *
nkeynes@31
     7
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@31
     8
 *
nkeynes@31
     9
 * This program is free software; you can redistribute it and/or modify
nkeynes@31
    10
 * it under the terms of the GNU General Public License as published by
nkeynes@31
    11
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@31
    12
 * (at your option) any later version.
nkeynes@31
    13
 *
nkeynes@31
    14
 * This program is distributed in the hope that it will be useful,
nkeynes@31
    15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@31
    16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@31
    17
 * GNU General Public License for more details.
nkeynes@31
    18
 */
nkeynes@31
    19
nkeynes@31
    20
#ifndef dream_video_H
nkeynes@31
    21
#define dream_video_H
nkeynes@31
    22
nkeynes@31
    23
#include <stdint.h>
nkeynes@94
    24
#include <glib.h>
nkeynes@31
    25
nkeynes@31
    26
#ifdef __cplusplus
nkeynes@31
    27
extern "C" {
nkeynes@31
    28
#endif
nkeynes@1
    29
nkeynes@94
    30
#define COLFMT_RGB15 0x00000000
nkeynes@94
    31
#define COLFMT_RGB16 0x00000004
nkeynes@94
    32
#define COLFMT_RGB24 0x00000008
nkeynes@94
    33
#define COLFMT_RGB32 0x0000000C
nkeynes@94
    34
nkeynes@94
    35
typedef struct video_buffer {
nkeynes@94
    36
    uint32_t hres;
nkeynes@94
    37
    uint32_t vres;
nkeynes@94
    38
    uint32_t rowstride;
nkeynes@94
    39
    int colour_format;
nkeynes@94
    40
    char *data;
nkeynes@94
    41
} *video_buffer_t;
nkeynes@94
    42
nkeynes@94
    43
typedef struct video_driver {
nkeynes@94
    44
    char *name;
nkeynes@94
    45
    gboolean (*set_output_format)( uint32_t hres, uint32_t vres, 
nkeynes@94
    46
				   int colour_fmt );
nkeynes@94
    47
    gboolean (*display_frame)( video_buffer_t buffer );
nkeynes@94
    48
    gboolean (*display_blank_frame)( uint32_t rgb );
nkeynes@94
    49
} *video_driver_t;
nkeynes@94
    50
nkeynes@94
    51
nkeynes@1
    52
void video_open( void );
nkeynes@1
    53
void video_update_frame( void );
nkeynes@1
    54
void video_update_size( int, int, int );
nkeynes@1
    55
nkeynes@94
    56
extern uint32_t pvr2_frame_counter;
nkeynes@94
    57
nkeynes@94
    58
extern struct video_driver video_gtk_driver;
nkeynes@31
    59
nkeynes@31
    60
#ifdef __cplusplus
nkeynes@31
    61
}
nkeynes@31
    62
#endif
nkeynes@31
    63
#endif
.