static void
gst_rtp_pt_demux_class_init (GstRtpPtDemuxClass * klass)
{
GObjectClass *gobject_klass;
GstElementClass *gstelement_klass;
gobject_klass = (GObjectClass *) klass;
gstelement_klass = (GstElementClass *) klass;
/**
* GstRtpPtDemux::request-pt-map:
* @demux: the object which received the signal
* @pt: the payload type
*
* Request the payload type as #GstCaps for @pt.
*/
gst_rtp_pt_demux_signals[SIGNAL_REQUEST_PT_MAP] =
g_signal_new ("request-pt-map", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpPtDemuxClass, request_pt_map),
NULL, NULL, g_cclosure_marshal_generic, GST_TYPE_CAPS, 1, G_TYPE_UINT);
/**
* GstRtpPtDemux::new-payload-type:
* @demux: the object which received the signal
* @pt: the payload type
* @pad: the pad with the new payload
*
* Emited when a new payload type pad has been created in @demux.
*/
gst_rtp_pt_demux_signals[SIGNAL_NEW_PAYLOAD_TYPE] =
g_signal_new ("new-payload-type", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpPtDemuxClass, new_payload_type),
NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_UINT,
GST_TYPE_PAD);
/**
* GstRtpPtDemux::payload-type-change:
* @demux: the object which received the signal
* @pt: the new payload type
*
* Emited when the payload type changed.
*/
gst_rtp_pt_demux_signals[SIGNAL_PAYLOAD_TYPE_CHANGE] =
g_signal_new ("payload-type-change", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpPtDemuxClass,
payload_type_change), NULL, NULL, g_cclosure_marshal_VOID__UINT,
G_TYPE_NONE, 1, G_TYPE_UINT);
/**
* GstRtpPtDemux::clear-pt-map:
* @demux: the object which received the signal
*
* The application can call this signal to instruct the element to discard the
* currently cached payload type map.
*/
gst_rtp_pt_demux_signals[SIGNAL_CLEAR_PT_MAP] =
g_signal_new ("clear-pt-map", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_ACTION | G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpPtDemuxClass,
clear_pt_map), NULL, NULL, g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0, G_TYPE_NONE);
gobject_klass->finalize = gst_rtp_pt_demux_finalize;
gstelement_klass->change_state =
GST_DEBUG_FUNCPTR (gst_rtp_pt_demux_change_state);
klass->clear_pt_map = GST_DEBUG_FUNCPTR (gst_rtp_pt_demux_clear_pt_map);
gst_element_class_add_pad_template (gstelement_klass,
gst_static_pad_template_get (&rtp_pt_demux_sink_template));
gst_element_class_add_pad_template (gstelement_klass,
gst_static_pad_template_get (&rtp_pt_demux_src_template));
gst_element_class_set_static_metadata (gstelement_klass, "RTP Demux",
"Demux/Network/RTP",
"Parses codec streams transmitted in the same RTP session",
"Kai Vehmanen <[email protected]>");
GST_DEBUG_CATEGORY_INIT (gst_rtp_pt_demux_debug,
"rtpptdemux", 0, "RTP codec demuxer");
}
static void
gst_audio_fx_base_fir_filter_class_init (GstAudioFXBaseFIRFilterClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
GstAudioFilterClass *filter_class = (GstAudioFilterClass *) klass;
GstCaps *caps;
GST_DEBUG_CATEGORY_INIT (gst_audio_fx_base_fir_filter_debug,
"audiofxbasefirfilter", 0, "FIR filter base class");
gobject_class->finalize = gst_audio_fx_base_fir_filter_finalize;
gobject_class->set_property = gst_audio_fx_base_fir_filter_set_property;
gobject_class->get_property = gst_audio_fx_base_fir_filter_get_property;
/**
* GstAudioFXBaseFIRFilter::low-latency:
*
* Work in low-latency mode. This mode is much slower for large filter sizes
* but the latency is always only the pre-latency of the filter.
*
* Since: 0.10.18
*/
g_object_class_install_property (gobject_class, PROP_LOW_LATENCY,
g_param_spec_boolean ("low-latency", "Low latency",
"Operate in low latency mode. This mode is slower but the "
"latency will only be the filter pre-latency. "
"Can only be changed in states < PAUSED!", DEFAULT_LOW_LATENCY,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstAudioFXBaseFIRFilter::drain-on-changes:
*
* Whether the filter should be drained when its coeficients change
*
* Note: Currently this only works if the kernel size is not changed!
* Support for drainless kernel size changes will be added in the future.
*
* Since: 0.10.18
*/
g_object_class_install_property (gobject_class, PROP_DRAIN_ON_CHANGES,
g_param_spec_boolean ("drain-on-changes", "Drain on changes",
"Drains the filter when its coeficients change",
DEFAULT_DRAIN_ON_CHANGES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
caps = gst_caps_from_string (ALLOWED_CAPS);
gst_audio_filter_class_add_pad_templates (GST_AUDIO_FILTER_CLASS (klass),
caps);
gst_caps_unref (caps);
trans_class->transform =
GST_DEBUG_FUNCPTR (gst_audio_fx_base_fir_filter_transform);
trans_class->start = GST_DEBUG_FUNCPTR (gst_audio_fx_base_fir_filter_start);
trans_class->stop = GST_DEBUG_FUNCPTR (gst_audio_fx_base_fir_filter_stop);
trans_class->sink_event =
GST_DEBUG_FUNCPTR (gst_audio_fx_base_fir_filter_sink_event);
trans_class->query = GST_DEBUG_FUNCPTR (gst_audio_fx_base_fir_filter_query);
trans_class->transform_size =
GST_DEBUG_FUNCPTR (gst_audio_fx_base_fir_filter_transform_size);
filter_class->setup = GST_DEBUG_FUNCPTR (gst_audio_fx_base_fir_filter_setup);
}
//.........这里部分代码省略.........
"Vertical offset of overlay image in fractions of video image "
"height, from top-left corner of video image"
" (in relative positioning)", -1.0, 1.0, 0.0,
GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_OVERLAY_WIDTH,
g_param_spec_int ("overlay-width", "Overlay Width",
"Width of overlay image in pixels (0 = same as overlay image)", 0,
G_MAXINT, 0,
GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_OVERLAY_HEIGHT,
g_param_spec_int ("overlay-height", "Overlay Height",
"Height of overlay image in pixels (0 = same as overlay image)", 0,
G_MAXINT, 0,
GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_ALPHA,
g_param_spec_double ("alpha", "Alpha", "Global alpha of overlay image",
0.0, 1.0, 1.0, GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING
| G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstGdkPixbufOverlay:pixbuf:
*
* GdkPixbuf object to render.
*
* Since: 1.6
*/
g_object_class_install_property (gobject_class, PROP_PIXBUF,
g_param_spec_object ("pixbuf", "Pixbuf", "GdkPixbuf object to render",
GDK_TYPE_PIXBUF, GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING
| G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstGdkPixbufOverlay:positioning-mode:
*
* Positioning mode of offset-x and offset-y properties. Determines how
* negative x/y offsets will be interpreted. By default negative values
* are for positioning relative to the right/bottom edge of the video
* image, but you can use this property to select absolute positioning
* relative to a (0, 0) origin in the top-left corner. That way negative
* offsets will be to the left/above the video image, which allows you to
* smoothly slide logos into and out of the frame if desired.
*
* Since: 1.6
*/
g_object_class_install_property (gobject_class, PROP_POSITIONING_MODE,
g_param_spec_enum ("positioning-mode", "Positioning mode",
"Positioning mode of offset-x and offset-y properties",
GST_TYPE_GDK_PIXBUF_POSITIONING_MODE, DEFAULT_POSITIONING_MODE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* FIXME the following actually act as a RELATIVE_X/RELATIVE_Y,
* but those were already slightly mutated/abused with ABSOLUTE positioning,
* so let's keep that and follow suit
* Suffice it to say all that could do with cleanup (2.0 ??) */
/**
* GstGdkPixbufOverlay:coef-x:
*
* In absolute positioning mode, the x coordinate of overlay image's
* top-left corner is now given by
* offset-x + (relative-x * overlay_width) + (coef-x * video_width).
* This allows to align the image absolutely and relatively
* to any edge or center position.
*
* Since: 1.12
*/
g_object_class_install_property (gobject_class, PROP_COEF_X,
g_param_spec_double ("coef-x", "Relative X Offset",
"Horizontal offset of overlay image in fractions of video image "
"width, from top-left corner of video image (absolute positioning)",
-1.0, 1.0, 0.0, GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING
| G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstGdkPixbufOverlay:coef-y:
*
* In absolute positioning mode, the y coordinate of overlay image's
* top-left corner is now given by
* offset-y + (relative-y * overlay_height) + (coef-y * video_height).
* This allows to align the image absolutely and relatively
* to any edge or center position.
*
* Since: 1.12
*/
g_object_class_install_property (gobject_class, PROP_COEF_Y,
g_param_spec_double ("coef-y", "Relative Y Offset",
"Vertical offset of overlay image in fractions of video image "
"height, from top-left corner of video image (absolute positioning)",
-1.0, 1.0, 0.0, GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING
| G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_add_static_pad_template (element_class, &sink_template);
gst_element_class_add_static_pad_template (element_class, &src_template);
gst_element_class_set_static_metadata (element_class,
"GdkPixbuf Overlay", "Filter/Effect/Video",
"Overlay an image onto a video stream",
"Tim-Philipp Müller <tim centricular net>");
GST_DEBUG_CATEGORY_INIT (gdkpixbufoverlay_debug, "gdkpixbufoverlay", 0,
"debug category for gdkpixbufoverlay element");
}
static void
gst_mfxpostproc_class_init (GstMfxPostprocClass * klass)
{
GObjectClass *const object_class = G_OBJECT_CLASS (klass);
GstElementClass *const element_class = GST_ELEMENT_CLASS (klass);
GstBaseTransformClass *const trans_class = GST_BASE_TRANSFORM_CLASS (klass);
GstPadTemplate *pad_template;
GST_DEBUG_CATEGORY_INIT (gst_debug_mfxpostproc,
GST_PLUGIN_NAME, 0, GST_PLUGIN_DESC);
gst_mfx_plugin_base_class_init (GST_MFX_PLUGIN_BASE_CLASS (klass));
object_class->finalize = gst_mfxpostproc_finalize;
object_class->set_property = gst_mfxpostproc_set_property;
object_class->get_property = gst_mfxpostproc_get_property;
trans_class->transform_caps = gst_mfxpostproc_transform_caps;
trans_class->transform = gst_mfxpostproc_transform;
trans_class->set_caps = gst_mfxpostproc_set_caps;
trans_class->stop = gst_mfxpostproc_stop;
trans_class->query = gst_mfxpostproc_query;
trans_class->propose_allocation = gst_mfxpostproc_propose_allocation;
trans_class->decide_allocation = gst_mfxpostproc_decide_allocation;
trans_class->before_transform = gst_mfxpostproc_before_transform;
gst_element_class_set_static_metadata (element_class,
"MFX video postprocessing",
"Filter/Converter/Video;Filter/Converter/Video/Scaler;"
"Filter/Effect/Video;Filter/Effect/Video/Deinterlace",
GST_PLUGIN_DESC, "Ishmael Sameen <[email protected]>");
/* sink pad */
pad_template = gst_static_pad_template_get (&gst_mfxpostproc_sink_factory);
gst_element_class_add_pad_template (element_class, pad_template);
/* src pad */
pad_template = gst_static_pad_template_get (&gst_mfxpostproc_src_factory);
gst_element_class_add_pad_template (element_class, pad_template);
g_object_class_install_property (object_class,
PROP_ASYNC_DEPTH,
g_param_spec_uint ("async-depth", "Asynchronous Depth",
"Number of async operations before explicit sync",
0, 20, DEFAULT_ASYNC_DEPTH,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstMfxPostproc:deinterlace-mode
*
* This selects whether the deinterlacing should always be applied
* or if they should only be applied on content that has the
* "interlaced" flag on the caps.
*/
g_object_class_install_property
(object_class,
PROP_DEINTERLACE_MODE,
g_param_spec_enum ("deinterlace-mode",
"Deinterlace mode",
"Deinterlace mode to use",
GST_MFX_TYPE_DEINTERLACE_MODE,
DEFAULT_DEINTERLACE_MODE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstMfxPostproc:width
*
* The forced output width in pixels. If set to zero, the width is
* calculated from the height if aspect ration is preserved, or
* inherited from the sink caps width
*/
g_object_class_install_property
(object_class,
PROP_WIDTH,
g_param_spec_uint ("width",
"Width",
"Forced output width",
0, 8192, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstMfxPostproc:height
*
* The forced output height in pixels. If set to zero, the height is
* calculated from the width if aspect ration is preserved, or
* inherited from the sink caps height
*/
g_object_class_install_property
(object_class,
PROP_HEIGHT,
g_param_spec_uint ("height",
"Height",
"Forced output height",
0, 8192, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstMfxPostproc:force-aspect-ratio
*
* When enabled, scaling respects video aspect ratio; when disabled,
* the video is distorted to fit the width and height properties.
*/
g_object_class_install_property
//.........这里部分代码省略.........
请发表评论