Commit graph

48 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
f1d02cf0c0 camerabin2: Move to encodebin 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
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
58d4315965 camerabin2: more logs 2010-12-23 13:24:56 -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
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
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
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
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
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
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
b11342d325 camerabin2: Reset all elements on video recording branch before capture
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.
2010-12-08 15:38:29 -03:00
Thiago Santos
5776a17c86 camerabin2: More debug logs
Sprinkle some more debugging logs
2010-12-08 15:38:29 -03:00
Thiago Santos
122a7bd556 camerabin2: Various fixes
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
2010-12-08 15:38:29 -03:00
Thiago Santos
ba878c95b2 camerabin2: adds location property
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.
2010-12-08 15:38:28 -03:00
Thiago Santos
5b3deecab9 camerabin2: Fix set/get property function names
Add more consistency to the function names by using
gst_camera_bin as the other functions.
2010-12-08 15:38:28 -03:00
Thiago Santos
cb915196e2 camerabin2: Handle vidbin state change individually
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.
2010-12-08 15:38:28 -03:00
Thiago Santos
0ae8df4312 camerabin2: Keep it under --enable-experimental
camerabin2 is still under heavy development, activate it only if
the --enable-experimental flag is on.

Also add a note to the docs.
2010-12-08 15:38:28 -03:00
Thiago Santos
bd89d22da9 camerabin2: Update v4l2camerasrc to use start/stop signals
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.
2010-12-08 15:38:28 -03:00
Thiago Santos
b4d73cb9a8 camerabin2: Cleanup capturing flag
Cleanup capturing flag when the source switches back to the
viewfinder mode
2010-12-08 15:38:28 -03:00
Thiago Santos
6c7d7946f5 camerabin2: Keep mode definition at -enum file
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.
2010-12-08 15:38:27 -03:00
Thiago Santos
dee167edc8 camerabin2: Adding debug categories
Adding debug categories to v4l2camerasrc and camerabin2, also
removing generic category from camerabingeneral.
2010-12-08 15:38:27 -03:00
Thiago Santos
6c72fed8b4 camerabin2: Adding basic property and signals
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
2010-12-08 15:38:27 -03:00
Thiago Santos
1887669d6e camerabin2: Adding basic elements
Instantiating and linking basic elements on camerabin2
so it at least shows the viewfinder when running.
2010-12-08 15:38:27 -03:00
Thiago Santos
3db90e1d43 camerabin2: Adds a stub element for camerabin2
Adds camerabin2 element, it is now a pile of stubs.
2010-12-08 15:38:27 -03:00