• Home
  • Raw
  • Download

Lines Matching refs:v4l2src

102 GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (v4l2src,
113 static void gst_v4l2src_finalize (GstV4l2Src * v4l2src);
206 gst_v4l2src_init (GstV4l2Src * v4l2src) in gst_v4l2src_init() argument
209 v4l2src->v4l2object = gst_v4l2_object_new (GST_ELEMENT (v4l2src), in gst_v4l2src_init()
210 GST_OBJECT (GST_BASE_SRC_PAD (v4l2src)), V4L2_BUF_TYPE_VIDEO_CAPTURE, in gst_v4l2src_init()
214 v4l2src->v4l2object->skip_try_fmt_probes = TRUE; in gst_v4l2src_init()
216 gst_base_src_set_format (GST_BASE_SRC (v4l2src), GST_FORMAT_TIME); in gst_v4l2src_init()
217 gst_base_src_set_live (GST_BASE_SRC (v4l2src), TRUE); in gst_v4l2src_init()
222 gst_v4l2src_finalize (GstV4l2Src * v4l2src) in gst_v4l2src_finalize() argument
224 gst_v4l2_object_destroy (v4l2src->v4l2object); in gst_v4l2src_finalize()
226 G_OBJECT_CLASS (parent_class)->finalize ((GObject *) (v4l2src)); in gst_v4l2src_finalize()
234 GstV4l2Src *v4l2src = GST_V4L2SRC (object); in gst_v4l2src_set_property() local
236 if (!gst_v4l2_object_set_property_helper (v4l2src->v4l2object, in gst_v4l2src_set_property()
250 GstV4l2Src *v4l2src = GST_V4L2SRC (object); in gst_v4l2src_get_property() local
252 if (!gst_v4l2_object_get_property_helper (v4l2src->v4l2object, in gst_v4l2src_get_property()
377 gst_v4l2src_set_format (GstV4l2Src * v4l2src, GstCaps * caps, in gst_v4l2src_set_format() argument
382 obj = v4l2src->v4l2object; in gst_v4l2src_set_format()
388 g_signal_emit (v4l2src, gst_v4l2_signals[SIGNAL_PRE_SET_FORMAT], 0, in gst_v4l2src_set_format()
389 v4l2src->v4l2object->video_fd, caps); in gst_v4l2src_set_format()
398 GstV4l2Src *v4l2src = GST_V4L2SRC (basesrc); in gst_v4l2src_fixate() local
399 GstV4l2Object *obj = v4l2src->v4l2object; in gst_v4l2src_fixate()
464 v4l2src->renegotiation_adjust = v4l2src->offset + 1; in gst_v4l2src_fixate()
465 v4l2src->pending_set_fmt = TRUE; in gst_v4l2src_fixate()
479 gst_v4l2_error (v4l2src, &error); in gst_v4l2src_fixate()
494 gst_v4l2src_query_preferred_dv_timings (GstV4l2Src * v4l2src, in gst_v4l2src_query_preferred_dv_timings() argument
497 GstV4l2Object *obj = v4l2src->v4l2object; in gst_v4l2src_query_preferred_dv_timings()
532 GST_INFO_OBJECT (v4l2src, "Using DV Timings: %i x %i (%i/%i fps)", in gst_v4l2src_query_preferred_dv_timings()
539 gst_v4l2src_query_preferred_size (GstV4l2Src * v4l2src, in gst_v4l2src_query_preferred_size() argument
544 if (!gst_v4l2_get_input (v4l2src->v4l2object, &in.index)) in gst_v4l2src_query_preferred_size()
547 if (!gst_v4l2_query_input (v4l2src->v4l2object, &in)) in gst_v4l2src_query_preferred_size()
550 GST_INFO_OBJECT (v4l2src, "Detect input %u as `%s`", in.index, in.name); in gst_v4l2src_query_preferred_size()
554 if (!v4l2src->no_signal) in gst_v4l2src_query_preferred_size()
556 GST_ELEMENT_WARNING (v4l2src, RESOURCE, READ, ("Signal lost"), in gst_v4l2src_query_preferred_size()
558 v4l2src->no_signal = TRUE; in gst_v4l2src_query_preferred_size()
559 } else if (v4l2src->no_signal) { in gst_v4l2src_query_preferred_size()
560 if (v4l2src->no_signal) in gst_v4l2src_query_preferred_size()
561 GST_ELEMENT_INFO (v4l2src, RESOURCE, READ, in gst_v4l2src_query_preferred_size()
563 v4l2src->no_signal = FALSE; in gst_v4l2src_query_preferred_size()
567 GST_FIXME_OBJECT (v4l2src, "missing support for native video size"); in gst_v4l2src_query_preferred_size()
570 return gst_v4l2src_query_preferred_dv_timings (v4l2src, pref); in gst_v4l2src_query_preferred_size()
572 GST_FIXME_OBJECT (v4l2src, "missing support for video standards"); in gst_v4l2src_query_preferred_size()
582 GstV4l2Src *v4l2src = GST_V4L2SRC (basesrc); in gst_v4l2src_negotiate() local
597 have_pref = gst_v4l2src_query_preferred_size (v4l2src, &pref); in gst_v4l2src_negotiate()
679 GstV4l2Src *v4l2src; in gst_v4l2src_get_caps() local
682 v4l2src = GST_V4L2SRC (src); in gst_v4l2src_get_caps()
683 obj = v4l2src->v4l2object; in gst_v4l2src_get_caps()
686 return gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (v4l2src)); in gst_v4l2src_get_caps()
842 GstV4l2Src *v4l2src = GST_V4L2SRC (src); in gst_v4l2src_start() local
844 v4l2src->offset = 0; in gst_v4l2src_start()
845 v4l2src->next_offset_same = FALSE; in gst_v4l2src_start()
846 v4l2src->renegotiation_adjust = 0; in gst_v4l2src_start()
849 v4l2src->ctrl_time = 0; in gst_v4l2src_start()
850 gst_object_sync_values (GST_OBJECT (src), v4l2src->ctrl_time); in gst_v4l2src_start()
852 v4l2src->has_bad_timestamp = FALSE; in gst_v4l2src_start()
853 v4l2src->last_timestamp = 0; in gst_v4l2src_start()
861 GstV4l2Src *v4l2src = GST_V4L2SRC (src); in gst_v4l2src_unlock() local
862 return gst_v4l2_object_unlock (v4l2src->v4l2object); in gst_v4l2src_unlock()
868 GstV4l2Src *v4l2src = GST_V4L2SRC (src); in gst_v4l2src_unlock_stop() local
870 v4l2src->last_timestamp = 0; in gst_v4l2src_unlock_stop()
872 return gst_v4l2_object_unlock_stop (v4l2src->v4l2object); in gst_v4l2src_unlock_stop()
878 GstV4l2Src *v4l2src = GST_V4L2SRC (src); in gst_v4l2src_stop() local
879 GstV4l2Object *obj = v4l2src->v4l2object; in gst_v4l2src_stop()
886 v4l2src->pending_set_fmt = FALSE; in gst_v4l2src_stop()
895 GstV4l2Src *v4l2src = GST_V4L2SRC (element); in gst_v4l2src_change_state() local
896 GstV4l2Object *obj = v4l2src->v4l2object; in gst_v4l2src_change_state()
903 gst_v4l2_error (v4l2src, &error); in gst_v4l2src_change_state()
930 GstV4l2Src *v4l2src = GST_V4L2SRC (src); in gst_v4l2src_create() local
931 GstV4l2Object *obj = v4l2src->v4l2object; in gst_v4l2src_create()
947 GST_INFO_OBJECT (v4l2src, "Resolution change detected."); in gst_v4l2src_create()
955 v4l2src->renegotiation_adjust = v4l2src->offset + 1; in gst_v4l2src_create()
956 v4l2src->pending_set_fmt = TRUE; in gst_v4l2src_create()
981 GST_OBJECT_LOCK (v4l2src); in gst_v4l2src_create()
982 if ((clock = GST_ELEMENT_CLOCK (v4l2src))) { in gst_v4l2src_create()
984 base_time = GST_ELEMENT (v4l2src)->base_time; in gst_v4l2src_create()
990 GST_OBJECT_UNLOCK (v4l2src); in gst_v4l2src_create()
1001 if (!v4l2src->has_bad_timestamp && timestamp != GST_CLOCK_TIME_NONE) { in gst_v4l2src_create()
1024 GST_WARNING_OBJECT (v4l2src, in gst_v4l2src_create()
1026 v4l2src->has_bad_timestamp = TRUE; in gst_v4l2src_create()
1030 if (v4l2src->last_timestamp > timestamp) { in gst_v4l2src_create()
1031 GST_WARNING_OBJECT (v4l2src, in gst_v4l2src_create()
1033 v4l2src->has_bad_timestamp = TRUE; in gst_v4l2src_create()
1040 GST_WARNING_OBJECT (v4l2src, in gst_v4l2src_create()
1042 v4l2src->has_bad_timestamp = TRUE; in gst_v4l2src_create()
1047 v4l2src->last_timestamp = timestamp; in gst_v4l2src_create()
1049 GST_DEBUG_OBJECT (v4l2src, "ts: %" GST_TIME_FORMAT " now %" GST_TIME_FORMAT in gst_v4l2src_create()
1077 v4l2src->ctrl_time += duration; in gst_v4l2src_create()
1082 v4l2src->ctrl_time = timestamp; in gst_v4l2src_create()
1084 gst_object_sync_values (GST_OBJECT (src), v4l2src->ctrl_time); in gst_v4l2src_create()
1087 GST_TIME_ARGS (v4l2src->ctrl_time), GST_TIME_ARGS (timestamp)); in gst_v4l2src_create()
1089 if (v4l2src->next_offset_same && in gst_v4l2src_create()
1091 GST_BUFFER_OFFSET (*buf) != v4l2src->offset) { in gst_v4l2src_create()
1093 GST_WARNING_OBJECT (v4l2src, in gst_v4l2src_create()
1096 v4l2src->next_offset_same = FALSE; in gst_v4l2src_create()
1101 v4l2src->next_offset_same = !v4l2src->next_offset_same; in gst_v4l2src_create()
1108 (v4l2src->offset - v4l2src->renegotiation_adjust)) { in gst_v4l2src_create()
1109 GST_BUFFER_OFFSET (*buf) = v4l2src->offset; in gst_v4l2src_create()
1110 GST_BUFFER_OFFSET_END (*buf) = v4l2src->offset + 1; in gst_v4l2src_create()
1111 if (!half_frame || !v4l2src->next_offset_same) in gst_v4l2src_create()
1112 v4l2src->offset++; in gst_v4l2src_create()
1116 GST_BUFFER_OFFSET (*buf) += v4l2src->renegotiation_adjust; in gst_v4l2src_create()
1117 GST_BUFFER_OFFSET_END (*buf) += v4l2src->renegotiation_adjust; in gst_v4l2src_create()
1119 if ((v4l2src->offset != 0) in gst_v4l2src_create()
1120 && (!half_frame || v4l2src->next_offset_same) in gst_v4l2src_create()
1121 && (GST_BUFFER_OFFSET (*buf) != (v4l2src->offset + 1))) { in gst_v4l2src_create()
1122 guint64 lost_frame_count = GST_BUFFER_OFFSET (*buf) - v4l2src->offset - 1; in gst_v4l2src_create()
1123 GST_WARNING_OBJECT (v4l2src, in gst_v4l2src_create()
1127 qos_msg = gst_message_new_qos (GST_OBJECT_CAST (v4l2src), TRUE, in gst_v4l2src_create()
1131 gst_element_post_message (GST_ELEMENT_CAST (v4l2src), qos_msg); in gst_v4l2src_create()
1134 v4l2src->offset = GST_BUFFER_OFFSET (*buf); in gst_v4l2src_create()
1185 GstV4l2Src *v4l2src = GST_V4L2SRC (handler); in gst_v4l2src_uri_get_uri() local
1187 if (v4l2src->v4l2object->videodev != NULL) { in gst_v4l2src_uri_get_uri()
1188 return g_strdup_printf ("v4l2://%s", v4l2src->v4l2object->videodev); in gst_v4l2src_uri_get_uri()
1198 GstV4l2Src *v4l2src = GST_V4L2SRC (handler); in gst_v4l2src_uri_set_uri() local
1204 g_object_set (v4l2src, "device", device, NULL); in gst_v4l2src_uri_set_uri()