Commit graph

186 commits

Author SHA1 Message Date
Thiago Santos
7fd638bd0d camerabin2: viewfinderbin: Post missing plugin messages
Makes viewfinderbin post missing plugin messages when it
can't create an internal elements
2011-05-16 18:08:39 -03:00
Thiago Santos
54a35ab879 camerabin2: Improve missing plugin message
Improves the message text for missing plugin messages from
camerabin2
2011-05-16 18:08:39 -03:00
Thiago Santos
4ca402a470 camerabin2: Update porting file
Update porting file with mention that stop-capture is now
async.
2011-05-16 18:08:38 -03:00
Robert Swain
10b6765fba camerabin2: Fix debug print to show audio/video depending on pad type 2011-05-16 18:08:38 -03:00
Robert Swain
74d4030e3f camerabin2: Fix order of element state change
To change the state of elements in a pipeline, we should mirror the
behaviour of GstBin which starts at the sink element and works its way
upstream.
2011-05-16 18:08:38 -03:00
Thibault Saunier
17fd7ebcb4 android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 07:27:11 +02:00
Thiago Santos
d2e1f1bdc6 camerabin2: Only mark video capture as finished after EOS
Instead of probing the videosink sinkpad for passing EOS, better
to wait for EOS from the bus.

This makes sure the filesink has already processed it and is
ready to close the file. This is used to notify applications
that camerabin2 is idle and can be shut down.
2011-03-23 16:50:12 -03:00
Robert Swain
6a686316d5 basecamerasrc: camerabin2: wrappercamerabinsrc: Add read-only max-zoom prop
This is not implemented in any of our real sources to which wrappercamerabinsrc
might connect but this is optional and can be implemented at any time. A
limit on the software zoom level using video{crop,scale} would be arbitrary.
2011-03-23 16:48:11 -03:00
Thiago Santos
aa7b962891 camerabin2: Improve idle property usage
Use resource warning messages to notify camerabin2 that a capture
as aborted or couldn't be started, making it decrement the
processing counter and making the idle property more reliable.
2011-03-23 16:13:32 -03:00
Thiago Santos
6913db30f8 camerabin2: No need to force audiosrc to null on stop_capture
Setting the audio source to null isn't needed and it could
make the EOS that is still flowing be dropped if autoaudiosrc
is used because its pads go flushing before the EOS gets pushed
from the real source.
2011-03-23 16:13:32 -03:00
Thiago Santos
3dc9a0e9c6 camerabin2: Adds new idle property
Adds idle property (just like camerabin1), a boolean that
is true when camerabin2 isn't processing and can be shut down
without losing data.
2011-03-23 16:13:32 -03:00
Thiago Santos
19628ec3f3 camerabin2: Adding properties for image capture settings
Adds properties for selecting image encoder and muxer for
image capture
2011-03-23 16:13:32 -03:00
Thiago Santos
223697c2b9 camerabin2: More debug log
Small refactoring and adding more debug log to encodebin related
paths
2011-03-23 16:13:32 -03:00
Thiago Santos
ba878f7427 camerabin2: Set queues to silent
Optimize a little by setting queues to silent
2011-03-11 18:41:16 -03:00
Thiago Santos
b2f39d1844 camerabin2: Refactoring encodebin usage
Refactor some common code regarding encodebin usage in camerabin2
2011-03-11 18:40:52 -03:00
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
Tim-Philipp Müller
90c96fc17b camerabin2: don't leak element name strings
Don't leak string copy returned by gst_element_get_name(). Also, check
for certain elements by checking the plugin feature / factory name, not
the assigned object name.
2011-03-11 10:34:23 +00:00
Thiago Santos
3d1a7b0021 camerabin2: Force EOS on audio src
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.
2011-03-10 08:56:48 -03:00
Thiago Santos
42ade52136 wrappercamerabinsrc: No need for starting segment 2011-03-10 08:56:48 -03:00
Thiago Santos
ba16894da3 gstcamerabin2: Set encodebin's videorate and audiorate properties
Listen to encodebin's element-added signal to be able to set
skip-to-first on both audiorates and videorates.
2011-03-10 08:56:48 -03:00
Thiago Santos
fc9c9b0f24 camerabin2: Handle audio elements states
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.
2011-03-10 08:56:48 -03:00
Thiago Santos
8fe75f8067 camerabin: adding audio related properties
Adds 4 audio properties related to audio recording
* audio-src
* mute
* audio-supported-capture-caps
* audio-capture-caps
2011-03-10 08:56:48 -03:00
Thiago Santos
abdb0bbfa6 camerabin2: Adding audio support for video recordings
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.
2011-03-10 08:56:47 -03:00
Thiago Santos
992917b6aa camerabin2: Add logging for stop-capture signal 2011-03-10 08:42:01 -03:00
Thiago Santos
bcc6d99bbe camerabin2: Add viewfinder caps related properties
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.
2011-03-10 08:42:01 -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
d3a5058611 camerabin2: Set some queue's properties
Sets viewfinder queue to leaky and tell image branch
queue to don't care about durations
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
0255584d90 camerabin2: Move preview helper functions to basecamerabinsrc
Move preview helper functions to baseacamerabinsrc so they can
be reused by multiple camerabin2 sources.
2011-03-10 08:42:00 -03:00
Thiago Santos
060611b060 camerabin2: Add viewfinder-sink property
Adds a property to set the viewfinder's sink of camerabin2
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
186d317a2f imagecapturebin: Fix property setting
Set the property on the child and not on itself causing infinite
looping
2011-02-03 19:10:07 -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
675632b382 camerabin2: Add custom filter properties
Adds custom filter properties for camerabin2. Custom filters
can be added to video/image/preview branches.
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
6395b45908 camerabin2: Handle videosink states more carefully
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.
2011-01-26 14:31:12 -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
4ec3189575 camerabin2: Update porting file
Adds porting information about using encodebin on camerabin2
2011-01-24 14:50:30 -03:00
Thiago Santos
bccae0f994 camerabin2: Add image-done message
Post an image-done message when a new image is saved to disk
2011-01-24 14:50:30 -03:00
Thiago Santos
a715b46c7f camerabin2: Implement tagsetter interface 2011-01-24 14:50:30 -03:00
Thiago Santos
ccb1960a42 camerabin2: Add a property to select the encoding profile
Adds a video-profile to allow selecting which encoding profile
to use for video recordings
2011-01-24 14:50:29 -03:00
Thiago Santos
e5f267f682 camerabin2: Removing videorecordingbin
Removing videorecordingbin as we now use encodebin for it
2011-01-24 14:50:29 -03:00
Thiago Santos
f1d02cf0c0 camerabin2: Move to encodebin 2011-01-24 14:50:29 -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
aa671439e1 camerabin2: Add methods for preview image message posting
Adds a helper struct and functions for implementing a preview message
in camerabin2.
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
Tim-Philipp Müller
eec67aeee6 camerabin2: fix cflags and libs order in Makefile.am 2011-01-03 23:49:51 +00: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
203508079a camerabin2: Fix renegotiate event pushing
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.
2010-12-29 13:24:05 -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
1ff89c5f83 videorecordingbin: Fix leaks 2010-12-23 14:24:45 -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
450f54b020 viewfinderbin: Remove leaks
Removing various leaks from viewfinderbin
2010-12-23 13:24:56 -03:00
Thiago Santos
58d4315965 camerabin2: more logs 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
1e6be5ec56 camerabin2: Use custom renegotiate event
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.
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
85bf8f2335 camerabin2: Adds properties for capture caps
Adds properties for selecting caps for video and image captures
2010-12-23 13:24:55 -03:00
Teemu Katajisto
a7fe67700e camerabin2: remove abreviations from imagecapturebin 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
Thiago Santos
b822ad3cd3 v4l2camerasrc: remove video filter property code
Removes some unused custom video filter element property code
2010-12-23 13:20:36 -03:00
Thiago Santos
706740845b viewfinderbin: Fix video-sink property again
Avoid switching the element on the set_property function, instead wait
for the next NULL -> READY transition.
2010-12-23 13:20:36 -03:00
Thiago Santos
07d58dbf84 v4l2camerasrc: add video-src property
Adds a property to select the src element to be used internally
on v4l2camerasrc. Yeah, I know, this element should have a better
name.
2010-12-23 13:20:35 -03:00
Thiago Santos
b81677032c camerabin2: adds PORTING document
Adds a PORTING document to explain the differences from
camerabin to camerabin2 and help application developers on
porting from one to another.
2010-12-23 13:20:35 -03:00
Thiago Santos
4938c2e9ea camerabin2: Move basecamerasrc to gst-libs
Move the base camera src class to gst-libs/gst/basecamerabinsrc to
allow it to be included from the tests.
2010-12-23 13:20:31 -03:00
Teemu Katajisto
4a28d5f478 camerabin2: add videorecordingbin::video-muxer property 2010-12-23 13:18:58 -03:00
Teemu Katajisto
c76aeb77e5 camerabin2: add videorecordingbin::video-encoder property 2010-12-23 13:18:58 -03:00
Teemu Katajisto
78dc07987e camerabin2: remove abbreviations from videorecordingbin 2010-12-23 13:18:58 -03:00
Teemu Katajisto
7409211055 camerabin2: imagecapturebin: release objects and memory allocations 2010-12-23 13:18:58 -03:00
Thiago Santos
59c48d3443 camerabin2: Add camera-src property
Adds a property to select the camera source element to be used.
Changing only happens on the next NULL->READY transition
2010-12-23 13:18:57 -03:00
Thiago Santos
adc3cdc6aa camerabin2: Rename variables
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.
2010-12-23 13:18:57 -03:00
Thiago Santos
201e9ac221 camerabin2: Add properties for supported capture caps
Adds 2 property for getting the supported image/video capture
caps from the camera source.
2010-12-23 13:18:57 -03:00
Thiago Santos
f52d805166 camerabin2: Put enums inside their classes .c
Remove global list of properties' enums and put them
inside their classes .c
2010-12-23 13:18:57 -03:00
Thiago Santos
014b8f97f8 viewfinderbin: Fixes to video-sink handling
Handle video-sink more carefully, checking if it should
be already added to the bin, and removing old ones when
replacing.
2010-12-23 13:18:57 -03:00
Teemu Katajisto
89142163b1 camerabin2: add imagecapturebin::image-muxer property 2010-12-23 13:18:57 -03:00
Teemu Katajisto
87e0cbff38 camerabin2: add imagecapturebin::image-encoder property 2010-12-23 13:18:57 -03:00
Teemu Katajisto
e5d388698a camerabin2: remove abreviations from imagecapturebin 2010-12-23 13:18:57 -03:00
André Dieb Martins
7c47fc497f camerabin2: implement viewfinderbin::video-sink property to override default video output 2010-12-23 13:18:56 -03:00
Thiago Santos
80ff930012 basecamerasrc: Make construct_pipeline optional
Construct pipeline should be optional. Subclasses that don't
have internal elements don't need it.
2010-12-23 13:18:56 -03:00
Stefan Kost
ba2368d0bc basecamerasrc: write more details on the api docs 2010-12-23 12:11:59 -03:00
Stefan Kost
4b23fe6872 basecamerasrc: use the enum type for mode 2010-12-23 12:11:59 -03:00
Stefan Kost
17d5914c59 basecamerasrc: comment cleanups 2010-12-23 12:11:59 -03:00
Sebastian Dröge
b297490b2a imagecapturebin: Don't leak pad and sink 2010-12-19 12:09:41 +01:00
Sebastian Dröge
9605ff9aa8 imagecapturebin: Don't leak pad template created from static pad template 2010-12-19 12:05:11 +01:00
Sebastian Dröge
073916c9fb imagecapturebin: Don't leak location string 2010-12-19 12:03:03 +01:00