Commit graph

185 commits

Author SHA1 Message Date
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
Wim Taymans de1f89bf07 GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:37:13 +01:00
Thiago Santos 3b549c4dbd camerabin: prevent captures from being lost when switching resolutions
When switching capture caps, camerabin1 resets its state to ready
to force a new caps to be negotiated. This causes ongoing captures
to be aborted.

This commit adds a condition to wait for captures to finish before
going to ready state.
2012-02-06 10:48:32 -03:00
Thiago Santos 9bd40e92ce camerabin: Improve debug message about processing counter
Mention on the logs how many capture operations might have been
lost
2012-02-06 10:48:32 -03:00
Vincent Penquerc'h 8147669971 plenty: fixup glib deprecations 2012-01-27 15:47:07 +00:00
Thiago Santos f4d6e03b9b camerabin: Add viewfinder colorspace conversion to default flags
This make the default settings more likely to work. If needed, one
can optimize by disabling conversions with the flags.
2012-01-27 07:37:56 -03:00
Vincent Penquerc'h 7521b597f4 various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:08:27 +00:00
Wim Taymans bc6ed0bf97 Merge branch 'master' into 0.11
Conflicts:
	ext/celt/gstceltdec.c
	ext/opus/gstopusdec.c
	ext/opus/gstopusdec.h
	ext/opus/gstopusenc.c
	ext/opus/gstopusenc.h
	ext/opus/gstopusparse.c
2011-11-17 17:32:42 +01:00
David King 92f07e3898 camerabin: Document requirement for PLAYING state
As described in GNOME bug 663998, the element must be in the PLAYING
state before calling capture-start.

https://bugzilla.gnome.org/show_bug.cgi?id=664048
2011-11-14 23:28:29 -03:00
Wim Taymans eaad7e58b0 more template fixes 2011-11-04 12:31:19 +01:00
Wim Taymans c8adc4f8c8 make request pads take _%u 2011-11-04 12:22:37 +01:00
Stefan Sauer 69f8921e2c interfaces: clean up the use of iface and class/klass 2011-10-21 15:04:05 +02:00
Wim Taymans 7f851794d6 Merge branch 'master' into 0.11 2011-10-16 15:28:31 +02:00
Thiago Santos 17a00123a4 camerabin: Reset audiosrc timestamping
Reset audiosrc's timestamping data by setting
it to NULL to reset the ringbuffer and then re-seting
the clock that camerabin might not redistribute
2011-10-11 18:48:07 -03:00
Thiago Santos 0f99118141 camerabin: Prevent audio source from providing clock
camerabin's audio source might be put to NULL during its
use, so the clock would be lost. Better not allow it to
provide a clock at all.
2011-10-11 16:27:07 -03:00
Wim Taymans a2b7a672b8 Merge branch 'master' into 0.11
Conflicts:
	android/aacparse.mk
	android/amrparse.mk
	android/h264parse.mk
	android/metadata.mk
	android/qtmux.mk
	android/sdpelem.mk
	configure.ac
	gst/qtmux/gstqtmux.c
	win32/common/config.h
2011-06-15 16:06:36 +02:00
Debarshi Ray 03bb5dc8ba Remove unused but set variables
This is needed to satisfy the new -Wunused-but-set-variable added in
GCC 4.6: http://gcc.gnu.org/gcc-4.6/changes.html
2011-05-30 22:52:03 +10:00
Lasse Laukkanen 466ca5d460 camerabin: Add image-formatter property
Add image-formatter property in order to let application configure
the formatter element for metadata.
2011-05-23 12:08:37 -03:00
Thiago Santos 72574962ef camerabin: Use running time for muxing
This patch removes the audio source buffer probe that was used
to re-timestamp buffers to make them start from 0. As muxers
have been fixed to use running time instead of timestamps, this
is not needed anymore.

Fixes bug #646211
2011-05-06 12:45:28 -03:00
Thiago Santos 834dc9ca63 camerabin: Fix typo 2011-05-05 09:57:17 -03:00
Thiago Santos 19bd1e6d55 camerabin: Do not forget to unref the ffmpegcolorspace
Do not leak the ffmpegcolorspace by unrefing it at dispose
2011-04-15 07:53:43 -03:00
Lasse Laukkanen 26553bfb1d camerabin: Preserve unused imagebin or videobin on NULL
If video or image mode is never selected then respective bin is in NULL state.
Preserve this state when resetting camerabin from PAUSED to READY.
2011-04-13 22:34:35 -03:00
Lasse Laukkanen ada43fe3bd camerabin: Fix corner case for preview posting
Fix corner case where video preview image is not posted if stopping
video capture immediately after capture start.
2011-04-11 14:56:35 -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
Tim-Philipp Müller 9c5863ad35 camerabin: don't rely on the application running the default GLib main loop
Don't use g_idle_add() and friends to schedule things we can't do from the
streaming thread in another thread. The app may not be running the default
GLib main loop. Instead, just spawn a thread.

Also, we need to care for when acessing a pad variable, as another thread
might have taken camerabin to NULL while this gst_camerabin_imgbin_finished
didn't run.

https://bugzilla.gnome.org/show_bug.cgi?id=615655
2011-04-05 14:40:35 -03:00
Thiago Santos 6a4be5a2ba camerabin: Processing should stop on READY
The videobin and imagebin from camerabin have their states
locked and aren't put to READY when all the rest of camerabin
is set to it.

This might cause one of them to be still processing and post
an EOS after camerabin isn't expecting it anymore, this causes
an assertion as the processing counter would already be 0 and
would be decremented.
2011-04-01 13:42:33 -03:00
Lasse Laukkanen fbe4f5f610 camerabin: Add an assertion to preview pipeline generation
Adds an assertion in case the preview pipeline is NULL and also
explicitly initializes preview caps to NULL for clarity.
2011-03-15 09:18:31 -03:00
Wim Taymans cbb7fa5701 miniobject: port to new 0.11 API
Remove miniobject and buffer subclassesusing GObject subclasses and
metadata.
2011-02-28 12:06:57 +01:00
Teemu Katajisto 7e9fb16c48 camerabin: application element memory leak fixes
If videobin/imagebin was never set to READY state the ownership
 of elements created and set by application were never taken by
 bin and therefore gst_object_sink is called for these elements
 before unreffing (they may still be in floating state and not
 unreffed properly without sinking first)
2011-02-11 09:22:59 -03:00
Luciana Fujii Pontello fa45b1fe2d camerabin: Always take photo when preview-caps is set
When filename is not set, but preview-caps is set, take the photo and
send its preview.
2011-02-09 13:42:07 +02:00
Luciana Fujii Pontello 2522a672a9 camerabin: Events with select-all in input-selector
When select-all was set, input-selector wasn't handling upstream events.
Now input-selector forwards the event to all of its sink pads. This
changes the input-selector internal to camerabin until it is replaced
with a better solution.
2011-02-09 13:42:06 +02:00
Edward Hervey 4724ecfd06 camerabin: Initialize variables
Makes compilers happy
2011-02-03 16:24:24 +01:00
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
Tim-Philipp Müller b700377e22 camerabin: use private input-selector that still has "select-all" property
The "select-all" property was removed when input-selector was moved
to core, but camerabin uses this, so make camerabin use a private
copy until a better fix is found.
2011-01-08 02:43:41 +00: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
Thiago Santos d96964e391 camerabin: Add missing change to previous commits
Forgot to add this change to the latest commits. This fixes the build.
2010-11-02 10:24:49 -03:00
Thiago Santos 7ae195788a camerabin: Fix leaks in the preview handling
Remember to unref the bus after adding the watch.
Remember to unref the element after getting it with
gst_bin_get_by_name.
2010-11-02 09:39:49 -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