Commit graph

77 commits

Author SHA1 Message Date
Stefan Kost
1b103d259d camerabin2: don't mess with camerabin (1) namespace
Use an extra '2' to stay out of the old namespace.
2011-07-08 00:11:37 -07:00
Tim-Philipp Müller
2b2e6fbdea camerabin2: don't use GLib 2.28 API
Don't use GLib 2.28 API, we still only require >= 2.24.
2011-06-23 20:11:55 +01:00
Thiago Santos
e19a488bce camerabin2: Set tagsetters to merge replace mode
The default for tagsetters is to use merge keep mode, so tags
would never be replaced and all captures would have the same tags.

This commit watches all elements added into encodebin and sets
all tagsetters to merge replace mode
2011-06-23 00:05:13 -03:00
Thiago Santos
f1fa6c6531 camerabin2: Use a single location for both modes
Implement the location property just like it works in camerabin, the
same location is used for both images and videos
2011-06-23 00:05:13 -03:00
Thiago Santos
f31554bc4f camerabin2: Send serialized custom events for filename changes in image sink
Using serialized custom events for switching image capture saving
location makes camerabin2 save each capture correctly to the location
that was set during the moment start-capture was called, and not
the moment the filesink was writing to disk.

This prevents captures to be overwriten by racyness among start-capture
and setting location for images.
2011-06-23 00:05:13 -03:00
Thiago Santos
a33eae1a65 camerabin2: No need to change state of the whole image branch
We only need to change the state of the filesink to switch its
saving location. This might still cause some problems of dropping
captured buffers, but it is better than changing the state of
the whole branch.
2011-06-23 00:05:13 -03:00
Thiago Santos
b1b0082cdb camerabin2: Use names for image and video encodebin
Naming encodebins as image-encodebin and video-encodebin to make
it easier for debugging camerabin2.
2011-06-23 00:05:13 -03:00
Thiago Santos
e23e5380d3 camerabin2: Remove unused variable 2011-06-23 00:05:13 -03:00
Thiago Santos
ac2d5821b3 camerabin2: Minor debug message fix 2011-06-23 00:05:13 -03:00
Thiago Santos
cff308eba2 camerabin2: Use full names in properties
Improve API by using source instead of src in properties
2011-06-02 16:24:03 -03:00
Teemu Katajisto
2a6d25659a camerabin2: do not unref pad template 2011-06-02 16:24:03 -03:00
Thiago Santos
d25908cf81 camerabin2: Do not segfault on null locations
Prevent capture from starting when saving location is set to
NULL
2011-05-20 15:25:08 -03:00
Thiago Santos
5dadb325ae camerabin2: Remove obsolete imagecapturebin
imagecapturebin has been replaced by encodebin, no need
for it anymore
2011-05-16 18:08:41 -03:00
Thiago Santos
e2c67098e9 camerabin2: use jpeg as a container to force jifmux usage
Jifmux should be used as it can do xmp/exif tagging, so this patch
sets jpeg as a container to force it to be used together with
a jpeg encoder
2011-05-16 18:08:41 -03:00
Alessandro Decina
90221c4a82 camerabin2: do proper EOS handling on send_event(eos)
We first let the inner camera EOS. Then we manually post EOS on the image and
video sinks if those are <= READY and so have ignored EOS events.
2011-05-16 18:08:40 -03:00
Alessandro Decina
9e9507b645 camerabin2: use encodebin to encode images 2011-05-16 18:08:40 -03:00
Thiago Santos
0b02e595f3 camerabin2: Changing how some properties work
Some properties (like viewfinder-filter) only are taken into use
on NULL->READY transitions and the get/set property was returning
the currently in use value, instead of the last set.

This is bad, as after setting 'a' to 'x', you expect that getting 'a'
will return 'x'. This patch fixes it.

If needed, later we could add current-* properties that are readonly
and get the current value in use.
2011-05-16 18:08:40 -03:00
Thiago Santos
56007404b6 camerabin2: Adding missing plugin error messages
Whenever a required plugin is missing, camerabin2 should post
a missing plugin message to the bus
2011-05-16 18:08:40 -03:00
Thiago Santos
1c8e1722eb camerabin2: encodebin might not have the requested pad
handle the case where encodebin doesn't have the pad
camerabin2 is requesting, either because of its current profile
or because of missing elements, making it fail to provide
the pad
2011-05-16 18:08:40 -03:00
Thiago Santos
dfdc6255f8 camerabin2: Fix tag handling for videos
In video mode the tags should be pushed after sending the start capture
to the source, this allows the video recording elements to be reset
and leave the flushing state they were at after a previous capture.

This fixes the problem where tags only work for the first video capture
2011-05-16 18:08:39 -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
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
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