1 /* GStreamer PNM utility functions
2 * Copyright (C) 2009 Lutz Mueller <lutz@users.sourceforge.net>
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.
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.
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.
20 #ifndef __GST_PNM_UTILS_H__
21 #define __GST_PNM_UTILS_H__
24 #include <glib-object.h>
26 #define MIME_BM "image/x-portable-bitmap"
27 #define MIME_GM "image/x-portable-graymap"
28 #define MIME_PM "image/x-portable-pixmap"
29 #define MIME_AM "image/x-portable-anymap"
30 #define MIME_ALL MIME_BM "; " MIME_GM "; " MIME_PM "; " MIME_AM
34 GST_PNM_INFO_FIELDS_TYPE = 1 << 0,
35 GST_PNM_INFO_FIELDS_WIDTH = 1 << 1,
36 GST_PNM_INFO_FIELDS_HEIGHT = 1 << 2,
37 GST_PNM_INFO_FIELDS_MAX = 1 << 3,
38 GST_PNM_INFO_FIELDS_ENCODING = 1 << 4
41 #define GST_PNM_INFO_FIELDS_ALL (GST_PNM_INFO_FIELDS_TYPE | GST_PNM_INFO_FIELDS_WIDTH | GST_PNM_INFO_FIELDS_HEIGHT | GST_PNM_INFO_FIELDS_MAX | GST_PNM_INFO_FIELDS_ENCODING)
45 GST_PNM_TYPE_BITMAP = 1,
46 GST_PNM_TYPE_GRAYMAP = 2,
47 GST_PNM_TYPE_PIXMAP = 3
52 GST_PNM_ENCODING_RAW = 0,
53 GST_PNM_ENCODING_ASCII = 1
58 GstPnmInfoFields fields;
60 GstPnmEncoding encoding;
61 guint width, height, max;
66 GST_PNM_INFO_MNGR_STATE_NONE = 0,
67 GST_PNM_INFO_MNGR_STATE_DATA_TYPE,
68 GST_PNM_INFO_MNGR_STATE_DATA_WIDTH,
69 GST_PNM_INFO_MNGR_STATE_DATA_HEIGHT,
70 GST_PNM_INFO_MNGR_STATE_DATA_MAX,
71 GST_PNM_INFO_MNGR_STATE_COMMENT,
72 GST_PNM_INFO_MNGR_STATE_WHITE_SPACE
73 } GstPnmInfoMngrState;
77 GstPnmInfoMngrState state;
84 GST_PNM_INFO_MNGR_RESULT_FAILED,
85 GST_PNM_INFO_MNGR_RESULT_READING,
86 GST_PNM_INFO_MNGR_RESULT_FINISHED
87 } GstPnmInfoMngrResult;
89 GstPnmInfoMngrResult gst_pnm_info_mngr_scan (GstPnmInfoMngr *, const guint8 *, guint);
91 #endif /* __GST_PNM_UTILS_H__ */