Commit graph

31 commits

Author SHA1 Message Date
Thiago Santos
79bb475abe camerabin2: Some memleak fixes 2011-03-11 18:26:43 -03:00
Robert Swain
5fd15521e2 basecamerasrc: wrappercamerabinsrc: camerabin2: Expose/add floating point
zoom property
2011-03-11 18:26:43 -03:00
Robert Swain
b38bf37218 wrappercamerabinsrc: Remove dead definition
This definition is unused in this code.
2011-03-11 18:26:43 -03:00
Thiago Santos
18602e6e4e wrappercamerabinsrc: Avoid clearing recording caps
When recording 2 videos in sequence with the same video-capture-caps,
the second video would get a not-negotiated error because the
src caps were being cleared without any intention of
renegotiating it back to the requested capture caps.

This patch avoids this caps reset procedure unless a new
caps was set.
2011-03-11 18:26:42 -03:00
Thiago Santos
42ade52136 wrappercamerabinsrc: No need for starting segment 2011-03-10 08:56:48 -03:00
Thiago Santos
582c150658 wrappercamerabinsrc: Fix newsegment pushing
Send update newsegments instead of non-update ones
for the video branch when starting recordings
2011-03-10 08:42:01 -03:00
Thiago Santos
4624e88b08 wrappercamerabinsrc: Ready is enough for forcing a caps change 2011-03-10 08:42:01 -03:00
Thiago Santos
b56d9d3ba0 wrappercamerabinsrc: Check for downstream caps on first captures
Use video_renegotiate and image_renegotiate booleans to make
the videosrc negotiate the capture caps on the first capture because
the caps might be set before wrappercamerabinsrc goes into PLAYING
and pads drop the internal renegotiate event.

This is required as the output-selector is using the 'none' negotiation
mode.
2011-03-10 08:42:01 -03:00
Thiago Santos
4da517ae87 wrappercamerabinsrc: Avoid fixating capture caps
When setting the internal capsfilter caps for capture we should put
the full caps instead of trying to fixate it ourselves. This way we let
the elements (and mostly the source) select the best format instead
of defaulting to what the pad fixation function picks.
2011-03-10 08:42:00 -03:00
Thiago Santos
b3abf91232 camerabin2: Moving preview image properties to basecamerasrc
Moves preview image related properties to basecamerasrc as that
should be present on all camerasrcs
2011-03-10 08:42:00 -03:00
Thiago Santos
15366355a4 wrappercamerabinsrc: Do not re-set the clock if it is null
Avoids not needed work and doesn't assert when trying to
unref the null reference
2011-02-08 11:24:59 -03:00
Thiago Santos
48b05a3002 wrappercamerabinsrc: Fix preview messages
Image previews where being posted in sync with the buffers
timestamps, this makes no sense as previews should be posted ASAP.

Also adds some debugging messages.
2011-02-03 19:09:20 -03:00
Thiago Santos
1a62d9374b wrappercamerabinsrc: Handle src state change to avoid losing timestamps
Camerabin2 uses state changes to force the source to renegotiate its
caps to the capture formats. The state changes makes the source lose
its clock and base_time, causing it to stop timestamping the buffers.

We still need a proper way to make sources renegotiate its caps, so this
patch is a hack to make the source continue timestamping buffers even
after changing state. The patch works by getting the clock and base
time before doing the state change to NULL and setting them back
after putting it to PLAYING again. It also cares to drop the first
new segment after this state change.
2011-02-03 19:09:20 -03:00
Thiago Santos
869a61343c camerabin2: Add preview-filter property
Adds a property to select a custom element for preview pipeline
buffers processing
2011-02-03 19:09:20 -03:00
Thiago Santos
68bff61732 camerabin2: Do not forget to unref some stuff
Cleanup properly by unrefing the encoding profile and preview caps
2011-01-26 14:31:13 -03:00
Thiago Santos
b66dde5746 camerabin2: Add names to some elements
Adds names to instances of some elements to make debugging easier
2011-01-26 14:31:13 -03:00
Thiago Santos
25062fc384 wrappercamerabinsrc: Remove unused macro 2011-01-24 18:36:58 -03:00
Thiago Santos
a791f5070c wrappercamerabinsrc: Check the start time of buffers
Be careful when trying to create a newsegment event to avoid
start times of -1 from invalid buffer timestamps
2011-01-24 18:05:20 -03:00
Thiago Santos
31dbc2eeba wrappercamerabinsrc: Set output-selector pad-negotiation-mode to none
Use output-selector none negotiation mode as it was the default before
the last changes. This likely needs to be fixed to use 'active' on
camerabin2
2011-01-24 14:50:29 -03:00
Thiago Santos
3a495eaafc wrappercamerabinsrc: Handle state change failures
When its internal element fails to change state, don't act as
if succeeded.
2011-01-24 14:50:29 -03:00
Thiago Santos
9863feb328 camerabin2: Implement previewing
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.
2011-01-24 14:50:29 -03:00
Thiago Santos
bc1f57a645 wrappercamerabinsrc: Use drop_eos function from camerabingeneral
There was already a event probe function for dropping EOS on
camerabingenereal, so use that instead of replicating the code
2011-01-24 14:50:28 -03:00
Thiago Santos
95597d8f0e camerabin2: Various leak fixes
Various leak fixes and some code reorganization
2010-12-29 13:24:06 -03:00
Thiago Santos
890c4ab4fd wrappercamerabinsrc: Implement video capture renegotiate
Handle caps renegotiation from camerabin2's renegotiate event
to allow video capture to be done with the user's requested
resolution.
2010-12-29 13:24:06 -03:00
Thiago Santos
1c761196f7 wrappercamerabinsrc: Refactor internal pipeline
Instead of linking 3 src pads from tee to the ghostpads, use 2
srcpads and add an output-selector to completely split caps
negotiation of video/image modes. I don't think there is an
use case that would require image and video pads to be used
at the same time.
2010-12-29 13:24:05 -03:00
Thiago Santos
2513e9f01b wrappercamerabinsrc: Add converters for viewfinder branch
Viewfinder branch should have converters as it has to work
always anyway.
2010-12-23 13:24:56 -03:00
Thiago Santos
e94c5b3b9b wrappercamerabinsrc: Handle camerabin2 custom renegotiate events 2010-12-23 13:24:55 -03:00
Thiago Santos
b1a361b566 wrappercamerabinsrc: Add local mode 2010-12-23 13:24:55 -03:00
Thiago Santos
539f10f4d9 basecamerasrc: More cleanup
Remove old legacy code copied from camerabin(1) that should be handled
by caps negotiation on camerabin2
2010-12-23 13:24:54 -03:00
Thiago Santos
029e63a31e wrappercamerabinsrc: Remove unused variable
Remove wait_for_prepara variable that wasn't being used
2010-12-23 13:24:54 -03:00
Thiago Santos
99210b0a3a camerabin2: Rename v4l2camerasrc to wrappercamerabinsrc
Use a better name for the element that wraps single pad src element
into a 3pad source required by camerabin2.
2010-12-23 13:24:43 -03:00
Renamed from gst/camerabin2/gstv4l2camerasrc.c (Browse further)