1 /* 2 * Copyright (C) 2012,2018 Collabora Ltd. 3 * Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation 8 * version 2.1 of the License. 9 * 10 * This library 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 GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 * 19 */ 20 21 #ifndef __GST_AMC_FORMAT_H__ 22 #define __GST_AMC_FORMAT_H__ 23 24 #include <gst/gst.h> 25 26 G_BEGIN_DECLS 27 28 typedef struct _GstAmcFormat GstAmcFormat; 29 typedef struct _GstAmcColorFormatInfo GstAmcColorFormatInfo; 30 31 gboolean gst_amc_format_static_init (void); 32 33 GstAmcFormat * gst_amc_format_new_audio (const gchar *mime, gint sample_rate, gint channels, GError **err); 34 GstAmcFormat * gst_amc_format_new_video (const gchar *mime, gint width, gint height, GError **err); 35 void gst_amc_format_free (GstAmcFormat * format); 36 37 gchar * gst_amc_format_to_string (GstAmcFormat * format, GError **err); 38 39 gboolean gst_amc_format_get_float (GstAmcFormat *format, const gchar *key, gfloat *value, GError **err); 40 gboolean gst_amc_format_set_float (GstAmcFormat *format, const gchar *key, gfloat value, GError **err); 41 gboolean gst_amc_format_get_int (GstAmcFormat *format, const gchar *key, gint *value, GError **err); 42 gboolean gst_amc_format_set_int (GstAmcFormat *format, const gchar *key, gint value, GError **err); 43 gboolean gst_amc_format_get_string (GstAmcFormat *format, const gchar *key, gchar **value, GError **err); 44 gboolean gst_amc_format_set_string (GstAmcFormat *format, const gchar *key, const gchar *value, GError **err); 45 gboolean gst_amc_format_get_buffer (GstAmcFormat *format, const gchar *key, guint8 **data, gsize *size, GError **err); 46 gboolean gst_amc_format_set_buffer (GstAmcFormat *format, const gchar *key, guint8 *data, gsize size, GError **err); 47 48 G_END_DECLS 49 50 #endif /* __GST_AMC_FORMAT_H__ */ 51