本文整理匯總了C++中GST_STATIC_CAPS函數的典型用法代碼示例。如果您正苦於以下問題:C++ GST_STATIC_CAPS函數的具體用法?C++ GST_STATIC_CAPS怎麽用?C++ GST_STATIC_CAPS使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GST_STATIC_CAPS函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: GST_DEBUG_CATEGORY
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstmusepackdec.h"
#include "gstmusepackreader.h"
GST_DEBUG_CATEGORY (musepackdec_debug);
#define GST_CAT_DEFAULT musepackdec_debug
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
#ifdef MPC_IS_OLD_API
GST_STATIC_CAPS ("audio/x-musepack, streamversion = (int) 7")
#else
GST_STATIC_CAPS ("audio/x-musepack, streamversion = (int) { 7, 8 }")
#endif
);
#ifdef MPC_FIXED_POINT
#define BASE_CAPS \
"audio/x-raw-int, " \
"signed = (bool) TRUE, " \
"width = (int) 32, " \
"depth = (int) 32"
#else
#define BASE_CAPS \
"audio/x-raw-float, " \
"width = (int) 32"
示例2: CHANNEL_MAPS_SIZE
uniaudio_channel_map_5_1_surround,
uniaudio_channel_map_6_1_surround,
uniaudio_channel_map_7_1_surround
};
#define CHANNEL_MAPS_SIZE (sizeof(uniaudio_channel_maps) / sizeof(gint32 *))
static GstStaticPadTemplate static_src_template = GST_STATIC_PAD_TEMPLATE(
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS(
"audio/x-raw, "
"format = (string) { S32LE, S24LE, S16LE, S8 }, "
"rate = [ 1, MAX ], "
"channels = (int) [ 1, 8 ], "
"layout = (string) interleaved "
)
);
G_DEFINE_TYPE(GstImxAudioUniaudioDec, gst_imx_audio_uniaudio_dec, GST_TYPE_AUDIO_DECODER);
static void gst_imx_audio_uniaudio_dec_finalize(GObject *object);
static gboolean gst_imx_audio_uniaudio_dec_start(GstAudioDecoder *dec);
static gboolean gst_imx_audio_uniaudio_dec_stop(GstAudioDecoder *dec);
static gboolean gst_imx_audio_uniaudio_dec_set_format(GstAudioDecoder *dec, GstCaps *caps);
static GstFlowReturn gst_imx_audio_uniaudio_dec_handle_frame(GstAudioDecoder *dec, GstBuffer *buffer);
示例3: GST_DEBUG_CATEGORY_STATIC
#include "gstdshowvideosrc.h"
#include <gst/video/video.h>
GST_DEBUG_CATEGORY_STATIC (dshowvideosrc_debug);
#define GST_CAT_DEFAULT dshowvideosrc_debug
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_BGR ";"
GST_VIDEO_CAPS_YUV ("{ I420 }") ";"
GST_VIDEO_CAPS_YUV ("{ YUY2 }") ";"
"video/x-dv,"
"systemstream = (boolean) FALSE,"
"width = (int) [ 1, MAX ],"
"height = (int) [ 1, MAX ],"
"framerate = (fraction) [ 0, MAX ],"
"format = (fourcc) dvsd;" "video/x-dv," "systemstream = (boolean) TRUE")
);
static void gst_dshowvideosrc_init_interfaces (GType type);
GST_BOILERPLATE_FULL (GstDshowVideoSrc, gst_dshowvideosrc, GstPushSrc,
GST_TYPE_PUSH_SRC, gst_dshowvideosrc_init_interfaces);
enum
{
PROP_0,
PROP_DEVICE,
示例4: GST_STATIC_PAD_TEMPLATE
PROP_OVERLAY_WIDTH,
PROP_OVERLAY_HEIGHT,
PROP_ALPHA
};
#define VIDEO_FORMATS "{ RGBx, RGB, BGR, BGRx, xRGB, xBGR, " \
"RGBA, BGRA, ARGB, ABGR, I420, YV12, AYUV, YUY2, UYVY, " \
"v308, v210, v216, Y41B, Y42B, Y444, YVYU, NV12, NV21, UYVP, " \
"RGB16, BGR16, RGB15, BGR15, UYVP, A420, YUV9, YVU9, " \
"IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, " \
"GRAY8, GRAY16_BE, GRAY16_LE }"
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (VIDEO_FORMATS))
);
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (VIDEO_FORMATS))
);
G_DEFINE_TYPE (GstGdkPixbufOverlay, gst_gdk_pixbuf_overlay,
GST_TYPE_VIDEO_FILTER);
static void
gst_gdk_pixbuf_overlay_class_init (GstGdkPixbufOverlayClass * klass)
{
GstVideoFilterClass *videofilter_class = GST_VIDEO_FILTER_CLASS (klass);
示例5: GST_STATIC_CAPS
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstpnmdec.h"
#include "gstpnmenc.h"
#include "gstpnmutils.h"
#include <gst/gstplugin.h>
#include <gst/gstversion.h>
#include <gst/gsttypefind.h>
#include <string.h>
static GstStaticCaps bitmap_caps = GST_STATIC_CAPS (MIME_BM);
static GstStaticCaps graymap_caps = GST_STATIC_CAPS (MIME_GM);
static GstStaticCaps pixmap_caps = GST_STATIC_CAPS (MIME_PM);
#define BITMAP_CAPS (gst_static_caps_get (&bitmap_caps))
#define GRAYMAP_CAPS (gst_static_caps_get (&graymap_caps))
#define PIXMAP_CAPS (gst_static_caps_get (&pixmap_caps))
static void
gst_my_typefind_function (GstTypeFind * tf, gpointer d)
{
GstPnmInfoMngrResult r = GST_PNM_INFO_MNGR_RESULT_READING;
GstPnmInfoMngr mngr = { 0, };
guint i;
guint8 *data = NULL;
示例6: GST_STATIC_PAD_TEMPLATE
ARG_MUTE,
ARG_HOST
};
#define DEFAULT_MUTE FALSE
#define DEFAULT_HOST NULL
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) TRUE, "
"width = (int) 16, "
"depth = (int) 16, "
"rate = (int) [ 1000, 96000 ], "
"channels = (int) [ 1, 2 ]; "
"audio/x-raw-int, "
"signed = (boolean) FALSE, "
"width = (int) 8, "
"depth = (int) 8, "
"rate = (int) [ 1000, 96000 ], " "channels = (int) [ 1, 2 ]")
);
static void gst_nas_sink_finalize (GObject * object);
static gboolean gst_nas_sink_open (GstAudioSink * sink);
static gboolean gst_nas_sink_close (GstAudioSink * sink);
static gboolean gst_nas_sink_prepare (GstAudioSink * sink,
GstRingBufferSpec * spec);
static gboolean gst_nas_sink_unprepare (GstAudioSink * sink);
static guint gst_nas_sink_write (GstAudioSink * asink, gpointer data,
示例7: GST_STATIC_PAD_TEMPLATE
PROP_COLOR_R,
PROP_COLOR_G,
PROP_COLOR_B,
PROP_TEXT,
PROP_HEIGHT,
PROP_WIDTH
};
/* the capabilities of the inputs and outputs.
*
* describe the real formats here.
*/
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("RGB"))
);
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("RGB"))
);
G_DEFINE_TYPE (GstOpencvTextOverlay, gst_opencv_text_overlay,
GST_TYPE_OPENCV_VIDEO_FILTER);
static void gst_opencv_text_overlay_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_opencv_text_overlay_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
示例8: GST_STATIC_CAPS
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
"width = (int) 8, "
"depth = (int) [ 1, 8 ], "
"signed = (boolean) true, "
"endianness = (int) BIG_ENDIAN, "
"channels = (int) [ 1, MAX ], "
"rate = (int) [ 1, MAX ];"
"audio/x-raw-int, "
"width = (int) 16, "
"depth = (int) [ 9, 16 ], "
"signed = (boolean) true, "
"endianness = (int) BIG_ENDIAN, "
"channels = (int) [ 1, MAX ], "
"rate = (int) [ 1, MAX ];"
"audio/x-raw-int, "
"width = (int) 24, "
"depth = (int) [ 17, 24 ], "
"signed = (boolean) true, "
"endianness = (int) BIG_ENDIAN, "
"channels = (int) [ 1, MAX ], "
"rate = (int) [ 1, MAX ];"
"audio/x-raw-int, "
"width = (int) 32, "
"depth = (int) [ 25, 32 ], "
"signed = (boolean) true, "
"endianness = (int) BIG_ENDIAN, "
"channels = (int) [ 1, MAX ], " "rate = (int) [ 1, MAX ]")
);
示例9: GST_VIDEO_CAPS_MAKE_WITH_FEATURES
/* *INDENT-OFF* */
static const char gst_vaapi_decode_bin_src_caps_str[] =
GST_VAAPI_DECODE_BIN_SURFACE_CAPS ", "
GST_CAPS_INTERLACED_FALSE "; "
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (
GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "{ RGBA, BGRA }") ", "
GST_CAPS_INTERLACED_FALSE "; "
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ", "
GST_CAPS_INTERLACED_FALSE;
/* *INDENT-ON* */
static GstStaticPadTemplate gst_vaapi_decode_bin_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (gst_vaapi_decode_bin_sink_caps_str));
static GstStaticPadTemplate gst_vaapi_decode_bin_src_factory =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (gst_vaapi_decode_bin_src_caps_str));
G_DEFINE_TYPE (GstVaapiDecodeBin, gst_vaapi_decode_bin, GST_TYPE_BIN);
static void
post_missing_element_message (GstVaapiDecodeBin * vaapidecbin,
const gchar * missing_factory)
{
GstMessage *msg;
示例10: GST_STATIC_PAD_TEMPLATE
/* For ease of programming we use globals to keep refs for our floating src and
* sink pads we create; otherwise we always have to do get_pad, get_peer, and
* then remove references in every test function */
static GstPad *mysrcpad, *mysinkpad;
#define RG_VOLUME_CAPS_TEMPLATE_STRING \
"audio/x-raw-float, " \
"width = (int) 32, " \
"endianness = (int) BYTE_ORDER, " \
"channels = (int) [ 1, MAX ], " \
"rate = (int) [ 1, MAX ]"
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (RG_VOLUME_CAPS_TEMPLATE_STRING)
);
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (RG_VOLUME_CAPS_TEMPLATE_STRING)
);
/* gstcheck sets up a chain function that appends buffers to a global list.
* This is our equivalent of that for event handling. */
static gboolean
event_func (GstPad * pad, GstEvent * event)
{
events = g_list_append (events, event);
return TRUE;
示例11: fail_if
fail_if (gst_bus_poll (GST_ELEMENT_BUS (pipe), GST_MESSAGE_ERROR, 0) != NULL);
gst_element_set_state (pipe, GST_STATE_NULL);
gst_object_unref (pipe);
}
GST_END_TEST;
/* Fake mp3 parser for test */
typedef GstBaseParse TestMpegAudioParse;
typedef GstBaseParseClass TestMpegAudioParseClass;
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/mpeg, mpegversion=1, layer=[1,3], parsed=(b)true")
);
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/mpeg, mpegversion=1")
);
static GType test_mpeg_audio_parse_get_type (void);
static gboolean test_mpeg_audio_parse_start (GstBaseParse * parse);
static gboolean test_mpeg_audio_parse_stop (GstBaseParse * parse);
static GstFlowReturn test_mpeg_audio_parse_handle_frame (GstBaseParse * parse,
GstBaseParseFrame * frame, gint * skipsize);
G_DEFINE_TYPE (TestMpegAudioParse, test_mpeg_audio_parse, GST_TYPE_BASE_PARSE);
示例12: GST_STATIC_PAD_TEMPLATE
ARG_PAT_INTERVAL,
ARG_PMT_INTERVAL
};
static GstStaticPadTemplate mpegtsmux_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink_%d",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS ("video/mpeg, "
"mpegversion = (int) { 1, 2, 4 }, "
"systemstream = (boolean) false; "
"video/x-dirac;"
"video/x-h264,stream-format=(string)byte-stream;"
"audio/mpeg, "
"mpegversion = (int) { 1, 2 };"
"audio/mpeg, "
"mpegversion = (int) 4, stream-format = (string) { raw, adts };"
"audio/x-lpcm, "
"width = (int) { 16, 20, 24 }, "
"rate = (int) { 48000, 96000 }, "
"channels = (int) [ 1, 8 ], "
"dynamic_range = (int) [ 0, 255 ], "
"emphasis = (boolean) { FALSE, TRUE }, "
"mute = (boolean) { FALSE, TRUE }; " "audio/x-ac3;" "audio/x-dts"));
static GstStaticPadTemplate mpegtsmux_src_factory =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/mpegts, "
"systemstream = (boolean) true, " "packetsize = (int) { 188, 192} ")
);
示例13: GST_DEBUG_CATEGORY_EXTERN
#include "gstvcdparse.h"
GST_DEBUG_CATEGORY_EXTERN (vcdparse_debug);
#define GST_CAT_DEFAULT vcdparse_debug
static gboolean gst_vcd_parse_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_vcd_parse_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_vcd_parse_src_query (GstPad * pad, GstQuery * query);
static GstFlowReturn gst_vcd_parse_chain (GstPad * pad, GstBuffer * buf);
static GstStateChangeReturn gst_vcd_parse_change_state (GstElement * element,
GstStateChange transition);
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-vcd")
);
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/mpeg, systemstream = (boolean) TRUE")
);
GST_BOILERPLATE (GstVcdParse, gst_vcd_parse, GstElement, GST_TYPE_ELEMENT);
static void
gst_vcd_parse_base_init (gpointer klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
示例14: GST_DEBUG_CATEGORY_STATIC
#include <gst/base/gstadapter.h>
#include <gst/base/gstbitreader.h>
#include <string.h>
#include "gsth264frame.h"
#include "gstvdph264dec.h"
GST_DEBUG_CATEGORY_STATIC (gst_vdp_h264_dec_debug);
#define GST_CAT_DEFAULT gst_vdp_h264_dec_debug
static GstStaticPadTemplate sink_template =
GST_STATIC_PAD_TEMPLATE (GST_BASE_VIDEO_DECODER_SINK_NAME,
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-h264, " "interlaced = (boolean) false")
);
#define DEBUG_INIT(bla) \
GST_DEBUG_CATEGORY_INIT (gst_vdp_h264_dec_debug, "vdpauh264dec", 0, \
"VDPAU h264 decoder");
GST_BOILERPLATE_FULL (GstVdpH264Dec, gst_vdp_h264_dec, GstVdpDecoder,
GST_TYPE_VDP_DECODER, DEBUG_INIT);
#define SYNC_CODE_SIZE 3
#define READ_UINT8(reader, val, nbits) { \
if (!gst_bit_reader_get_bits_uint8 (reader, &val, nbits)) { \
GST_WARNING ("failed to read uint8, nbits: %d", nbits); \
return FALSE; \
示例15: GST_STATIC_PAD_TEMPLATE
GstBin parent;
GstElement *inner_parser;
};
struct _GstUnalignedAudioParseClass
{
GstBinClass parent_class;
};
static GstStaticPadTemplate static_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_UNALIGNED_RAW_AUDIO_CAPS)
);
static GstStaticPadTemplate static_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_AUDIO_CAPS_MAKE (GST_AUDIO_FORMATS_ALL)
", layout = (string) { interleaved, non-interleaved }")
);
G_DEFINE_TYPE (GstUnalignedAudioParse, gst_unaligned_audio_parse, GST_TYPE_BIN);