| 1 | /* GStreamer base utils library source/sink/codec description support |
| 2 | * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net> |
| 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., 51 Franklin St, Fifth Floor, |
| 17 | * Boston, MA 02110-1301, USA. |
| 18 | */ |
| 19 | |
| 20 | #ifndef __GST_PB_UTILS_DESCRIPTIONS_H__ |
| 21 | #define __GST_PB_UTILS_DESCRIPTIONS_H__ |
| 22 | |
| 23 | #include <gst/gsttaglist.h> |
| 24 | #include <gst/gstcaps.h> |
| 25 | #include <gst/pbutils/pbutils-prelude.h> |
| 26 | |
| 27 | G_BEGIN_DECLS |
| 28 | |
| 29 | /** |
| 30 | * GstPbUtilsCapsDescriptionFlags: |
| 31 | * @GST_PBUTILS_CAPS_DESCRIPTION_FLAG_CONTAINER: Caps describe a container format. |
| 32 | * @GST_PBUTILS_CAPS_DESCRIPTION_FLAG_AUDIO: Caps describe an audio format, or a |
| 33 | * container format that can store audio. |
| 34 | * @GST_PBUTILS_CAPS_DESCRIPTION_FLAG_VIDEO: Caps describe an video format, or a |
| 35 | * container format that can store video. |
| 36 | * @GST_PBUTILS_CAPS_DESCRIPTION_FLAG_IMAGE: Caps describe an image format, or a |
| 37 | * container format that can store image. |
| 38 | * @GST_PBUTILS_CAPS_DESCRIPTION_FLAG_SUBTITLE: Caps describe an subtitle format, or a |
| 39 | * container format that can store subtitles. |
| 40 | * @GST_PBUTILS_CAPS_DESCRIPTION_FLAG_TAG: Container format is a tags container. |
| 41 | * @GST_PBUTILS_CAPS_DESCRIPTION_FLAG_GENERIC: Container format can store any kind of |
| 42 | * stream type. |
| 43 | * |
| 44 | * Flags that are returned by gst_pb_utils_get_caps_description_flags() and |
| 45 | * describe the format of the caps. |
| 46 | * |
| 47 | * Since: 1.20 |
| 48 | */ |
| 49 | typedef enum { |
| 50 | GST_PBUTILS_CAPS_DESCRIPTION_FLAG_CONTAINER = 1 << 0, |
| 51 | GST_PBUTILS_CAPS_DESCRIPTION_FLAG_AUDIO = 1 << 1, |
| 52 | GST_PBUTILS_CAPS_DESCRIPTION_FLAG_VIDEO = 1 << 2, |
| 53 | GST_PBUTILS_CAPS_DESCRIPTION_FLAG_IMAGE = 1 << 3, |
| 54 | GST_PBUTILS_CAPS_DESCRIPTION_FLAG_SUBTITLE = 1 << 4, |
| 55 | GST_PBUTILS_CAPS_DESCRIPTION_FLAG_TAG = 1 << 5, |
| 56 | GST_PBUTILS_CAPS_DESCRIPTION_FLAG_GENERIC = 1 << 6, |
| 57 | } GstPbUtilsCapsDescriptionFlags; |
| 58 | |
| 59 | /* |
| 60 | * functions for use by demuxers or decoders to add CODEC tags to tag lists |
| 61 | * from caps |
| 62 | */ |
| 63 | |
| 64 | GST_PBUTILS_API |
| 65 | gboolean gst_pb_utils_add_codec_description_to_tag_list (GstTagList * taglist, |
| 66 | const gchar * codec_tag, |
| 67 | const GstCaps * caps); |
| 68 | |
| 69 | GST_PBUTILS_API |
| 70 | gchar * gst_pb_utils_get_codec_description (const GstCaps * caps); |
| 71 | |
| 72 | /* |
| 73 | * functions mainly used by the missing plugins message creation functions to |
| 74 | * find descriptions of what exactly is missing |
| 75 | */ |
| 76 | |
| 77 | GST_PBUTILS_API |
| 78 | gchar * gst_pb_utils_get_source_description (const gchar * protocol); |
| 79 | |
| 80 | GST_PBUTILS_API |
| 81 | gchar * gst_pb_utils_get_sink_description (const gchar * protocol); |
| 82 | |
| 83 | GST_PBUTILS_API |
| 84 | gchar * gst_pb_utils_get_decoder_description (const GstCaps * caps); |
| 85 | |
| 86 | GST_PBUTILS_API |
| 87 | gchar * gst_pb_utils_get_encoder_description (const GstCaps * caps); |
| 88 | |
| 89 | GST_PBUTILS_API |
| 90 | gchar * gst_pb_utils_get_element_description (const gchar * factory_name); |
| 91 | |
| 92 | GST_PBUTILS_API |
| 93 | GstPbUtilsCapsDescriptionFlags gst_pb_utils_get_caps_description_flags (const GstCaps * caps); |
| 94 | |
| 95 | GST_PBUTILS_API |
| 96 | gchar * gst_pb_utils_get_file_extension_from_caps (const GstCaps *caps); |
| 97 | |
| 98 | G_END_DECLS |
| 99 | |
| 100 | #endif /* __GST_PB_UTILS_DESCRIPTIONS_H__ */ |
| 101 | |
| 102 | |