Commit graph

26 commits

Author SHA1 Message Date
Edgard Lima 8635258046 Update Edgard Lima's email
https://bugzilla.gnome.org/show_bug.cgi?id=779230
2017-02-27 00:34:19 +00:00
Olivier Crête 24286f1612 v4l2: Use G_DEFINE_ macros for added thread safety 2013-08-19 12:48:35 -04:00
Tim-Philipp Müller 230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Wim Taymans 7c5f5b1b7f v4l2: move capture code to device object
Move the details of how to capture to the device object. Remove the
v4l2src_calls.[ch] files because they are empty now.
Provide two simple methods to get and return a buffer to the device.
Also do a slow copy when the buffer is not from our pool.
2011-07-13 18:32:00 +02:00
Rob Clark 9c9585116c v4l2: add norm property
Based on a patch by Guennadi Liakhovetski.

v2: updates because I forgot to add GstTuner interface to v4l2sink
v3: update to add all possible values to norm enum
2011-05-24 10:47:26 +02:00
Tim-Philipp Müller 0be6bd355a Revert "v4l2: add norm property"
This reverts commit 9e1d419d07.

Reverting this since it adds unreviewed and bad API to v4l2src
(property of type enum, with seemingly random and unsorted values).
2011-01-02 11:40:28 +00:00
Rob Clark 9e1d419d07 v4l2: add norm property
Based on a patch by Guennadi Liakhovetski.
2010-12-29 11:46:42 -06:00
Brijesh Singh 74f84ae47f Fix comparison of the tuner norms
The V4L2 tuner norms that a device supports could
be a subset of some norm (e.g. NTSC instead of NTSC_M).
The comparison should be done by & instead of ==.

See http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec-single/v4l2.html#STANDARD

Fixes bug #569820.
2009-01-30 14:42:44 +01:00
Filippo Argiolas 4cefe7e944 sys/v4l2/gstv4l2tuner.c: v4l2src doesn't have a property named "norm" so don't try to notify about changes to that pr...
Original commit message from CVS:
Patch by: Filippo Argiolas <filippo dot argiolas at gmail dot com>
* sys/v4l2/gstv4l2tuner.c: (gst_v4l2_tuner_set_norm_and_notify):
v4l2src doesn't have a property named "norm" so don't try to notify
about changes to that property. The "norm" property and related
code are commented out currently. Fixes bug #549090.
2008-08-23 15:43:49 +00:00
Alexander Eichner e547bc5595 sys/v4l2/gstv4l2src.c: Use define here.
Original commit message from CVS:
Patch by: Alexander Eichner <alexeichi@yahoo.de>
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_init):
Use define here.
* sys/v4l2/gstv4l2tuner.c:
(gst_v4l2_tuner_set_frequency_and_notify):
Don't touch the property - its still disabled.
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format),
(gst_v4l2src_grab_frame), (gst_v4l2src_get_size_limits):
* sys/v4l2/v4l2src_calls.h:
Improve fallback format negotionation. Fixes #451388
2007-07-18 11:42:33 +00:00
Andy Wingo 3b5f988239 sys/v4l2/v4l2src_calls.*: Store the format list in the order that the driver gives it to us.
Original commit message from CVS:
2007-05-30  Andy Wingo  <wingo@pobox.com>

* sys/v4l2/v4l2src_calls.h:
* sys/v4l2/v4l2src_calls.c (gst_v4l2src_fill_format_list): Store
the format list in the order that the driver gives it to us.
(gst_v4l2src_probe_caps_for_format_and_size)
(gst_v4l2src_probe_caps_for_format): New functions, fill GstCaps
based on the capabilities of the device.
(gst_v4l2src_grab_frame): Update for object variable renaming.
(gst_v4l2src_set_capture): Update to be strict in its parameters,
as in the set_caps below.
(gst_v4l2src_capture_init): Update for object variable renaming,
and reflow.
(gst_v4l2src_capture_start, gst_v4l2src_capture_stop)
(gst_v4l2src_capture_deinit): Update for object variable renaming.
(gst_v4l2src_update_fps, gst_v4l2src_set_fps)
(gst_v4l2src_get_fps): Remove; these functions don't have much
meaning outside of an atomic set_caps method.
(gst_v4l2src_buffer_new): Don't set buffer duration, it is not
known.

* sys/v4l2/gstv4l2tuner.c (gst_v4l2_tuner_set_channel): Remove
call to update_fps; not sure about this change.
(gst_v4l2_tuner_set_norm): Work around the fact that for the
moment we don't have an update_fps_func.

* sys/v4l2/gstv4l2src.h (struct _GstV4l2Src): Don't put v4l2
structures in the object, just store what we need. Do store the
probed caps of the device. Don't store the current frame rate.

