static void gst_app_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstAppSink *appsink = GST_APP_SINK_CAST (object); switch (prop_id) { case PROP_CAPS: { GstCaps *caps; caps = gst_app_sink_get_caps (appsink); gst_value_set_caps (value, caps); if (caps) gst_caps_unref (caps); break; } case PROP_EOS: g_value_set_boolean (value, gst_app_sink_is_eos (appsink)); break; case PROP_EMIT_SIGNALS: g_value_set_boolean (value, gst_app_sink_get_emit_signals (appsink)); break; case PROP_MAX_BUFFERS: g_value_set_uint (value, gst_app_sink_get_max_buffers (appsink)); break; case PROP_DROP: g_value_set_boolean (value, gst_app_sink_get_drop (appsink)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
/* * Get a given property value for the client src. */ static void gst_dccp_client_src_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstDCCPClientSrc *src = GST_DCCP_CLIENT_SRC (object); switch (prop_id) { case PROP_PORT: g_value_set_int (value, src->port); break; case PROP_HOST: g_value_set_string (value, src->host); break; case PROP_SOCK_FD: g_value_set_int (value, src->sock_fd); break; case PROP_CLOSED: g_value_set_boolean (value, src->closed); break; case PROP_CCID: g_value_set_int (value, src->ccid); break; case PROP_CAPS: gst_value_set_caps (value, src->caps); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_app_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstAppSink *appsink = GST_APP_SINK (object); //printf("appsinkgetproperty\n"); switch (prop_id) { case PROP_CAPS: { GstCaps *caps; caps = gst_app_sink_get_caps (appsink); gst_value_set_caps (value, caps); if (caps) gst_caps_unref (caps); break; } case PROP_EOS: g_value_set_boolean (value, gst_app_sink_is_eos (appsink)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_multi_file_src_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstMultiFileSrc *src = GST_MULTI_FILE_SRC (object); switch (prop_id) { case ARG_LOCATION: g_value_set_string (value, src->filename); break; case ARG_INDEX: g_value_set_int (value, src->index); break; case ARG_START_INDEX: g_value_set_int (value, src->start_index); break; case ARG_STOP_INDEX: g_value_set_int (value, src->stop_index); break; case ARG_CAPS: gst_value_set_caps (value, src->caps); break; case ARG_LOOP: g_value_set_boolean (value, src->loop); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_app_src_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstAppSrc *appsrc = GST_APP_SRC (object); switch (prop_id) { case PROP_CAPS: { GstCaps *caps; /* we're missing a _take_caps() function to transfer ownership */ caps = gst_app_src_get_caps (appsrc); gst_value_set_caps (value, caps); if (caps) gst_caps_unref (caps); break; } case PROP_SIZE: g_value_set_int64 (value, gst_app_src_get_size (appsrc)); break; case PROP_STREAM_TYPE: g_value_set_enum (value, gst_app_src_get_stream_type (appsrc)); break; case PROP_MAX_BYTES: g_value_set_uint64 (value, gst_app_src_get_max_bytes (appsrc)); break; case PROP_FORMAT: g_value_set_enum (value, appsrc->priv->format); break; case PROP_BLOCK: g_value_set_boolean (value, appsrc->priv->block); break; case PROP_IS_LIVE: g_value_set_boolean (value, gst_base_src_is_live (GST_BASE_SRC (appsrc))); break; case PROP_MIN_LATENCY: { guint64 min; gst_app_src_get_latency (appsrc, &min, NULL); g_value_set_int64 (value, min); break; } case PROP_MAX_LATENCY: { guint64 max; gst_app_src_get_latency (appsrc, &max, NULL); g_value_set_int64 (value, max); break; } case PROP_EMIT_SIGNALS: g_value_set_boolean (value, gst_app_src_get_emit_signals (appsrc)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_espeak_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstEspeak *self = GST_ESPEAK (object); switch (prop_id) { case PROP_TEXT: g_value_set_string (value, self->text); break; case PROP_PITCH: g_value_set_uint (value, self->pitch); break; case PROP_RATE: g_value_set_uint (value, self->rate); break; case PROP_VOICE: g_value_set_string (value, self->voice); break; case PROP_GAP: g_value_set_uint (value, self->gap); break; case PROP_TRACK: g_value_set_uint (value, self->track); break; case PROP_VOICES: g_value_set_boxed (value, self->voices); break; case PROP_CAPS: gst_value_set_caps (value, self->caps); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_base_camera_src_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstBaseCameraBinSrc *self = GST_BASE_CAMERA_SRC (object); switch (prop_id) { case PROP_MODE: g_value_set_enum (value, self->mode); break; case PROP_READY_FOR_CAPTURE: g_value_set_boolean (value, !self->capturing); break; case PROP_ZOOM: g_value_set_float (value, self->zoom); break; case PROP_MAX_ZOOM: g_value_set_float (value, self->max_zoom); break; case PROP_POST_PREVIEW: g_value_set_boolean (value, self->post_preview); break; case PROP_PREVIEW_CAPS: if (self->preview_caps) gst_value_set_caps (value, self->preview_caps); break; case PROP_PREVIEW_FILTER: if (self->preview_filter) g_value_set_object (value, self->preview_filter); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); break; } }
static void gst_udpsrc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstUDPSrc *udpsrc = GST_UDPSRC (object); switch (prop_id) { case PROP_BUFFER_SIZE: g_value_set_int (value, udpsrc->buffer_size); break; case PROP_PORT: g_value_set_int (value, udpsrc->port); break; case PROP_MULTICAST_GROUP: case PROP_ADDRESS: g_value_set_string (value, udpsrc->address); break; case PROP_MULTICAST_IFACE: g_value_set_string (value, udpsrc->multi_iface); break; case PROP_URI: g_value_set_string (value, udpsrc->uri); break; case PROP_CAPS: GST_OBJECT_LOCK (udpsrc); gst_value_set_caps (value, udpsrc->caps); GST_OBJECT_UNLOCK (udpsrc); break; case PROP_SOCKET: g_value_set_object (value, udpsrc->socket); break; case PROP_TIMEOUT: g_value_set_uint64 (value, udpsrc->timeout); break; case PROP_SKIP_FIRST_BYTES: g_value_set_int (value, udpsrc->skip_first_bytes); break; case PROP_CLOSE_SOCKET: g_value_set_boolean (value, udpsrc->close_socket); break; case PROP_USED_SOCKET: g_value_set_object (value, udpsrc->used_socket); break; case PROP_AUTO_MULTICAST: g_value_set_boolean (value, udpsrc->auto_multicast); break; case PROP_REUSE: g_value_set_boolean (value, udpsrc->reuse); break; case PROP_LOOP: g_value_set_boolean (value, udpsrc->loop); break; case PROP_RETRIEVE_SENDER_ADDRESS: g_value_set_boolean (value, udpsrc->retrieve_sender_address); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static GstCaps * gst_rtp_mux_getcaps (GstPad * pad, GstRTPMux * mux, GstCaps * filter) { GstCaps *caps = NULL; GstIterator *iter = NULL; GValue v = { 0 }; GstIteratorResult res; GstCaps *peercaps; GstCaps *othercaps; GstCaps *tcaps; GstCaps *other_filtered; peercaps = gst_pad_peer_query_caps (mux->srcpad, filter); if (peercaps) { tcaps = gst_pad_get_pad_template_caps (pad); othercaps = gst_caps_intersect_full (peercaps, tcaps, GST_CAPS_INTERSECT_FIRST); gst_caps_unref (peercaps); } else { tcaps = gst_pad_get_pad_template_caps (mux->srcpad); if (filter) othercaps = gst_caps_intersect_full (filter, tcaps, GST_CAPS_INTERSECT_FIRST); else othercaps = gst_caps_copy (tcaps); } gst_caps_unref (tcaps); clear_caps (othercaps, FALSE); other_filtered = gst_caps_copy (othercaps); clear_caps (other_filtered, TRUE); g_value_init (&v, GST_TYPE_CAPS); iter = gst_element_iterate_sink_pads (GST_ELEMENT (mux)); do { gst_value_set_caps (&v, other_filtered); res = gst_iterator_fold (iter, same_clock_rate_fold, &v, pad); gst_iterator_resync (iter); } while (res == GST_ITERATOR_RESYNC); gst_iterator_free (iter); gst_caps_unref (other_filtered); caps = gst_caps_intersect ((GstCaps *) gst_value_get_caps (&v), othercaps); g_value_unset (&v); gst_caps_unref (othercaps); if (res == GST_ITERATOR_ERROR) { gst_caps_unref (caps); caps = gst_caps_new_empty (); } return caps; }
static void gst_capsfilter_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstCapsFilter *capsfilter = GST_CAPSFILTER (object); switch (prop_id) { case PROP_FILTER_CAPS: gst_value_set_caps (value, capsfilter->filter_caps); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void _encoding_profile_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstEncodingProfile *prof = (GstEncodingProfile *) object; switch (prop_id) { case PROP_RESTRICTION_CAPS: gst_value_set_caps (value, prof->restriction); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_auto_video_src_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstAutoVideoSrc *src = GST_AUTO_VIDEO_SRC (object); switch (prop_id) { case PROP_CAPS:{ gst_value_set_caps (value, src->filter_caps); break; } default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_auto_audio_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstAutoAudioSink *sink = GST_AUTO_AUDIO_SINK (object); switch (prop_id) { case PROP_CAPS:{ gst_value_set_caps (value, sink->filter_caps); break; } default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_audiomixer_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstAudioMixer *audiomixer = GST_AUDIO_MIXER (object); switch (prop_id) { case PROP_FILTER_CAPS: GST_OBJECT_LOCK (audiomixer); gst_value_set_caps (value, audiomixer->filter_caps); GST_OBJECT_UNLOCK (audiomixer); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gnl_object_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GnlObject *gnlobject = (GnlObject *) object; switch (prop_id) { case PROP_START: g_value_set_uint64 (value, gnlobject->start); break; case PROP_DURATION: g_value_set_int64 (value, gnlobject->duration); break; case PROP_STOP: g_value_set_uint64 (value, gnlobject->stop); break; case PROP_MEDIA_START: g_value_set_uint64 (value, gnlobject->media_start); break; case PROP_MEDIA_DURATION: g_value_set_int64 (value, gnlobject->media_duration); break; case PROP_MEDIA_STOP: g_value_set_uint64 (value, gnlobject->media_stop); break; case PROP_RATE: g_value_set_double (value, gnlobject->rate); break; case PROP_PRIORITY: g_value_set_uint (value, gnlobject->priority); break; case PROP_ACTIVE: g_value_set_boolean (value, gnlobject->active); break; case PROP_CAPS: gst_value_set_caps (value, gnlobject->caps); break; case PROP_EXPANDABLE: g_value_set_boolean (value, GNL_OBJECT_IS_EXPANDABLE (object)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_auto_video_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstAutoVideoSink *sink = GST_AUTO_VIDEO_SINK (object); switch (prop_id) { case PROP_CAPS:{ gst_value_set_caps (value, sink->filter_caps); break; } case PROP_TS_OFFSET: g_value_set_int64 (value, sink->ts_offset); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void ges_track_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { GESTrack *track = GES_TRACK (object); switch (property_id) { case ARG_CAPS: gst_value_set_caps (value, track->priv->caps); break; case ARG_TYPE: g_value_set_flags (value, track->type); break; case ARG_DURATION: g_value_set_uint64 (value, track->priv->duration); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } }
static void nle_object_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { NleObject *nleobject = (NleObject *) object; switch (prop_id) { case PROP_START: g_value_set_uint64 (value, nleobject->pending_start); break; case PROP_DURATION: g_value_set_int64 (value, nleobject->pending_duration); break; case PROP_STOP: g_value_set_uint64 (value, nleobject->stop); break; case PROP_INPOINT: g_value_set_uint64 (value, nleobject->pending_inpoint); break; case PROP_PRIORITY: g_value_set_uint (value, nleobject->pending_priority); break; case PROP_ACTIVE: g_value_set_boolean (value, nleobject->pending_active); break; case PROP_IS_LIVE: g_value_set_boolean (value, nleobject->is_live); case PROP_CAPS: gst_value_set_caps (value, nleobject->caps); break; case PROP_EXPANDABLE: g_value_set_boolean (value, NLE_OBJECT_IS_EXPANDABLE (object)); break; case PROP_COMPOSITION: g_value_set_object (value, nleobject->composition); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_caps_setter_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstCapsSetter *filter = GST_CAPS_SETTER (object); switch (prop_id) { case PROP_CAPS: gst_value_set_caps (value, filter->caps); break; case PROP_JOIN: g_value_set_boolean (value, filter->join); break; case PROP_REPLACE: g_value_set_boolean (value, filter->replace); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_app_src_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstAppSrc *appsrc = GST_APP_SRC (object); switch (prop_id) { case PROP_CAPS: { GstCaps *caps; /* we're missing a _take_caps() function to transfer ownership */ caps = gst_app_src_get_caps (appsrc); gst_value_set_caps (value, caps); if (caps) gst_caps_unref (caps); break; } case PROP_SIZE: g_value_set_int64 (value, gst_app_src_get_size (appsrc)); break; case PROP_STREAM_TYPE: g_value_set_enum (value, gst_app_src_get_stream_type (appsrc)); break; case PROP_MAX_BYTES: g_value_set_uint64 (value, gst_app_src_get_max_bytes (appsrc)); break; case PROP_FORMAT: g_value_set_enum (value, appsrc->format); break; case PROP_BLOCK: g_value_set_boolean (value, appsrc->block); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void shell_recorder_src_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { ShellRecorderSrc *src = SHELL_RECORDER_SRC (object); switch (prop_id) { case PROP_CAPS: gst_value_set_caps (value, src->caps); break; case PROP_MEMORY_USED: g_mutex_lock (src->mutex); g_value_set_uint (value, src->memory_used); g_mutex_unlock (src->mutex); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_camera_bin_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstCameraBin *camera = GST_CAMERA_BIN_CAST (object); switch (prop_id) { case PROP_MODE: g_value_set_enum (value, camera->mode); break; case PROP_LOCATION: if (camera->mode == MODE_VIDEO) { g_value_set_string (value, camera->video_location); } else { g_value_set_string (value, camera->image_location); } break; case PROP_CAMERA_SRC: g_value_set_object (value, camera->src); break; case PROP_VIDEO_CAPTURE_SUPPORTED_CAPS: case PROP_IMAGE_CAPTURE_SUPPORTED_CAPS:{ GstPad *pad; GstCaps *caps; const gchar *padname; if (prop_id == PROP_VIDEO_CAPTURE_SUPPORTED_CAPS) { padname = GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME; } else { padname = GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME; } if (camera->src) { pad = gst_element_get_static_pad (camera->src, padname); g_assert (pad != NULL); /* TODO not sure if we want get_caps or get_allowed_caps to already * consider the full pipeline scenario and avoid picking a caps that * won't negotiate. Need to take care on the special case of the * pad being unlinked. */ caps = gst_pad_get_caps_reffed (pad); if (caps) { gst_value_set_caps (value, caps); gst_caps_unref (caps); } gst_object_unref (pad); } else { GST_DEBUG_OBJECT (camera, "Camera source not created, can't get " "supported caps"); } } break; case PROP_IMAGE_CAPTURE_CAPS:{ GstCaps *caps = NULL; g_object_get (camera->imagebin_capsfilter, "caps", &caps, NULL); gst_value_set_caps (value, caps); gst_caps_unref (caps); } break; case PROP_VIDEO_CAPTURE_CAPS:{ GstCaps *caps = NULL; g_object_get (camera->videobin_capsfilter, "caps", &caps, NULL); gst_value_set_caps (value, caps); gst_caps_unref (caps); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_imx_v4l2src_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GstImxV4l2VideoSrc *v4l2src = GST_IMX_V4L2SRC(object); switch (prop_id) { case IMX_V4L2SRC_CAPTURE_MODE: g_value_set_int(value, v4l2src->capture_mode); break; case IMX_V4L2SRC_FRAMERATE_NUM: g_value_set_int(value, v4l2src->fps_n); break; case IMX_V4L2SRC_INPUT: g_value_set_int(value, v4l2src->input); break; case IMX_V4L2SRC_DEVICE: g_value_set_string(value, v4l2src->devicename); break; case IMX_V4L2SRC_QUEUE_SIZE: g_value_set_int(value, v4l2src->queue_size); break; case IMX_V4L2SRC_CROP_META_X: g_value_set_int(value, v4l2src->metaCropX); break; case IMX_V4L2SRC_CROP_META_Y: g_value_set_int(value, v4l2src->metaCropY); break; case IMX_V4L2SRC_CROP_META_WIDTH: g_value_set_int(value, v4l2src->metaCropWidth); break; case IMX_V4L2SRC_CROP_META_HEIGHT: g_value_set_int(value, v4l2src->metaCropHeight); break; case PROP_FOCUS_MODE: { GstPhotographyFocusMode focus_mode; gst_imx_v4l2src_get_focus_mode(GST_PHOTOGRAPHY(v4l2src), &focus_mode); g_value_set_enum(value, focus_mode); } break; case PROP_WB_MODE: g_value_set_enum(value, GST_PHOTOGRAPHY_WB_MODE_AUTO); break; case PROP_COLOR_TONE: g_value_set_enum(value, GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL); break; case PROP_SCENE_MODE: g_value_set_enum(value, GST_TYPE_PHOTOGRAPHY_SCENE_MODE); break; case PROP_FLASH_MODE: g_value_set_enum(value, GST_PHOTOGRAPHY_FLASH_MODE_AUTO); break; case PROP_FLICKER_MODE: g_value_set_enum(value, GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF); break; case PROP_CAPABILITIES: g_value_set_ulong(value, GST_PHOTOGRAPHY_CAPS_NONE); break; case PROP_EV_COMP: g_value_set_float(value, 0.0f); break; case PROP_ISO_SPEED: g_value_set_uint(value, 0); break; case PROP_APERTURE: g_value_set_uint(value, 0); break; case PROP_EXPOSURE_TIME: g_value_set_uint(value, 0); break; case PROP_IMAGE_CAPTURE_SUPPORTED_CAPS: case PROP_IMAGE_PREVIEW_SUPPORTED_CAPS: if (v4l2src->fd_obj_v4l) gst_value_set_caps(value, gst_imx_v4l2src_caps_for_current_setup(v4l2src)); else GST_DEBUG_OBJECT(v4l2src, "not connected to hardware, don't know supported caps"); break; case PROP_ZOOM: g_value_set_float(value, 1.0f); break; case PROP_COLOR_TEMPERATURE: g_value_set_uint(value, 0); break; case PROP_WHITE_POINT: g_value_set_boxed(value, NULL); break; case PROP_ANALOG_GAIN: g_value_set_float(value, 1.0f); break; case PROP_LENS_FOCUS: g_value_set_float(value, 0.0f); break; case PROP_MIN_EXPOSURE_TIME: g_value_set_uint(value, 0); break; case PROP_MAX_EXPOSURE_TIME: g_value_set_uint(value, 0); break; case PROP_NOISE_REDUCTION: g_value_set_flags(value, 0); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } }