Commit graph

139 commits

Author SHA1 Message Date
Tim-Philipp Müller 2f50ad435b camerabin2: rename to "camerabin"
But leave source code intact for now, for easier patch merging.
2012-04-30 17:56:17 +01:00
Wim Taymans 1119f6ee41 Merge branch 'master' into 0.11
Conflicts:
	ext/chromaprint/gstchromaprint.c
	ext/mpeg2enc/Makefile.am
	ext/voaacenc/gstvoaacenc.c
	gst/dvbsuboverlay/gstdvbsuboverlay.c
	gst/mpegtsdemux/mpegtsbase.c
	gst/sdp/gstsdpdemux.c
	gst/videoparsers/gsth264parse.c
	sys/d3dvideosink/d3dvideosink.c
	tests/examples/camerabin/gst-camera-perf.c
	tests/examples/camerabin/gst-camerabin-test.c
	tests/examples/camerabin2/gst-camerabin2-test.c
	tests/examples/mxf/mxfdemux-structure.c
	tests/examples/scaletempo/demo-main.c
2012-02-10 16:46:50 +01:00
Vincent Penquerc'h 8147669971 plenty: fixup glib deprecations 2012-01-27 15:47:07 +00:00
Thiago Santos 5edd64eec6 camerabin2: Removing solved TODO and fixing a typo 2012-01-27 07:37:55 -03:00
Wim Taymans 27ee60a27b port to new gthread API 2012-01-19 11:34:26 +01:00
Edward Hervey f017f9a913 camerabin2: encoding profiles are objects in 0.11 2012-01-02 15:55:21 +01:00
Edward Hervey 4917e16458 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	tests/examples/camerabin2/Makefile.am
2011-12-30 11:49:27 +01:00
Edward Hervey f70a623418 Merge remote-tracking branch 'origin/master' into 0.11-premerge
Conflicts:
	docs/libs/Makefile.am
	ext/kate/gstkatetiger.c
	ext/opus/gstopusdec.c
	ext/xvid/gstxvidenc.c
	gst-libs/gst/basecamerabinsrc/Makefile.am
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h
	gst-libs/gst/video/gstbasevideocodec.c
	gst-libs/gst/video/gstbasevideocodec.h
	gst-libs/gst/video/gstbasevideodecoder.c
	gst-libs/gst/video/gstbasevideoencoder.c
	gst/asfmux/gstasfmux.c
	gst/audiovisualizers/gstwavescope.c
	gst/camerabin2/gstcamerabin2.c
	gst/debugutils/gstcompare.c
	gst/frei0r/gstfrei0rmixer.c
	gst/mpegpsmux/mpegpsmux.c
	gst/mpegtsmux/mpegtsmux.c
	gst/mxf/mxfmux.c
	gst/videomeasure/gstvideomeasure_ssim.c
	gst/videoparsers/gsth264parse.c
	gst/videoparsers/gstmpeg4videoparse.c
2011-12-30 11:41:17 +01:00
Thiago Santos e4d3d2dcd1 camerabin2: clarify some message logs
Be explicit on which encodebin we're switching profiles on the
log messages
2011-12-30 00:02:19 -03:00
Thiago Santos 9de92cf9dc camerabin2: fix gvalue leak 2011-12-27 16:40:38 -03:00
Thiago Santos 399ec70a08 camerabin2: secure event ref when sending event to parent class
camerabin2 needs to hold an extra ref on send_event before sending
it to the parent class as it will need to use it after the parent
handles it.
2011-12-27 16:40:38 -03:00
Thiago Santos 44eb631841 camerabin2: port to 0.11 2011-12-23 19:01:20 -03:00
Thiago Santos 0ce5021058 camerabin2: Fix A/V sync for captures
Audio src was pushing newsegments starting from 0, even when its buffers
were not starting with 0 as their timestamps. Add a buffer probe that
checks the ts of the first buffer and uses that to push a newsegment,
just like we do for video on wrappercamerabinsrc.
2011-12-20 15:05:27 -03:00
Tommi Myöhänen 9648d100b4 camerabin2: fix leak on error handling
Camerabin2 parses warning messages with gst_message_parse_warning(message,
&err, &debug) but doesn't free given GError and debug strings.
Documentation shows that the ownership of those fields is transferred
to caller (they are marked "[transfer full]" in the API docs).
2011-12-14 08:32:50 -03:00
Thiago Santos f6d47a4206 camerabin2: micro optimize linking some more 2011-11-28 18:48:51 -03:00
Thiago Santos 524c478fa1 camerabin2: Also reset video/audio filters before capturing
Video and audio custom filter element should also be reset before
starting a new capture, otherwise we get wrong-state errors
2011-11-19 16:22:29 -03:00
Thiago Santos 1d5b324e7d camerabin2: Also reset audio elements when video capture finishes
Audio elements also need to be reset after each capture, do it
together with the video elements' reset
2011-11-14 17:48:52 -03:00
Thiago Santos aab3a73ccd camerabin2: Add one debug line about camerabin2 being idle 2011-11-14 13:06:29 -03:00
Thiago Santos 54351a0129 camerabin2: Remove video elements' state clearing from start-capture
Reduce start-capture workload by moving the elements' state reseting to the
finishing steps of the capture. This reduces the time start-capture takes to
actually start a capture and return to its caller, improving user experience.

As the elements' state reset is now triggered from the message handling
function, it needs to spawn a new thread, changing state from the pad's
task would cause a deadlock.
2011-11-14 13:06:29 -03:00
Thiago Santos c635e4bc3b camerabin2: keep track of video recording state
Adds a new variable to keep track of the state of the video
recording in camerabin2. This allows start-capture to reject
new video recording requests when one is already ongoing. This
fixes one of check tests.
2011-11-14 13:06:28 -03:00
Thiago Santos c7db5db632 camerabin2: protect image location list with mutex
Rename the image taglists' mutex into image capture mutex and
use it also for the image capture list to prevent concurrent
access from different threads (application and capture threads).
2011-11-09 12:30:58 -03:00
Thiago Santos 27e01e02a4 camerabin2: Handle null taglists for images
Add NULL and check for them to the image capture taglist list, representing
that a capture has no application tags set.
2011-11-09 12:30:58 -03:00
Thiago Santos 9ab6406f23 camerabin2: Don't store preview location if preview isn't requested
Do not store preview location is post-previews is false, this would
mess up preview naming in case application switches between enabling
and disabling previews
2011-11-09 12:30:33 -03:00
Lasse Laukkanen 5ca3c9477e camerabin2: Avoid blocking in start-capture and send application tags later
Tags are currently sent from start-capture, which is run in the
application thread. For images we can delay the tags pushing to the
buffer probe and push the tags with the location event and reduce
start-capture time.
2011-11-09 11:45:55 -03:00
Thiago Santos 74df06d8c6 camerabin2: Decrement processing counter when message handling finishes
Some messages might be interesting to applications, so we can only
decrement the processing counter and send the idle notification
when those messages are posted on the pipline's bus
2011-11-08 08:13:20 -03:00
Lasse Laukkanen ad1ddaf53a camerabin2: change post-previews property default value as false
Generating and posting preview image always comes with a performance
penalty so set default value as false. The preview-caps property that
defines the preview image format is also NULL by default, so instead
of generating preview image of unspecified format by default explicit
action from application should be required for enabling preview image
posting feature.

Application also has to add custom code to be able
to handle preview messages on its message handling function anyway.
2011-11-08 07:09:41 -03:00
Thiago Santos d4105d4b56 camerabin2: On capture error, skip previews
When the camera source fails to do some capture, skip the next
preview and decrement processing counter.
2011-11-01 11:49:17 -03:00
Lasse Laukkanen 37aa6a9c71 camerabin2: track also preview images with processing counter
Makes camerabin2 only signal that it is idle after all previews have
been generated, images are captured and saved, and videos have
been finished properly.
2011-11-01 11:49:17 -03:00
Thiago Santos 61a7e6bf38 camerabin2: Check before acessing preview location list
Only access the preview location if it exists, to avoid acessing
a NULL variable. If the preview location list doesn't exist, it is
likely because the source has posted a preview message after camerabin2
has been put to READY.
2011-10-12 12:19:13 -03:00
Thiago Santos e90e041e52 camerabin2: Add a mutex to avoid concurrent access of preview filename lists
The preview filename list is acessed whenever a new capture is started, when
camera-source posts a new preview message or on state changes. All of those can
occur simultaneously, so add a mutex to prevent concurrent access.
2011-10-11 23:13:00 -03:00
Thiago Santos 379670e036 camerabin2: add location to preview image messages
Makes camerabin2 intercept preview-image messages and add
the filename corresponding to the message structure in the
'location' field.

Makes easier for applications to track preview images
2011-09-29 18:21:06 -03:00
Robert Swain 6446cc4ae9 camerabin2: Fix potential loss of EOS event
Setting the audio source to NULL just after pushing the EOS event
on it could potentially cause loss of said EOS event. Instead, we
can set the audio source to NULL when ready-for-capture is
signalled and the boolean value is true as this indicates we are
not currently capturing video.
2011-09-29 16:22:00 +02:00
Robert Swain f4e744ff49 camerabin2: Stop the audio source between captures
Move the audio source setting of state to NULL to _stop_capture () to
avoid the audio source running between captures.
2011-09-26 17:23:41 +02:00
Thiago Santos b8f9c3b39d camerabin2: Adding 2 more log messages 2011-09-16 00:52:53 -03:00
Vincent Penquerc'h 25c3ce9a7a camerabin2: replace deprecated g_atomic_int_exchange_and_add
It was replaced by g_atomic_int_add, which now returns the
old value.

https://bugzilla.gnome.org/show_bug.cgi?id=659061
2011-09-16 00:52:53 -03:00
Thiago Santos cc27a7fe3a camerabin2: Reset last state change result on state-locked elements
An element stores the result for the last state change it did and
GstBin's state change handler will use this last result for state
locked elements to decide if its state change was successfull or not.

In camerabin2, the filesinks have their state locked and when they
fail switching states, this last failure will be used if the application
tries to change camerabin2's state, causing any state change to fail.

This patch makes camerabin2 reset this last change failure, avoiding
that camerabin2 fails on its next state changes.
2011-09-16 00:52:53 -03:00
Thiago Santos 00e635e786 camerabin2: Check zoom notify callback from camera-source
Camerabin2 has a zoom property that is simply proxied to its
internal camera-source element. This patch makes camerabin2 listen
to 'notify' signals from it so it can update its zoom property value
when camera-source changes its zoom as a side-effect of another operation
or because the user set the zoom directly to it, instead of doing
it from camerabin2.
2011-09-12 17:49:25 -03:00
Robert Swain db0739e54f camerabin2: Add a flag to disable image conversion elements
If we know that our camera source element produces buffers at the same
resolution and appropriate colourspace for the output, we don't need any
of the generic conversion elements in encodebin. This reduces caps
negotiation overheads among other things.
2011-09-01 15:57:50 +02:00
Thiago Santos 2ed3d1b309 camerabin2: Micro optimize encodebin pads linking
Reduce one check in encodebin pads linking on camerabin2 by
using the link_pads_full version
2011-08-31 15:45:18 -03:00
Thiago Santos ac7fc0d357 camerabin2: Use explicit boolean literals to make gobject happy
gobject boolean properties are strict and only accept 1 or 0, otherwise
they throw an assertion.
2011-08-31 15:45:18 -03:00
Thiago Santos 5ae630489c camerabin2: Make viewfinder's queue a thread limit only
Reduce the viewfinder queue limits to only allow it to store
one buffer, preventing the queue from holding old buffers for
too long. This also avoids showing slightly outdated frames on
the viewfinder when the source has already produced new ones
and improves the buffer recycling rate, important for sources
that use bufferpools.
2011-08-26 09:43:14 -03:00
Thiago Santos 69c65875ea camerabin2: Optimize start up a little by removing some pad checks
Some pad checks are guaranteed to work, so we can disable them
by using gst_element_link_pads_full
2011-08-24 01:03:32 -03:00
Thiago Santos 011eddcd0e camerabin2: Remove from experimental
Remove camerabin2 from experimental, allowing it to be built
without needing to pass --enable-experimental on configure.
2011-08-23 19:26:31 -03:00
Thiago Santos e32897d809 camerabin2: Always set encodebin flags when going to ready
When going from NULL to READY we want the encodebin flags to be
set, and not only after creating encodebin (on the first run)
2011-08-23 19:13:21 -03:00
Thiago Santos 5c662ec0c7 camerabin2: Add new entry to flags property
Adds a new entry to camerabin2 flags to disable viewfinder
conversion elements.
2011-08-23 11:58:33 -03:00
Thiago Santos 6c272aafa7 camerabin2: Prevent audiosrc from sending undesired eos
Basesrc derived classes send an eos when they change state
from paused to ready and that breaks video recordings on camerabin2
as it makes the whole audio branch pads flushing.

Prevent it by using a pad probe that only allows the eos to pass
when it is caused by a stop-capture action.
2011-08-21 18:23:16 -03:00
Thiago Santos fefc27a586 camerabin2: Use gst_pad_send_event instead of eventfunc macro 2011-08-21 18:23:16 -03:00
Thiago Santos fe206e75f7 camerabin2: Avoid assertions when plugin creation fails
Capsfilters are created on the constructor and their properties can
be set/get from camerabin2's set/get_property functions. The user with
a broken setup would cause assertions when trying to set/get the
capture caps of this camerabin2.

A proper missing-plugin message will be posted when the user tries to
set camerabin2 to READY state.
2011-08-21 18:23:16 -03:00
Thiago Santos 19e5736acd camerabin2: Add audio-filter property
Adds a property to add a custom GstElement to the audio
branch of the pipeline. This allows the user to do custom audio
processing/analysis when recording videos.
2011-08-13 11:42:07 -03:00
Thiago Santos 8dc9551f9a camerabin2: Adding video-done message
video-done message will be posted when a video recording is
finished. Similar to image-done message.
2011-08-06 19:55:48 -03:00