Commit graph

117 commits

Author SHA1 Message Date
Teemu Katajisto
ad019102e5 camerabin: optimize setting new caps for preview image pipeline
Avoid re-creating and linking of preview image pipeline when
setting new preview image caps. Backported from camerabin2.

https://bugzilla.gnome.org/show_bug.cgi?id=639502
2011-01-31 12:25:55 -03:00
Thiago Santos
0b3ad60269 camerabin: add names for more elements 2011-01-24 11:07:28 -03:00
Luciana Fujii Pontello
b55775a9d3 camerabin: Enable conversion flags
Camerabin default should just work, so we need to enable audio, image
and video conversions.

https://bugzilla.gnome.org/show_bug.cgi?id=639456
2011-01-13 18:15:13 -03:00
Teemu Katajisto
85a355fd84 camerabin: set pad-negotiation-mode to active for output-selector
Fixes #639413.
2011-01-13 15:00:21 +02:00
Thiago Santos
07279bac7b camerabin: mode can be only image or video
No need to check if camerabin is on video mode if it isn't on
image mode as those are the only 2 modes available.

Additionally, if mode gets corrupted somehow and would be neither
image or video it would cause a null pointer dereferencing some
lines of code below, so this is safer.
2010-12-28 17:16:05 -03:00
Thiago Santos
895c07ef04 camerabin: Remove unused variable 2010-12-28 16:55:11 -03:00
Stefan Kost
6e9763a090 camerabin: smal api doc update 2010-12-02 15:51:16 +02:00
Lasse Laukkanen
e96b8a7b5f camerabin: Avoid assertion on image finishing
As imgbin_finished() is scheduled from g_idle_add, it might
be run a little later than expected, this can lead to the application
setting camerabin to ready before imgbin_finished() runs. In this case,
the processing counter goes to 0 and an assertion happens.

This patch relaxes the imgbin_finished() check on the processing
counter.
2010-12-02 05:42:08 -03:00
Lasse Laukkanen
5c2f805199 camerabin: Create imagebin elements when image mode is set in camerabin NULL state
This patch refactors imagebin element creation and linking into separate functions,
and adds re-using also for imagebin internally created elements.

So this refactoring allows creating imagebin elements already in NULL state when
application sets the image mode, and next state change from NULL to READY will be faster.
This reduces first capture latency.

Earlier the elements were both created and linked in NULL to READY state change.
2010-11-23 10:04:24 -03:00
Aleksey Lim
d66ef4dea8 camerabin: Do not use audio clock after stopping video capture
Adda provide clock function to camerabin to make it not
provide the audio clock of the record bin when no video
recording is happening

Fixes #613379
2010-11-18 10:58:06 -03:00
Thiago Santos
60a6eca2a1 camerabin: Adds 'idle' property
Adds 'idle', a read-only boolean property that tells applications
if there is any capturing/saving/encoding going on in camerabin. If
not, it is safe to set it to NULL and release resources without
losing data.
2010-11-04 22:48:02 -03:00
Lasse Laukkanen
bc1b09c1c4 camerabin: Add "ready-for-capture" property
Add "ready-for-capture" property to indicate if preparing a new
capture is possible.

"ready-for-capture" changes before the 'image-done' signal, so
the application can be notified that it can do a new capture
even before the previous one has finished encoding/saving.
2010-11-04 21:41:07 -03:00
Lasse Laukkanen
5a5fca2689 camerabin: Do not leak a caps
gst_caps_replace doesn't take ownership, but refs the caps. So we
unref the remaining caps.
2010-11-02 09:39:40 -03:00
Thiago Santos
618f32ad8d camerabin: Reset pre-night-mode stored fps when mode changes
When switching between video/still modes the pre-night-mode fps
should be reset to prevent it being used in the incorrect mode, causing
the videosource to fail configuring itself
2010-11-02 09:16:45 -03:00
Thiago Santos
6ee256d462 camerabin: Store app preferred capture parameters separately
Store width/height/fps for video captures in a separate variable
than the one that stores the currently used value.

