static void gst_video_parse_class_init (GstVideoParseClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); GstRawParseClass *rp_class = GST_RAW_PARSE_CLASS (klass); GstCaps *caps; gobject_class->set_property = gst_video_parse_set_property; gobject_class->get_property = gst_video_parse_get_property; rp_class->get_caps = gst_video_parse_get_caps; rp_class->set_buffer_flags = gst_video_parse_set_buffer_flags; g_object_class_install_property (gobject_class, PROP_FORMAT, g_param_spec_enum ("format", "Format", "Format of images in raw stream", GST_TYPE_VIDEO_FORMAT, GST_VIDEO_FORMAT_I420, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_WIDTH, g_param_spec_int ("width", "Width", "Width of images in raw stream", 0, INT_MAX, 320, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_HEIGHT, g_param_spec_int ("height", "Height", "Height of images in raw stream", 0, INT_MAX, 240, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FRAMERATE, gst_param_spec_fraction ("framerate", "Frame Rate", "Frame rate of images in raw stream", 0, 1, G_MAXINT, 1, 25, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PAR, gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio", "Pixel aspect ratio of images in raw stream", 1, 100, 100, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INTERLACED, g_param_spec_boolean ("interlaced", "Interlaced flag", "True if video is interlaced", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TOP_FIELD_FIRST, g_param_spec_boolean ("top-field-first", "Top field first", "True if top field is earlier than bottom field", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_static_metadata (gstelement_class, "Video Parse", "Filter/Video", "Converts stream into video frames", "David Schleef <*****@*****.**>, " "Sebastian Dröge <*****@*****.**>"); caps = gst_caps_from_string ("video/x-raw; video/x-bayer"); gst_raw_parse_class_set_src_pad_template (rp_class, caps); gst_raw_parse_class_set_multiple_frames_per_buffer (rp_class, FALSE); gst_caps_unref (caps); GST_DEBUG_CATEGORY_INIT (gst_video_parse_debug, "videoparse", 0, "videoparse element"); }
static void gtk_gst_widget_class_init (GtkGstWidgetClass * klass) { GObjectClass *gobject_klass = (GObjectClass *) klass; GtkWidgetClass *widget_klass = (GtkWidgetClass *) klass; g_type_class_add_private (klass, sizeof (GtkGstWidgetPrivate)); gobject_klass->set_property = gtk_gst_widget_set_property; gobject_klass->get_property = gtk_gst_widget_get_property; gobject_klass->finalize = gtk_gst_widget_finalize; g_object_class_install_property (gobject_klass, PROP_FORCE_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio", "Force aspect ratio", "When enabled, scaling will respect original aspect ratio", DEFAULT_FORCE_ASPECT_RATIO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_klass, PROP_PIXEL_ASPECT_RATIO, gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio", "The pixel aspect ratio of the device", DEFAULT_PAR_N, DEFAULT_PAR_D, G_MAXINT, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_klass, PROP_IGNORE_ALPHA, g_param_spec_boolean ("ignore-alpha", "Ignore Alpha", "When enabled, alpha will be ignored and converted to black", DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); widget_klass->draw = gtk_gst_widget_draw; widget_klass->get_preferred_width = gtk_gst_widget_get_preferred_width; widget_klass->get_preferred_height = gtk_gst_widget_get_preferred_height; }
static void gst_aspect_ratio_crop_class_init (GstAspectRatioCropClass * klass) { GObjectClass *gobject_class; GstElementClass *element_class; gobject_class = (GObjectClass *) klass; element_class = (GstElementClass *) klass; gobject_class->set_property = gst_aspect_ratio_crop_set_property; gobject_class->get_property = gst_aspect_ratio_crop_get_property; gobject_class->finalize = gst_aspect_ratio_crop_finalize; g_object_class_install_property (gobject_class, ARG_ASPECT_RATIO_CROP, gst_param_spec_fraction ("aspect-ratio", "aspect-ratio", "Target aspect-ratio of video", 0, 1, G_MAXINT, 1, 0, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_static_metadata (element_class, "aspectratiocrop", "Filter/Effect/Video", "Crops video into a user-defined aspect-ratio", "Thijs Vermeir <*****@*****.**>"); 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)); }
void gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass * klass) { GObjectClass *gobject_klass = (GObjectClass *) klass; GtkWidgetClass *widget_klass = (GtkWidgetClass *) klass; gobject_klass->set_property = gtk_gst_base_widget_set_property; gobject_klass->get_property = gtk_gst_base_widget_get_property; g_object_class_install_property (gobject_klass, PROP_FORCE_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio", "Force aspect ratio", "When enabled, scaling will respect original aspect ratio", DEFAULT_FORCE_ASPECT_RATIO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_klass, PROP_PIXEL_ASPECT_RATIO, gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio", "The pixel aspect ratio of the device", DEFAULT_PAR_N, DEFAULT_PAR_D, G_MAXINT, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_klass, PROP_IGNORE_ALPHA, g_param_spec_boolean ("ignore-alpha", "Ignore Alpha", "When enabled, alpha will be ignored and converted to black", DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); widget_klass->get_preferred_width = gtk_gst_base_widget_get_preferred_width; widget_klass->get_preferred_height = gtk_gst_base_widget_get_preferred_height; widget_klass->key_press_event = gtk_gst_base_widget_key_event; widget_klass->key_release_event = gtk_gst_base_widget_key_event; widget_klass->button_press_event = gtk_gst_base_widget_button_event; widget_klass->button_release_event = gtk_gst_base_widget_button_event; widget_klass->motion_notify_event = gtk_gst_base_widget_motion_event; }
static void gst_libde265_dec_class_init (GstLibde265DecClass * klass) { GObjectClass *gobject_class = (GObjectClass *) klass; VIDEO_DECODER_CLASS *decoder_class = VIDEO_DECODER_GET_CLASS (klass); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); gobject_class->finalize = gst_libde265_dec_finalize; gobject_class->set_property = gst_libde265_dec_set_property; gobject_class->get_property = gst_libde265_dec_get_property; g_object_class_install_property (gobject_class, PROP_MODE, g_param_spec_enum ("mode", "Input mode", "Input mode of data to decode", GST_TYPE_LIBDE265_DEC_MODE, DEFAULT_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FRAMERATE, gst_param_spec_fraction ("framerate", "Frame Rate", "Frame rate of images in raw stream", 0, 1, // min 100, 1, // max DEFAULT_FPS_N, DEFAULT_FPS_D, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); decoder_class->start = GST_DEBUG_FUNCPTR (gst_libde265_dec_start); decoder_class->stop = GST_DEBUG_FUNCPTR (gst_libde265_dec_stop); #if GST_CHECK_VERSION(1,0,0) decoder_class->parse = GST_DEBUG_FUNCPTR (gst_libde265_dec_parse); decoder_class->set_format = GST_DEBUG_FUNCPTR (gst_libde265_dec_set_format); #else decoder_class->parse_data = GST_DEBUG_FUNCPTR (gst_libde265_dec_parse_data); #endif #if GST_CHECK_VERSION(1,2,0) decoder_class->flush = GST_DEBUG_FUNCPTR (gst_libde265_dec_flush); #else decoder_class->reset = GST_DEBUG_FUNCPTR (gst_libde265_dec_reset); #endif decoder_class->handle_frame = GST_DEBUG_FUNCPTR (gst_libde265_dec_handle_frame); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&sink_template)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get(&src_template)); gst_element_class_set_details_simple (gstelement_class, "HEVC/H.265 parser", "Codec/Parser/Converter/Video", "Decodes HEVC/H.265 video streams using libde265", "struktur AG <*****@*****.**>"); }
static void gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSinkClass *gstbasesink_class; GstVideoSinkClass *gstvideosink_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesink_class = (GstBaseSinkClass *) klass; gstvideosink_class = (GstVideoSinkClass *) klass; gobject_class->set_property = gst_gtk_base_sink_set_property; gobject_class->get_property = gst_gtk_base_sink_get_property; g_object_class_install_property (gobject_class, PROP_WIDGET, g_param_spec_object ("widget", "Gtk Widget", "The GtkWidget to place in the widget hierarchy " "(must only be get from the GTK main thread)", GTK_TYPE_WIDGET, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio", "Force aspect ratio", "When enabled, scaling will respect original aspect ratio", DEFAULT_FORCE_ASPECT_RATIO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO, gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio", "The pixel aspect ratio of the device", DEFAULT_PAR_N, DEFAULT_PAR_D, G_MAXINT, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_IGNORE_ALPHA, g_param_spec_boolean ("ignore-alpha", "Ignore Alpha", "When enabled, alpha will be ignored and converted to black", DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gobject_class->finalize = gst_gtk_base_sink_finalize; gstelement_class->change_state = gst_gtk_base_sink_change_state; gstbasesink_class->set_caps = gst_gtk_base_sink_set_caps; gstbasesink_class->get_times = gst_gtk_base_sink_get_times; gstbasesink_class->start = gst_gtk_base_sink_start; gstbasesink_class->stop = gst_gtk_base_sink_stop; gstvideosink_class->show_frame = gst_gtk_base_sink_show_frame; }
static void gst_aspect_ratio_crop_class_init (GstAspectRatioCropClass * klass) { GObjectClass *gobject_class; gobject_class = (GObjectClass *) klass; gobject_class->set_property = gst_aspect_ratio_crop_set_property; gobject_class->get_property = gst_aspect_ratio_crop_get_property; gobject_class->finalize = gst_aspect_ratio_crop_finalize; g_object_class_install_property (gobject_class, ARG_ASPECT_RATIO_CROP, gst_param_spec_fraction ("aspect-ratio", "aspect-ratio", "Target aspect-ratio of video", 0, 1, G_MAXINT, 1, 0, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); }
static void gst_glimage_sink_class_init (GstGLImageSinkClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSinkClass *gstbasesink_class; GstElementClass *element_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesink_class = (GstBaseSinkClass *) klass; element_class = GST_ELEMENT_CLASS (klass); gobject_class->set_property = gst_glimage_sink_set_property; gobject_class->get_property = gst_glimage_sink_get_property; g_object_class_install_property (gobject_class, ARG_DISPLAY, g_param_spec_string ("display", "Display", "Display name", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CLIENT_RESHAPE_CALLBACK, g_param_spec_pointer ("client-reshape-callback", "Client reshape callback", "Define a custom reshape callback in a client code", G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CLIENT_DRAW_CALLBACK, g_param_spec_pointer ("client-draw-callback", "Client draw callback", "Define a custom draw callback in a client code", G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CLIENT_DATA, g_param_spec_pointer ("client-data", "Client data", "Pass data to the draw and reshape callbacks", G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio", "Force aspect ratio", "When enabled, scaling will respect original aspect ratio", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO, gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio", "The pixel aspect ratio of the device", 0, 1, G_MAXINT, 1, 0, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_metadata (element_class, "OpenGL video sink", "Sink/Video", "A videosink based on OpenGL", "Julien Isorce <*****@*****.**>"); g_object_class_install_property (gobject_class, PROP_OTHER_CONTEXT, g_param_spec_object ("other-context", "External OpenGL context", "Give an external OpenGL context with which to share textures", GST_GL_TYPE_CONTEXT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_glimage_sink_template)); gobject_class->finalize = gst_glimage_sink_finalize; gstelement_class->change_state = gst_glimage_sink_change_state; gstelement_class->set_context = gst_glimage_sink_set_context; gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_glimage_sink_query); gstbasesink_class->set_caps = gst_glimage_sink_set_caps; gstbasesink_class->get_times = gst_glimage_sink_get_times; gstbasesink_class->preroll = gst_glimage_sink_render; gstbasesink_class->render = gst_glimage_sink_render; gstbasesink_class->propose_allocation = gst_glimage_sink_propose_allocation; gstbasesink_class->stop = gst_glimage_sink_stop; }
static void gst_rtsp_cam_media_factory_class_init (GstRTSPCamMediaFactoryClass * klass) { GObjectClass *gobject_class; GstRTSPMediaFactoryClass *media_factory_class = GST_RTSP_MEDIA_FACTORY_CLASS (klass); gobject_class = G_OBJECT_CLASS (klass); gobject_class->get_property = gst_rtsp_cam_media_factory_get_property; gobject_class->set_property = gst_rtsp_cam_media_factory_set_property; gobject_class->finalize = gst_rtsp_cam_media_factory_finalize; media_factory_class->get_element = gst_rtsp_cam_media_factory_get_element; media_factory_class->gen_key = gst_rtsp_cam_media_factory_gen_key; g_object_class_install_property (gobject_class, PROP_VIDEO, g_param_spec_boolean ("video", "Video", "video", DEFAULT_VIDEO, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_VIDEO_SOURCE, g_param_spec_string ("video-source", "Video source", "video source", DEFAULT_VIDEO_SOURCE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_VIDEO_DEVICE, g_param_spec_string ("video-device", "Video device", "video device", DEFAULT_VIDEO_DEVICE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_VIDEO_CODEC, g_param_spec_string ("video-codec", "Video codec", "video codec", DEFAULT_VIDEO_CODEC, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_VIDEO_WIDTH, g_param_spec_int ("video-width", "Video width", "video width", -1, G_MAXINT32, DEFAULT_VIDEO_WIDTH, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_VIDEO_HEIGHT, g_param_spec_int ("video-height", "Video height", "video height", -1, G_MAXINT32, DEFAULT_VIDEO_HEIGHT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_VIDEO_BITRATE, g_param_spec_int ("video-bitrate", "Video bitrate", "video bitrate", -1, G_MAXINT32, DEFAULT_VIDEO_BITRATE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_VIDEO_FRAMERATE, gst_param_spec_fraction ("video-framerate", "Video framerate", "video framerate", 0, 1, G_MAXINT, 1, DEFAULT_VIDEO_FRAMERATE_N, DEFAULT_VIDEO_FRAMERATE_D, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_AUDIO, g_param_spec_boolean ("audio", "Audio", "audio", DEFAULT_AUDIO, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_AUDIO_SOURCE, g_param_spec_string ("audio-source", "Audio source", "audio source", DEFAULT_AUDIO_SOURCE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_AUDIO_DEVICE, g_param_spec_string ("audio-device", "Audio device", "audio device", DEFAULT_AUDIO_DEVICE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_AUDIO_CODEC, g_param_spec_string ("audio-codec", "Audio codec", "audio codec", DEFAULT_AUDIO_CODEC, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_AUDIO_CHANNELS, g_param_spec_int ("audio-channels", "Audio channels", "audio channels", -1, G_MAXINT32, DEFAULT_AUDIO_CHANNELS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); GST_DEBUG_CATEGORY_INIT (rtsp_cam_media_factory_debug, "rtspcammediafactory", 0, "RTSP Cam Media Factory"); }
static void gst_raw_video_parse_class_init (GstRawVideoParseClass * klass) { GObjectClass *object_class; GstElementClass *element_class; GstBaseParseClass *baseparse_class; GstRawBaseParseClass *rawbaseparse_class; GST_DEBUG_CATEGORY_INIT (raw_video_parse_debug, "rawvideoparse", 0, "rawvideoparse element"); object_class = G_OBJECT_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass); baseparse_class = GST_BASE_PARSE_CLASS (klass); rawbaseparse_class = GST_RAW_BASE_PARSE_CLASS (klass); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&static_sink_template)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&static_src_template)); object_class->set_property = GST_DEBUG_FUNCPTR (gst_raw_video_parse_set_property); object_class->get_property = GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_property); baseparse_class->stop = GST_DEBUG_FUNCPTR (gst_raw_video_parse_stop); rawbaseparse_class->set_current_config = GST_DEBUG_FUNCPTR (gst_raw_video_parse_set_current_config); rawbaseparse_class->get_current_config = GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_current_config); rawbaseparse_class->set_config_from_caps = GST_DEBUG_FUNCPTR (gst_raw_video_parse_set_config_from_caps); rawbaseparse_class->get_caps_from_config = GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_caps_from_config); rawbaseparse_class->get_config_frame_size = GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_config_frame_size); rawbaseparse_class->get_max_frames_per_buffer = GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_max_frames_per_buffer); rawbaseparse_class->is_config_ready = GST_DEBUG_FUNCPTR (gst_raw_video_parse_is_config_ready); rawbaseparse_class->process = GST_DEBUG_FUNCPTR (gst_raw_video_parse_process); rawbaseparse_class->is_unit_format_supported = GST_DEBUG_FUNCPTR (gst_raw_video_parse_is_unit_format_supported); rawbaseparse_class->get_units_per_second = GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_units_per_second); rawbaseparse_class->get_overhead_size = GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_overhead_size); g_object_class_install_property (object_class, PROP_WIDTH, g_param_spec_int ("width", "Width", "Width of frames in raw stream", 0, G_MAXINT, DEFAULT_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); g_object_class_install_property (object_class, PROP_HEIGHT, g_param_spec_int ("height", "Height", "Height of frames in raw stream", 0, G_MAXINT, DEFAULT_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); g_object_class_install_property (object_class, PROP_FORMAT, g_param_spec_enum ("format", "Format", "Format of frames in raw stream", GST_TYPE_VIDEO_FORMAT, DEFAULT_FORMAT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); g_object_class_install_property (object_class, PROP_FRAMERATE, gst_param_spec_fraction ("framerate", "Frame rate", "Rate of frames in raw stream", 0, 1, G_MAXINT, 1, DEFAULT_FRAMERATE_N, DEFAULT_FRAMERATE_D, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); g_object_class_install_property (object_class, PROP_PIXEL_ASPECT_RATIO, gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel aspect ratio", "Pixel aspect ratio of frames in raw stream", 1, 100, 100, 1, DEFAULT_PIXEL_ASPECT_RATIO_N, DEFAULT_PIXEL_ASPECT_RATIO_D, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); g_object_class_install_property (object_class, PROP_INTERLACED, g_param_spec_boolean ("interlaced", "Interlaced flag", "True if frames in raw stream are interlaced", DEFAULT_INTERLACED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); g_object_class_install_property (object_class, PROP_TOP_FIELD_FIRST, g_param_spec_boolean ("top-field-first", "Top field first", "True if top field in frames in raw stream come first (not used if frames aren't interlaced)", DEFAULT_INTERLACED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); g_object_class_install_property (object_class, PROP_PLANE_STRIDES, g_param_spec_value_array ("plane-strides", "Plane strides", "Strides of the planets in bytes", g_param_spec_uint ("plane-stride", "Plane stride", "Stride of the n-th plane in bytes (0 = stride equals width*bytes-per-pixel)", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); g_object_class_install_property (object_class, PROP_PLANE_OFFSETS, g_param_spec_value_array ("plane-offsets", "Plane offsets", "Offsets of the planets in bytes", g_param_spec_uint ("plane-offset", "Plane offset", "Offset of the n-th plane in bytes", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); g_object_class_install_property (object_class, PROP_FRAME_STRIDE, g_param_spec_uint ("frame-stride", "Frame stride", "Stride between whole frames (0 = frames are tightly packed together)", 0, G_MAXUINT, DEFAULT_FRAME_STRIDE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); gst_element_class_set_static_metadata (element_class, "rawvideoparse", "Codec/Parser/Video", "Converts unformatted data streams into timestamped raw video frames", "Carlos Rafael Giani <*****@*****.**>"); }
static void gst_glimage_sink_class_init (GstGLImageSinkClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSinkClass *gstbasesink_class; GstVideoSinkClass *gstvideosink_class; GstElementClass *element_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesink_class = (GstBaseSinkClass *) klass; gstvideosink_class = (GstVideoSinkClass *) klass; element_class = GST_ELEMENT_CLASS (klass); gobject_class->set_property = gst_glimage_sink_set_property; gobject_class->get_property = gst_glimage_sink_get_property; g_object_class_install_property (gobject_class, ARG_DISPLAY, g_param_spec_string ("display", "Display", "Display name", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio", "Force aspect ratio", "When enabled, scaling will respect original aspect ratio", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO, gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio", "The pixel aspect ratio of the device", 0, 1, G_MAXINT, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OTHER_CONTEXT, g_param_spec_object ("other-context", "External OpenGL context", "Give an external OpenGL context with which to share textures", GST_GL_TYPE_CONTEXT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CONTEXT, g_param_spec_object ("context", "OpenGL context", "Get OpenGL context", GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_metadata (element_class, "OpenGL video sink", "Sink/Video", "A videosink based on OpenGL", "Julien Isorce <*****@*****.**>"); /** * GstGLImageSink::client-draw: * @object: the #GstGLImageSink * @texture: the #guint id of the texture. * @width: the #guint width of the texture. * @height: the #guint height of the texture. * * Will be emitted before actually drawing the texture. The client should * redraw the surface/contents with the @texture, @width and @height and * and return %TRUE. * * Returns: whether the texture was redrawn by the signal. If not, a * default redraw will occur. */ gst_glimage_sink_signals[CLIENT_DRAW_SIGNAL] = g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 4, GST_GL_TYPE_CONTEXT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * GstGLImageSink::client-reshape: * @object: the #GstGLImageSink * @width: the #guint width of the texture. * @height: the #guint height of the texture. * * The client should resize the surface/window/viewport with the @width and * @height and return %TRUE. * * Returns: whether the content area was resized by the signal. If not, a * default viewport resize will occur. */ gst_glimage_sink_signals[CLIENT_RESHAPE_SIGNAL] = g_signal_new ("client-reshape", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 3, GST_GL_TYPE_CONTEXT, G_TYPE_UINT, G_TYPE_UINT); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_glimage_sink_template)); gobject_class->finalize = gst_glimage_sink_finalize; gstelement_class->change_state = gst_glimage_sink_change_state; gstelement_class->set_context = gst_glimage_sink_set_context; gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_glimage_sink_query); gstbasesink_class->set_caps = gst_glimage_sink_set_caps; gstbasesink_class->get_times = gst_glimage_sink_get_times; gstbasesink_class->prepare = gst_glimage_sink_prepare; gstbasesink_class->propose_allocation = gst_glimage_sink_propose_allocation; gstbasesink_class->stop = gst_glimage_sink_stop; gstvideosink_class->show_frame = GST_DEBUG_FUNCPTR (gst_glimage_sink_show_frame); }
static void gst_mfxpostproc_class_init (GstMfxPostprocClass * klass) { GObjectClass *const object_class = G_OBJECT_CLASS (klass); GstElementClass *const element_class = GST_ELEMENT_CLASS (klass); GstBaseTransformClass *const trans_class = GST_BASE_TRANSFORM_CLASS (klass); GstPadTemplate *pad_template; GST_DEBUG_CATEGORY_INIT (gst_debug_mfxpostproc, GST_PLUGIN_NAME, 0, GST_PLUGIN_DESC); gst_mfx_plugin_base_class_init (GST_MFX_PLUGIN_BASE_CLASS (klass)); object_class->finalize = gst_mfxpostproc_finalize; object_class->set_property = gst_mfxpostproc_set_property; object_class->get_property = gst_mfxpostproc_get_property; trans_class->transform_caps = gst_mfxpostproc_transform_caps; trans_class->transform = gst_mfxpostproc_transform; trans_class->set_caps = gst_mfxpostproc_set_caps; trans_class->stop = gst_mfxpostproc_stop; trans_class->query = gst_mfxpostproc_query; trans_class->propose_allocation = gst_mfxpostproc_propose_allocation; trans_class->decide_allocation = gst_mfxpostproc_decide_allocation; trans_class->before_transform = gst_mfxpostproc_before_transform; gst_element_class_set_static_metadata (element_class, "MFX video postprocessing", "Filter/Converter/Video;Filter/Converter/Video/Scaler;" "Filter/Effect/Video;Filter/Effect/Video/Deinterlace", GST_PLUGIN_DESC, "Ishmael Sameen <*****@*****.**>"); /* sink pad */ pad_template = gst_static_pad_template_get (&gst_mfxpostproc_sink_factory); gst_element_class_add_pad_template (element_class, pad_template); /* src pad */ pad_template = gst_static_pad_template_get (&gst_mfxpostproc_src_factory); gst_element_class_add_pad_template (element_class, pad_template); g_object_class_install_property (object_class, PROP_ASYNC_DEPTH, g_param_spec_uint ("async-depth", "Asynchronous Depth", "Number of async operations before explicit sync", 0, 20, DEFAULT_ASYNC_DEPTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:deinterlace-mode * * This selects whether the deinterlacing should always be applied * or if they should only be applied on content that has the * "interlaced" flag on the caps. */ g_object_class_install_property (object_class, PROP_DEINTERLACE_MODE, g_param_spec_enum ("deinterlace-mode", "Deinterlace mode", "Deinterlace mode to use", GST_MFX_TYPE_DEINTERLACE_MODE, DEFAULT_DEINTERLACE_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:width * * The forced output width in pixels. If set to zero, the width is * calculated from the height if aspect ration is preserved, or * inherited from the sink caps width */ g_object_class_install_property (object_class, PROP_WIDTH, g_param_spec_uint ("width", "Width", "Forced output width", 0, 8192, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:height * * The forced output height in pixels. If set to zero, the height is * calculated from the width if aspect ration is preserved, or * inherited from the sink caps height */ g_object_class_install_property (object_class, PROP_HEIGHT, g_param_spec_uint ("height", "Height", "Forced output height", 0, 8192, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:force-aspect-ratio * * When enabled, scaling respects video aspect ratio; when disabled, * the video is distorted to fit the width and height properties. */ g_object_class_install_property (object_class, PROP_FORCE_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio", "Force aspect ratio", "When enabled, scaling will respect original aspect ratio", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:framerate * * The forced output frame rate specified as a floating-point value */ g_object_class_install_property (object_class, PROP_FRAMERATE, gst_param_spec_fraction ("framerate", "Frame rate", "Forced output frame rate", 0, 1, G_MAXINT, 1, 0, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:denoise * * The level of noise reduction to apply. */ g_object_class_install_property (object_class, PROP_DENOISE, g_param_spec_uint ("denoise", "Denoising Level", "The level of denoising to apply", 0, 100, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:detail * * The level of detail / edge enhancement to apply for positive values. */ g_object_class_install_property (object_class, PROP_DETAIL, g_param_spec_uint ("detail", "Detail Level", "The level of detail / edge enhancement to apply", 0, 100, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:hue * * The color hue, expressed as a float value. Range is -180.0 to * 180.0. Default value is 0.0 and represents no modification. */ g_object_class_install_property (object_class, PROP_HUE, g_param_spec_float ("hue", "Hue", "The color hue value", -180.0, 180.0, 0.0, GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:saturation * * The color saturation, expressed as a float value. Range is 0.0 to * 10.0. Default value is 1.0 and represents no modification. */ g_object_class_install_property (object_class, PROP_SATURATION, g_param_spec_float ("saturation", "Saturation", "The color saturation value", 0.0, 10.0, 1.0, GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:brightness * * The color brightness, expressed as a float value. Range is -100.0 * to 100.0. Default value is 0.0 and represents no modification. */ g_object_class_install_property (object_class, PROP_BRIGHTNESS, g_param_spec_float ("brightness", "Brightness", "The color brightness value", -100.0, 100.0, 0.0, GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstMfxPostproc:contrast * * The color contrast, expressed as a float value. Range is 0.0 to * 10.0. Default value is 1.0 and represents no modification. */ g_object_class_install_property (object_class, PROP_CONTRAST, g_param_spec_float ("contrast", "Contrast", "The color contrast value", 0.0, 10.0, 1.0, GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #ifndef WITH_MSS_2016 /** * GstMfxPostproc:rotation * * The rotation angle for the surface, expressed in GstMfxRotation. */ g_object_class_install_property (object_class, PROP_ROTATION, g_param_spec_enum ("rotation", "Rotation", "The rotation angle", GST_MFX_TYPE_ROTATION, DEFAULT_ROTATION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #endif /** * GstMfxPostproc: frc-algorithm * The framerate conversion algorithm to convert framerate of the video, * expressed in GstMfxFrcAlgorithm. */ g_object_class_install_property (object_class, PROP_FRC_ALGORITHM, g_param_spec_enum ("frc-algorithm", "Algorithm", "The algorithm type", GST_MFX_TYPE_FRC_ALGORITHM, DEFAULT_FRC_ALG, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); }
static void gst_video_parse_class_init (GstVideoParseClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); gobject_class->set_property = gst_video_parse_set_property; gobject_class->get_property = gst_video_parse_get_property; g_object_class_install_property (gobject_class, PROP_FORMAT, g_param_spec_enum ("format", "Format", "Format of images in raw stream", GST_TYPE_VIDEO_FORMAT, GST_VIDEO_FORMAT_I420, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_WIDTH, g_param_spec_int ("width", "Width", "Width of images in raw stream", 0, INT_MAX, 320, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_HEIGHT, g_param_spec_int ("height", "Height", "Height of images in raw stream", 0, INT_MAX, 240, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FRAMERATE, gst_param_spec_fraction ("framerate", "Frame Rate", "Frame rate of images in raw stream", 0, 1, G_MAXINT, 1, 25, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PAR, gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio", "Pixel aspect ratio of images in raw stream", 1, 100, 100, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INTERLACED, g_param_spec_boolean ("interlaced", "Interlaced flag", "True if video is interlaced", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TOP_FIELD_FIRST, g_param_spec_boolean ("top-field-first", "Top field first", "True if top field is earlier than bottom field", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STRIDES, g_param_spec_string ("strides", "Strides", "Stride of each planes in bytes using string format: 's0,s1,s2,s3'", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OFFSETS, g_param_spec_string ("offsets", "Offsets", "Offset of each planes in bytes using string format: 'o0,o1,o2,o3'", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FRAMESIZE, g_param_spec_uint ("framesize", "Framesize", "Size of an image in raw stream (0: default)", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_static_metadata (gstelement_class, "Video Parse", "Filter/Video", "Converts stream into video frames (deprecated: use rawvideoparse instead)", "David Schleef <*****@*****.**>, " "Sebastian Dröge <*****@*****.**>"); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&static_sink_template)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&static_src_template)); GST_DEBUG_CATEGORY_INIT (gst_video_parse_debug, "videoparse", 0, "videoparse element"); }