本文整理汇总了C++中GST_DEBUG_FUNCPTR函数的典型用法代码示例。如果您正苦于以下问题:C++ GST_DEBUG_FUNCPTR函数的具体用法?C++ GST_DEBUG_FUNCPTR怎么用?C++ GST_DEBUG_FUNCPTR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GST_DEBUG_FUNCPTR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gst_opus_enc_class_init
static void
gst_opus_enc_class_init (GstOpusEncClass * klass)
{
GObjectClass *gobject_class;
GstAudioEncoderClass *base_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
base_class = (GstAudioEncoderClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->set_property = gst_opus_enc_set_property;
gobject_class->get_property = gst_opus_enc_get_property;
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&src_factory));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sink_factory));
gst_element_class_set_static_metadata (gstelement_class, "Opus audio encoder",
"Codec/Encoder/Audio",
"Encodes audio in Opus format",
"Vincent Penquerc'h <[email protected]>");
base_class->start = GST_DEBUG_FUNCPTR (gst_opus_enc_start);
base_class->stop = GST_DEBUG_FUNCPTR (gst_opus_enc_stop);
base_class->set_format = GST_DEBUG_FUNCPTR (gst_opus_enc_set_format);
base_class->handle_frame = GST_DEBUG_FUNCPTR (gst_opus_enc_handle_frame);
base_class->sink_event = GST_DEBUG_FUNCPTR (gst_opus_enc_sink_event);
base_class->getcaps = GST_DEBUG_FUNCPTR (gst_opus_enc_sink_getcaps);
g_object_class_install_property (gobject_class, PROP_AUDIO,
g_param_spec_boolean ("audio", "Audio or voice",
"Audio or voice", DEFAULT_AUDIO,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BITRATE,
g_param_spec_int ("bitrate", "Encoding Bit-rate",
"Specify an encoding bit-rate (in bps).",
LOWEST_BITRATE, HIGHEST_BITRATE, DEFAULT_BITRATE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (gobject_class, PROP_BANDWIDTH,
g_param_spec_enum ("bandwidth", "Band Width", "Audio Band Width",
GST_OPUS_ENC_TYPE_BANDWIDTH, DEFAULT_BANDWIDTH,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (gobject_class, PROP_FRAME_SIZE,
g_param_spec_enum ("frame-size", "Frame Size",
"The duration of an audio frame, in ms", GST_OPUS_ENC_TYPE_FRAME_SIZE,
DEFAULT_FRAMESIZE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (gobject_class, PROP_CBR,
g_param_spec_boolean ("cbr", "Constant bit rate", "Constant bit rate",
DEFAULT_CBR,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (gobject_class, PROP_CONSTRAINED_VBR,
g_param_spec_boolean ("constrained-vbr", "Constrained VBR",
"Constrained VBR", DEFAULT_CONSTRAINED_VBR,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (gobject_class, PROP_COMPLEXITY,
g_param_spec_int ("complexity", "Complexity", "Complexity", 0, 10,
DEFAULT_COMPLEXITY,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (gobject_class, PROP_INBAND_FEC,
g_param_spec_boolean ("inband-fec", "In-band FEC",
"Enable forward error correction", DEFAULT_INBAND_FEC,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (gobject_class, PROP_DTX,
g_param_spec_boolean ("dtx", "DTX", "DTX", DEFAULT_DTX,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_PACKET_LOSS_PERCENT, g_param_spec_int ("packet-loss-percentage",
"Loss percentage", "Packet loss percentage", 0, 100,
DEFAULT_PACKET_LOSS_PERCENT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_MAX_PAYLOAD_SIZE, g_param_spec_uint ("max-payload-size",
"Max payload size", "Maximum payload size in bytes", 2, 4000,
DEFAULT_MAX_PAYLOAD_SIZE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_opus_enc_finalize);
GST_DEBUG_CATEGORY_INIT (opusenc_debug, "opusenc", 0, "Opus encoder");
}
示例2: gst_euresys_class_init
static void
gst_euresys_class_init (GstEuresysClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
GstBaseSrcClass *gstbasesrc_class = GST_BASE_SRC_CLASS (klass);
GstPushSrcClass *gstpushsrc_class = GST_PUSH_SRC_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "euresyssrc", 0,
"Euresys MultiCam source");
gobject_class->set_property = gst_euresys_set_property;
gobject_class->get_property = gst_euresys_get_property;
gobject_class->dispose = gst_euresys_dispose;
/* Install GObject properties */
g_object_class_install_property (gobject_class, PROP_BOARD_INDEX,
g_param_spec_int ("board", "Board", "Index of board connected to camera",
0, 15, DEFAULT_PROP_BOARD_INDEX,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE |
GST_PARAM_MUTABLE_READY));
g_object_class_install_property (gobject_class, PROP_CAMERA_TYPE,
g_param_spec_enum ("camera", "Camera", "Camera type",
GST_TYPE_EURESYS_CAMERA, DEFAULT_PROP_CAMERA_TYPE,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE |
GST_PARAM_MUTABLE_READY));
g_object_class_install_property (gobject_class, PROP_CONNECTOR,
g_param_spec_enum ("connector", "Connector",
"Connector where camera is attached", GST_TYPE_EURESYS_CONNECTOR,
DEFAULT_PROP_CONNECTOR,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE |
GST_PARAM_MUTABLE_READY));
g_object_class_install_property (gobject_class, PROP_COLOR_FORMAT,
g_param_spec_enum ("color-format", "Color format",
"Color format of the camera", GST_TYPE_EURESYS_COLOR_FORMAT,
DEFAULT_PROP_COLOR_FORMAT,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE |
GST_PARAM_MUTABLE_READY));
g_object_class_install_property (gobject_class, PROP_PIXEL_TIMING,
g_param_spec_enum ("pixel-timing", "Pixel timing",
"Pixel timing that produces square or broadcast timing",
GST_TYPE_EURESYS_PIXEL_TIMING, DEFAULT_PROP_PIXEL_TIMING,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE |
GST_PARAM_MUTABLE_READY));
g_object_class_install_property (gobject_class, PROP_NUM_CAPTURE_BUFFERS,
g_param_spec_int ("num-capture-buffers", "Number of capture buffers",
"Number of capture buffers", 2, 4095,
DEFAULT_PROP_NUM_CAPTURE_BUFFERS,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_euresys_src_template));
gst_element_class_set_static_metadata (gstelement_class,
"Euresys MultiCam Video Source", "Source/Video",
"Euresys MultiCam framegrabber video source",
"Joshua M. Doe <[email protected]>");
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_euresys_start);
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_euresys_stop);
gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_euresys_get_caps);
gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_euresys_set_caps);
gstpushsrc_class->fill = GST_DEBUG_FUNCPTR (gst_euresys_fill);
}
示例3: gst_curl_smtp_sink_class_init
static void
gst_curl_smtp_sink_class_init (GstCurlSmtpSinkClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstBaseSinkClass *gstbasesink_class = (GstBaseSinkClass *) klass;
GstCurlBaseSinkClass *gstcurlbasesink_class = (GstCurlBaseSinkClass *) klass;
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (gst_curl_smtp_sink_debug, "curlsmtpsink", 0,
"curl smtp sink element");
GST_DEBUG_OBJECT (klass, "class_init");
gst_element_class_set_static_metadata (element_class,
"Curl smtp sink",
"Sink/Network",
"Upload data over SMTP protocol using libcurl",
"Patricia Muscalu <[email protected]>");
gstcurlbasesink_class->set_protocol_dynamic_options_unlocked =
gst_curl_smtp_sink_set_payload_headers_unlocked;
gstcurlbasesink_class->set_options_unlocked =
gst_curl_smtp_sink_set_transfer_options_unlocked;
gstcurlbasesink_class->set_mime_type = gst_curl_smtp_sink_set_mime_type;
gstcurlbasesink_class->prepare_transfer = gst_curl_smtp_sink_prepare_transfer;
gstcurlbasesink_class->transfer_data_buffer =
gst_curl_smtp_sink_transfer_data_buffer;
gstcurlbasesink_class->flush_data_unlocked =
gst_curl_smtp_sink_flush_data_unlocked;
gstcurlbasesink_class->has_buffered_data_unlocked =
gst_curl_smtp_sink_has_buffered_data_unlocked;
gstbasesink_class->event = gst_curl_smtp_sink_event;
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_curl_smtp_sink_finalize);
gobject_class->set_property = gst_curl_smtp_sink_set_property;
gobject_class->get_property = gst_curl_smtp_sink_get_property;
g_object_class_install_property (gobject_class, PROP_MAIL_RCPT,
g_param_spec_string ("mail-rcpt", "Mail recipient",
"Single address that the given mail should get sent to", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_MAIL_FROM,
g_param_spec_string ("mail-from", "Mail sender",
"Single address that the given mail should get sent from", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CONTENT_TYPE,
g_param_spec_string ("content-type", "Content type",
"The mime type of the body of the request", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SUBJECT,
g_param_spec_string ("subject", "UTF-8 encoded mail subject",
"Mail subject", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_MESSAGE_BODY,
g_param_spec_string ("message-body", "UTF-8 encoded message body",
"Message body", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_USE_SSL,
g_param_spec_boolean ("use-ssl", "Use SSL",
"Use SSL/TLS for the connection", DEFAULT_USE_SSL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_NBR_ATTACHMENTS,
g_param_spec_int ("nbr-attachments", "Number attachments",
"Number attachments to send", G_MININT, G_MAXINT,
DEFAULT_NBR_ATTACHMENTS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_POP_USER_NAME,
g_param_spec_string ("pop-user", "User name",
"User name to use for POP server authentication", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_POP_USER_PASSWD,
g_param_spec_string ("pop-passwd", "User password",
"User password to use for POP server authentication", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_POP_LOCATION,
g_param_spec_string ("pop-location", "POP location",
"URL POP used for authentication", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
示例4: gst_shape_wipe_init
static void
gst_shape_wipe_init (GstShapeWipe * self, GstShapeWipeClass * g_class)
{
self->video_sinkpad =
gst_pad_new_from_static_template (&video_sink_pad_template, "video_sink");
gst_pad_set_chain_function (self->video_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_video_sink_chain));
gst_pad_set_event_function (self->video_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_video_sink_event));
gst_pad_set_setcaps_function (self->video_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_video_sink_setcaps));
gst_pad_set_getcaps_function (self->video_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_video_sink_getcaps));
gst_pad_set_bufferalloc_function (self->video_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_video_sink_bufferalloc));
gst_pad_set_query_function (self->video_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_video_sink_query));
gst_element_add_pad (GST_ELEMENT (self), self->video_sinkpad);
self->mask_sinkpad =
gst_pad_new_from_static_template (&mask_sink_pad_template, "mask_sink");
gst_pad_set_chain_function (self->mask_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_mask_sink_chain));
gst_pad_set_event_function (self->mask_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_mask_sink_event));
gst_pad_set_setcaps_function (self->mask_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_mask_sink_setcaps));
gst_pad_set_getcaps_function (self->mask_sinkpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_mask_sink_getcaps));
gst_element_add_pad (GST_ELEMENT (self), self->mask_sinkpad);
self->srcpad = gst_pad_new_from_static_template (&src_pad_template, "src");
gst_pad_set_event_function (self->srcpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_src_event));
gst_pad_set_getcaps_function (self->srcpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_src_getcaps));
gst_pad_set_query_function (self->srcpad,
GST_DEBUG_FUNCPTR (gst_shape_wipe_src_query));
gst_element_add_pad (GST_ELEMENT (self), self->srcpad);
self->mask_mutex = g_mutex_new ();
self->mask_cond = g_cond_new ();
gst_shape_wipe_reset (self);
}
示例5: gst_jack_audio_sink_class_init
static void
gst_jack_audio_sink_class_init (GstJackAudioSinkClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSinkClass *gstbasesink_class;
GstAudioBaseSinkClass *gstaudiobasesink_class;
GST_DEBUG_CATEGORY_INIT (gst_jack_audio_sink_debug, "jacksink", 0,
"jacksink element");
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesink_class = (GstBaseSinkClass *) klass;
gstaudiobasesink_class = (GstAudioBaseSinkClass *) klass;
gobject_class->dispose = gst_jack_audio_sink_dispose;
gobject_class->get_property = gst_jack_audio_sink_get_property;
gobject_class->set_property = gst_jack_audio_sink_set_property;
g_object_class_install_property (gobject_class, PROP_CONNECT,
g_param_spec_enum ("connect", "Connect",
"Specify how the output ports will be connected",
GST_TYPE_JACK_CONNECT, DEFAULT_PROP_CONNECT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SERVER,
g_param_spec_string ("server", "Server",
"The Jack server to connect to (NULL = default)",
DEFAULT_PROP_SERVER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstJackAudioSink:client-name
*
* The client name to use.
*
* Since: 0.10.31
*/
g_object_class_install_property (gobject_class, PROP_CLIENT_NAME,
g_param_spec_string ("client-name", "Client name",
"The client name of the Jack instance (NULL = default)",
DEFAULT_PROP_CLIENT_NAME,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CLIENT,
g_param_spec_boxed ("client", "JackClient", "Handle for jack client",
GST_TYPE_JACK_CLIENT,
GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
/**
* GstJackAudioSink:transport
*
* The jack transport behaviour for the client.
*
* Since: 0.10.31
*/
g_object_class_install_property (gobject_class, PROP_TRANSPORT,
g_param_spec_flags ("transport", "Transport mode",
"Jack transport behaviour of the client",
GST_TYPE_JACK_TRANSPORT, DEFAULT_PROP_TRANSPORT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_static_metadata (gstelement_class, "Audio Sink (Jack)",
"Sink/Audio", "Output audio to a JACK server",
"Wim Taymans <[email protected]>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&jackaudiosink_sink_factory));
gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_jack_audio_sink_getcaps);
gstaudiobasesink_class->create_ringbuffer =
GST_DEBUG_FUNCPTR (gst_jack_audio_sink_create_ringbuffer);
/* ref class from a thread-safe context to work around missing bit of
* thread-safety in GObject */
g_type_class_ref (GST_TYPE_JACK_RING_BUFFER);
gst_jack_audio_client_init ();
}
示例6: gst_opencv_text_overlay_class_init
/* initialize the opencvtextoverlay's class */
static void
gst_opencv_text_overlay_class_init (GstOpencvTextOverlayClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gobject_class = (GObjectClass *) klass;
gobject_class->finalize =
GST_DEBUG_FUNCPTR (gst_opencv_text_overlay_finalize);
gobject_class->set_property = gst_opencv_text_overlay_set_property;
gobject_class->get_property = gst_opencv_text_overlay_get_property;
g_object_class_install_property (gobject_class, PROP_TEXT,
g_param_spec_string ("text", "text",
"Text to be display.", DEFAULT_PROP_TEXT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_XPOS,
g_param_spec_int ("xpos", "horizontal position",
"Sets the Horizontal position", 0, G_MAXINT,
DEFAULT_PROP_XPOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_YPOS,
g_param_spec_int ("ypos", "vertical position",
"Sets the Vertical position", 0, G_MAXINT,
DEFAULT_PROP_YPOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_THICKNESS,
g_param_spec_int ("thickness", "font thickness",
"Sets the Thickness of Font", 0, G_MAXINT,
DEFAULT_PROP_THICKNESS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_COLOR_R,
g_param_spec_int ("colorR", "color -Red ",
"Sets the color -R", 0, 255,
DEFAULT_PROP_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_COLOR_G,
g_param_spec_int ("colorG", "color -Green",
"Sets the color -G", 0, 255,
DEFAULT_PROP_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_COLOR_B,
g_param_spec_int ("colorB", "color -Blue",
"Sets the color -B", 0, 255,
DEFAULT_PROP_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_HEIGHT,
g_param_spec_double ("height", "Height",
"Sets the height of fonts", 1.0, 5.0,
DEFAULT_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_WIDTH,
g_param_spec_double ("width", "Width",
"Sets the width of fonts", 1.0, 5.0,
DEFAULT_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_static_metadata (element_class,
"opencvtextoverlay",
"Filter/Effect/Video",
"Write text on the top of video", "sreerenj<[email protected]>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_factory));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_factory));
}
示例7: gst_audio_test_src_class_init
static void
gst_audio_test_src_class_init (GstAudioTestSrcClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSrcClass *gstbasesrc_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesrc_class = (GstBaseSrcClass *) klass;
gobject_class->set_property = gst_audio_test_src_set_property;
gobject_class->get_property = gst_audio_test_src_get_property;
gobject_class->finalize = gst_audio_test_src_finalize;
g_object_class_install_property (gobject_class, PROP_SAMPLES_PER_BUFFER,
g_param_spec_int ("samplesperbuffer", "Samples per buffer",
"Number of samples in each outgoing buffer",
1, G_MAXINT, DEFAULT_SAMPLES_PER_BUFFER,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_WAVE,
g_param_spec_enum ("wave", "Waveform", "Oscillator waveform",
GST_TYPE_AUDIO_TEST_SRC_WAVE, GST_AUDIO_TEST_SRC_WAVE_SINE,
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_FREQ,
g_param_spec_double ("freq", "Frequency", "Frequency of test signal",
0.0, 20000.0, DEFAULT_FREQ,
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_VOLUME,
g_param_spec_double ("volume", "Volume", "Volume of test signal", 0.0,
1.0, DEFAULT_VOLUME,
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_IS_LIVE,
g_param_spec_boolean ("is-live", "Is Live",
"Whether to act as a live source", DEFAULT_IS_LIVE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_TIMESTAMP_OFFSET, g_param_spec_int64 ("timestamp-offset",
"Timestamp offset",
"An offset added to timestamps set on buffers (in ns)", G_MININT64,
G_MAXINT64, DEFAULT_TIMESTAMP_OFFSET,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CAN_ACTIVATE_PUSH,
g_param_spec_boolean ("can-activate-push", "Can activate push",
"Can activate in push mode", DEFAULT_CAN_ACTIVATE_PUSH,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CAN_ACTIVATE_PULL,
g_param_spec_boolean ("can-activate-pull", "Can activate pull",
"Can activate in pull mode", DEFAULT_CAN_ACTIVATE_PULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_audio_test_src_src_template));
gst_element_class_set_static_metadata (gstelement_class,
"Audio test source", "Source/Audio",
"Creates audio test signals of given frequency and volume",
"Stefan Kost <[email protected]>");
gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_audio_test_src_setcaps);
gstbasesrc_class->fixate = GST_DEBUG_FUNCPTR (gst_audio_test_src_fixate);
gstbasesrc_class->is_seekable =
GST_DEBUG_FUNCPTR (gst_audio_test_src_is_seekable);
gstbasesrc_class->do_seek = GST_DEBUG_FUNCPTR (gst_audio_test_src_do_seek);
gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_audio_test_src_query);
gstbasesrc_class->get_times =
GST_DEBUG_FUNCPTR (gst_audio_test_src_get_times);
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_audio_test_src_start);
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_audio_test_src_stop);
gstbasesrc_class->fill = GST_DEBUG_FUNCPTR (gst_audio_test_src_fill);
}
示例8: gnl_object_class_init
static void
gnl_object_class_init (GnlObjectClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GnlObjectClass *gnlobject_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gnlobject_class = (GnlObjectClass *) klass;
GST_DEBUG_CATEGORY_INIT (gnlobject, "gnlobject",
GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin Object base class");
gobject_class->set_property = GST_DEBUG_FUNCPTR (gnl_object_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gnl_object_get_property);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gnl_object_dispose);
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gnl_object_change_state);
gnlobject_class->prepare = GST_DEBUG_FUNCPTR (gnl_object_prepare_func);
gnlobject_class->cleanup = GST_DEBUG_FUNCPTR (gnl_object_cleanup_func);
/**
* GnlObject:start
*
* The start position relative to the parent in nanoseconds.
*/
properties[PROP_START] = g_param_spec_uint64 ("start", "Start",
"The start position relative to the parent (in nanoseconds)",
0, G_MAXUINT64, 0, G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_START,
properties[PROP_START]);
/**
* GnlObject:duration
*
* The outgoing duration in nanoseconds.
*/
properties[PROP_DURATION] = g_param_spec_int64 ("duration", "Duration",
"Outgoing duration (in nanoseconds)", 0, G_MAXINT64, 0,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_DURATION,
properties[PROP_DURATION]);
/**
* GnlObject:stop
*
* The stop position relative to the parent in nanoseconds.
*
* This value is computed based on the values of start and duration.
*/
properties[PROP_STOP] = g_param_spec_uint64 ("stop", "Stop",
"The stop position relative to the parent (in nanoseconds)",
0, G_MAXUINT64, 0, G_PARAM_READABLE);
g_object_class_install_property (gobject_class, PROP_STOP,
properties[PROP_STOP]);
/**
* GnlObject:media_start
*
* The media start position in nanoseconds.
*
* Also called 'in-point' in video-editing, this corresponds to
* what position in the 'contained' object we should start outputting from.
*/
properties[PROP_MEDIA_START] =
g_param_spec_uint64 ("media_start", "Media start",
"The media start position (in nanoseconds)", 0, G_MAXUINT64,
GST_CLOCK_TIME_NONE, G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_MEDIA_START,
properties[PROP_MEDIA_START]);
/**
* GnlObject:media_duration
*
* The media's duration in nanoseconds.
*
* This correspond to the 'contained' object's duration we will be
* outputting for.
*/
properties[PROP_MEDIA_DURATION] =
g_param_spec_int64 ("media_duration", "Media duration",
"Duration of the media (in nanoseconds), can be negative", G_MININT64,
G_MAXINT64, 0, G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_MEDIA_DURATION,
properties[PROP_MEDIA_DURATION]);
/**
* GnlObject:media_stop
*
* The media stop position in nanoseconds.
*
* Also called 'out-point' in video-editing, this corresponds to the
* position in the 'contained' object we should output until.
*
* This value is read-only, and is computed from the media_start and
* media_duration property.
*/
properties[PROP_MEDIA_STOP] = g_param_spec_uint64 ("media_stop", "Media stop",
//.........这里部分代码省略.........
示例9: gst_v4l2src_class_init
static void
gst_v4l2src_class_init (GstV4l2SrcClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *element_class;
GstBaseSrcClass *basesrc_class;
GstPushSrcClass *pushsrc_class;
gobject_class = G_OBJECT_CLASS (klass);
element_class = GST_ELEMENT_CLASS (klass);
basesrc_class = GST_BASE_SRC_CLASS (klass);
pushsrc_class = GST_PUSH_SRC_CLASS (klass);
gobject_class->dispose = gst_v4l2src_dispose;
gobject_class->finalize = (GObjectFinalizeFunc) gst_v4l2src_finalize;
gobject_class->set_property = gst_v4l2src_set_property;
gobject_class->get_property = gst_v4l2src_get_property;
element_class->change_state = gst_v4l2src_change_state;
gst_v4l2_object_install_properties_helper (gobject_class,
DEFAULT_PROP_DEVICE);
/**
* GstV4l2Src::prepare-format:
* @v4l2src: the v4l2src instance
* @fd: the file descriptor of the current device
* @fourcc: the fourcc of the format being set
* @width: The width of the video
* @height: The height of the video
*
* This signal gets emitted before calling the v4l2 VIDIOC_S_FMT ioctl
* (set format). This allows for any custom configuration of the device to
* happen prior to the format being set.
* This is mostly useful for UVC H264 encoding cameras which need the H264
* Probe & Commit to happen prior to the normal Probe & Commit.
*
* Since: 0.10.32
*/
gst_v4l2_signals[SIGNAL_PRE_SET_FORMAT] = g_signal_new ("prepare-format",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
NULL, G_TYPE_NONE, 4, G_TYPE_INT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
gst_element_class_set_static_metadata (element_class,
"Video (video4linux2) Source", "Source/Video",
"Reads frames from a Video4Linux2 device",
"Edgard Lima <[email protected]>, "
"Stefan Kost <[email protected]>");
gst_element_class_add_pad_template
(element_class,
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
gst_v4l2_object_get_all_caps ()));
basesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_v4l2src_get_caps);
basesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_v4l2src_set_caps);
basesrc_class->start = GST_DEBUG_FUNCPTR (gst_v4l2src_start);
basesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_v4l2src_unlock);
basesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_v4l2src_unlock_stop);
basesrc_class->stop = GST_DEBUG_FUNCPTR (gst_v4l2src_stop);
basesrc_class->query = GST_DEBUG_FUNCPTR (gst_v4l2src_query);
basesrc_class->fixate = GST_DEBUG_FUNCPTR (gst_v4l2src_fixate);
basesrc_class->event = GST_DEBUG_FUNCPTR (gst_v4l2src_event);
basesrc_class->negotiate = GST_DEBUG_FUNCPTR (gst_v4l2src_negotiate);
basesrc_class->decide_allocation =
GST_DEBUG_FUNCPTR (gst_v4l2src_decide_allocation);
pushsrc_class->fill = GST_DEBUG_FUNCPTR (gst_v4l2src_fill);
klass->v4l2_class_devices = NULL;
GST_DEBUG_CATEGORY_INIT (v4l2src_debug, "v4l2src", 0, "V4L2 source element");
}
示例10: kms_pointer_detector_class_init
static void
kms_pointer_detector_class_init (KmsPointerDetectorClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstBaseTransformClass *base_transform_class =
GST_BASE_TRANSFORM_CLASS (klass);
GstVideoFilterClass *video_filter_class = GST_VIDEO_FILTER_CLASS (klass);
/* Setting up pads and setting metadata should be moved to
base_class_init if you intend to subclass this class. */
gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
gst_caps_from_string (VIDEO_SRC_CAPS)));
gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
gst_caps_from_string (VIDEO_SINK_CAPS)));
gst_element_class_set_static_metadata (GST_ELEMENT_CLASS (klass),
"Pointer detector element", "Video/Filter",
"Detects pointer an raises events with its position",
"Francisco Rivero <[email protected]>");
gobject_class->set_property = kms_pointer_detector_set_property;
gobject_class->get_property = kms_pointer_detector_get_property;
gobject_class->dispose = kms_pointer_detector_dispose;
gobject_class->finalize = kms_pointer_detector_finalize;
base_transform_class->start = GST_DEBUG_FUNCPTR (kms_pointer_detector_start);
base_transform_class->stop = GST_DEBUG_FUNCPTR (kms_pointer_detector_stop);
video_filter_class->set_info =
GST_DEBUG_FUNCPTR (kms_pointer_detector_set_info);
video_filter_class->transform_frame_ip =
GST_DEBUG_FUNCPTR (kms_pointer_detector_transform_frame_ip);
/* Properties initialization */
g_object_class_install_property (gobject_class, PROP_NUM_REGIONS,
g_param_spec_int ("num-regions-eval", "num regions eval",
"Number of regions evaluated when searching for similar regions",
20, 400, 150, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_WINDOW_SCALE,
g_param_spec_int ("scale-search-window", "scale search window",
"Fix the size of the searching window",
2, 100, 5, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_SHOW_DEBUG_INFO,
g_param_spec_boolean ("show-debug-region", "show debug region",
"show evaluation regions over the image", FALSE, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_WINDOWS_LAYOUT,
g_param_spec_boxed ("windows-layout", "windows layout",
"supply the positions and dimensions of windows into the main window",
GST_TYPE_STRUCTURE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_MESSAGE,
g_param_spec_boolean ("message", "message",
"Put a window-in or window-out message in the bus if "
"an object enters o leaves a window", TRUE, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_SHOW_WINDOWS_LAYOUT,
g_param_spec_boolean ("show-windows-layout", "show windows layout",
"show windows layout over the image", TRUE, G_PARAM_READWRITE));
}
示例11: gst_shout2send_class_init
static void
gst_shout2send_class_init (GstShout2sendClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSinkClass *gstbasesink_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesink_class = (GstBaseSinkClass *) klass;
parent_class = g_type_class_peek_parent (klass);
gobject_class->set_property = gst_shout2send_set_property;
gobject_class->get_property = gst_shout2send_get_property;
gobject_class->finalize = (GObjectFinalizeFunc) gst_shout2send_finalize;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_IP,
g_param_spec_string ("ip", "ip", "ip", DEFAULT_IP,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PORT,
g_param_spec_int ("port", "port", "port", 1, G_MAXUSHORT, DEFAULT_PORT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PASSWORD,
g_param_spec_string ("password", "password", "password", DEFAULT_PASSWORD,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_USERNAME,
g_param_spec_string ("username", "username", "username", DEFAULT_USERNAME,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* metadata */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PUBLIC,
g_param_spec_boolean ("public", "public",
"If the stream should be listed on the server's stream directory",
DEFAULT_PUBLIC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_STREAMNAME,
g_param_spec_string ("streamname", "streamname", "name of the stream",
DEFAULT_STREAMNAME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DESCRIPTION,
g_param_spec_string ("description", "description", "description",
DEFAULT_DESCRIPTION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_GENRE,
g_param_spec_string ("genre", "genre", "genre", DEFAULT_GENRE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PROTOCOL,
g_param_spec_enum ("protocol", "protocol", "Connection Protocol to use",
GST_TYPE_SHOUT_PROTOCOL, DEFAULT_PROTOCOL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* icecast only */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MOUNT,
g_param_spec_string ("mount", "mount", "mount", DEFAULT_MOUNT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_URL,
g_param_spec_string ("url", "url", "url", DEFAULT_URL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* signals */
gst_shout2send_signals[SIGNAL_CONNECTION_PROBLEM] =
g_signal_new ("connection-problem", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_CLEANUP, G_STRUCT_OFFSET (GstShout2sendClass,
connection_problem), NULL, NULL, g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_shout2send_start);
gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_shout2send_stop);
gstbasesink_class->unlock = GST_DEBUG_FUNCPTR (gst_shout2send_unlock);
gstbasesink_class->unlock_stop =
GST_DEBUG_FUNCPTR (gst_shout2send_unlock_stop);
gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_shout2send_render);
gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_shout2send_event);
gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_shout2send_setcaps);
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sink_template));
gst_element_class_set_static_metadata (gstelement_class,
"Icecast network sink",
"Sink/Network", "Sends data to an icecast server",
"Wim Taymans <[email protected]>, "
"Pedro Corte-Real <[email protected]>, "
"Zaheer Abbas Merali <zaheerabbas at merali dot org>");
GST_DEBUG_CATEGORY_INIT (shout2_debug, "shout2", 0, "shout2send element");
}
示例12: GST_DEBUG_FUNCPTR
GST_DEBUG_FUNCPTR (gst_adder_request_new_pad);
gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gst_adder_release_pad);
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_adder_change_state);
}
static void
gst_adder_init (GstAdder * adder)
{
GstPadTemplate *template;
template = gst_static_pad_template_get (&gst_adder_src_template);
adder->srcpad = gst_pad_new_from_template (template, "src");
gst_object_unref (template);
gst_pad_set_query_function (adder->srcpad,
GST_DEBUG_FUNCPTR (gst_adder_src_query));
gst_pad_set_event_function (adder->srcpad,
GST_DEBUG_FUNCPTR (gst_adder_src_event));
GST_PAD_SET_PROXY_CAPS (adder->srcpad);
gst_element_add_pad (GST_ELEMENT (adder), adder->srcpad);
adder->current_caps = NULL;
gst_audio_info_init (&adder->info);
adder->padcount = 0;
adder->filter_caps = NULL;
/* keep track of the sinkpads requested */
adder->collect = gst_collect_pads_new ();
gst_collect_pads_set_function (adder->collect,
GST_DEBUG_FUNCPTR (gst_adder_collected), adder);
示例13: gst_curl_base_sink_class_init
static void
gst_curl_base_sink_class_init (GstCurlBaseSinkClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstBaseSinkClass *gstbasesink_class = (GstBaseSinkClass *) klass;
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (gst_curl_base_sink_debug, "curlbasesink", 0,
"curl base sink element");
GST_DEBUG_OBJECT (klass, "class_init");
gst_element_class_set_static_metadata (element_class,
"Curl base sink",
"Sink/Network",
"Upload data over the network to a server using libcurl",
"Patricia Muscalu <[email protected]>");
gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_curl_base_sink_event);
gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_curl_base_sink_render);
gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_curl_base_sink_start);
gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_curl_base_sink_stop);
gstbasesink_class->unlock = GST_DEBUG_FUNCPTR (gst_curl_base_sink_unlock);
gstbasesink_class->unlock_stop =
GST_DEBUG_FUNCPTR (gst_curl_base_sink_unlock_stop);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_curl_base_sink_finalize);
gobject_class->set_property = gst_curl_base_sink_set_property;
gobject_class->get_property = gst_curl_base_sink_get_property;
klass->handle_transfer = handle_transfer;
klass->transfer_read_cb = gst_curl_base_sink_transfer_read_cb;
klass->transfer_data_buffer = gst_curl_base_sink_transfer_data_buffer;
klass->has_buffered_data_unlocked =
gst_curl_base_sink_default_has_buffered_data_unlocked;
/* FIXME: check against souphttpsrc and use same names for same properties */
g_object_class_install_property (gobject_class, PROP_LOCATION,
g_param_spec_string ("location", "Location",
"URI location to write to", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_USER_NAME,
g_param_spec_string ("user", "User name",
"User name to use for server authentication", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_USER_PASSWD,
g_param_spec_string ("passwd", "User password",
"User password to use for server authentication", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_FILE_NAME,
g_param_spec_string ("file-name", "Base file name",
"The base file name for the uploaded images", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TIMEOUT,
g_param_spec_int ("timeout", "Timeout",
"Number of seconds waiting to write before timeout",
0, G_MAXINT, DEFAULT_TIMEOUT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_QOS_DSCP,
g_param_spec_int ("qos-dscp",
"QoS diff srv code point",
"Quality of Service, differentiated services code point (0 default)",
DSCP_MIN, DSCP_MAX, DEFAULT_QOS_DSCP,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_add_static_pad_template (element_class, &sinktemplate);
}
示例14: gst_input_selector_class_init
//.........这里部分代码省略.........
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
/* FIXME: remove after confirming it is safe now */
g_type_class_ref (gst_selector_pad_get_type ());
gobject_class->dispose = gst_input_selector_dispose;
gobject_class->set_property = gst_input_selector_set_property;
gobject_class->get_property = gst_input_selector_get_property;
g_object_class_install_property (gobject_class, PROP_N_PADS,
g_param_spec_uint ("n-pads", "Number of Pads",
"The number of sink pads", 0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_ACTIVE_PAD,
g_param_spec_object ("active-pad", "Active pad",
"The currently active sink pad", GST_TYPE_PAD,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SELECT_ALL,
g_param_spec_boolean ("select-all", "Select all mode",
"Forwards data from all input pads", FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstInputSelector::block:
* @inputselector: the #GstInputSelector
*
* Block all sink pads in preparation for a switch. Returns the stop time of
* the current switch segment, as a running time, or 0 if there is no current
* active pad or the current active pad never received data.
*/
gst_input_selector_signals[SIGNAL_BLOCK] =
g_signal_new ("block", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GstInputSelectorClass, block), NULL, NULL,
__gst_camerabin_marshal_INT64__VOID, G_TYPE_INT64, 0);
/**
* GstInputSelector::switch:
* @inputselector: the #GstInputSelector
* @pad: the pad to switch to
* @stop_time: running time at which to close the previous segment, or -1
* to use the running time of the previously active sink pad
* @start_time: running time at which to start the new segment, or -1 to
* use the running time of the newly active sink pad
*
* Switch to a new feed. The segment opened by the previously active pad, if
* any, will be closed, and a new segment opened before data flows again.
*
* This signal must be emitted when the element has been blocked via the <link
* linkend="GstInputSelector-block">block</link> signal.
*
* If you have a stream with only one switch element, such as an audio-only
* stream, a stream switch should be performed by first emitting the block
* signal, and then emitting the switch signal with -1 for the stop and start
* time values.
*
* The intention of the @stop_time and @start_time arguments is to allow
* multiple switch elements to switch and maintain stream synchronization.
* When switching a stream with multiple feeds, you will need as many switch
* elements as you have feeds. For example, a feed with audio and video will
* have one switch element between the audio feeds and one for video.
*
* A switch over multiple switch elements should be performed as follows:
* First, emit the <link linkend="GstInputSelector-block">block</link>
* signal, collecting the returned values. The maximum running time returned
* by block should then be used as the time at which to close the previous
* segment.
*
* Then, query the running times of the new audio and video pads that you will
* switch to. Naturally, these pads are on separate switch elements. Take the
* minimum running time for those streams and use it for the time at which to
* open the new segment.
*
* If @pad is the same as the current active pad, the element will cancel any
* previous block without adjusting segments.
*
* <note><simpara>
* the signal changed from accepting the pad name to the pad object.
* </simpara></note>
*
* Since: 0.10.7
*/
gst_input_selector_signals[SIGNAL_SWITCH] =
g_signal_new ("switch", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstInputSelectorClass, switch_),
NULL, NULL, __gst_camerabin_marshal_VOID__OBJECT_INT64_INT64,
G_TYPE_NONE, 3, GST_TYPE_PAD, G_TYPE_INT64, G_TYPE_INT64);
gstelement_class->request_new_pad = gst_input_selector_request_new_pad;
gstelement_class->release_pad = gst_input_selector_release_pad;
gstelement_class->change_state = gst_input_selector_change_state;
klass->block = GST_DEBUG_FUNCPTR (gst_input_selector_block);
/* note the underscore because switch is a keyword otherwise */
klass->switch_ = GST_DEBUG_FUNCPTR (gst_input_selector_switch);
}
示例15: gst_video_detect_class_init
static void
gst_video_detect_class_init (gpointer klass, gpointer class_data)
{
GObjectClass *gobject_class;
GstBaseTransformClass *trans_class;
gobject_class = (GObjectClass *) klass;
trans_class = (GstBaseTransformClass *) klass;
parent_class = g_type_class_peek_parent (klass);
gobject_class->set_property = gst_video_detect_set_property;
gobject_class->get_property = gst_video_detect_get_property;
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MESSAGE,
g_param_spec_boolean ("message", "Message",
"Post statics messages",
DEFAULT_MESSAGE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PATTERN_WIDTH,
g_param_spec_int ("pattern-width", "Pattern width",
"The width of the pattern markers", 1, G_MAXINT,
DEFAULT_PATTERN_WIDTH,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PATTERN_HEIGHT,
g_param_spec_int ("pattern-height", "Pattern height",
"The height of the pattern markers", 1, G_MAXINT,
DEFAULT_PATTERN_HEIGHT,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PATTERN_COUNT,
g_param_spec_int ("pattern-count", "Pattern count",
"The number of pattern markers", 0, G_MAXINT,
DEFAULT_PATTERN_COUNT,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PATTERN_DATA_COUNT,
g_param_spec_int ("pattern-data-count", "Pattern data count",
"The number of extra data pattern markers", 0, G_MAXINT,
DEFAULT_PATTERN_DATA_COUNT,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PATTERN_CENTER,
g_param_spec_double ("pattern-center", "Pattern center",
"The center of the black/white separation (0.0 = lowest, 1.0 highest)",
0.0, 1.0, DEFAULT_PATTERN_CENTER,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PATTERN_SENSITIVITY,
g_param_spec_double ("pattern-sensitivity", "Pattern sensitivity",
"The sensitivity around the center for detecting the markers "
"(0.0 = lowest, 1.0 highest)", 0.0, 1.0, DEFAULT_PATTERN_SENSITIVITY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_LEFT_OFFSET,
g_param_spec_int ("left-offset", "Left Offset",
"The offset from the left border where the pattern starts", 0,
G_MAXINT, DEFAULT_LEFT_OFFSET,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_BOTTOM_OFFSET,
g_param_spec_int ("bottom-offset", "Bottom Offset",
"The offset from the bottom border where the pattern starts", 0,
G_MAXINT, DEFAULT_BOTTOM_OFFSET,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_video_detect_set_caps);
trans_class->transform_ip = GST_DEBUG_FUNCPTR (gst_video_detect_transform_ip);
trans_class->passthrough_on_same_caps = TRUE;
GST_DEBUG_CATEGORY_INIT (video_detect_debug, "videodetect", 0,
"Video detect");
}