This prevents the user preferences to be lost when resetting
the currently used dimensions for night mode, for example
2010-11-02 09:16:44 -03:00
Thiago Santos
73a909c0e3 camerabin: cleanup used caps when going to NULL
Resets used caps so that camerabin doesn't try to use them
when restarting, where elements/properties might have changed
and the old caps be incompatible
2010-11-02 09:16:44 -03:00
Teemu Katajisto
ca16d951ba camerabin: fix priority for idle_add function
Adds a higher priority to the idle_add function for when
the image bin finished the image capture. This reduces the
delay for the application to be notified about this.
2010-11-02 09:16:44 -03:00
Thiago Santos
0999fdb82a camerabin: Check the source scene mode when creating it
As camerabin only gets notified of the changes from the
video source element, it should query the initial value
once the source is created so it initializes itself
correctly.
2010-10-21 16:43:45 -03:00
Thiago Santos
5cb8164938 camerabin: Do not wrongly fail when starting a capture
If the elements are in NULL/READY and changing state to
PAUSED/PLAYING while a capture is started
camerabin might not set the active_bin properly causing the
capture start to fail.

This patch fixes it by checking the current and pending state
of the branches instead of only the current one
2010-09-29 18:42:27 -03:00
Thiago Santos
0a7ae539ea camerabin: Use link_full version for disabling hierarchy check
Disable hierarchy checks when linking because we are already
handling the element adding to bins and it should be done
correctly.
2010-09-22 23:47:08 -03:00
Thiago Santos
e893a8b82e camerabin: Set queues to silent
We currently don't use queues' signals, so set them
to silent.
2010-09-22 23:47:08 -03:00
Thiago Santos
30ff1ea346 camerabin: Mention photography interface in docs
Add a note to docs about getting the videosource and accessing
its photography interface (in case it has it)

Fixes #616923
2010-09-20 21:49:35 -03:00
Lasse Laukkanen
5767739431 camerabin: Adds missing variable initialization
Adds missing app_src_vid initialization
2010-09-20 21:22:55 -03:00
Teemu Katajisto
e6141120d8 camerabin: check state change to playing for imagebin and videobin
Properly check and handle error cases related to imagebin and
videobin state changes.
2010-09-20 21:21:58 -03:00
Thiago Santos
9c3692cc4f camerabin: Forward tag events to preview pipeline
Forward tag events from image pipeline to preview pipeline so
that preview elements can use capture tags information
2010-09-20 21:21:58 -03:00
Hoseok Chang
f0f8df1a30 camerabin: add "preview-source-filter" property
Adds 'preview-source-filter' for adding an element to proccess
the preview images before posting them to the bus.
2010-09-20 20:46:00 -03:00
Thiago Santos
44fa17b036 camerabin: Make block-after-capture resetting more consistent
Adds another boolean to help controlling viewfinder blocking,
making it possible for the applications to reset the viewfinder
blocking after capture was started but before the blocking
actually happens.
2010-09-20 18:26:48 -03:00
Thiago Santos
87d600b7a2 camerabin: Unblock the viewfinder when going to READY
Unblock the viewfinder when going to ready to avoid
blocking when setting camerabin to playing again and
attemping to capture. Keep the property as is.
2010-09-20 18:26:48 -03:00
Thiago Santos
ca11a51295 camerabin: add monitoring and support for photoiface zoom for video-source
Makes camerabin aware of changes in its videosource zoom property.
2010-09-20 18:26:48 -03:00
Thiago Santos
19981f2787 camerabin: Change zoom property from int to float
Updates zoom property for a more natural type and
makes it consistent with the photography API
2010-09-20 18:26:48 -03:00
Lasse Laukkanen
3e6a4edb15 camerabin: remove caching photography interface settings
Camerabin doesn't implement photography interface, so we
don't need caching the video source properties anymore.
2010-09-20 18:26:48 -03:00
Teemu Katajisto
3582a4a595 camerabin: remove photography interface implementation from camerabin
Remove notify signal proxy for video-source. Application can use
video-source directly from now on to get notified of property changes.
Add monitoring scene-mode property change to select lowest possible
framerate for video capture when night mode is selected.

