| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Instead of the deprecated gst_element_get_request_pad.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2180>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2110>
|
| |
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=763081
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=753241
|
|
|
|
|
| |
Remember to set the source to NULL state as adding it to the pipeline
will set it to the READY state.
|
|
|
|
|
| |
Video source should be linked to videocrop and not to
videoconvert as it is done in the main linking path
|
|
|
|
| |
The structure is created and never used anymore. Remove it.
|
|
|
|
|
|
|
| |
Replace videocrop ! videoscale ! capsfilter with the digitalzoom
bin that has the same pipeline internally and already updates
the capsfilter automatically when caps change, removing this code
from wrappercamerabinsrc and making it cleaner.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wrappercamerabinsrc has a videocrop element to be used for
zooming and for cropping when input caps is different when used
with the GstPhotography interface. The zooming part needs
the following elements:
capsfilter ! videocrop ! videoscale ! capsfilter
The capsfilters should always have the same caps to ensure the
zooming is done and preserves dimensions, unless when it is needed
to do more cropping due to input dimensions those caps
need to be modified accordingly to preserve the output dimensions.
This, however, makes it hard to get caps negotiation to work properly
as we need to have different caps in the capsfilters to account for
the extra cropping needed. It could be simple for fixed caps but it
gets tricky with unfixed ones.
To solve this, this patch splits the zooming and dimension reduction
cropping into 2 separate videocrop elements. The first one does
the dimension cropping, which is only needed when the GstPhotography
API is used and the source provides a caps that is different than
what is requested, while the second is dedicated to zoom crop only.
The first part of the pipeline goes from:
src ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter
to
src ! videocrop ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter
It might add an extra overhead in the image capture as the image might need
to be cropped twice but this can be solved by enabling videocrop to use
crop metas so only the later one does the real cropping.
It also makes the code a bit simpler.
|
|
|
|
|
| |
This is already handled in another place and doesn't make sense
in the function context anymore
|
|
|
|
|
| |
Post an error when preparing the image capture through photography
interface fails
|
|
|
|
|
| |
Intersect is enough to check if the requested caps are compatible
with what the source is going to provide. Equality will be too strict.
|
| |
|
|
|
|
|
| |
Avoids not-negotiated failures related to using image capture caps
still when adjusting to go back to viewfinder.
|
|
|
|
| |
gst_pad_peer_query doesn't take ownership of the query object
|
|
|
|
|
|
|
|
|
|
|
| |
Remove tee and output-selector and just link the source
pad to the outputs we want as needed.
The way we need to prioritize caps negotiation and allocation
queries depending on the mode enabled is too custom to be
handled using tee and output-selector.
This provides more flexibility and doesn't get in the way of proper
handling of negotiation and allocation queries.
|
|
|
|
|
| |
The variable was never set to true and can be removed along
with the probe in which it used to act
|
|
|
|
|
| |
Only get the pad if it is really going to be used to avoid
leaking it
|
|
|
|
|
|
|
|
|
|
| |
To avoid useless renegotiation of the pipe we can check for
negotiated caps on src_filter and compare it with requested
filter. If the caps intersect, avoid restart.
Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
https://bugzilla.gnome.org/show_bug.cgi?id=672610
|
|
|
|
|
|
|
|
| |
The image capture mutex and the pad object lock would cause a race
if the pad query was made right when the image probe was running.
The image probe needs the capture mutex and the querying would need
the pad object lock.
|
|
|
|
|
| |
It is not an if/else situation but an if error abort otherwise
just continue. Remove else to make it more readable
|
|
|
|
|
|
|
|
|
| |
It might be racy with the image probe thread as it uses the capture
mutex just like the start-capture handler from camerabin. The
start-capture would be waiting for the source's streaming thread
to stop to be able to set the source state to ready while the
probe would be blocked waiting to acquire the capture mutex.
It causes a deadlock.
|
|
|
|
|
|
| |
The flush might clear any pending captures that are still in
queues being processed while the drain query will wait for those
to be properly done
|
|
|
|
|
|
|
|
| |
There are unnecessary definitions for disabling deprecation warnings.
Since GLIB_DISABLE_DEPRECATION_WARNINGS is not needed anymore in these files,
removing the same.
https://bugzilla.gnome.org/show_bug.cgi?id=737559
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=736853
|
|
|
|
|
|
|
| |
gst_bin_get_by_name() and gst_bin_get_by_interface() both return
references to elements that need to be unreferenced after usage.
https://bugzilla.gnome.org/show_bug.cgi?id=734524
|
|
|
|
|
|
|
|
|
|
| |
They are kept until the probes are removed but they will never be
removed as the refcount of the element won't get to 0 because the
probes own references (cyclic refs). As the probes should only be
running as long as the element is running there is no need to
secure a ref for them.
Removes 3 leaked refs of wrappercamerabinsrc
|
|
|
|
| |
Do not forget to unref output-selector requested pads
|
|
|
|
|
| |
This avoid extra overhead when taking sequential pictures that woudln't
need renegotiation
|
|
|
|
|
| |
Make camerabin handle EOS to the pipeline to allow standard pipeline
close where an EOS is sent to the whole pipeline before setting it to NULL.
|
|
|
|
|
|
|
| |
Setting to ready will block waiting for buffers to be reclaimed, so flush
before setting to null to make sure no buffers are pending
https://bugzilla.gnome.org/show_bug.cgi?id=733072
|
|
|
|
|
|
|
|
|
|
|
|
| |
The notify signal is triggered when caps is changed. But instead of
proxying the fixed caps, we query for the caps. Hence, when we go to
READY state, we endup setting template caps on the proxied caps
filter instead of NULL, which leads to negoitation failure. Correctly
proxy NULL caps if this is the new caps. Fixes not negotiated error
when running in cheese. Also fix a leak of caps string in one of the
trace.
https://bugzilla.gnome.org/show_bug.cgi?id=732741
|
|
|
|
|
|
|
|
| |
v4l2src requires all buffers to come back in order to cleanly stop
streaming. Flushing the pipline should force all buffers to come
back.
https://bugzilla.gnome.org/show_bug.cgi?id=732741
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to be able to change the caps on multiple capsfilters the
source element needs to be stopped, otherwise it will get a few
reconfigure events and might try to renegotiate while the bin
is still transitioning its caps, leading to a not-negotiated failure
and the image capture won't happen because the source will be
unusable.
The solution is to keep the source in paused while the caps are being
changed in the bin, and then bring the element back to playing once
it is done. Unfortunately this increases the image capture latency,
but it should always work.
A possible improvement to reduce the latency is to add another signal
to be called before 'start-capture': 'prepare-capture'. At this step
the camera source should set all caps it needs and get the source
ready for doing the capture as soon as 'start-capture' is called.
This can be done on a future commit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By adding the video-source-filter during construction time, rather then
patching it in later (*), we can greatly reduce the amount of caps involved
in negotation, speeding up pipeline creation.
I wrote this while working on speeding up the startup of cheese. My cheese
has been modified to add a capsfilter, filtering for only the configured
resolution, with that cheese patch + this patch, the pipeline creation time
goes from aprox 1.1 seconds to aprox 350ms. This is with a Logitech 9000
pro camera, which supports lots of different resolutions at many different
framerates per resolution, causing a caps "explosion" if not filtered.
*) Note the code for this is left in, as it is still necessary if the
video-source-filter is changed between a stop + re-start.
https://bugzilla.gnome.org/show_bug.cgi?id=701953
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
check_and_replace_src() was setting self->app_vid_src to NULL, which
means that an app setting the video-source property, and then starting,
stopping and re-starting the pipeline (ie to make changes to the
video-source-filter property) would after the restart no longer have
a video-source.
This patch fixes this by making gst_camerabin_setup_default_element return a
ref to the passed in user_element, rather then returning the user_element as
is, so that that ref can be passed on to the bin, and the app_vid_src ref
stays valid.
https://bugzilla.gnome.org/show_bug.cgi?id=701915
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=687520
|
|
|
|
|
| |
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
|
|
|
|
|
|
|
| |
When going from null to ready, check if the user requested to
use a new source and replace the current one.
Fixes #681562
|
|
|
|
|
|
|
|
| |
The name was updated on the 0.10 -> 1.0 transition, but the
gst_bin_remove was still using the old name, causing an assertion
when replacing video-source-filter
https://bugzilla.gnome.org/show_bug.cgi?id=681564
|
| |
|
|
|
|
|
| |
Setting capsfilters already sends reconfigure events when a new
caps is set, no need to resend them.
|
|
|
|
|
|
| |
Push EOS outside of wrappercamerabinsrc so that none of the
internal elements gets its pads into eos state, preventing any
further data from passing
|
|
|
|
|
|
|
|
| |
Add a src pad event handler function that filters reconfigure events to
trigger the renegotiation code paths in the mode-specific start-capture
phase.
This is to work towards fixing unit tests but more work is needed.
|
|
|
|
|
|
|
| |
need to pass a GstSample to the utilitary preview buffer post functions
as a GstBuffer doesn't have caps anymore. The GstSample has the GstCaps
and it is used to inform the preview's pipeline about the format of the
input, before it gets converted to the user's requested output format.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=622482
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=675520
|
| |
|