* sys/v4l2/gstv4l2src.c (gst_v4l2src_init): Remove the
update_fps_function, for now. Update for new object variable
naming.
(gst_v4l2src_set_property, gst_v4l2src_get_property): Update for
new object variable naming.
(gst_v4l2src_v4l2fourcc_to_structure): Rename from ..._to_caps.
(gst_v4l2_structure_to_v4l2fourcc): Rename from ...caps_to_....
(gst_v4l2src_get_caps): Rework to probe the device for supported
frame sizes and frame rates.
(gst_v4l2src_set_caps): Rework to be strict in the given
parameters: if someone asks us to have a certain size and rate,
that is what we configure.
(gst_v4l2src_get_read): Update for object variable naming. Don't
leak buffers on short reads.
(gst_v4l2src_get_mmap): Update for object variable naming, and add
comments.
(gst_v4l2src_create): Update for object variable naming.
2007-05-30 14:40:53 +00:00
Edgard Lima fff672f930 Fix segfault when oppening a radio device.
Original commit message from CVS:
Fix segfault when oppening a radio device.
2007-02-22 17:53:26 +00:00
Fredrik Persson 7d5caee3b5 sys/v4l2/gstv4l2tuner.*: Fix _set_channel(): remove useless g_object_notify() for "channel" property that doesn't exi...
Original commit message from CVS:
Patch by: Fredrik Persson  <frepe at broadband net>
* sys/v4l2/gstv4l2tuner.c:
* sys/v4l2/gstv4l2tuner.h:
Fix _set_channel(): remove useless g_object_notify() for "channel"
property that doesn't exist any longer and therefore now also
useless redirect (#338818).
2006-10-18 11:04:09 +00:00
Wim Taymans d8769c7d84 sys/v4l2/: Renamed some properties to match the tuner interface naming.
Original commit message from CVS:
* sys/v4l2/gstv4l2object.c:
(gst_v4l2_object_install_properties_helper), (gst_v4l2_object_new),
(gst_v4l2_object_set_property_helper),
(gst_v4l2_object_get_property_helper), (gst_v4l2_set_defaults):
* sys/v4l2/gstv4l2object.h:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_class_init),
(gst_v4l2src_create):
* sys/v4l2/gstv4l2tuner.c: (gst_v4l2_tuner_contains_channel),
(gst_v4l2_tuner_list_channels),
(gst_v4l2_tuner_set_channel_and_notify),
(gst_v4l2_tuner_get_channel), (gst_v4l2_tuner_contains_norm),
(gst_v4l2_tuner_list_norms), (gst_v4l2_tuner_set_norm_and_notify),
(gst_v4l2_tuner_get_norm):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities),
(gst_v4l2_fill_lists), (gst_v4l2_empty_lists):
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_get_fps):
Renamed some properties to match the tuner interface naming.
2006-09-27 17:04:22 +00:00
Edgard Lima eea3a2d9b6 Some cleanups and comments.
Original commit message from CVS:
Some cleanups and comments.
2006-09-27 15:14:07 +00:00
Stefan Kost 074e7b0d53 sys/v4l2/: Cleanup error messages and unify header comments
Original commit message from CVS:
* sys/v4l2/gstv4l2.c:
* sys/v4l2/gstv4l2colorbalance.c:
* sys/v4l2/gstv4l2colorbalance.h:
* sys/v4l2/gstv4l2object.c:
* sys/v4l2/gstv4l2object.h:
* sys/v4l2/gstv4l2src.c:
* sys/v4l2/gstv4l2src.h:
* sys/v4l2/gstv4l2tuner.c:
* sys/v4l2/gstv4l2tuner.h:
* sys/v4l2/gstv4l2xoverlay.c: (gst_v4l2_xoverlay_open):
* sys/v4l2/gstv4l2xoverlay.h:
* sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities),
(gst_v4l2_open):
* sys/v4l2/v4l2_calls.h:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_queue_frame),
(gst_v4l2src_capture_init):
* sys/v4l2/v4l2src_calls.h:
Cleanup error messages and unify header comments
2006-09-02 14:28:55 +00:00
Edgard Lima 9edc0c0365 Changes proposed by Wingo in bug #338818.
Original commit message from CVS:
Changes proposed by Wingo in bug #338818.
2006-05-11 17:59:59 +00:00
Martin Rubli 59bc24d738 Some changes proposed by wingo in bug #338818 (but not everything yet). Patch from Martin Rubli to fix framerate dete...
Original commit message from CVS:
Some changes proposed by wingo in bug #338818 (but not everything yet). Patch from Martin Rubli to fix framerate detection.
2006-05-05 20:12:59 +00:00
Stefan Kost 687ccc01c7 Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
Original commit message from CVS:
* ext/amrwb/gstamrwbdec.c: (gst_amrwbdec_class_init):
* ext/amrwb/gstamrwbenc.c: (gst_amrwbenc_class_init):
* ext/amrwb/gstamrwbparse.c: (gst_amrwbparse_class_init):
* ext/arts/gst_arts.c: (gst_arts_class_init):
* ext/artsd/gstartsdsink.c: (gst_artsdsink_class_init):
* ext/audiofile/gstafsink.c: (gst_afsink_class_init):
* ext/audiofile/gstafsrc.c: (gst_afsrc_class_init):
* ext/audioresample/gstaudioresample.c:
* ext/cdaudio/gstcdaudio.c: (gst_cdaudio_class_init):
* ext/directfb/dfbvideosink.c: (gst_dfbvideosink_class_init):
* ext/divx/gstdivxdec.c: (gst_divxdec_class_init):
* ext/hermes/gsthermescolorspace.c:
(gst_hermes_colorspace_class_init):
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_class_init):
* ext/jack/gstjack.c: (gst_jack_class_init):
* ext/jack/gstjackbin.c: (gst_jack_bin_class_init):
* ext/lcs/gstcolorspace.c: (gst_colorspace_class_init):
* ext/libfame/gstlibfame.c: (gst_fameenc_class_init):
* ext/musicbrainz/gsttrm.c: (gst_musicbrainz_class_init):
* ext/nas/nassink.c: (gst_nassink_class_init):
* ext/shout/gstshout.c: (gst_icecastsend_class_init):
* ext/snapshot/gstsnapshot.c: (gst_snapshot_class_init):
* ext/sndfile/gstsf.c: (gst_sf_class_init):
* ext/swfdec/gstswfdec.c: (gst_swfdecbuffer_class_init),
(gst_swfdec_class_init):
* ext/tarkin/gsttarkindec.c: (gst_tarkindec_class_init):
* ext/tarkin/gsttarkinenc.c: (gst_tarkinenc_class_init):
* gst/cdxaparse/gstcdxastrip.c: (gst_cdxastrip_class_init):
* gst/chart/gstchart.c: (gst_chart_class_init):
* gst/colorspace/gstcolorspace.c: (gst_colorspace_class_init):
* gst/deinterlace/gstdeinterlace.c: (gst_deinterlace_class_init):
* gst/festival/gstfestival.c: (gst_festival_class_init):
* gst/filter/gstbpwsinc.c: (gst_bpwsinc_class_init):
* gst/filter/gstiir.c: (gst_iir_class_init):
* gst/filter/gstlpwsinc.c: (gst_lpwsinc_class_init):
* gst/librfb/gstrfbsrc.c: (gst_rfbsrc_class_init):
* gst/mixmatrix/mixmatrix.c: (gst_mixmatrix_class_init):
* gst/mpeg1sys/gstmpeg1systemencode.c:
(gst_system_encode_class_init):
* gst/mpeg1videoparse/gstmp1videoparse.c:
(gst_mp1videoparse_class_init):
* gst/mpeg2sub/gstmpeg2subt.c: (gst_mpeg2subt_class_init):
* gst/mpegaudioparse/gstmpegaudioparse.c:
(gst_mp3parse_class_init):
* gst/overlay/gstoverlay.c: (gst_overlay_class_init):
* gst/passthrough/gstpassthrough.c: (passthrough_class_init):
* gst/playondemand/gstplayondemand.c: (play_on_demand_class_init):
* gst/rtjpeg/gstrtjpegdec.c: (gst_rtjpegdec_class_init):
* gst/rtjpeg/gstrtjpegenc.c: (gst_rtjpegenc_class_init):
* gst/smooth/gstsmooth.c: (gst_smooth_class_init):
* gst/smoothwave/gstsmoothwave.c: (gst_smoothwave_class_init):
* gst/spectrum/gstspectrum.c: (gst_spectrum_class_init):
* gst/stereo/gststereo.c: (gst_stereo_class_init):
* gst/switch/gstswitch.c: (gst_switch_class_init):
* gst/tta/gstttadec.c: (gst_tta_dec_class_init):
* gst/tta/gstttaparse.c: (gst_tta_parse_class_init):
* gst/vbidec/gstvbidec.c: (gst_vbidec_class_init):
* gst/videocrop/gstvideocrop.c: (gst_video_crop_class_init):
* gst/virtualdub/gstxsharpen.c: (gst_xsharpen_class_init):
* gst/y4m/gsty4mencode.c: (gst_y4mencode_class_init):
* sys/cdrom/gstcdplayer.c: (cdplayer_class_init):
* sys/directsound/gstdirectsoundsink.c:
(gst_directsoundsink_class_init):
* sys/dxr3/dxr3audiosink.c: (dxr3audiosink_class_init):
* sys/dxr3/dxr3spusink.c: (dxr3spusink_class_init):
* sys/dxr3/dxr3videosink.c: (dxr3videosink_class_init):
* sys/qcam/gstqcamsrc.c: (gst_qcamsrc_class_init):
* sys/v4l2/gstv4l2colorbalance.c:
(gst_v4l2_color_balance_channel_class_init):
* sys/v4l2/gstv4l2tuner.c: (gst_v4l2_tuner_channel_class_init),
(gst_v4l2_tuner_norm_class_init):
* sys/ximagesrc/ximagesrc.c: (gst_ximagesrc_class_init):
Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
2006-04-08 21:48:01 +00:00
Edgard Lima 51b1537e45 Just make few things more robust and also some identation.
Original commit message from CVS:
Just make few things more robust and also some identation.
2006-03-25 05:31:28 +00:00
Edgard Lima 2dd8010618 V4L2 ported to 0.10.
Original commit message from CVS:
V4L2 ported to 0.10.
2006-03-11 22:50:03 +00:00
Benjamin Otte c5d29a1b39 compile fixes for --disable-gst-debug, G_DISABLE_ASSERT and friends
Original commit message from CVS:
* ext/alsa/gstalsamixer.c: (gst_alsa_mixer_get_volume),
(gst_alsa_mixer_set_volume), (gst_alsa_mixer_set_mute),
(gst_alsa_mixer_set_record), (gst_alsa_mixer_set_option),
(gst_alsa_mixer_get_option):
* ext/dvdnav/dvdnavsrc.c: (dvdnav_get_event_name),
(dvdnavsrc_print_event):
* ext/ogg/gstoggdemux.c: (_find_chain_process), (gst_ogg_print):
* ext/ogg/gstoggmux.c: (gst_ogg_mux_pad_link),
(gst_ogg_mux_pad_unlink):
* gst/multipart/multipartmux.c: (gst_multipart_mux_pad_link),
(gst_multipart_mux_pad_unlink):
* gst/videofilter/gstvideobalance.c:
(gst_videobalance_colorbalance_set_value):
* gst/videomixer/videomixer.c: (gst_videomixer_pad_link),
(gst_videomixer_pad_unlink):
* po/uk.po:
* sys/oss/gstossmixer.c:
* sys/v4l/gstv4lcolorbalance.c:
* sys/v4l/gstv4ltuner.c:
* sys/v4l/v4lsrc_calls.c:
* sys/v4l2/gstv4l2colorbalance.c:
* sys/v4l2/gstv4l2tuner.c:
compile fixes for --disable-gst-debug, G_DISABLE_ASSERT and friends
2004-08-03 16:06:09 +00:00
Thomas Vander Stichele 6cc1c73d2b don't mix tabs and spaces
Original commit message from CVS:
don't mix tabs and spaces
2004-03-15 19:32:27 +00:00
Thomas Vander Stichele 5d25c00e4b gst-indent
Original commit message from CVS:
gst-indent
2004-03-14 22:34:33 +00:00
Benjamin Otte 409384e0d8 sys/v4l2/: add norm, channel and frequency properties.
Original commit message from CVS:
2004-01-12  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* sys/v4l2/gstv4l2element.c: (gst_v4l2element_class_init),
(gst_v4l2element_dispose), (gst_v4l2element_set_property),
(gst_v4l2element_get_property):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_set_defaults), (gst_v4l2_open):
add norm, channel and frequency properties.
* sys/v4l2/gstv4l2tuner.c:
fixes for tuner interface changes
* sys/v4l2/gstv4l2element.h:
* sys/v4l2/gstv4l2src.c:
* sys/v4l2/gstv4l2src.h:
* sys/v4l2/v4l2src_calls.c:
* sys/v4l2/v4l2src_calls.h:
rework v4l2src to work with saa1734 cards and allow mmaped buffers.
2004-01-12 02:19:57 +00:00
Ronald S. Bultje 862d28a1b7 Some interface implementations for video4linux/video4linux2 plugins: a Tuner interface, with which one can select inp...
Original commit message from CVS:
Some interface implementations for video4linux/video4linux2 plugins:
* a Tuner interface, with which one can select inputs and stations. Audio
work is underway here, but unfinished.
* A Xoverlay interface with which one can do simple overlay. Similar to
the API of the v4l/Xv XFree86 extension. Widget implementation for
GTK-2.0 coming up in the sandbox.
* Colorbalance - for adapting colors (brightness, contrast, etc.) - pretty
basic and maybe somewhat overdesigned. But it'll do for now.

Apart from these interfaces, there's also a loadable library 'xwindowlistener'
that listenes to X for the movement of a window and the overlap of other
windows. This is partly copied from xawtv (and thus partly GPL :(), but it's
needed for the xoverlay interface implementation in the v4l/v4l2 elements.

Lastly, some small changes to remove redundant properties from the v4l/v4l2
elements since these can be done much simpler. Comments appreciated!
2003-10-10 12:47:42 +00:00