src/video/bwindow/SDL_sysyuv.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 17 Mar 2009 03:58:53 +0000
branchSDL-1.2
changeset 4164 7a4c511c980a
parent 4159 a1b03ba2fcd0
child 4888 46fb637777ed
permissions -rw-r--r--
Date: Fri, 6 Mar 2009 12:41:17 -0800
From: scott mc
Subject: Re: [SDL] patch for building on haiku

Ok. I've combined the various Haiku patches for the SDL-1.2 branch
into one .diff file
slouken@756
     1
/*
slouken@756
     2
    SDL - Simple DirectMedia Layer
slouken@4159
     3
    Copyright (C) 1997-2009 Sam Lantinga
slouken@756
     4
slouken@756
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@756
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@756
     9
slouken@756
    10
    This library is distributed in the hope that it will be useful,
slouken@756
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@756
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@756
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@756
    18
slouken@756
    19
    Sam Lantinga
slouken@756
    20
    slouken@libsdl.org
slouken@756
    21
*/
slouken@1402
    22
#include "SDL_config.h"
slouken@756
    23
slouken@756
    24
slouken@756
    25
#ifndef __SDL_SYS_YUV_H__
slouken@756
    26
#define __SDL_SYS_YUV_H__
slouken@756
    27
slouken@756
    28
/* This is the BeOS implementation of YUV video overlays */
slouken@756
    29
slouken@756
    30
#include "SDL_video.h"
slouken@756
    31
#include "SDL_lowvideo.h"
slouken@756
    32
slouken@756
    33
extern "C" {
slouken@756
    34
slouken@756
    35
struct private_yuvhwdata
slouken@756
    36
{
slouken@756
    37
/*  FRAMEDATA* CurrentFrameData;
slouken@756
    38
    FRAMEDATA* FrameData0;
slouken@756
    39
    FRAMEDATA* FrameData1;
slouken@756
    40
    PgScalerProps_t   props;
slouken@756
    41
    PgScalerCaps_t    caps;
slouken@756
    42
    PgVideoChannel_t* channel;
slouken@756
    43
    PhArea_t CurrentViewPort;
slouken@756
    44
    PhPoint_t CurrentWindowPos;
slouken@756
    45
    long format;
slouken@756
    46
    int scaler_on;
slouken@756
    47
    int current;
slouken@756
    48
    long YStride;
slouken@756
    49
    long VStride;
slouken@756
    50
    long UStride;
slouken@756
    51
    int ischromakey;
slouken@756
    52
    long chromakey;
slouken@756
    53
    int forcedredraw;
slouken@756
    54
    unsigned long State;
slouken@756
    55
    long flags;
slouken@756
    56
*/
slouken@756
    57
	SDL_Surface *display;
slouken@756
    58
	BView *bview;
slouken@756
    59
	bool first_display;
slouken@756
    60
	BBitmap *bbitmap;
slouken@756
    61
    int locked;
slouken@756
    62
};
slouken@756
    63
slouken@756
    64
extern BBitmap * BE_GetOverlayBitmap(BRect bounds, color_space cs);
slouken@4164
    65
SDL_Overlay* BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface* display);
slouken@756
    66
extern int BE_LockYUVOverlay(_THIS, SDL_Overlay* overlay);
slouken@756
    67
extern void BE_UnlockYUVOverlay(_THIS, SDL_Overlay* overlay);
slouken@1643
    68
extern int BE_DisplayYUVOverlay(_THIS, SDL_Overlay* overlay, SDL_Rect* src, SDL_Rect* dst);
slouken@756
    69
extern void BE_FreeYUVOverlay(_THIS, SDL_Overlay* overlay);
slouken@756
    70
slouken@756
    71
};
slouken@756
    72
slouken@756
    73
#endif /* __SDL_PH_YUV_H__ */