We can't rely on audio sources pushing EOS when going PAUSED->READY
because this is a basesrc bahavior and when used inside autoaudiosrc
the ghostpad goes flushing before the real source pushes the EOS,
so it is dropped.
Audio elements are put into bin only when needed, so we need
to be careful with their states as camerabin2 won't manage
them if they are outside the bin.
Also we should reset their pad's flushing status before
starting a new capture.
Adds an audio source and audio capsfilter/queue/convert, creating
a new branch on camerabin2 that is used to feed encodebin with
audio buffers for video recording.
Adds properties to check what caps are supported on the
viewfinder (from the camerasrc viewfinder pad) and another
one to set a caps for the viewfinder.
When going to ready, camerabin2 could create an empty file
if the videosink was put to ready. This patch only puts videosink
to ready on the PAUSED_TO_READY state change if it is on PAUSED
or PLAYING.
Implement previewing functionality using 2 properties. A boolean
(post-previews) that indicates if previews should be posted, and a
GstCaps (preview-caps) to provide the desired preview caps.
wrappercamerabinsrc implements previewing by supplying the captured
image to a pipeline to adapt it to the required caps before posting.
Use a hack to make the event upstream to reach the camera source
instead of going downstream and being useless.
This was already fixed this way for image srcpad renegotiate and
video srcpad was left unfixed.
Adds a custom renegotiate event that is pushed to the camerasrc pad
that needs renegotiation due to the user selecting a new capture
caps for that pad.
This is a way of notifying the source that it should update its caps, even
if it doesn't use pad allocs.
Use better name for the variables, making the code clearer. Also
keep a ref for some internal elements to avoid fetching them
by name when needed later.
We need to reset the elements from the video recording branch, including
the queue and capsfilter in order to clear the eos state and activate
the pads.
This makes it possible to record multiple videos with camerabin2 in a
sequence, otherwise the source would get a unexpected return and
push EOS, stopping the whole pipeline.
As video recording bin's state is locked, we should always
remember of setting it to NULL when camerabin2 goes to NULL
Be more careful when using elements that might not
have been created yet
And do not set location property recursively on videorecordingbin
Adds a location property to enable applications to select
the captured files names. Locations are handled just like
multifilesink ones
Also disables -Wformat-nonliteral to allow to use non-literals
on g_strdup_printf on camerabin and generate a sequence of
locations for captures.
Keep vidbin state locked to avoid it going to playing without
being used and leaving an empty file created.
Check the docs on the code for details on the handling.
Removes the old logic for v4l2camerasrc that used the mode
property switching to start/stop captures to make it identical
to camerabin2 behavior and to allow the future addition of
pausing a video recording.
This also removes the MODE_PREVIEW as it became useless.
Use 'mode' enum definition from gstcamerabin-enum file to avoid
conflicts between v4l2camerasrc and gstcamerabin2 modes.
For now there is a MODE_PREVIEW there that is only used on the
camerasrc, not sure if we are keeping it at the future, but for
now this works.
Adds mode property to camerabin2, allowing users to
select between video and stills capture. Also adds
start/stop capture actions to trigger and stop
capturing