Matthew Waters
612102fdbc
gst: don't use volatile to mean atomic
...
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead. GCC 11 has started warning about using volatile
with atomic operations.
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/911 >
2021-03-18 19:52:53 +11:00
Tim Schneider
2c76f03fe2
rpicamsrc: Added "src->started = FALSE;" to gst_rpi_cam_src_stop
...
Makes the element reusable multiple times after a state change back to READY.
Fixes #105
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/823 >
2020-11-20 02:15:15 +11:00
Tim-Philipp Müller
9588108d6e
rpicamsrc: fix nal alignment of output buffers
...
We claim output buffers are nal-aligned, but that wasn't
actually true: We would push out a partial nal in case
the nal doesn't fit into the max encoder-selected output
buffer size, and then the next buffer would not start
with a sync marker. That's not right and makes h264parse
unhappy.
Instead accumulate buffers until we have a full frame
(we can't rely on the NAL_END flag, it's always set).
Fixes #768
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682 >
2020-07-24 17:09:45 +01:00
Tim-Philipp Müller
fbcc43d822
rpicamsrc: flesh out docs and add to plugin docs cache
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/667 >
2020-07-10 17:37:28 +01:00
Tim-Philipp Müller
b7c07b1a95
rpicamsrc: enable video orientation/direction unconditionally
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/667 >
2020-07-10 17:37:28 +01:00
Tim-Philipp Müller
8ceaefe101
rpicamsrc: fix indentation
...
Not touching the Raspi* files.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/667 >
2020-07-10 17:37:28 +01:00
Tim-Philipp Müller
996d2389af
rpicamsrc: fix and silence some compiler warnings
...
Some are in system headers, and in Raspi files we want
to keep modifications to a minimum.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/667 >
2020-07-10 17:37:28 +01:00
Tim-Philipp Müller
4a4de61c23
rpicamsrc: hook up to build
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/667 >
2020-07-10 17:37:28 +01:00
Tim-Philipp Müller
1c25fe131d
rpicamsrc: meson: use gnome.glib_mkenums_simple() and fix build as Meson subproject
...
While at it also fix up the type defines, e.g.
GST_RPI_CAM_TYPE_RPI_CAM_SRC_EXPOSURE_MODE -> GST_RPI_CAM_SRC_TYPE_EXPOSURE_MODE
2020-07-10 16:47:10 +01:00
Jan Schmidt
c907deb15f
rpicamsrc: Improve timeout error
...
Propagate timeout errors so they're not reported
generically
2020-07-10 16:46:31 +01:00
Jan Schmidt
d5cd0c0301
rpicamsrc: Expose constrained-baseline profile
...
constrained-baseline is a useful profile for streaming to iOS
devices, and seems to work in the firmware, so let's publish it
2020-07-10 16:46:19 +01:00
Jan Schmidt
93bd8c34ed
rpicamsrc: Add define and increase reported maximum FPS from 90 to 1000
2020-07-10 16:46:18 +01:00
Jan Schmidt
ed893592ea
rpicamsrc: Implement use-stc property to disable STC timestamps
...
If use-stc=false, then rpicamsrc won't apply
the camera timestamping to outgoing buffers, instead
relying on real-time timestamping by the
GStreamer clock. It means slightly less accuracy
and more jitter in timestamps, but might help on some
CSI inputs with broken timestamping.
2020-07-10 16:46:12 +01:00
Jan Schmidt
f093e3f5fb
rpicamsrc: Fix the descriptions of text annotation colour properties
...
The text annotation colour properties take an integer value
corresponding to a VUY colour, not a text string like
the copy-pasted description from raspivid suggests.
Fixes https://github.com/thaytan/gst-rpicamsrc/issues/59
2020-07-10 16:46:03 +01:00
Jan Schmidt
1670712500
rpicamsrc: Set outgoing buffer durations based on negotiated framerate.
...
make sure outgoing buffers have at least some duration set,
otherwise it leads to strange situations, like qtmux writing
out a file that doesn't include the final frame inside the
playable segment, because no-duration = 0 duration there.
2020-07-10 16:45:53 +01:00
Jan Schmidt
f42afec471
rpicamsrc: Switch back to MJPEG codec for image/jpeg
...
The JPEG codec hangs, not sure why yet. The MJPEG
codec doesn't provide a quality setting, and sometimes
freezes on shutdown, but otherwise seems more
reliable
2020-07-10 16:45:50 +01:00
Jan Schmidt
38ef8c2411
rpicamsrc: Don't try and set H264 params with JPEG codec
2020-07-10 16:45:49 +01:00
Jan Schmidt
da86cec40e
rpicamsrc: First attempt at implementing MJPEG and raw video support
2020-07-10 16:45:47 +01:00
Xabier Rodriguez Calvar
39afecac32
rpicamsrc: Implement GstVideoDirection interface
...
Instead of implementing a custom property, we implement that interface.
2020-07-10 16:45:45 +01:00
Jan Schmidt
2496d0e859
rpicamsrc: MMAL gives buffers with nal alignment, not AU
...
Fix the output caps, our buffers are not AU aligned, since
the SPS / PPS are given in separate packets at the start.
2020-07-10 16:45:43 +01:00
Xabier Rodriguez Calvar
c785d4f5db
rpicamsrc: Create orientation property
...
Its behavior and choices are analog to the ones present in [gl]videoflip
for the method property.
2020-07-10 16:45:39 +01:00
Jan Schmidt
8e8ac0504c
rpicamsrc: basesrc event handlers should not unref
...
Don't unref the passed event when handling events via
the GstBaseSrc src pad event handler - basesrc does
the unref. That breaks handling of upstream
force-key-unit events by unreffing twice.
Fixes https://github.com/thaytan/gst-rpicamsrc/issues/43
2020-07-10 16:45:29 +01:00
Jan Schmidt
8fa4acacc0
rpicamsrc: Add property getters for preview window position.
...
Add the lines in get_property() for the preview-x/y/w/h properties
so the values can be retrieved without causing critical warnings.
Fixes https://github.com/thaytan/gst-rpicamsrc/issues/42
2020-07-10 16:45:21 +01:00
Jan Schmidt
48b3c2bc8e
rpicamsrc: Add preview-x/y/w/h properties
...
Expose properties for setting the position of the preview
window on the screen
2020-07-10 16:45:19 +01:00
Jan Schmidt
63f60f7e7e
rpicamsrc: Add properties for configuring annotation text size and colour.
...
Map the raspivid setting for annotation text size and colours
to properties.
2020-07-10 16:45:18 +01:00
ibauer
a3de294cb5
rpicamsrc: Changed awb-gain-blue use the correct enum PROP_AWB_GAIN_BLUE and not PROP_AWB_GAIN_RED
2020-07-10 16:45:16 +01:00
Philippe Normand
cda483cb3c
rpicamsrc: Basic orientation interface support
...
The (h,v)flip attributes are now supported through this interface.
It should also be possible to support (h,v)center attributes using the
ROI properties.
2020-07-10 16:45:13 +01:00
Jan Schmidt
1a4870d13d
rpicamsrc: Describe awb-mode=off in lowercase
...
Change the descriptions for the awb-gain-blue and awb-gain-red
properties to say 'awb-mode=off' instead of 'awb-mode=OFF'
See https://github.com/thaytan/gst-rpicamsrc/issues/26
2020-07-10 16:45:05 +01:00
Philippe Normand
961cf17c97
rpicamsrc: colorbalance: protect with config_lock mutex
2020-07-10 16:45:03 +01:00
Philippe Normand
48a735ff21
rpicamsrc: Implement GstColorBalance interface
...
Fixes https://github.com/thaytan/gst-rpicamsrc/issues/24
2020-07-10 16:44:48 +01:00
Jan Schmidt
4e827949ef
rpicamsrc: Fix initial config setting.
...
Make sure to update the captsure config before starting
capture. Since the capture component now keeps a local
copy of the config, it's not updated automatically.
2020-07-10 16:44:46 +01:00
Jan Schmidt
3b85ddd90e
rpicamsrc: Update properties dynamically where possible
...
Update camera and encoder properties at runtime
where possible
Fixes https://github.com/thaytan/gst-rpicamsrc/issues/19
and https://github.com/thaytan/gst-rpicamsrc/issues/23
2020-07-10 16:44:23 +01:00
Jan Schmidt
8fe0590c29
rpicamsrc: Use MMAL PTS and STC to calculate GStreamer timestamps
...
Don't apply timestamps based on output time from the encoder,
but use the MMAL STC and capture PTS to generate a GStreamer
timestamp that more accurately resembles the input (and would
preserve reordering should the encoder ever add B-frames).
Fixes https://github.com/thaytan/gst-rpicamsrc/issues/16
2020-07-10 16:43:55 +01:00
Jan Schmidt
3abe941e74
rpicamsrc: Read and set H.264 profile from negotiated caps
2020-07-10 16:43:51 +01:00
Jan Schmidt
2087b1e44e
rpicamsrc: Add intra-refresh-type property, and set default keyframe spacing to -1 (auto)
...
This plus other recent commits mostly fix
bug https://github.com/thaytan/gst-rpicamsrc/issues/16
2020-07-10 16:43:31 +01:00
Jan Schmidt
ed22d5cc4e
rpicamsrc: Add annotation-mode and annotation-text properties
2020-07-10 16:43:30 +01:00
Jan Schmidt
39d212df57
rpicamsrc: implement sensor-mode property
2020-07-10 16:43:28 +01:00
Jan Schmidt
37028010f1
rpicamsrc: Implement drc property
2020-07-10 16:43:25 +01:00
Jan Schmidt
78b36bbb6b
rpicamsrc: add awb-gain-red and awb-gain-blue properties
2020-07-10 16:43:23 +01:00
Jan Schmidt
f6451323b5
rpicamsrc: Add camera-number property
2020-07-10 16:43:22 +01:00
Jan Schmidt
1ea517a692
rpicamsrc: add inline-headers and shutter-speed properties
2020-07-10 16:43:20 +01:00
Jan Schmidt
861c353873
rpicamsrc: Add quantisation-parameter property, support variable bitrate
...
Allow birate=0 and implement the quantisation-parameter property
Fixes https://github.com/thaytan/gst-rpicamsrc/issues/21
2020-07-10 16:43:07 +01:00
Jan Schmidt
eb345f032c
rpicamsrc: Add keyframe-interval property to the element
2020-07-10 16:43:00 +01:00
Tim-Philipp Müller
8e9c8663f8
rpicamsrc: Add GstDeviceProvider for rpi camera module
2020-07-10 16:42:58 +01:00
Tim-Philipp Müller
4b15fa2abc
rpicamsrc: avoid single-element lists in template caps
2020-07-10 16:42:56 +01:00
Vivia Nikolaidou
d226968275
rpicamsrc: Add force-key-unit event support
2020-07-10 16:42:55 +01:00
Jan Schmidt
244091bb5e
rpicamsrc: Move all debug output to go via GStreamer logs
...
Fixes https://github.com/thaytan/gst-rpicamsrc/issues/9
2020-07-10 16:42:16 +01:00
Jan Schmidt
df3ceb86f7
rpicamsrc: Update maximum framerate to 90 fps
2020-07-10 16:42:15 +01:00
Jan Schmidt
1dfb41bdce
rpicamsrc: Enable image effects
2020-07-10 16:42:14 +01:00
Jan Schmidt
1b9a614272
rpicamsrc: Re-flow element source code with gst-indent
2020-07-10 16:42:12 +01:00