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->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 * @caps: the caps of the format being set * * 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, 2, G_TYPE_INT, GST_TYPE_CAPS); gst_element_class_set_static_metadata (element_class, "Video (video4linux2) Source", "Source/Video", "Reads frames from a Video4Linux2 device", "Edgard Lima <*****@*****.**>, " "Stefan Kost <*****@*****.**>"); 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->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"); }
static void gst_shmdata_sink_class_init (GstShmdataSinkClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSinkClass *gstbasesink_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesink_class = (GstBaseSinkClass *) klass; gobject_class->finalize = gst_shmdata_sink_finalize; gobject_class->set_property = gst_shmdata_sink_set_property; gobject_class->get_property = gst_shmdata_sink_get_property; gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_shmdata_sink_on_caps); gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_shmdata_sink_start); gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_shmdata_sink_stop); gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_shmdata_sink_render); gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_shmdata_sink_event); gstbasesink_class->unlock = GST_DEBUG_FUNCPTR (gst_shmdata_sink_unlock); gstbasesink_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_shmdata_sink_unlock_stop); gstbasesink_class->propose_allocation = GST_DEBUG_FUNCPTR (gst_shmdata_sink_propose_allocation); g_object_class_install_property ( gobject_class, PROP_SOCKET_PATH, g_param_spec_string ( "socket-path", "Path to the control socket", "The path to the control socket used to control the shared memory transport", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property ( gobject_class, PROP_CAPS, g_param_spec_string ( "caps", "Data type exposed in the shared memory", "The data type (caps) exposed in the shared memory, as negociated with other elements", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property ( gobject_class, PROP_BYTES_SINCE_LAST_REQUEST, g_param_spec_uint64 ( "bytes", "Bytes number since last request", "The number of bytes that passed the shmdata since last request", 0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /* g_object_class_install_property (gobject_class, PROP_PERMS, */ /* g_param_spec_uint ("perms", */ /* "Permissions on the shm area", */ /* "Permissions to set on the shm area", */ /* 0, 07777, DEFAULT_PERMS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); */ unsigned long shmmax = shmdata_get_shmmax(NULL); if (0 == shmmax ||shmmax > 268435456) // clip to 256MB shmmax = 268435456; g_object_class_install_property ( gobject_class, PROP_INITIAL_SHM_SIZE, g_param_spec_ulong ("initial-size", "Initial memory size", "Initial size of the shared memory area (will be automatically resized if needed)", 1, shmmax, DEFAULT_INITIAL_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); signals[SIGNAL_CLIENT_CONNECTED] = g_signal_new ("client-connected", GST_TYPE_SHMDATA_SINK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); signals[SIGNAL_CLIENT_DISCONNECTED] = g_signal_new ("client-disconnected", GST_TYPE_SHMDATA_SINK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&sinktemplate)); gst_element_class_set_static_metadata (gstelement_class, "Shmdata Sink", "Sink", "Share data over a shmdata", "Nicolas Bouillot <*****@*****.**>"); GST_DEBUG_CATEGORY_INIT (shmdatasink_debug, "shmdatasink", 0, "Shared Memory Sink"); }
static void gst_neonhttp_src_class_init (GstNeonhttpSrcClass * klass) { GObjectClass *gobject_class; GstElementClass *element_class; GstBaseSrcClass *gstbasesrc_class; GstPushSrcClass *gstpushsrc_class; gobject_class = (GObjectClass *) klass; element_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; gstpushsrc_class = (GstPushSrcClass *) klass; gobject_class->set_property = gst_neonhttp_src_set_property; gobject_class->get_property = gst_neonhttp_src_get_property; gobject_class->dispose = gst_neonhttp_src_dispose; g_object_class_install_property (gobject_class, PROP_LOCATION, g_param_spec_string ("location", "Location", "Location to read from", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PROXY, g_param_spec_string ("proxy", "Proxy", "Proxy server to use, in the form HOSTNAME:PORT. " "Defaults to the http_proxy environment variable", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_USER_AGENT, g_param_spec_string ("user-agent", "User-Agent", "Value of the User-Agent HTTP request header field", "GStreamer neonhttpsrc", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_COOKIES, g_param_spec_boxed ("cookies", "Cookies", "HTTP request cookies", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_AUTOMATIC_REDIRECT, g_param_spec_boolean ("automatic-redirect", "automatic-redirect", "Automatically follow HTTP redirects (HTTP Status Code 3xx)", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ACCEPT_SELF_SIGNED, g_param_spec_boolean ("accept-self-signed", "accept-self-signed", "Accept self-signed SSL/TLS certificates", DEFAULT_ACCEPT_SELF_SIGNED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CONNECT_TIMEOUT, g_param_spec_uint ("connect-timeout", "connect-timeout", "Value in seconds to timeout a blocking connection (0 = default).", 0, 3600, DEFAULT_CONNECT_TIMEOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_READ_TIMEOUT, g_param_spec_uint ("read-timeout", "read-timeout", "Value in seconds to timeout a blocking read (0 = default).", 0, 3600, DEFAULT_READ_TIMEOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #ifndef GST_DISABLE_GST_DEBUG g_object_class_install_property (gobject_class, PROP_NEON_HTTP_DEBUG, g_param_spec_boolean ("neon-http-debug", "neon-http-debug", "Enable Neon HTTP debug messages", DEFAULT_NEON_HTTP_DEBUG, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #endif g_object_class_install_property (gobject_class, PROP_IRADIO_MODE, g_param_spec_boolean ("iradio-mode", "iradio-mode", "Enable internet radio mode (ask server to send shoutcast/icecast " "metadata interleaved with the actual stream data)", DEFAULT_IRADIO_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_neonhttp_src_start); gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_neonhttp_src_stop); gstbasesrc_class->get_size = GST_DEBUG_FUNCPTR (gst_neonhttp_src_get_size); gstbasesrc_class->is_seekable = GST_DEBUG_FUNCPTR (gst_neonhttp_src_is_seekable); gstbasesrc_class->do_seek = GST_DEBUG_FUNCPTR (gst_neonhttp_src_do_seek); gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_neonhttp_src_query); gstpushsrc_class->fill = GST_DEBUG_FUNCPTR (gst_neonhttp_src_fill); GST_DEBUG_CATEGORY_INIT (neonhttpsrc_debug, "neonhttpsrc", 0, "NEON HTTP Client Source"); gst_element_class_add_static_pad_template (element_class, &srctemplate); gst_element_class_set_static_metadata (element_class, "HTTP client source", "Source/Network", "Receive data as a client over the network via HTTP using NEON", "Edgard Lima <*****@*****.**>, " "Rosfran Borges <*****@*****.**>, " "Andre Moreira Magalhaes <*****@*****.**>"); }
static void gst_a52dec_class_init (GstA52DecClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstAudioDecoderClass *gstbase_class; guint cpuflags = 0; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbase_class = (GstAudioDecoderClass *) klass; gobject_class->set_property = gst_a52dec_set_property; gobject_class->get_property = gst_a52dec_get_property; gstbase_class->start = GST_DEBUG_FUNCPTR (gst_a52dec_start); gstbase_class->stop = GST_DEBUG_FUNCPTR (gst_a52dec_stop); gstbase_class->set_format = GST_DEBUG_FUNCPTR (gst_a52dec_set_format); gstbase_class->parse = GST_DEBUG_FUNCPTR (gst_a52dec_parse); gstbase_class->handle_frame = GST_DEBUG_FUNCPTR (gst_a52dec_handle_frame); /** * GstA52Dec::drc * * Set to true to apply the recommended Dolby Digital dynamic range compression * to the audio stream. Dynamic range compression makes loud sounds * softer and soft sounds louder, so you can more easily listen * to the stream without disturbing other people. */ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DRC, g_param_spec_boolean ("drc", "Dynamic Range Compression", "Use Dynamic Range Compression", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstA52Dec::mode * * Force a particular output channel configuration from the decoder. By default, * the channel downmix (if any) is chosen automatically based on the downstream * capabilities of the pipeline. */ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MODE, g_param_spec_enum ("mode", "Decoder Mode", "Decoding Mode (default 3f2r)", GST_TYPE_A52DEC_MODE, A52_3F2R, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstA52Dec::lfe * * Whether to output the LFE (Low Frequency Emitter) channel of the audio stream. */ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LFE, g_param_spec_boolean ("lfe", "LFE", "LFE", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&sink_factory)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_factory)); gst_element_class_set_static_metadata (gstelement_class, "ATSC A/52 audio decoder", "Codec/Decoder/Audio", "Decodes ATSC A/52 encoded audio streams", "David I. Lehn <*****@*****.**>"); GST_DEBUG_CATEGORY_INIT (a52dec_debug, "a52dec", 0, "AC3/A52 software decoder"); /* If no CPU instruction based acceleration is available, end up using the * generic software djbfft based one when available in the used liba52 */ #ifdef MM_ACCEL_DJBFFT klass->a52_cpuflags = MM_ACCEL_DJBFFT; #elif defined(A52_ACCEL_DETECT) klass->a52_cpuflags = A52_ACCEL_DETECT; #else klass->a52_cpuflags = 0; #endif #if HAVE_ORC && !defined(A52_ACCEL_DETECT) cpuflags = orc_target_get_default_flags (orc_target_get_by_name ("mmx")); if (cpuflags & ORC_TARGET_MMX_MMX) klass->a52_cpuflags |= MM_ACCEL_X86_MMX; if (cpuflags & ORC_TARGET_MMX_3DNOW) klass->a52_cpuflags |= MM_ACCEL_X86_3DNOW; if (cpuflags & ORC_TARGET_MMX_MMXEXT) klass->a52_cpuflags |= MM_ACCEL_X86_MMXEXT; #endif GST_LOG ("CPU flags: a52=%08x, orc=%08x", klass->a52_cpuflags, cpuflags); }
static void gst_video_scale_class_init (GstVideoScaleClass * klass) { GObjectClass *gobject_class = (GObjectClass *) klass; GstElementClass *element_class = (GstElementClass *) klass; GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass; GstVideoFilterClass *filter_class = (GstVideoFilterClass *) klass; gobject_class->finalize = (GObjectFinalizeFunc) gst_video_scale_finalize; gobject_class->set_property = gst_video_scale_set_property; gobject_class->get_property = gst_video_scale_get_property; g_object_class_install_property (gobject_class, PROP_METHOD, g_param_spec_enum ("method", "method", "method", GST_TYPE_VIDEO_SCALE_METHOD, DEFAULT_PROP_METHOD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ADD_BORDERS, g_param_spec_boolean ("add-borders", "Add Borders", "Add black borders if necessary to keep the display aspect ratio", DEFAULT_PROP_ADD_BORDERS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SHARPNESS, g_param_spec_double ("sharpness", "Sharpness", "Sharpness of filter", 0.5, 1.5, DEFAULT_PROP_SHARPNESS, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SHARPEN, g_param_spec_double ("sharpen", "Sharpen", "Sharpening", 0.0, 1.0, DEFAULT_PROP_SHARPEN, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DITHER, g_param_spec_boolean ("dither", "Dither", "Add dither (only used for Lanczos method)", DEFAULT_PROP_DITHER, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #if 0 /* I am hiding submethod for now, since it's poorly named, poorly * documented, and will probably just get people into trouble. */ g_object_class_install_property (gobject_class, PROP_SUBMETHOD, g_param_spec_int ("submethod", "submethod", "submethod", 0, 3, DEFAULT_PROP_SUBMETHOD, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #endif g_object_class_install_property (gobject_class, PROP_ENVELOPE, g_param_spec_double ("envelope", "Envelope", "Size of filter envelope", 1.0, 5.0, DEFAULT_PROP_ENVELOPE, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_GAMMA_DECODE, g_param_spec_boolean ("gamma-decode", "Gamma Decode", "Decode gamma before scaling", DEFAULT_PROP_GAMMA_DECODE, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_static_metadata (element_class, "Video scaler", "Filter/Converter/Video/Scaler", "Resizes video", "Wim Taymans <*****@*****.**>"); gst_element_class_add_pad_template (element_class, gst_video_scale_sink_template_factory ()); gst_element_class_add_pad_template (element_class, gst_video_scale_src_template_factory ()); trans_class->transform_caps = GST_DEBUG_FUNCPTR (gst_video_scale_transform_caps); trans_class->fixate_caps = GST_DEBUG_FUNCPTR (gst_video_scale_fixate_caps); trans_class->src_event = GST_DEBUG_FUNCPTR (gst_video_scale_src_event); filter_class->set_info = GST_DEBUG_FUNCPTR (gst_video_scale_set_info); filter_class->transform_frame = GST_DEBUG_FUNCPTR (gst_video_scale_transform_frame); }
static void gst_openjpeg_enc_class_init (GstOpenJPEGEncClass * klass) { GObjectClass *gobject_class; GstElementClass *element_class; GstVideoEncoderClass *video_encoder_class; gobject_class = (GObjectClass *) klass; element_class = (GstElementClass *) klass; video_encoder_class = (GstVideoEncoderClass *) klass; gobject_class->set_property = gst_openjpeg_enc_set_property; gobject_class->get_property = gst_openjpeg_enc_get_property; g_object_class_install_property (gobject_class, PROP_NUM_LAYERS, g_param_spec_int ("num-layers", "Number of layers", "Number of layers", 1, 10, DEFAULT_NUM_LAYERS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_NUM_RESOLUTIONS, g_param_spec_int ("num-resolutions", "Number of resolutions", "Number of resolutions", 1, 10, DEFAULT_NUM_RESOLUTIONS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PROGRESSION_ORDER, g_param_spec_enum ("progression-order", "Progression Order", "Progression order", GST_OPENJPEG_ENC_TYPE_PROGRESSION_ORDER, DEFAULT_PROGRESSION_ORDER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TILE_OFFSET_X, g_param_spec_int ("tile-offset-x", "Tile Offset X", "Tile Offset X", G_MININT, G_MAXINT, DEFAULT_TILE_OFFSET_X, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TILE_OFFSET_Y, g_param_spec_int ("tile-offset-y", "Tile Offset Y", "Tile Offset Y", G_MININT, G_MAXINT, DEFAULT_TILE_OFFSET_Y, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TILE_WIDTH, g_param_spec_int ("tile-width", "Tile Width", "Tile Width", 0, G_MAXINT, DEFAULT_TILE_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TILE_HEIGHT, g_param_spec_int ("tile-height", "Tile Height", "Tile Height", 0, G_MAXINT, DEFAULT_TILE_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_openjpeg_enc_src_template)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_openjpeg_enc_sink_template)); gst_element_class_set_static_metadata (element_class, "OpenJPEG JPEG2000 encoder", "Codec/Encoder/Video", "Encode JPEG2000 streams", "Sebastian Dröge <*****@*****.**>"); video_encoder_class->start = GST_DEBUG_FUNCPTR (gst_openjpeg_enc_start); video_encoder_class->stop = GST_DEBUG_FUNCPTR (gst_openjpeg_enc_stop); video_encoder_class->set_format = GST_DEBUG_FUNCPTR (gst_openjpeg_enc_set_format); video_encoder_class->handle_frame = GST_DEBUG_FUNCPTR (gst_openjpeg_enc_handle_frame); video_encoder_class->propose_allocation = gst_openjpeg_enc_propose_allocation; GST_DEBUG_CATEGORY_INIT (gst_openjpeg_enc_debug, "openjpegenc", 0, "OpenJPEG Encoder"); }
static void gst_ks_video_src_class_init (GstKsVideoSrcClass * 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); g_type_class_add_private (klass, sizeof (GstKsVideoSrcPrivate)); parent_class = g_type_class_peek_parent (klass); gst_element_class_set_static_metadata (gstelement_class, "KsVideoSrc", "Source/Video", "Stream data from a video capture device through Windows kernel streaming", "Ole André Vadla Ravnås <*****@*****.**>\n" "Haakon Sporsheim <*****@*****.**>\n" "Andres Colubri <*****@*****.**>"); gst_element_class_add_pad_template (gstelement_class, gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, ks_video_get_all_caps ())); gobject_class->finalize = gst_ks_video_src_finalize; gobject_class->get_property = gst_ks_video_src_get_property; gobject_class->set_property = gst_ks_video_src_set_property; gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_ks_video_src_change_state); gstelement_class->set_clock = GST_DEBUG_FUNCPTR (gst_ks_video_src_set_clock); gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_ks_video_src_get_caps); gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_ks_video_src_set_caps); gstbasesrc_class->fixate = GST_DEBUG_FUNCPTR (gst_ks_video_src_fixate); gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_ks_video_src_query); gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_ks_video_src_unlock); gstbasesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_ks_video_src_unlock_stop); gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_ks_video_src_create); g_object_class_install_property (gobject_class, PROP_DEVICE_PATH, g_param_spec_string ("device-path", "Device Path", "The device path", DEFAULT_DEVICE_PATH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DEVICE_NAME, g_param_spec_string ("device-name", "Device Name", "The human-readable device name", DEFAULT_DEVICE_NAME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DEVICE_INDEX, g_param_spec_int ("device-index", "Device Index", "The zero-based device index", -1, G_MAXINT, DEFAULT_DEVICE_INDEX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DO_STATS, g_param_spec_boolean ("do-stats", "Enable statistics", "Enable logging of statistics", DEFAULT_DO_STATS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FPS, g_param_spec_int ("fps", "Frames per second", "Last measured framerate, if statistics are enabled", -1, G_MAXINT, -1, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ENABLE_QUIRKS, g_param_spec_boolean ("enable-quirks", "Enable quirks", "Enable driver-specific quirks", DEFAULT_ENABLE_QUIRKS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); }
static void gst_v4l2sink_class_init (GstV4l2SinkClass * klass) { GObjectClass *gobject_class; GstElementClass *element_class; GstBaseSinkClass *basesink_class; gobject_class = G_OBJECT_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass); basesink_class = GST_BASE_SINK_CLASS (klass); gobject_class->dispose = gst_v4l2sink_dispose; gobject_class->finalize = (GObjectFinalizeFunc) gst_v4l2sink_finalize; gobject_class->set_property = gst_v4l2sink_set_property; gobject_class->get_property = gst_v4l2sink_get_property; element_class->change_state = gst_v4l2sink_change_state; gst_v4l2_object_install_properties_helper (gobject_class, DEFAULT_PROP_DEVICE); g_object_class_install_property (gobject_class, PROP_OVERLAY_TOP, g_param_spec_int ("overlay-top", "Overlay top", "The topmost (y) coordinate of the video overlay; top left corner of screen is 0,0", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OVERLAY_LEFT, g_param_spec_int ("overlay-left", "Overlay left", "The leftmost (x) coordinate of the video overlay; top left corner of screen is 0,0", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OVERLAY_WIDTH, g_param_spec_uint ("overlay-width", "Overlay width", "The width of the video overlay; default is equal to negotiated image width", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OVERLAY_HEIGHT, g_param_spec_uint ("overlay-height", "Overlay height", "The height of the video overlay; default is equal to negotiated image height", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CROP_TOP, g_param_spec_int ("crop-top", "Crop top", "The topmost (y) coordinate of the video crop; top left corner of image is 0,0", 0x80000000, 0x7fffffff, 0, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_CROP_LEFT, g_param_spec_int ("crop-left", "Crop left", "The leftmost (x) coordinate of the video crop; top left corner of image is 0,0", 0x80000000, 0x7fffffff, 0, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_CROP_WIDTH, g_param_spec_uint ("crop-width", "Crop width", "The width of the video crop; default is equal to negotiated image width", 0, 0xffffffff, 0, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_CROP_HEIGHT, g_param_spec_uint ("crop-height", "Crop height", "The height of the video crop; default is equal to negotiated image height", 0, 0xffffffff, 0, G_PARAM_READWRITE)); gst_element_class_set_static_metadata (element_class, "Video (video4linux2) Sink", "Sink/Video", "Displays frames on a video4linux2 device", "Rob Clark <*****@*****.**>,"); gst_element_class_add_pad_template (element_class, gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, gst_v4l2_object_get_all_caps ())); basesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_v4l2sink_get_caps); basesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_v4l2sink_set_caps); basesink_class->propose_allocation = GST_DEBUG_FUNCPTR (gst_v4l2sink_propose_allocation); basesink_class->render = GST_DEBUG_FUNCPTR (gst_v4l2sink_show_frame); klass->v4l2_class_devices = NULL; GST_DEBUG_CATEGORY_INIT (v4l2sink_debug, "v4l2sink", 0, "V4L2 sink element"); }
static void gst_imx_v4l2src_class_init(GstImxV4l2VideoSrcClass *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->set_property = gst_imx_v4l2src_set_property; gobject_class->get_property = gst_imx_v4l2src_get_property; g_object_class_install_property(gobject_class, IMX_V4L2SRC_CAPTURE_MODE, g_param_spec_int("capture-mode", "Capture mode", "Capture mode of camera, varies with each v4l2 driver,\n" "\t\t\t\tfor example ov5460:\n " "\t\t\t\tov5640_mode_VGA_640_480 = 0,\n" "\t\t\t\tov5640_mode_QVGA_320_240 = 1,\n" "\t\t\t\tov5640_mode_NTSC_720_480 = 2,\n" "\t\t\t\tov5640_mode_PAL_720_576 = 3,\n" "\t\t\t\tov5640_mode_720P_1280_720 = 4,\n" "\t\t\t\tov5640_mode_1080P_1920_1080 = 5", 0, G_MAXINT, DEFAULT_CAPTURE_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(gobject_class, IMX_V4L2SRC_FRAMERATE_NUM, g_param_spec_int("fps-n", "FPS numerator", "Numerator of the framerate at which" "the input stream is to be captured", 0, G_MAXINT, DEFAULT_FRAMERATE_NUM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(gobject_class, IMX_V4L2SRC_INPUT, g_param_spec_int("input", "Input", "Video input selected with VIDIOC_S_INPUT", 0, G_MAXINT, DEFAULT_INPUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(gobject_class, IMX_V4L2SRC_DEVICE, g_param_spec_string("device", "Device", "Device location", DEFAULT_DEVICE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(gobject_class, IMX_V4L2SRC_QUEUE_SIZE, g_param_spec_int("queue-size", "Queue size", "Number of V4L2 buffers to request", 0, G_MAXINT, DEFAULT_QUEUE_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(gobject_class, IMX_V4L2SRC_CROP_META_X, g_param_spec_int("crop-meta-x", "Crop meta X", "X value for crop metadata", 0, G_MAXINT, DEFAULT_CROP_META_X, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(gobject_class, IMX_V4L2SRC_CROP_META_Y, g_param_spec_int("crop-meta-y", "Crop meta Y", "Y value for crop metadata", 0, G_MAXINT, DEFAULT_CROP_META_Y, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(gobject_class, IMX_V4L2SRC_CROP_META_WIDTH, g_param_spec_int("crop-meta-width", "Crop meta WIDTH", "WIDTH value for crop metadata", 0, G_MAXINT, DEFAULT_CROP_META_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(gobject_class, IMX_V4L2SRC_CROP_META_HEIGHT, g_param_spec_int("crop-meta-height", "Crop meta HEIGHT", "HEIGHT value for crop metadata", 0, G_MAXINT, DEFAULT_CROP_META_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); basesrc_class->negotiate = gst_imx_v4l2src_negotiate; basesrc_class->get_caps = gst_imx_v4l2src_get_caps; basesrc_class->set_caps = gst_imx_v4l2src_set_caps; basesrc_class->start = gst_imx_v4l2src_start; basesrc_class->stop = gst_imx_v4l2src_stop; basesrc_class->decide_allocation = gst_imx_v4l2src_decide_allocation; pushsrc_class->fill = gst_imx_v4l2src_fill; gst_element_class_set_static_metadata(element_class, "V4L2 CSI Video Source", "Source/Video", "Capture video streams using V4L2 CSI interface", "Philip Craig <*****@*****.**>"); gst_element_class_add_pad_template(element_class, gst_static_pad_template_get(&src_template)); return; }
static void gst_gdk_pixbuf_overlay_class_init (GstGdkPixbufOverlayClass * klass) { GstVideoFilterClass *videofilter_class = GST_VIDEO_FILTER_CLASS (klass); GstBaseTransformClass *basetrans_class = GST_BASE_TRANSFORM_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->set_property = gst_gdk_pixbuf_overlay_set_property; gobject_class->get_property = gst_gdk_pixbuf_overlay_get_property; gobject_class->finalize = gst_gdk_pixbuf_overlay_finalize; basetrans_class->start = GST_DEBUG_FUNCPTR (gst_gdk_pixbuf_overlay_start); basetrans_class->stop = GST_DEBUG_FUNCPTR (gst_gdk_pixbuf_overlay_stop); basetrans_class->before_transform = GST_DEBUG_FUNCPTR (gst_gdk_pixbuf_overlay_before_transform); videofilter_class->set_info = GST_DEBUG_FUNCPTR (gst_gdk_pixbuf_overlay_set_info); videofilter_class->transform_frame_ip = GST_DEBUG_FUNCPTR (gst_gdk_pixbuf_overlay_transform_frame_ip); g_object_class_install_property (gobject_class, PROP_LOCATION, g_param_spec_string ("location", "location", "Location of image file to overlay", NULL, GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OFFSET_X, g_param_spec_int ("offset-x", "X Offset", "For positive value, horizontal offset of overlay image in pixels from" " left of video image. For negative value, horizontal offset of overlay" " image in pixels from right of video image", G_MININT, 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_OFFSET_Y, g_param_spec_int ("offset-y", "Y Offset", "For positive value, vertical offset of overlay image in pixels from" " top of video image. For negative value, vertical offset of overlay" " image in pixels from bottom of video image", G_MININT, 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_RELATIVE_X, g_param_spec_double ("relative-x", "Relative X Offset", "Horizontal offset of overlay image in fractions of video image " "width, from top-left corner of video image", 0.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_RELATIVE_Y, g_param_spec_double ("relative-y", "Relative Y Offset", "Vertical offset of overlay image in fractions of video image " "height, from top-left corner of video image", 0.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)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sink_template)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&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_video_detect_class_init (GstSimpleVideoMarkDetectClass * 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); 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_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_CAPS))); gst_element_class_set_static_metadata (GST_ELEMENT_CLASS (klass), "Video detecter", "Filter/Effect/Video", "Detect patterns in a video signal", "Wim Taymans <*****@*****.**>"); gobject_class->set_property = gst_video_detect_set_property; gobject_class->get_property = gst_video_detect_get_property; gobject_class->dispose = gst_video_detect_dispose; gobject_class->finalize = gst_video_detect_finalize; base_transform_class->start = GST_DEBUG_FUNCPTR (gst_video_detect_start); base_transform_class->stop = GST_DEBUG_FUNCPTR (gst_video_detect_stop); video_filter_class->set_info = GST_DEBUG_FUNCPTR (gst_video_detect_set_info); video_filter_class->transform_frame_ip = GST_DEBUG_FUNCPTR (gst_video_detect_transform_frame_ip); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MESSAGE, g_param_spec_boolean ("message", "Message", "Post detected data as bus 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)); }
/* initialize the opencvtextoverlay's class */ static void gst_opencv_text_overlay_class_init (GstOpencvTextOverlayClass * klass) { GObjectClass *gobject_class; GstOpencvVideoFilterClass *gstopencvbasefilter_class; GstElementClass *element_class = GST_ELEMENT_CLASS (klass); gobject_class = (GObjectClass *) klass; gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_opencv_text_overlay_finalize); gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass; gstopencvbasefilter_class->cv_trans_ip_func = gst_opencv_text_overlay_transform_ip; 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, (GParamFlags) (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, (GParamFlags) (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, (GParamFlags) (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, (GParamFlags) (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, (GParamFlags) (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, (GParamFlags) (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, (GParamFlags) (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, (GParamFlags) (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, (GParamFlags) (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<*****@*****.**>"); gst_element_class_add_static_pad_template (element_class, &src_factory); gst_element_class_add_static_pad_template (element_class, &sink_factory); }
static void gst_multi_socket_sink_class_init (GstMultiSocketSinkClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSinkClass *gstbasesink_class; GstMultiHandleSinkClass *gstmultihandlesink_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesink_class = (GstBaseSinkClass *) klass; gstmultihandlesink_class = (GstMultiHandleSinkClass *) klass; gobject_class->set_property = gst_multi_socket_sink_set_property; gobject_class->get_property = gst_multi_socket_sink_get_property; gobject_class->finalize = gst_multi_socket_sink_finalize; /** * GstMultiSocketSink::add: * @gstmultisocketsink: the multisocketsink element to emit this signal on * @socket: the socket to add to multisocketsink * * Hand the given open socket to multisocketsink to write to. */ gst_multi_socket_sink_signals[SIGNAL_ADD] = g_signal_new ("add", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstMultiSocketSinkClass, add), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_SOCKET); /** * GstMultiSocketSink::add-full: * @gstmultisocketsink: the multisocketsink element to emit this signal on * @socket: the socket to add to multisocketsink * @sync: the sync method to use * @format_min: the format of @value_min * @value_min: the minimum amount of data to burst expressed in * @format_min units. * @format_max: the format of @value_max * @value_max: the maximum amount of data to burst expressed in * @format_max units. * * Hand the given open socket to multisocketsink to write to and * specify the burst parameters for the new connection. */ gst_multi_socket_sink_signals[SIGNAL_ADD_BURST] = g_signal_new ("add-full", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstMultiSocketSinkClass, add_full), NULL, NULL, gst_tcp_marshal_VOID__OBJECT_ENUM_ENUM_UINT64_ENUM_UINT64, G_TYPE_NONE, 6, G_TYPE_SOCKET, GST_TYPE_SYNC_METHOD, GST_TYPE_FORMAT, G_TYPE_UINT64, GST_TYPE_FORMAT, G_TYPE_UINT64); /** * GstMultiSocketSink::remove: * @gstmultisocketsink: the multisocketsink element to emit this signal on * @socket: the socket to remove from multisocketsink * * Remove the given open socket from multisocketsink. */ gst_multi_socket_sink_signals[SIGNAL_REMOVE] = g_signal_new ("remove", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstMultiSocketSinkClass, remove), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_SOCKET); /** * GstMultiSocketSink::remove-flush: * @gstmultisocketsink: the multisocketsink element to emit this signal on * @socket: the socket to remove from multisocketsink * * Remove the given open socket from multisocketsink after flushing all * the pending data to the socket. */ gst_multi_socket_sink_signals[SIGNAL_REMOVE_FLUSH] = g_signal_new ("remove-flush", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstMultiSocketSinkClass, remove_flush), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_SOCKET); /** * GstMultiSocketSink::get-stats: * @gstmultisocketsink: the multisocketsink element to emit this signal on * @socket: the socket to get stats of from multisocketsink * * Get statistics about @socket. This function returns a GstStructure. * * Returns: a GstStructure with the statistics. The structure contains * values that represent: total number of bytes sent, time * when the client was added, time when the client was * disconnected/removed, time the client is/was active, last activity * time (in epoch seconds), number of buffers dropped. * All times are expressed in nanoseconds (GstClockTime). */ gst_multi_socket_sink_signals[SIGNAL_GET_STATS] = g_signal_new ("get-stats", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstMultiSocketSinkClass, get_stats), NULL, NULL, gst_tcp_marshal_BOXED__OBJECT, GST_TYPE_STRUCTURE, 1, G_TYPE_SOCKET); /** * GstMultiSocketSink::client-added: * @gstmultisocketsink: the multisocketsink element that emitted this signal * @socket: the socket that was added to multisocketsink * * The given socket was added to multisocketsink. This signal will * be emitted from the streaming thread so application should be prepared * for that. */ gst_multi_socket_sink_signals[SIGNAL_CLIENT_ADDED] = g_signal_new ("client-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); /** * GstMultiSocketSink::client-removed: * @gstmultisocketsink: the multisocketsink element that emitted this signal * @socket: the socket that is to be removed from multisocketsink * @status: the reason why the client was removed * * The given socket is about to be removed from multisocketsink. This * signal will be emitted from the streaming thread so applications should * be prepared for that. * * @gstmultisocketsink still holds a handle to @socket so it is possible to call * the get-stats signal from this callback. For the same reason it is * not safe to close() and reuse @socket in this callback. */ gst_multi_socket_sink_signals[SIGNAL_CLIENT_REMOVED] = g_signal_new ("client-removed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, gst_tcp_marshal_VOID__OBJECT_ENUM, G_TYPE_NONE, 2, G_TYPE_INT, GST_TYPE_CLIENT_STATUS); /** * GstMultiSocketSink::client-socket-removed: * @gstmultisocketsink: the multisocketsink element that emitted this signal * @socket: the socket that was removed from multisocketsink * * The given socket was removed from multisocketsink. This signal will * be emitted from the streaming thread so applications should be prepared * for that. * * In this callback, @gstmultisocketsink has removed all the information * associated with @socket and it is therefore not possible to call get-stats * with @socket. It is however safe to close() and reuse @fd in the callback. * * Since: 0.10.7 */ gst_multi_socket_sink_signals[SIGNAL_CLIENT_SOCKET_REMOVED] = g_signal_new ("client-socket-removed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_SOCKET); gst_element_class_set_static_metadata (gstelement_class, "Multi socket sink", "Sink/Network", "Send data to multiple sockets", "Thomas Vander Stichele <thomas at apestaart dot org>, " "Wim Taymans <*****@*****.**>, " "Sebastian Dröge <*****@*****.**>"); gstbasesink_class->unlock = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_unlock); gstbasesink_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_unlock_stop); klass->add = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_add); klass->add_full = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_add_full); klass->remove = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_remove); klass->remove_flush = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_remove_flush); klass->get_stats = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_get_stats); gstmultihandlesink_class->emit_client_added = gst_multi_socket_sink_emit_client_added; gstmultihandlesink_class->emit_client_removed = gst_multi_socket_sink_emit_client_removed; gstmultihandlesink_class->stop_pre = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_stop_pre); gstmultihandlesink_class->stop_post = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_stop_post); gstmultihandlesink_class->start_pre = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_start_pre); gstmultihandlesink_class->thread = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_thread); gstmultihandlesink_class->new_client = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_new_client); gstmultihandlesink_class->client_get_fd = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_client_get_fd); gstmultihandlesink_class->client_free = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_client_free); gstmultihandlesink_class->handle_debug = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_handle_debug); gstmultihandlesink_class->handle_hash_key = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_handle_hash_key); gstmultihandlesink_class->hash_adding = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_hash_adding); gstmultihandlesink_class->hash_removing = GST_DEBUG_FUNCPTR (gst_multi_socket_sink_hash_removing); GST_DEBUG_CATEGORY_INIT (multisocketsink_debug, "multisocketsink", 0, "Multi socket sink"); }
static void gst_hls_demux_class_init (GstHLSDemuxClass * klass) { GObjectClass *gobject_class; GstElementClass *element_class; GstAdaptiveDemuxClass *adaptivedemux_class; gobject_class = (GObjectClass *) klass; element_class = (GstElementClass *) klass; adaptivedemux_class = (GstAdaptiveDemuxClass *) klass; gobject_class->set_property = gst_hls_demux_set_property; gobject_class->get_property = gst_hls_demux_get_property; gobject_class->dispose = gst_hls_demux_dispose; #ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_FRAGMENTS_CACHE, g_param_spec_uint ("fragments-cache", "Fragments cache", "Number of fragments needed to be cached to start playing " "(DEPRECATED: Has no effect since 1.3.1)", 1, G_MAXUINT, DEFAULT_FRAGMENTS_CACHE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); #endif element_class->change_state = GST_DEBUG_FUNCPTR (gst_hls_demux_change_state); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&srctemplate)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sinktemplate)); gst_element_class_set_static_metadata (element_class, "HLS Demuxer", "Codec/Demuxer/Adaptive", "HTTP Live Streaming demuxer", "Marc-Andre Lureau <*****@*****.**>\n" "Andoni Morales Alastruey <*****@*****.**>"); adaptivedemux_class->is_live = gst_hls_demux_is_live; adaptivedemux_class->get_live_seek_range = gst_hls_demux_get_live_seek_range; adaptivedemux_class->get_duration = gst_hls_demux_get_duration; adaptivedemux_class->get_manifest_update_interval = gst_hls_demux_get_manifest_update_interval; adaptivedemux_class->process_manifest = gst_hls_demux_process_manifest; adaptivedemux_class->update_manifest = gst_hls_demux_update_manifest; adaptivedemux_class->reset = gst_hls_demux_reset; adaptivedemux_class->seek = gst_hls_demux_seek; adaptivedemux_class->stream_has_next_fragment = gst_hls_demux_stream_has_next_fragment; adaptivedemux_class->stream_advance_fragment = gst_hls_demux_advance_fragment; adaptivedemux_class->stream_update_fragment_info = gst_hls_demux_update_fragment_info; adaptivedemux_class->stream_select_bitrate = gst_hls_demux_select_bitrate; adaptivedemux_class->start_fragment = gst_hls_demux_start_fragment; adaptivedemux_class->finish_fragment = gst_hls_demux_finish_fragment; adaptivedemux_class->data_received = gst_hls_demux_data_received; GST_DEBUG_CATEGORY_INIT (gst_hls_demux_debug, "hlsdemux", 0, "hlsdemux element"); }
static void gst_udpsrc_class_init (GstUDPSrcClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSrcClass *gstbasesrc_class; GstPushSrcClass *gstpushsrc_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; gstpushsrc_class = (GstPushSrcClass *) klass; GST_DEBUG_CATEGORY_INIT (udpsrc_debug, "udpsrc", 0, "UDP src"); gobject_class->set_property = gst_udpsrc_set_property; gobject_class->get_property = gst_udpsrc_get_property; gobject_class->finalize = gst_udpsrc_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT, g_param_spec_int ("port", "Port", "The port to receive the packets from, 0=allocate", 0, G_MAXUINT16, UDP_DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* FIXME 2.0: Remove multicast-group property */ #ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_MULTICAST_GROUP, g_param_spec_string ("multicast-group", "Multicast Group", "The Address of multicast group to join. (DEPRECATED: " "Use address property instead)", UDP_DEFAULT_MULTICAST_GROUP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); #endif g_object_class_install_property (gobject_class, PROP_MULTICAST_IFACE, g_param_spec_string ("multicast-iface", "Multicast Interface", "The network interface on which to join the multicast group", UDP_DEFAULT_MULTICAST_IFACE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_URI, g_param_spec_string ("uri", "URI", "URI in the form of udp://multicast_group:port", UDP_DEFAULT_URI, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CAPS, g_param_spec_boxed ("caps", "Caps", "The caps of the source pad", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SOCKET, g_param_spec_object ("socket", "Socket", "Socket to use for UDP reception. (NULL == allocate)", G_TYPE_SOCKET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFFER_SIZE, g_param_spec_int ("buffer-size", "Buffer Size", "Size of the kernel receive buffer in bytes, 0=default", 0, G_MAXINT, UDP_DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_TIMEOUT, g_param_spec_uint64 ("timeout", "Timeout", "Post a message after timeout nanoseconds (0 = disabled)", 0, G_MAXUINT64, UDP_DEFAULT_TIMEOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SKIP_FIRST_BYTES, g_param_spec_int ("skip-first-bytes", "Skip first bytes", "number of bytes to skip for each udp packet", 0, G_MAXINT, UDP_DEFAULT_SKIP_FIRST_BYTES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CLOSE_SOCKET, g_param_spec_boolean ("close-socket", "Close socket", "Close socket if passed as property on state change", UDP_DEFAULT_CLOSE_SOCKET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_USED_SOCKET, g_param_spec_object ("used-socket", "Socket Handle", "Socket currently in use for UDP reception. (NULL = no socket)", G_TYPE_SOCKET, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_AUTO_MULTICAST, g_param_spec_boolean ("auto-multicast", "Auto Multicast", "Automatically join/leave multicast groups", UDP_DEFAULT_AUTO_MULTICAST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_REUSE, g_param_spec_boolean ("reuse", "Reuse", "Enable reuse of the port", UDP_DEFAULT_REUSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ADDRESS, g_param_spec_string ("address", "Address", "Address to receive packets for. This is equivalent to the " "multicast-group property for now", UDP_DEFAULT_MULTICAST_GROUP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_template)); gst_element_class_set_static_metadata (gstelement_class, "UDP packet receiver", "Source/Network", "Receive data over the network via UDP", "Wim Taymans <*****@*****.**>, " "Thijs Vermeir <*****@*****.**>"); gstelement_class->change_state = gst_udpsrc_change_state; gstbasesrc_class->unlock = gst_udpsrc_unlock; gstbasesrc_class->unlock_stop = gst_udpsrc_unlock_stop; gstbasesrc_class->get_caps = gst_udpsrc_getcaps; gstbasesrc_class->negotiate = gst_udpsrc_negotiate; gstpushsrc_class->create = gst_udpsrc_create; }
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 <*****@*****.**>"); 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_pad_template (element_class, gst_static_pad_template_get (&sinktemplate)); }
static void gst_vp9_dec_class_init (GstVP9DecClass * klass) { GObjectClass *gobject_class; GstElementClass *element_class; GstVideoDecoderClass *base_video_decoder_class; gobject_class = G_OBJECT_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass); base_video_decoder_class = GST_VIDEO_DECODER_CLASS (klass); gobject_class->set_property = gst_vp9_dec_set_property; gobject_class->get_property = gst_vp9_dec_get_property; g_object_class_install_property (gobject_class, PROP_POST_PROCESSING, g_param_spec_boolean ("post-processing", "Post Processing", "Enable post processing", DEFAULT_POST_PROCESSING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_POST_PROCESSING_FLAGS, g_param_spec_flags ("post-processing-flags", "Post Processing Flags", "Flags to control post processing", GST_VP9_DEC_TYPE_POST_PROCESSING_FLAGS, DEFAULT_POST_PROCESSING_FLAGS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DEBLOCKING_LEVEL, g_param_spec_uint ("deblocking-level", "Deblocking Level", "Deblocking level", 0, 16, DEFAULT_DEBLOCKING_LEVEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_NOISE_LEVEL, g_param_spec_uint ("noise-level", "Noise Level", "Noise level", 0, 16, DEFAULT_NOISE_LEVEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_THREADS, g_param_spec_uint ("threads", "Max Threads", "Maximum number of decoding threads", 1, 16, DEFAULT_THREADS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_vp9_dec_src_template)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_vp9_dec_sink_template)); gst_element_class_set_static_metadata (element_class, "On2 VP9 Decoder", "Codec/Decoder/Video", "Decode VP9 video streams", "David Schleef <*****@*****.**>, " "Sebastian Dröge <*****@*****.**>"); base_video_decoder_class->start = GST_DEBUG_FUNCPTR (gst_vp9_dec_start); base_video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_vp9_dec_stop); base_video_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_vp9_dec_flush); base_video_decoder_class->set_format = GST_DEBUG_FUNCPTR (gst_vp9_dec_set_format); base_video_decoder_class->handle_frame = GST_DEBUG_FUNCPTR (gst_vp9_dec_handle_frame); base_video_decoder_class->decide_allocation = gst_vp9_dec_decide_allocation; GST_DEBUG_CATEGORY_INIT (gst_vp9dec_debug, "vp9dec", 0, "VP9 Decoder"); }
/* initialize the plugin's class */ static void gst_dvbsrc_class_init (GstDvbSrcClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSrcClass *gstbasesrc_class; GstPushSrcClass *gstpushsrc_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; gstpushsrc_class = (GstPushSrcClass *) klass; gobject_class->set_property = gst_dvbsrc_set_property; gobject_class->get_property = gst_dvbsrc_get_property; gobject_class->finalize = gst_dvbsrc_finalize; gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_dvbsrc_change_state); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&ts_src_factory)); gst_element_class_set_static_metadata (gstelement_class, "DVB Source", "Source/Video", "Digital Video Broadcast Source", "P2P-VCR, C-Lab, University of Paderborn," "Zaheer Abbas Merali <zaheerabbas at merali dot org>"); gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_dvbsrc_start); gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_dvbsrc_stop); gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_dvbsrc_unlock); gstbasesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_dvbsrc_unlock_stop); gstbasesrc_class->is_seekable = GST_DEBUG_FUNCPTR (gst_dvbsrc_is_seekable); gstbasesrc_class->get_size = GST_DEBUG_FUNCPTR (gst_dvbsrc_get_size); gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_dvbsrc_create); g_object_class_install_property (gobject_class, ARG_DVBSRC_ADAPTER, g_param_spec_int ("adapter", "The adapter device number", "The adapter device number (eg. 0 for adapter0)", 0, 16, DEFAULT_ADAPTER, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_FRONTEND, g_param_spec_int ("frontend", "The frontend device number", "The frontend device number (eg. 0 for frontend0)", 0, 16, DEFAULT_FRONTEND, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_FREQUENCY, g_param_spec_uint ("frequency", "frequency", "Frequency", 0, G_MAXUINT, DEFAULT_FREQUENCY, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_POLARITY, g_param_spec_string ("polarity", "polarity", "Polarity [vhHV] (DVB-S)", DEFAULT_POLARITY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, ARG_DVBSRC_PIDS, g_param_spec_string ("pids", "pids", "Colon seperated list of pids (eg. 110:120)", DEFAULT_PIDS, G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_SYM_RATE, g_param_spec_uint ("symbol-rate", "symbol rate", "Symbol Rate (DVB-S, DVB-C)", 0, G_MAXUINT, DEFAULT_SYMBOL_RATE, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_TUNE, g_param_spec_pointer ("tune", "tune", "Atomically tune to channel. (For Apps)", G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_DISEQC_SRC, g_param_spec_int ("diseqc-source", "diseqc source", "DISEqC selected source (-1 disabled) (DVB-S)", -1, 7, DEFAULT_DISEQC_SRC, G_PARAM_READWRITE)); /* DVB-T, additional properties */ g_object_class_install_property (gobject_class, ARG_DVBSRC_BANDWIDTH, g_param_spec_enum ("bandwidth", "bandwidth", "Bandwidth (DVB-T)", GST_TYPE_DVBSRC_BANDWIDTH, DEFAULT_BANDWIDTH, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_CODE_RATE_HP, g_param_spec_enum ("code-rate-hp", "code-rate-hp", "High Priority Code Rate (DVB-T, DVB-S and DVB-C)", GST_TYPE_DVBSRC_CODE_RATE, DEFAULT_CODE_RATE_HP, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_CODE_RATE_LP, g_param_spec_enum ("code-rate-lp", "code-rate-lp", "Low Priority Code Rate (DVB-T)", GST_TYPE_DVBSRC_CODE_RATE, DEFAULT_CODE_RATE_LP, G_PARAM_READWRITE)); /* FIXME: should the property be called 'guard-interval' then? */ g_object_class_install_property (gobject_class, ARG_DVBSRC_GUARD, g_param_spec_enum ("guard", "guard", "Guard Interval (DVB-T)", GST_TYPE_DVBSRC_GUARD, DEFAULT_GUARD, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_MODULATION, g_param_spec_enum ("modulation", "modulation", "Modulation (DVB-T and DVB-C)", GST_TYPE_DVBSRC_MODULATION, DEFAULT_MODULATION, G_PARAM_READWRITE)); /* FIXME: property should be named 'transmission-mode' */ g_object_class_install_property (gobject_class, ARG_DVBSRC_TRANSMISSION_MODE, g_param_spec_enum ("trans-mode", "trans-mode", "Transmission Mode (DVB-T)", GST_TYPE_DVBSRC_TRANSMISSION_MODE, DEFAULT_TRANSMISSION_MODE, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_HIERARCHY_INF, g_param_spec_enum ("hierarchy", "hierarchy", "Hierarchy Information (DVB-T)", GST_TYPE_DVBSRC_HIERARCHY, DEFAULT_HIERARCHY, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_INVERSION, g_param_spec_enum ("inversion", "inversion", "Inversion Information (DVB-T and DVB-C)", GST_TYPE_DVBSRC_INVERSION, DEFAULT_INVERSION, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_STATS_REPORTING_INTERVAL, g_param_spec_uint ("stats-reporting-interval", "stats-reporting-interval", "The number of reads before reporting frontend stats", 0, G_MAXUINT, DEFAULT_STATS_REPORTING_INTERVAL, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_TIMEOUT, g_param_spec_uint64 ("timeout", "Timeout", "Post a message after timeout microseconds (0 = disabled)", 0, G_MAXUINT64, DEFAULT_TIMEOUT, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DVBSRC_DVB_BUFFER_SIZE, g_param_spec_uint ("dvb-buffer-size", "dvb-buffer-size", "The kernel buffer size used by the DVB api", 0, G_MAXUINT, DEFAULT_DVB_BUFFER_SIZE, G_PARAM_READWRITE)); }
static void gst_mpg123_audio_dec_class_init (GstMpg123AudioDecClass * klass) { GstAudioDecoderClass *base_class; GstElementClass *element_class; GstPadTemplate *src_template, *sink_template; int error; GST_DEBUG_CATEGORY_INIT (mpg123_debug, "mpg123", 0, "mpg123 mp3 decoder"); base_class = GST_AUDIO_DECODER_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass); gst_element_class_set_static_metadata (element_class, "mpg123 mp3 decoder", "Codec/Decoder/Audio", "Decodes mp3 streams using the mpg123 library", "Carlos Rafael Giani <*****@*****.**>"); /* Not using static pad template for srccaps, since the comma-separated list * of formats needs to be created depending on whatever mpg123 supports */ { const int *format_list; const long *rates_list; size_t num, i; GString *s; GstCaps *src_template_caps; s = g_string_new ("audio/x-raw, "); mpg123_encodings (&format_list, &num); g_string_append (s, "format = { "); for (i = 0; i < num; ++i) { switch (format_list[i]) { case MPG123_ENC_SIGNED_16: g_string_append (s, (i > 0) ? ", " : ""); g_string_append (s, GST_AUDIO_NE (S16)); break; case MPG123_ENC_UNSIGNED_16: g_string_append (s, (i > 0) ? ", " : ""); g_string_append (s, GST_AUDIO_NE (U16)); break; case MPG123_ENC_SIGNED_24: g_string_append (s, (i > 0) ? ", " : ""); g_string_append (s, GST_AUDIO_NE (S24)); break; case MPG123_ENC_UNSIGNED_24: g_string_append (s, (i > 0) ? ", " : ""); g_string_append (s, GST_AUDIO_NE (U24)); break; case MPG123_ENC_SIGNED_32: g_string_append (s, (i > 0) ? ", " : ""); g_string_append (s, GST_AUDIO_NE (S32)); break; case MPG123_ENC_UNSIGNED_32: g_string_append (s, (i > 0) ? ", " : ""); g_string_append (s, GST_AUDIO_NE (U32)); break; case MPG123_ENC_FLOAT_32: g_string_append (s, (i > 0) ? ", " : ""); g_string_append (s, GST_AUDIO_NE (F32)); break; default: GST_DEBUG ("Ignoring mpg123 format %d", format_list[i]); break; } } g_string_append (s, " }, "); mpg123_rates (&rates_list, &num); g_string_append (s, "rate = (int) { "); for (i = 0; i < num; ++i) { g_string_append_printf (s, "%s%lu", (i > 0) ? ", " : "", rates_list[i]); } g_string_append (s, "}, "); g_string_append (s, "channels = (int) [ 1, 2 ], "); g_string_append (s, "layout = (string) interleaved"); src_template_caps = gst_caps_from_string (s->str); src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, src_template_caps); g_string_free (s, TRUE); } sink_template = gst_static_pad_template_get (&static_sink_template); gst_element_class_add_pad_template (element_class, sink_template); gst_element_class_add_pad_template (element_class, src_template); base_class->start = GST_DEBUG_FUNCPTR (gst_mpg123_audio_dec_start); base_class->stop = GST_DEBUG_FUNCPTR (gst_mpg123_audio_dec_stop); base_class->handle_frame = GST_DEBUG_FUNCPTR (gst_mpg123_audio_dec_handle_frame); base_class->set_format = GST_DEBUG_FUNCPTR (gst_mpg123_audio_dec_set_format); base_class->flush = GST_DEBUG_FUNCPTR (gst_mpg123_audio_dec_flush); error = mpg123_init (); if (G_UNLIKELY (error != MPG123_OK)) GST_ERROR ("Could not initialize mpg123 library: %s", mpg123_plain_strerror (error)); else GST_INFO ("mpg123 library initialized"); }
static void gst_app_sink_class_init (GstAppSinkClass * klass) { GObjectClass *gobject_class = (GObjectClass *) klass; GstElementClass *element_class = (GstElementClass *) klass; GstBaseSinkClass *basesink_class = (GstBaseSinkClass *) klass; GST_DEBUG_CATEGORY_INIT (app_sink_debug, "appsink", 0, "appsink element"); gobject_class->dispose = gst_app_sink_dispose; gobject_class->finalize = gst_app_sink_finalize; gobject_class->set_property = gst_app_sink_set_property; gobject_class->get_property = gst_app_sink_get_property; g_object_class_install_property (gobject_class, PROP_CAPS, g_param_spec_boxed ("caps", "Caps", "The allowed caps for the sink pad", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EOS, g_param_spec_boolean ("eos", "EOS", "Check if the sink is EOS or not started", DEFAULT_PROP_EOS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EMIT_SIGNALS, g_param_spec_boolean ("emit-signals", "Emit signals", "Emit new-preroll and new-sample signals", DEFAULT_PROP_EMIT_SIGNALS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_MAX_BUFFERS, g_param_spec_uint ("max-buffers", "Max Buffers", "The maximum number of buffers to queue internally (0 = unlimited)", 0, G_MAXUINT, DEFAULT_PROP_MAX_BUFFERS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DROP, g_param_spec_boolean ("drop", "Drop", "Drop old buffers when the buffer queue is filled", DEFAULT_PROP_DROP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstAppSink::wait-on-eos: * * Wait for all buffers to be processed after receiving an EOS. * * In cases where it is uncertain if an @appsink will have a consumer for its buffers * when it receives an EOS, set to %FALSE to ensure that the @appsink will not hang. * * Since: 1.8 */ g_object_class_install_property (gobject_class, PROP_WAIT_ON_EOS, g_param_spec_boolean ("wait-on-eos", "Wait on EOS", "Wait for all buffers to be processed after receiving an EOS", DEFAULT_PROP_WAIT_ON_EOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstAppSink::eos: * @appsink: the appsink element that emitted the signal * * Signal that the end-of-stream has been reached. This signal is emitted from * the streaming thread. */ gst_app_sink_signals[SIGNAL_EOS] = g_signal_new ("eos", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstAppSinkClass, eos), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE); /** * GstAppSink::new-preroll: * @appsink: the appsink element that emitted the signal * * Signal that a new preroll sample is available. * * This signal is emitted from the streaming thread and only when the * "emit-signals" property is %TRUE. * * The new preroll sample can be retrieved with the "pull-preroll" action * signal or gst_app_sink_pull_preroll() either from this signal callback * or from any other thread. * * Note that this signal is only emitted when the "emit-signals" property is * set to %TRUE, which it is not by default for performance reasons. */ gst_app_sink_signals[SIGNAL_NEW_PREROLL] = g_signal_new ("new-preroll", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstAppSinkClass, new_preroll), NULL, NULL, __gst_app_marshal_ENUM__VOID, GST_TYPE_FLOW_RETURN, 0, G_TYPE_NONE); /** * GstAppSink::new-sample: * @appsink: the appsink element that emited the signal * * Signal that a new sample is available. * * This signal is emitted from the streaming thread and only when the * "emit-signals" property is %TRUE. * * The new sample can be retrieved with the "pull-sample" action * signal or gst_app_sink_pull_sample() either from this signal callback * or from any other thread. * * Note that this signal is only emitted when the "emit-signals" property is * set to %TRUE, which it is not by default for performance reasons. */ gst_app_sink_signals[SIGNAL_NEW_SAMPLE] = g_signal_new ("new-sample", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstAppSinkClass, new_sample), NULL, NULL, __gst_app_marshal_ENUM__VOID, GST_TYPE_FLOW_RETURN, 0, G_TYPE_NONE); /** * GstAppSink::pull-preroll: * @appsink: the appsink element to emit this signal on * * Get the last preroll sample in @appsink. This was the sample that caused the * appsink to preroll in the PAUSED state. This sample can be pulled many times * and remains available to the application even after EOS. * * This function is typically used when dealing with a pipeline in the PAUSED * state. Calling this function after doing a seek will give the sample right * after the seek position. * * Note that the preroll sample will also be returned as the first sample * when calling gst_app_sink_pull_sample() or the "pull-sample" action signal. * * If an EOS event was received before any buffers, this function returns * %NULL. Use gst_app_sink_is_eos () to check for the EOS condition. * * This function blocks until a preroll sample or EOS is received or the appsink * element is set to the READY/NULL state. * * Returns: a #GstSample or NULL when the appsink is stopped or EOS. */ gst_app_sink_signals[SIGNAL_PULL_PREROLL] = g_signal_new ("pull-preroll", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSinkClass, pull_preroll), NULL, NULL, __gst_app_marshal_BOXED__VOID, GST_TYPE_SAMPLE, 0, G_TYPE_NONE); /** * GstAppSink::pull-sample: * @appsink: the appsink element to emit this signal on * * This function blocks until a sample or EOS becomes available or the appsink * element is set to the READY/NULL state. * * This function will only return samples when the appsink is in the PLAYING * state. All rendered samples will be put in a queue so that the application * can pull samples at its own rate. * * Note that when the application does not pull samples fast enough, the * queued samples could consume a lot of memory, especially when dealing with * raw video frames. It's possible to control the behaviour of the queue with * the "drop" and "max-buffers" properties. * * If an EOS event was received before any buffers, this function returns * %NULL. Use gst_app_sink_is_eos () to check for the EOS condition. * * Returns: a #GstSample or NULL when the appsink is stopped or EOS. */ gst_app_sink_signals[SIGNAL_PULL_SAMPLE] = g_signal_new ("pull-sample", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSinkClass, pull_sample), NULL, NULL, __gst_app_marshal_BOXED__VOID, GST_TYPE_SAMPLE, 0, G_TYPE_NONE); gst_element_class_set_static_metadata (element_class, "AppSink", "Generic/Sink", "Allow the application to get access to raw buffer", "David Schleef <*****@*****.**>, Wim Taymans <*****@*****.**>"); gst_element_class_add_static_pad_template (element_class, &gst_app_sink_template); basesink_class->unlock = gst_app_sink_unlock_start; basesink_class->unlock_stop = gst_app_sink_unlock_stop; basesink_class->start = gst_app_sink_start; basesink_class->stop = gst_app_sink_stop; basesink_class->event = gst_app_sink_event; basesink_class->preroll = gst_app_sink_preroll; basesink_class->render = gst_app_sink_render; basesink_class->get_caps = gst_app_sink_getcaps; basesink_class->set_caps = gst_app_sink_setcaps; basesink_class->query = gst_app_sink_query; klass->pull_preroll = gst_app_sink_pull_preroll; klass->pull_sample = gst_app_sink_pull_sample; g_type_class_add_private (klass, sizeof (GstAppSinkPrivate)); }
static void gst_er_dtls_enc_class_init(GstErDtlsEncClass *klass) { GObjectClass *gobject_class; GstElementClass *element_class; gobject_class = (GObjectClass *) klass; element_class = (GstElementClass *) klass; gobject_class->finalize = GST_DEBUG_FUNCPTR(gst_er_dtls_enc_finalize); gobject_class->set_property = GST_DEBUG_FUNCPTR(gst_er_dtls_enc_set_property); gobject_class->get_property = GST_DEBUG_FUNCPTR(gst_er_dtls_enc_get_property); element_class->change_state = GST_DEBUG_FUNCPTR(gst_er_dtls_enc_change_state); element_class->request_new_pad = GST_DEBUG_FUNCPTR(gst_er_dtls_enc_request_new_pad); signals[SIGNAL_ON_KEY_RECEIVED] = g_signal_new("on-key-received", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0); properties[PROP_CONNECTION_ID] = g_param_spec_string("connection-id", "Connection id", "Every encoder/decoder pair should have the same, unique, connection-id", DEFAULT_CONNECTION_ID, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); properties[PROP_IS_CLIENT] = g_param_spec_boolean("is-client", "Is client", "Set to true if the decoder should act as" "client and initiate the handshake", DEFAULT_IS_CLIENT, GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); properties[PROP_ENCODER_KEY] = g_param_spec_boxed("encoder-key", "Encoder key", "Master key that should be used by the SRTP encoder", GST_TYPE_BUFFER, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); properties[PROP_SRTP_CIPHER] = g_param_spec_uint("srtp-cipher", "SRTP cipher", "The SRTP cipher selected in the DTLS handshake. " "The value will be set to an ErDtlsSrtpCipher.", 0, ER_DTLS_SRTP_CIPHER_AES_128_ICM, DEFAULT_SRTP_CIPHER, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); properties[PROP_SRTP_AUTH] = g_param_spec_uint("srtp-auth", "SRTP authentication", "The SRTP authentication selected in the DTLS handshake. " "The value will be set to an ErDtlsSrtpAuth.", 0, ER_DTLS_SRTP_AUTH_HMAC_SHA1_80, DEFAULT_SRTP_AUTH, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties(gobject_class, NUM_PROPERTIES, properties); gst_element_class_add_pad_template(element_class, gst_static_pad_template_get(&src_template)); gst_element_class_add_pad_template(element_class, gst_static_pad_template_get(&sink_template)); gst_element_class_set_static_metadata(element_class, "DTLS Encoder", "Encoder/Network/DTLS", "Encodes packets with DTLS", "Patrik Oldsberg [email protected]"); }
static void gst_rpi_cam_src_class_init (GstRpiCamSrcClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSrcClass *basesrc_class; GstPushSrcClass *pushsrc_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; basesrc_class = (GstBaseSrcClass *) klass; pushsrc_class = (GstPushSrcClass *) klass; gobject_class->finalize = gst_rpi_cam_src_finalize; gobject_class->set_property = gst_rpi_cam_src_set_property; gobject_class->get_property = gst_rpi_cam_src_get_property; g_object_class_install_property (gobject_class, PROP_CAMERA_NUMBER, g_param_spec_int ("camera-number", "Camera Number", "Which camera to use on a multi-camera system - 0 or 1", 0, 1, CAMERA_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_BITRATE, g_param_spec_int ("bitrate", "Bitrate", "Bitrate for encoding. 0 for VBR using quantisation-parameter", 0, BITRATE_HIGHEST, BITRATE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_KEYFRAME_INTERVAL, g_param_spec_int ("keyframe-interval", "Keyframe Interface", "Interval (in frames) between I frames. -1 = automatic, 0 = single-keyframe", -1, G_MAXINT, KEYFRAME_INTERVAL_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PREVIEW, g_param_spec_boolean ("preview", "Preview Window", "Display preview window overlay", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FULLSCREEN, g_param_spec_boolean ("fullscreen", "Fullscreen Preview", "Display preview window full screen", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PREVIEW_ENCODED, g_param_spec_boolean ("preview-encoded", "Preview Encoded", "Display encoder output in the preview", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PREVIEW_OPACITY, g_param_spec_int ("preview-opacity", "Preview Opacity", "Opacity to use for the preview window", 0, 255, 255, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SHARPNESS, g_param_spec_int ("sharpness", "Sharpness", "Image capture sharpness", -100, 100, SHARPNESS_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CONTRAST, g_param_spec_int ("contrast", "Contrast", "Image capture contrast", -100, 100, CONTRAST_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_BRIGHTNESS, g_param_spec_int ("brightness", "Brightness", "Image capture brightness", 0, 100, BRIGHTNESS_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SATURATION, g_param_spec_int ("saturation", "Saturation", "Image capture saturation", -100, 100, SATURATION_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ISO, g_param_spec_int ("iso", "ISO", "ISO value to use (0 = Auto)", 0, 3200, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_VIDEO_STABILISATION, g_param_spec_boolean ("video-stabilisation", "Video Stabilisation", "Enable or disable video stabilisation", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EXPOSURE_COMPENSATION, g_param_spec_int ("exposure-compensation", "EV compensation", "Exposure Value compensation", -10, 10, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EXPOSURE_MODE, g_param_spec_enum ("exposure-mode", "Exposure Mode", "Camera exposure mode to use", GST_RPI_CAM_TYPE_RPI_CAM_SRC_EXPOSURE_MODE, EXPOSURE_MODE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EXPOSURE_METERING_MODE, g_param_spec_enum ("metering-mode", "Exposure Metering Mode", "Camera exposure metering mode to use", GST_RPI_CAM_TYPE_RPI_CAM_SRC_EXPOSURE_METERING_MODE, EXPOSURE_METERING_MODE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DRC, g_param_spec_enum ("drc", "DRC level", "Dynamic Range Control level", GST_RPI_CAM_TYPE_RPI_CAM_SRC_DRC_LEVEL, GST_RPI_CAM_SRC_DRC_LEVEL_OFF, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_AWB_MODE, g_param_spec_enum ("awb-mode", "Automatic White Balance Mode", "White Balance mode", GST_RPI_CAM_TYPE_RPI_CAM_SRC_AWB_MODE, GST_RPI_CAM_SRC_AWB_MODE_AUTO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_AWB_GAIN_RED, g_param_spec_float ("awb-gain-red", "AWB Red Gain", "Manual AWB Gain for red channel when awb-mode=off", 0, 8.0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_AWB_GAIN_BLUE, g_param_spec_float ("awb-gain-blue", "AWB Blue Gain", "Manual AWB Gain for blue channel when awb-mode=off", 0, 8.0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_IMAGE_EFFECT, g_param_spec_enum ("image-effect", "Image effect", "Visual FX to apply to the image", GST_RPI_CAM_TYPE_RPI_CAM_SRC_IMAGE_EFFECT, GST_RPI_CAM_SRC_IMAGEFX_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #if 0 PROP_IMAGE_EFFECT_PARAMS, PROP_COLOUR_EFFECTS, #endif g_object_class_install_property (gobject_class, PROP_ROTATION, g_param_spec_int ("rotation", "Rotation", "Rotate captured image (0, 90, 180, 270 degrees)", 0, 270, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_HFLIP, g_param_spec_boolean ("hflip", "Horizontal Flip", "Flip capture horizontally", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_VFLIP, g_param_spec_boolean ("vflip", "Vertical Flip", "Flip capture vertically", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ROI_X, g_param_spec_float ("roi-x", "ROI X", "Normalised region-of-interest X coord", 0, 1.0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ROI_Y, g_param_spec_float ("roi-y", "ROI Y", "Normalised region-of-interest Y coord", 0, 1.0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ROI_W, g_param_spec_float ("roi-w", "ROI W", "Normalised region-of-interest W coord", 0, 1.0, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ROI_H, g_param_spec_float ("roi-h", "ROI H", "Normalised region-of-interest H coord", 0, 1.0, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_QUANTISATION_PARAMETER, g_param_spec_int ("quantisation-parameter", "Quantisation Parameter", "Set a Quantisation Parameter approx 10-40 with bitrate=0 for VBR encoding. 0 = off", 0, G_MAXINT, QUANTISATION_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INLINE_HEADERS, g_param_spec_boolean ("inline-headers", "Inline Headers", "Set to TRUE to insert SPS/PPS before each IDR packet", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SHUTTER_SPEED, g_param_spec_int ("shutter-speed", "Shutter Speed", "Set a fixed shutter speed, in microseconds. (0 = Auto)", 0, 6000000, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SENSOR_MODE, g_param_spec_enum ("sensor-mode", "Camera Sensor Mode", "Manually set the camera sensor mode", gst_rpi_cam_src_sensor_mode_get_type (), GST_RPI_CAM_SRC_SENSOR_MODE_AUTOMATIC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ANNOTATION_MODE, g_param_spec_flags ("annotation-mode", "Annotation Mode", "Flags to control annotation of the output video", GST_RPI_CAM_TYPE_RPI_CAM_SRC_ANNOTATION_MODE, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ANNOTATION_TEXT, g_param_spec_string ("annotation-text", "Annotation Text", "Text string to annotate onto video when annotation-mode flags include 'custom-text'", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INTRA_REFRESH_TYPE, g_param_spec_enum ("intra-refresh-type", "Intra Refresh Type", "Type of Intra Refresh to use, -1 to disable intra refresh", GST_RPI_CAM_TYPE_RPI_CAM_SRC_INTRA_REFRESH_TYPE, GST_RPI_CAM_SRC_INTRA_REFRESH_TYPE_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_static_metadata (gstelement_class, "Raspberry Pi Camera Source", "Source/Video", "Raspberry Pi camera module source", "Jan Schmidt <*****@*****.**>"); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&video_src_template)); basesrc_class->start = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_start); basesrc_class->stop = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_stop); basesrc_class->decide_allocation = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_decide_allocation); basesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_get_caps); basesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_set_caps); basesrc_class->fixate = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_fixate); basesrc_class->event = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_event); gstelement_class->send_event = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_send_event); pushsrc_class->create = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_create); raspicapture_init (); }
static void gst_multi_file_src_class_init (GstMultiFileSrcClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); GstPushSrcClass *gstpushsrc_class = GST_PUSH_SRC_CLASS (klass); GstBaseSrcClass *gstbasesrc_class = GST_BASE_SRC_CLASS (klass); gobject_class->set_property = gst_multi_file_src_set_property; gobject_class->get_property = gst_multi_file_src_get_property; g_object_class_install_property (gobject_class, PROP_LOCATION, g_param_spec_string ("location", "File Location", "Pattern to create file names of input files. File names are " "created by calling sprintf() with the pattern and the current " "index.", DEFAULT_LOCATION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INDEX, g_param_spec_int ("index", "File Index", "Index to use with location property to create file names. The " "index is incremented by one for each buffer read.", 0, INT_MAX, DEFAULT_INDEX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_START_INDEX, g_param_spec_int ("start-index", "Start Index", "Start value of index. The initial value of index can be set " "either by setting index or start-index. When the end of the loop " "is reached, the index will be set to the value start-index.", 0, INT_MAX, DEFAULT_INDEX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STOP_INDEX, g_param_spec_int ("stop-index", "Stop Index", "Stop value of index. The special value -1 means no stop.", -1, INT_MAX, DEFAULT_INDEX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CAPS, g_param_spec_boxed ("caps", "Caps", "Caps describing the format of the data.", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_LOOP, g_param_spec_boolean ("loop", "Loop", "Whether to repeat from the beginning when all files have been read.", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gobject_class->dispose = gst_multi_file_src_dispose; gstbasesrc_class->get_caps = gst_multi_file_src_getcaps; gstbasesrc_class->query = gst_multi_file_src_query; gstbasesrc_class->is_seekable = is_seekable; gstbasesrc_class->do_seek = do_seek; gstpushsrc_class->create = gst_multi_file_src_create; GST_DEBUG_CATEGORY_INIT (gst_multi_file_src_debug, "multifilesrc", 0, "multifilesrc element"); gst_element_class_add_static_pad_template (gstelement_class, &gst_multi_file_src_pad_template); gst_element_class_set_static_metadata (gstelement_class, "Multi-File Source", "Source/File", "Read a sequentially named set of files into buffers", "David Schleef <*****@*****.**>"); }
static void gst_dv1394src_class_init (GstDV1394SrcClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSrcClass *gstbasesrc_class; GstPushSrcClass *gstpushsrc_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; gstpushsrc_class = (GstPushSrcClass *) klass; gobject_class->set_property = gst_dv1394src_set_property; gobject_class->get_property = gst_dv1394src_get_property; gobject_class->dispose = gst_dv1394src_dispose; gstelement_class->provide_clock = gst_dv1394src_provide_clock; gstelement_class->change_state = gst_dv1394_src_change_state; gst_dv1394src_signals[SIGNAL_FRAME_DROPPED] = g_signal_new ("frame-dropped", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDV1394SrcClass, frame_dropped), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT, g_param_spec_int ("port", "Port", "Port number (-1 automatic)", -1, 16, DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CHANNEL, g_param_spec_int ("channel", "Channel", "Channel number for listening", 0, 64, DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CONSECUTIVE, g_param_spec_int ("consecutive", "consecutive frames", "send n consecutive frames after skipping", 1, G_MAXINT, DEFAULT_CONSECUTIVE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SKIP, g_param_spec_int ("skip", "skip frames", "skip n frames", 0, G_MAXINT, DEFAULT_SKIP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DROP_INCOMPLETE, g_param_spec_boolean ("drop-incomplete", "drop incomplete", "drop incomplete frames", DEFAULT_DROP_INCOMPLETE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_USE_AVC, g_param_spec_boolean ("use-avc", "Use AV/C", "Use AV/C VTR control", DEFAULT_USE_AVC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_GUID, g_param_spec_uint64 ("guid", "GUID", "select one of multiple DV devices by its GUID. use a hexadecimal " "like 0xhhhhhhhhhhhhhhhh. (0 = no guid)", 0, G_MAXUINT64, DEFAULT_GUID, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstDV1394Src:device-name: * * Descriptive name of the currently opened device */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DEVICE_NAME, g_param_spec_string ("device-name", "device name", "user-friendly name of the device", "Default", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); gstbasesrc_class->negotiate = NULL; gstbasesrc_class->start = gst_dv1394src_start; gstbasesrc_class->stop = gst_dv1394src_stop; gstbasesrc_class->unlock = gst_dv1394src_unlock; gstbasesrc_class->query = gst_dv1394src_query; gstpushsrc_class->create = gst_dv1394src_create; gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_factory)); gst_element_class_set_static_metadata (gstelement_class, "Firewire (1394) DV video source", "Source/Video", "Source for DV video data from firewire port", "Erik Walthinsen <*****@*****.**>, " "Daniel Fischer <*****@*****.**>, " "Wim Taymans <*****@*****.**>, " "Zaheer Abbas Merali <zaheerabbas at merali dot org>"); GST_DEBUG_CATEGORY_INIT (dv1394src_debug, "dv1394src", 0, "DV firewire source"); }
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 <*****@*****.**>"); 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; 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)); }
static void gst_scream_queue_class_init(GstScreamQueueClass *klass) { GObjectClass *gobject_class; GstElementClass *element_class; gobject_class = (GObjectClass *) klass; element_class = (GstElementClass *) klass; GST_DEBUG_CATEGORY_INIT(gst_scream_queue_debug_category, "screamqueue", 0, "debug category for screamqueue element"); gst_element_class_add_pad_template(GST_ELEMENT_CLASS(klass), gst_static_pad_template_get(&src_template)); gst_element_class_add_pad_template(GST_ELEMENT_CLASS(klass), gst_static_pad_template_get(&sink_template)); gobject_class->finalize = GST_DEBUG_FUNCPTR(gst_scream_queue_finalize); gobject_class->set_property = GST_DEBUG_FUNCPTR(gst_scream_queue_set_property); gobject_class->get_property = GST_DEBUG_FUNCPTR(gst_scream_queue_get_property); element_class->change_state = GST_DEBUG_FUNCPTR(gst_scream_queue_change_state); signals[SIGNAL_BITRATE_CHANGE] = g_signal_new("on-bitrate-change", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GstScreamQueueClass, gst_scream_queue_on_bitrate_change), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); signals[SIGNAL_PAYLOAD_ADAPTATION_REQUEST] = g_signal_new("on-payload-adaptation-request", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GstScreamQueueClass, gst_scream_queue_on_adaptation_request), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 1, G_TYPE_UINT); signals[SIGNAL_INCOMING_FEEDBACK] = g_signal_new("incoming-feedback", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(GstScreamQueueClass, gst_scream_queue_incoming_feedback), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 6, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_BOOLEAN); klass->gst_scream_queue_incoming_feedback = GST_DEBUG_FUNCPTR(gst_scream_queue_incoming_feedback); properties[PROP_GST_SCREAM_CONTROLLER_ID] = g_param_spec_uint("scream-controller-id", "SCReAM Controller ID", "Every queue that should be handled by the same controller should have the same " "scream-controller-id. This value must be set before going to PAUSED.", 0, G_MAXUINT, DEFAULT_GST_SCREAM_CONTROLLER_ID, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); properties[PROP_PASS_THROUGH] = g_param_spec_boolean("pass-through", "Pass through", "If set to true all packets will just pass through the plugin", DEFAULT_PASS_THROUGH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties(gobject_class, NUM_PROPERTIES, properties); gst_element_class_set_static_metadata(element_class, "SCREAM Queue", "Queue/Network/Adaptation", "RTP Queue for SCREAM adaptation", "Daniel Lindström <*****@*****.**>"); }
static void gst_multi_file_sink_class_init (GstMultiFileSinkClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); GstBaseSinkClass *gstbasesink_class = GST_BASE_SINK_CLASS (klass); gobject_class->set_property = gst_multi_file_sink_set_property; gobject_class->get_property = gst_multi_file_sink_get_property; g_object_class_install_property (gobject_class, PROP_LOCATION, g_param_spec_string ("location", "File Location", "Location of the file to write", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INDEX, g_param_spec_int ("index", "Index", "Index to use with location property to create file names. The " "index is incremented by one for each buffer written.", 0, G_MAXINT, DEFAULT_INDEX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMultiFileSink:post-messages: * * Post a message on the GstBus for each file. */ g_object_class_install_property (gobject_class, PROP_POST_MESSAGES, g_param_spec_boolean ("post-messages", "Post Messages", "Post a message for each file with information of the buffer", DEFAULT_POST_MESSAGES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMultiFileSink:next-file: * * When to start a new file. */ g_object_class_install_property (gobject_class, PROP_NEXT_FILE, g_param_spec_enum ("next-file", "Next File", "When to start a new file", GST_TYPE_MULTI_FILE_SINK_NEXT, DEFAULT_NEXT_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMultiFileSink:max-files: * * Maximum number of files to keep on disk. Once the maximum is reached, old * files start to be deleted to make room for new ones. */ g_object_class_install_property (gobject_class, PROP_MAX_FILES, g_param_spec_uint ("max-files", "Max files", "Maximum number of files to keep on disk. Once the maximum is reached," "old files start to be deleted to make room for new ones.", 0, G_MAXUINT, DEFAULT_MAX_FILES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMultiFileSink:max-file-size: * * Maximum file size before starting a new file in max-size mode. */ g_object_class_install_property (gobject_class, PROP_MAX_FILE_SIZE, g_param_spec_uint64 ("max-file-size", "Maximum File Size", "Maximum file size before starting a new file in max-size mode", 0, G_MAXUINT64, DEFAULT_MAX_FILE_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMultiFileSink:max-file-duration: * * Maximum file size before starting a new file in max-size mode. */ g_object_class_install_property (gobject_class, PROP_MAX_FILE_DURATION, g_param_spec_uint64 ("max-file-duration", "Maximum File Duration", "Maximum file duration before starting a new file in max-size mode " "(in nanoseconds)", 0, G_MAXUINT64, DEFAULT_MAX_FILE_DURATION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMultiFileSink:aggregate-gops: * * Whether to aggregate complete GOPs before doing any processing. Set this * to TRUE to make sure each new file starts with a keyframe. This requires * the upstream element to flag buffers containing key units and delta * units correctly. At least the MPEG-PS and MPEG-TS muxers should be doing * this. * * Since: 1.6 */ g_object_class_install_property (gobject_class, PROP_AGGREGATE_GOPS, g_param_spec_boolean ("aggregate-gops", "Aggregate GOPs", "Whether to aggregate GOPs and process them as a whole without " "splitting", DEFAULT_AGGREGATE_GOPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gobject_class->finalize = gst_multi_file_sink_finalize; gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_multi_file_sink_start); gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_multi_file_sink_stop); gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_multi_file_sink_render); gstbasesink_class->render_list = GST_DEBUG_FUNCPTR (gst_multi_file_sink_render_list); gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_multi_file_sink_set_caps); gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_multi_file_sink_event); GST_DEBUG_CATEGORY_INIT (gst_multi_file_sink_debug, "multifilesink", 0, "multifilesink element"); gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gst_element_class_set_static_metadata (gstelement_class, "Multi-File Sink", "Sink/File", "Write buffers to a sequentially named set of files", "David Schleef <*****@*****.**>"); }
static void gst_rtp_ssrc_demux_class_init (GstRtpSsrcDemuxClass * klass) { GObjectClass *gobject_klass; GstElementClass *gstelement_klass; GstRtpSsrcDemuxClass *gstrtpssrcdemux_klass; gobject_klass = (GObjectClass *) klass; gstelement_klass = (GstElementClass *) klass; gstrtpssrcdemux_klass = (GstRtpSsrcDemuxClass *) klass; gobject_klass->dispose = gst_rtp_ssrc_demux_dispose; gobject_klass->finalize = gst_rtp_ssrc_demux_finalize; /** * GstRtpSsrcDemux::new-ssrc-pad: * @demux: the object which received the signal * @ssrc: the SSRC of the pad * @pad: the new pad. * * Emited when a new SSRC pad has been created. */ gst_rtp_ssrc_demux_signals[SIGNAL_NEW_SSRC_PAD] = g_signal_new ("new-ssrc-pad", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSsrcDemuxClass, new_ssrc_pad), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_UINT, GST_TYPE_PAD); /** * GstRtpSsrcDemux::removed-ssrc-pad: * @demux: the object which received the signal * @ssrc: the SSRC of the pad * @pad: the removed pad. * * Emited when a SSRC pad has been removed. */ gst_rtp_ssrc_demux_signals[SIGNAL_REMOVED_SSRC_PAD] = g_signal_new ("removed-ssrc-pad", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSsrcDemuxClass, removed_ssrc_pad), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_UINT, GST_TYPE_PAD); /** * GstRtpSsrcDemux::clear-ssrc: * @demux: the object which received the signal * @ssrc: the SSRC of the pad * * Action signal to remove the pad for SSRC. */ gst_rtp_ssrc_demux_signals[SIGNAL_CLEAR_SSRC] = g_signal_new ("clear-ssrc", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpSsrcDemuxClass, clear_ssrc), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_UINT); gstelement_klass->change_state = GST_DEBUG_FUNCPTR (gst_rtp_ssrc_demux_change_state); gstrtpssrcdemux_klass->clear_ssrc = GST_DEBUG_FUNCPTR (gst_rtp_ssrc_demux_clear_ssrc); gst_element_class_add_pad_template (gstelement_klass, gst_static_pad_template_get (&rtp_ssrc_demux_sink_template)); gst_element_class_add_pad_template (gstelement_klass, gst_static_pad_template_get (&rtp_ssrc_demux_rtcp_sink_template)); gst_element_class_add_pad_template (gstelement_klass, gst_static_pad_template_get (&rtp_ssrc_demux_src_template)); gst_element_class_add_pad_template (gstelement_klass, gst_static_pad_template_get (&rtp_ssrc_demux_rtcp_src_template)); gst_element_class_set_static_metadata (gstelement_klass, "RTP SSRC Demux", "Demux/Network/RTP", "Splits RTP streams based on the SSRC", "Wim Taymans <*****@*****.**>"); GST_DEBUG_CATEGORY_INIT (gst_rtp_ssrc_demux_debug, "rtpssrcdemux", 0, "RTP SSRC demuxer"); }
static void gst_socket_src_class_init (GstSocketSrcClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSrcClass *gstbasesrc_class; GstPushSrcClass *gstpush_src_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; gstpush_src_class = (GstPushSrcClass *) klass; gobject_class->set_property = gst_socket_src_set_property; gobject_class->get_property = gst_socket_src_get_property; gobject_class->finalize = gst_socket_src_finalize; g_object_class_install_property (gobject_class, PROP_SOCKET, g_param_spec_object ("socket", "Socket", "The socket to receive packets from", G_TYPE_SOCKET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CAPS, g_param_spec_boxed ("caps", "Caps", "The caps of the source pad", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstSocketSrc:send-messages: * * Control if the source will handle GstNetworkMessage events. * The event is a CUSTOM event named 'GstNetworkMessage' and contains: * * "buffer", GST_TYPE_BUFFER : the buffer with data to send * * The buffer in the event will be sent on the socket. This allows * for simple bidirectional communication. * * Since: 1.8.0 **/ g_object_class_install_property (gobject_class, PROP_SEND_MESSAGES, g_param_spec_boolean ("send-messages", "Send Messages", "If GstNetworkMessage events should be handled", DEFAULT_SEND_MESSAGES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_socket_src_signals[CONNECTION_CLOSED_BY_PEER] = g_signal_new ("connection-closed-by-peer", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstSocketSrcClass, connection_closed_by_peer), NULL, NULL, NULL, G_TYPE_NONE, 0); gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); gst_element_class_set_static_metadata (gstelement_class, "socket source", "Source/Network", "Receive data from a socket", "Thomas Vander Stichele <thomas at apestaart dot org>, " "William Manley <*****@*****.**>"); gstbasesrc_class->event = gst_socketsrc_event; gstbasesrc_class->get_caps = gst_socketsrc_getcaps; gstbasesrc_class->unlock = gst_socket_src_unlock; gstbasesrc_class->unlock_stop = gst_socket_src_unlock_stop; gstpush_src_class->fill = gst_socket_src_fill; GST_DEBUG_CATEGORY_INIT (socketsrc_debug, "socketsrc", 0, "Socket Source"); }
static void gst_decklink_audio_src_class_init (GstDecklinkAudioSrcClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstBaseSrcClass *basesrc_class = GST_BASE_SRC_CLASS (klass); GstPushSrcClass *pushsrc_class = GST_PUSH_SRC_CLASS (klass); gobject_class->set_property = gst_decklink_audio_src_set_property; gobject_class->get_property = gst_decklink_audio_src_get_property; gobject_class->finalize = gst_decklink_audio_src_finalize; element_class->change_state = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_change_state); basesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_get_caps); basesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_set_caps); basesrc_class->query = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_query); basesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_unlock); basesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_unlock_stop); pushsrc_class->create = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_create); g_object_class_install_property (gobject_class, PROP_CONNECTION, g_param_spec_enum ("connection", "Connection", "Audio input connection to use", GST_TYPE_DECKLINK_AUDIO_CONNECTION, DEFAULT_CONNECTION, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT))); g_object_class_install_property (gobject_class, PROP_DEVICE_NUMBER, g_param_spec_int ("device-number", "Device number", "Output device instance to use", 0, G_MAXINT, 0, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT))); g_object_class_install_property (gobject_class, PROP_ALIGNMENT_THRESHOLD, g_param_spec_uint64 ("alignment-threshold", "Alignment Threshold", "Timestamp alignment threshold in nanoseconds", 0, G_MAXUINT64 - 1, DEFAULT_ALIGNMENT_THRESHOLD, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); g_object_class_install_property (gobject_class, PROP_DISCONT_WAIT, g_param_spec_uint64 ("discont-wait", "Discont Wait", "Window of time in nanoseconds to wait before " "creating a discontinuity", 0, G_MAXUINT64 - 1, DEFAULT_DISCONT_WAIT, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE, g_param_spec_uint ("buffer-size", "Buffer Size", "Size of internal buffer in number of video frames", 1, G_MAXINT, DEFAULT_BUFFER_SIZE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); gst_element_class_add_static_pad_template (element_class, &sink_template); gst_element_class_set_static_metadata (element_class, "Decklink Audio Source", "Audio/Src", "Decklink Source", "David Schleef <*****@*****.**>, " "Sebastian Dröge <*****@*****.**>"); GST_DEBUG_CATEGORY_INIT (gst_decklink_audio_src_debug, "decklinkaudiosrc", 0, "debug category for decklinkaudiosrc element"); }