Fixes #616923
2010-09-20 18:26:47 -03:00
Thiago Santos
fb00b71496 camerabin: Set tags to more elements
Remove check for 'Muxer' category when setting tags
for tagsetters. Set them to all tagsetters in the
pipelines.
2010-09-10 13:39:06 -03:00
Thiago Santos
9ae921f888 camerabin: Use jifmux instead of metadatamux
Use jifmux element to write exif/xmp tags instead of metadatamux
2010-09-05 09:15:56 -03:00
Thiago Santos
bcc59439bc camerabin: Use new tags from -base
Replace private tags from metadata plugin with the new generic tags
from -base.
2010-09-05 09:15:56 -03:00
Thiago Santos
44e3d29ec4 camerabin: Fix viewfiner-sink property for bins
Correctly iterate viewfinder-sink children when
it is a bin.

Fixes #623802
2010-07-07 23:21:52 -03:00
Thiago Santos
478ef90cf9 camerabin: Move debug category declaration to a separate file
Having GST_DEBUG_CATEGORY and GST_DEBUG_CATEGORY_EXTERN together
might lead to 'undefined symbol' problems. This commit moves
the _EXTERN to a separate new file.
2010-06-21 10:25:15 -03:00
Thiago Santos
233b09f9b9 camerabin: Do not assert on set_property to NULL for elements
Check if the value is NULL before reffing them in set_property
for 'GstElement' properties
2010-06-08 09:14:01 -03:00
Thiago Santos
7806ba95b6 camerabin: Do not assert on null caps property
If camerabin receives a null caps as 'filter-caps' argument,
use the default value
2010-06-08 08:41:49 -03:00
Thiago Santos
72590ad056 camerabin: Fix crash in 'filename' property
Do not crash when filename property is set to NULL, use an
empty string instead.
2010-06-07 07:58:22 -03:00
Lasse Laukkanen
30ff3bc098 camerabin: add meaningful names for queue elements inside camerabin 2010-04-21 12:25:39 +03:00
Thiago Santos
c4aaab2d59 camerabin: Avoid crashing when setting zoom in NULL
Avoid setting zoom in NULL state because the source is not
set yet and this leads to a crash. It is set on READY > PAUSED
anyway.
2010-04-19 19:06:39 -03:00
Adam Endrodi
822fd6a9ff camerabin: reset software zooming if not set by the photo interface
Otherwise both software (videoscal+videocrop) and hardware zooming would be used.
2010-04-15 13:22:16 +03:00
Thiago Santos
c48de5c594 camerabin: Add video-capture-width/height/framerate properties
Adds video-capture-width, video-capture-height and
video-capture-framerate properties to allow applications to
get/set those values. Getting was not possible before this patch,
and setting was done through the set-video-resolution-fps
action, which sets the properties and promptly resets the
video source to use them.

Fixes #614958
2010-04-13 20:37:03 -03:00
Thiago Santos
fa6adc85b4 camerabin: Adds image-capture-width/height properties
Adds image-capture-width and image-capture-height properties
to camerabin, allowing the user to get/set them. Getting was
not possible before and setting was done through the
set-image-resolution action, which shouldn't now just set
the properties.

Fixes #614958
2010-04-13 20:36:44 -03:00
Thiago Santos
a72774c5f8 camerabin: photography: Spring G_PARAM_STATIC_STRINGS
Sprinkle some G_PARAM_STATIC_STRINGS over the properties
in GstPhotography interface and in camerabin
2010-04-13 15:59:04 -03:00
Lasse Laukkanen
55d98ef488 camerabin: add block-after-capture property for viewfinder blocking
Adds block-after-capture property to block running viewfinder after capturing.
This property is useful if application wants to display capture preview and avoid
running viewfinder on background.

Based on a patch by Tommi Myöhänen <ext-tommi.1.myohanen@nokia.com>
2010-04-13 12:00:36 -03:00
Tommi Myöhänen
6206f58c3a GstPhotography: Add flicker and focus mode settings to photography API
Adds flicker and focus mode settings to photography API and also
implement it in camerabin.
2010-04-13 12:00:35 -03:00
Lasse Laukkanen
16cff06a70 camerabin: add viewfinder-filter property
Adds a new property called viewfinder-filter to camerabin.
This property is used to add a filter to process the video
flow right before the viewfinder sink.

Also updates test to check property exists.
2010-04-13 12:00:33 -03:00
Lasse Laukkanen
2c4417dabc camerabin: proxy video source photography interface property notify signals
If photography interface properties change in video source, notify the
application by emitting notify for respective camerabin properties.
2010-04-13 12:00:32 -03:00