PageRenderTime 20ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/cores/VideoRenderers/OverlayRendererUtil.h

http://github.com/xbmc/xbmc
C++ Header | 68 lines | 41 code | 8 blank | 19 comment | 0 complexity | d7143b86491b75871a6e5dad9778d0a0 MD5 | raw file
 1/*
 2 *      Copyright (C) 2005-2013 Team XBMC
 3 *      http://xbmc.org
 4 *
 5 *  This Program is free software; you can redistribute it and/or modify
 6 *  it under the terms of the GNU General Public License as published by
 7 *  the Free Software Foundation; either version 2, or (at your option)
 8 *  any later version.
 9 *
10 *  This Program is distributed in the hope that it will be useful,
11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *  GNU General Public License for more details.
14 *
15 *  You should have received a copy of the GNU General Public License
16 *  along with XBMC; see the file COPYING.  If not, see
17 *  <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#pragma once
22
23#include <stdlib.h>
24
25class CDVDOverlayImage;
26class CDVDOverlaySpu;
27class CDVDOverlaySSA;
28typedef struct ass_image ASS_Image;
29
30namespace OVERLAY {
31
32  struct SQuad
33  {
34     int           u, v;
35     unsigned char r, g, b, a;
36     int           x, y;
37     int           w, h;
38  };
39
40  struct SQuads
41  {
42    SQuads()
43    {
44      data = NULL;
45      quad = NULL;
46      size_x = 0;
47      size_y = 0;
48      count  = 0;
49    }
50   ~SQuads()
51    {
52      free(data);
53      free(quad);
54    }
55    int      size_x;
56    int      size_y;
57    int      count;
58    uint8_t* data;
59    SQuad*   quad;
60  };
61
62  uint32_t* convert_rgba(CDVDOverlayImage* o, bool mergealpha);
63  uint32_t* convert_rgba(CDVDOverlaySpu*   o, bool mergealpha
64                       , int& min_x, int& max_x
65                       , int& min_y, int& max_y);
66  bool      convert_quad(ASS_Image* images, SQuads& quads);
67
68}