summaryrefslogtreecommitdiff
path: root/gst-libs/gst/cairo/gstcairoformat-private.h
blob: cdafaf88d84fdfbd4ffdae7138332f0daa7d2118 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* GStreamer
 * Copyright (C) 2009 Benjamin Otte <otte@gnome.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __GST_CAIRO_FORMAT_PRIVATE_H__
#define __GST_CAIRO_FORMAT_PRIVATE_H__

#include <gst/video/video.h>
#include <cairo.h>

G_BEGIN_DECLS

struct _GstCairoFormat {
  volatile unsigned int refcount;
  cairo_surface_type_t  surface_type;   /* type of surfaces passed in this format or 0 for any/none */
  cairo_format_t        format;         /* cairo format in use or 0 for unknown */
  cairo_color_space_t   color_space;    /* cairo color space in use */
  guint                 n_planes;       /* number of planes for this format */
  GstVideoFormat        video_format;   /* the corresponding GStreamer video format */
  int                   width;          /* width of images */
  int                   height;         /* height of images */
  struct {
    int                 num;
    int                 denom;
  }                     framerate;      /* framerate as a fraction */
  struct {
    int                 num;
    int                 denom;
  }                     par;            /* pixel aspect ratio as a fraction - unset if num == 0 */
};

gsize           gst_cairo_format_get_offset             (const GstCairoFormat * format,
                                                         guint                  plane);
gsize           gst_cairo_format_get_stride             (const GstCairoFormat * format,
                                                         guint                  plane);
cairo_color_space_t
                gst_cairo_format_get_color_space        (const GstCairoFormat * format);
cairo_format_t  gst_cairo_format_get_cairo_format       (const GstCairoFormat * format);


G_END_DECLS

#endif /* __GST_CAIRO_FORMAT_PRIVATE_H__ */