077fe3f36da146f44a81a523efa179c9cca037d9
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / gst / ffmpegcolorspace / gstffmpegcodecmap.h
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GST_FFMPEG_CODECMAP_H__
21 #define __GST_FFMPEG_CODECMAP_H__
22
23 #include "avcodec.h"
24 #include <gst/gst.h>
25
26 /*
27  * _codectype_to_caps () gets the GstCaps that belongs to
28  * a certain CodecType for a pad with uncompressed data.
29  */
30
31 GstCaps *
32 gst_ffmpegcsp_codectype_to_caps (enum CodecType  codec_type,
33                                  AVCodecContext *context);
34
35 /*
36  * caps_with_codectype () transforms a GstCaps that belongs to
37  * a pad for uncompressed data to a filled-in context.
38  */
39
40 void
41 gst_ffmpegcsp_caps_with_codectype (enum CodecType  type,
42                                    const GstCaps  *caps,
43                                    AVCodecContext *context);
44
45 /*
46  * Fill in pointers in an AVPicture, aligned by 4 (required by X).
47  */
48
49 int
50 gst_ffmpegcsp_avpicture_fill (AVPicture * picture,
51                               uint8_t *   ptr,
52                               enum PixelFormat pix_fmt,
53                               int         width,
54                               int         height,
55                               int         interlaced);
56
57 #endif /* __GST_FFMPEG_CODECMAP_H__ */
58