Commit graph

353 commits

Author SHA1 Message Date
Vineeth T M
14acb6fb37 gst: remove unnecessary GLIB_DISABLE_DEPRECATION_WARNINGS
There are unnecessary definitions for disabling deprecation warnings.
Since GLIB_DISABLE_DEPRECATION_WARNINGS is not needed anymore in these files,
removing the same.

https://bugzilla.gnome.org/show_bug.cgi?id=737559
2014-10-02 10:51:35 +03:00
Sanjay NM
b041deb2fa camerabin2: removed redundant initialization
https://bugzilla.gnome.org/show_bug.cgi?id=736853
2014-09-18 12:34:39 +03:00
Sebastian Rasmussen
5d1fedd18e wrappercamerabinsrc: Unref elements after usage
gst_bin_get_by_name() and gst_bin_get_by_interface() both return
references to elements that need to be unreferenced after usage.

https://bugzilla.gnome.org/show_bug.cgi?id=734524
2014-08-10 14:17:55 +01:00
Thiago Santos
a70764df5a wrappercamerabinsrc: do not give references to probes
They are kept until the probes are removed but they will never be
removed as the refcount of the element won't get to 0 because the
probes own references (cyclic refs). As the probes should only be
running as long as the element is running there is no need to
secure a ref for them.

Removes 3 leaked refs of wrappercamerabinsrc
2014-07-26 13:27:51 -03:00
Thiago Santos
455baef448 camerabin: use gst_object_ref to make it easier to track refs
Helps debugging
2014-07-26 12:46:01 -03:00
Thiago Santos
34b90db967 wrappercamerabinsrc: unref request pads
Do not forget to unref output-selector requested pads
2014-07-26 12:38:42 -03:00
Thiago Santos
65676a2f15 wrappercamerabinsrc: only flush buffers if renegotiation is needed
This avoid extra overhead when taking sequential pictures that woudln't
need renegotiation
2014-07-23 13:58:26 -03:00
Thiago Santos
19d5be4c3a camerabin: handle EOS on the pipeline
Make camerabin handle EOS to the pipeline to allow standard pipeline
close where an EOS is sent to the whole pipeline before setting it to NULL.
2014-07-23 13:58:26 -03:00
Thiago Santos
b39c01baa1 wrappercamerabinsrc: set src to ready when there are no pending buffers
Setting to ready will block waiting for buffers to be reclaimed, so flush
before setting to null to make sure no buffers are pending

https://bugzilla.gnome.org/show_bug.cgi?id=733072
2014-07-17 10:06:09 -03:00
Nicolas Dufresne
362951b9ec wrappercamerabinsrc: Fix caps filter caps proxying
The notify signal is triggered when caps is changed. But instead of
proxying the fixed caps, we query for the caps. Hence, when we go to
READY state, we endup setting template caps on the proxied caps
filter instead of NULL, which leads to negoitation failure. Correctly
proxy NULL caps if this is the new caps. Fixes not negotiated error
when running in cheese. Also fix a leak of caps string in one of the
trace.

https://bugzilla.gnome.org/show_bug.cgi?id=732741
2014-07-11 11:05:08 -04:00
Nicolas Dufresne
5e4e572335 camerabin2: Flush downstream after setting src to READY
v4l2src requires all buffers to come back in order to cleanly stop
streaming. Flushing the pipline should force all buffers to come
back.

https://bugzilla.gnome.org/show_bug.cgi?id=732741
2014-07-10 18:34:21 -04:00
Thiago Santos
0ae4bc74ba camerabin: fix structure handling in preview message
Avoid trying to modify the message structure as it isn't mutable.
Use a copy and post a new message if necessary.

Fixes failing tests.
2014-05-30 02:10:45 -03:00
Vincent Penquerc'h
c3a2e0ad97 camerabin2: remove unneeded check
A message may not be NULL in the message handling function
(and nothing there sets it to NULL).

Coverity 1139848
2014-04-09 15:24:13 +01:00
Mohammed Sameer
0450e8f53f camerabin: add any feature to viewfinderbin static pad template
https://bugzilla.gnome.org/show_bug.cgi?id=727857
2014-04-09 08:56:01 +02:00
Mohammed Sameer
b261374462 camerabin: report an error if we fail to link vfsrc and viewfinder queue
https://bugzilla.gnome.org/show_bug.cgi?id=727855
2014-04-09 08:54:07 +02:00
Thiago Santos
cfda1aafa3 wrappercamerabinsrc: stop source to do internal reconfiguration safely
In order to be able to change the caps on multiple capsfilters the
source element needs to be stopped, otherwise it will get a few
reconfigure events and might try to renegotiate while the bin
is still transitioning its caps, leading to a not-negotiated failure
and the image capture won't happen because the source will be
unusable.

The solution is to keep the source in paused while the caps are being
changed in the bin, and then bring the element back to playing once
it is done. Unfortunately this increases the image capture latency,
but it should always work.

A possible improvement to reduce the latency is to add another signal
to be called before 'start-capture': 'prepare-capture'. At this step
the camera source should set all caps it needs and get the source
ready for doing the capture as soon as 'start-capture' is called.
This can be done on a future commit
2014-02-04 14:17:26 -03:00
Thiago Santos
3cdeea0cac camerabin: remove unused variable
Probably a left over from 0.10 -> 1.x porting
2014-02-04 14:17:26 -03:00
Thiago Santos
e7e7417523 camerabin: Make sure video-done is post only when file is closed
Force filesink to null before posting video-done to make sure the
file was closed.

Had to do it from a separate thread to avoid calling state_change from
a sync message handler.

https://bugzilla.gnome.org/show_bug.cgi?id=709373
2013-11-06 22:13:54 -03:00
Hans de Goede
28e64d1031 wrappercamerabinsrc: Add video-source-filter during construction
By adding the video-source-filter during construction time, rather then
patching it in later (*), we can greatly reduce the amount of caps involved
in negotation, speeding up pipeline creation.

I wrote this while working on speeding up the startup of cheese. My cheese
has been modified to add a capsfilter, filtering for only the configured
resolution, with that cheese patch + this patch, the pipeline creation time
goes from aprox 1.1 seconds to aprox 350ms. This is with a Logitech 9000
pro camera, which supports lots of different resolutions at many different
framerates per resolution, causing a caps "explosion" if not filtered.

*) Note the code for this is left in, as it is still necessary if the
video-source-filter is changed between a stop + re-start.

https://bugzilla.gnome.org/show_bug.cgi?id=701953
2013-06-11 12:47:53 +02:00
Hans de Goede
8dc7fae455 wrappercamerabinsrc: Don't unset the video-source property on pipeline start
check_and_replace_src() was setting self->app_vid_src to NULL, which
means that an app setting the video-source property, and then starting,
stopping and re-starting the pipeline (ie to make changes to the
video-source-filter property) would after the restart no longer have
a video-source.

This patch fixes this by making gst_camerabin_setup_default_element return a
ref to the passed in user_element, rather then returning the user_element as
is, so that that ref can be passed on to the bin, and the app_vid_src ref
stays valid.

https://bugzilla.gnome.org/show_bug.cgi?id=701915
2013-06-10 16:16:29 +02:00
Sebastian Dröge
e51cd4fe2f gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Tim-Philipp Müller
32ba17cd0f Use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2012-10-17 17:46:34 +01:00
Thiago Santos
8c8d1a0b6b wrappercamerabinsrc: change video-source if the user requested
When going from null to ready, check if the user requested to
use a new source and replace the current one.

Fixes #681562
2012-09-28 00:13:32 -03:00
Thiago Santos
c6fd3b070b wrappercamerabinsrc: pad probe ids are gulong
Change variable to the correct type
2012-09-27 23:22:37 -03:00
Thiago Santos
efd14946fd camerabin: use correct element name when replacing the video filter
The name was updated on the 0.10 -> 1.0 transition, but the
gst_bin_remove was still using the old name, causing an assertion
when replacing video-source-filter

https://bugzilla.gnome.org/show_bug.cgi?id=681564
2012-09-27 19:42:02 -03:00
Mark Nauwelaerts
578861abea replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-09-14 17:27:49 +02:00
Thiago Santos
8a8baa6a70 camerabin: port tagsetter mode setting code
Check directly with GST_IS_TAG_SETTER instead of using the
deprecated GstImplementsInterface

Fixes the image tag setting unit test
2012-09-12 09:48:32 -03:00
Thiago Santos
2139c81cdb camerabin2: use correct variable when handling pad probe buffers
Pad probe data is in the GstPadProbeInfo, not in the user data
parameter.
2012-09-06 01:53:07 -03:00
Thiago Santos
edb5a28973 camerabin: no need to set clock/basetime again
The base and clock aren't lost anymore on state changes
in 1.0
2012-08-29 22:05:56 -03:00
Thiago Santos
cc130a2fea camerabin: no need to send extra reconfigure
Setting capsfilters already sends reconfigure events when a new
caps is set, no need to resend them.
2012-08-29 22:05:04 -03:00
Thiago Santos
9ff5b6bcbe camerabin: request _%u templates instead of _%d
In 1.0, templates have been renamed to _%u as default
2012-08-29 15:45:05 -03:00
Thiago Santos
9fd555c3d0 wrappercamerabinsrc: rework video recording eos push
Push EOS outside of wrappercamerabinsrc so that none of the
internal elements gets its pads into eos state, preventing any
further data from passing
2012-08-29 15:45:05 -03:00
Tim-Philipp Müller
489b102a43 gst_tag_list_free -> gst_tag_list_unref 2012-08-04 16:31:30 +01:00
Robert Swain
955e50449e wrappercamerabinsrc: Save image/video reconfiguration until capturing
Add a src pad event handler function that filters reconfigure events to
trigger the renegotiation code paths in the mode-specific start-capture
phase.

This is to work towards fixing unit tests but more work is needed.
2012-08-02 22:46:21 +02:00
Thiago Santos
0a831613a8 camerabin: update preview buffer pushing
need to pass a GstSample to the utilitary preview buffer post functions
as a GstBuffer doesn't have caps anymore. The GstSample has the GstCaps
and it is used to inform the preview's pipeline about the format of the
input, before it gets converted to the user's requested output format.
2012-07-29 00:53:29 -03:00
Tim-Philipp Müller
8b36de8b41 Revert "camerabin: update to new tag event creation API"
This reverts commit 5d890b3c92.

The new API is the old API.
2012-07-29 00:04:35 +01:00
Thiago Santos
3ce5a977ad camerabin: Fix references to avoid element leaking
Some pad probes are never going to be removed from the pads, so
we shouldn't keep a camerabin reference with them or camerabin will
never get released
2012-07-28 18:27:19 -03:00
Thiago Santos
5d890b3c92 camerabin: update to new tag event creation API 2012-07-28 15:17:17 -03:00
Sebastian Dröge
afd50a79f4 tag: Update for taglist/tag event API changes 2012-07-28 00:32:58 +02:00
Lasse Laukkanen
8fd2fc662a photography: Add GstPhotography prefix and fix spelling colour->color
https://bugzilla.gnome.org/show_bug.cgi?id=622482
2012-07-11 00:10:55 +01:00
Wim Taymans
b98ec32380 update for tag event change 2012-06-06 13:02:40 +02:00
Raimo Järvi
93ad7a4d06 Fix printf format compiler warnings on mingw-w64
https://bugzilla.gnome.org/show_bug.cgi?id=675520
2012-05-05 19:45:42 +01:00
Thiago Santos
133c9ef6be camerabin: remove unnecessary code 2012-05-04 19:54:51 -03:00
Thiago Santos
acc48b7833 camerabin: improve image capture debug 2012-05-04 19:54:51 -03:00
Thiago Santos
95fd9cd277 camerabin: always force image-profile to have variable framerate
image-encodebin can't use videorate as it always store one buffer
to be able to do its timestamps/duration math. As image captures
only push one buffer at a time, this videorate behavior breaks
camerabin usage.
2012-05-04 19:50:52 -03:00
Youness Alaoui
d3303121c8 basecamerabin: Do not set the pad templates in the base class.
It is best to let the subclass define the pad templates, this would
allow the subclass to decide which caps the pads should have.
2012-05-04 19:50:52 -03:00
Thiago Santos
37bac4c1ed wrappercamerabinsrc: avoid assertion by using null caps as any
NULL caps aren't valid caps, use a reference to 'any' caps
2012-05-02 16:21:01 -03:00
Thiago Santos
cc09cd1303 camerabin: Fix get/set_property for encoding profiles
Encoding profiles are objects, not boxed types
2012-05-02 15:25:32 -03:00
Thiago Santos
b5ba142b06 camerabin: remove custom renegotiate event
In 1.0 there is a core reconfigure event, camerabin doesn't need
its custom renegotiate event anymore
2012-05-01 15:31:11 -03:00
Thiago Santos
b030923eb5 camerabin: Use plain video encoding profile for images
Do not use jpeg as a container format for image captures, use
the plain video encoding format. It was used as a container in
0.10 to force the addition of tags to the image.
2012-05-01 15:20:50 -03:00
Thiago Santos
ad9822dea7 wrappercamerabinsrc: change output-selector negotiation mode
In 0.10 camerabin2 controlled the negotiation strictly and the output-selector
wouldn't forward setcaps calls. In 0.11 the renegotiation events are already in
core and we can allow the pipeline to handle it without much control from camerabin
part (I hope), so this patch makes output-selector forward caps negotiation events
to the active pad.
2012-05-01 15:20:49 -03:00
Thiago Santos
4a4f06abcf wrappercamerabinsrc: removing renegotiate handlers
gstreamer 1.0 already has the reconfigure event, remove the
custom event handling from wrappercamerabinsrc
2012-05-01 15:20:49 -03:00
Thiago Santos
9cd0172581 wrappercamerabinsrc: prevent caps renegotiation loop
Only set the zoom capsfilter caps when the new caps are different,
preventing a caps renegotiation loop.
2012-05-01 15:20:49 -03:00
Thiago Santos
79d3cc533f camerabin: Replacing ffmpegcolorspace with videoconvert 2012-05-01 15:10:51 -03:00
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
Sebastian Dröge
c88cd9cefc Update for the removal of the interfaces library and the tuner/mixer interfaces 2012-04-13 13:15:39 +02:00
Sebastian Dröge
cda192b3b7 gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 18:02:56 +02:00
Sebastian Dröge
1318a97e0a gst: Update versioning 2012-04-04 14:44:34 +02:00
Sebastian Dröge
860ccd414d Merge remote-tracking branch 'origin/0.10'
Conflicts:
	NEWS
	RELEASE
	common
	configure.ac
	docs/libs/gst-plugins-bad-libs-sections.txt
	docs/plugins/gst-plugins-bad-plugins.args
	docs/plugins/gst-plugins-bad-plugins.hierarchy
	docs/plugins/gst-plugins-bad-plugins.interfaces
	docs/plugins/inspect/plugin-adpcmdec.xml
	docs/plugins/inspect/plugin-adpcmenc.xml
	docs/plugins/inspect/plugin-assrender.xml
	docs/plugins/inspect/plugin-audiovisualizers.xml
	docs/plugins/inspect/plugin-autoconvert.xml
	docs/plugins/inspect/plugin-bayer.xml
	docs/plugins/inspect/plugin-bz2.xml
	docs/plugins/inspect/plugin-camerabin2.xml
	docs/plugins/inspect/plugin-celt.xml
	docs/plugins/inspect/plugin-dataurisrc.xml
	docs/plugins/inspect/plugin-debugutilsbad.xml
	docs/plugins/inspect/plugin-dtmf.xml
	docs/plugins/inspect/plugin-dtsdec.xml
	docs/plugins/inspect/plugin-dvbsuboverlay.xml
	docs/plugins/inspect/plugin-dvdspu.xml
	docs/plugins/inspect/plugin-faac.xml
	docs/plugins/inspect/plugin-faad.xml
	docs/plugins/inspect/plugin-gsm.xml
	docs/plugins/inspect/plugin-h264parse.xml
	docs/plugins/inspect/plugin-mms.xml
	docs/plugins/inspect/plugin-modplug.xml
	docs/plugins/inspect/plugin-mpeg2enc.xml
	docs/plugins/inspect/plugin-mpegdemux2.xml
	docs/plugins/inspect/plugin-mpegtsdemux.xml
	docs/plugins/inspect/plugin-mpegvideoparse.xml
	docs/plugins/inspect/plugin-mplex.xml
	docs/plugins/inspect/plugin-pcapparse.xml
	docs/plugins/inspect/plugin-rawparse.xml
	docs/plugins/inspect/plugin-rtpmux.xml
	docs/plugins/inspect/plugin-rtpvp8.xml
	docs/plugins/inspect/plugin-scaletempo.xml
	docs/plugins/inspect/plugin-schro.xml
	docs/plugins/inspect/plugin-sdp.xml
	docs/plugins/inspect/plugin-segmentclip.xml
	docs/plugins/inspect/plugin-shm.xml
	docs/plugins/inspect/plugin-videomaxrate.xml
	docs/plugins/inspect/plugin-videoparsersbad.xml
	docs/plugins/inspect/plugin-vp8.xml
	docs/plugins/inspect/plugin-y4mdec.xml
	ext/celt/gstceltdec.c
	ext/dts/gstdtsdec.c
	ext/modplug/gstmodplug.cc
	ext/opus/gstopusenc.c
	gst-libs/gst/video/gstbasevideocodec.c
	gst-libs/gst/video/gstbasevideocodec.h
	gst-libs/gst/video/gstbasevideodecoder.c
	gst-libs/gst/video/gstbasevideodecoder.h
	gst-libs/gst/video/gstbasevideoencoder.c
	gst-libs/gst/video/gstbasevideoencoder.h
	gst/adpcmdec/Makefile.am
	gst/audiovisualizers/gstbaseaudiovisualizer.c
	gst/h264parse/gsth264parse.c
	gst/mpegdemux/mpegtsparse.c
	gst/mpegtsdemux/mpegtsbase.c
	gst/mpegtsdemux/mpegtspacketizer.c
	gst/mpegtsdemux/mpegtsparse.c
	gst/mpegtsdemux/tsdemux.c
	gst/mpegtsdemux/tsdemux.h
	gst/mxf/mxfdemux.c
	gst/rawparse/gstaudioparse.c
	gst/videoparsers/gsth263parse.c
	gst/videoparsers/gsth264parse.c
	sys/d3dvideosink/d3dvideosink.c
	sys/decklink/gstdecklinksink.cpp
	sys/dvb/gstdvbsrc.c
	sys/shm/gstshmsrc.c
	sys/vdpau/h264/gstvdph264dec.c
	sys/vdpau/mpeg/gstvdpmpegdec.c
	tests/examples/opencv/gst_element_print_properties.c
	win32/common/config.h
2012-03-29 17:41:53 +02:00
Oleksij Rempel (Alexey Fisher)
79a74089d4 wrappercamerabinsrc: avoid reseting caps to the same value
Reduces capture latency when the new caps are the same as the old
one, avoiding resetting the source state for a forced renegotiation.
2012-03-20 20:11:30 -03:00
Wim Taymans
bc9ebb2ff2 use new style caps 2012-03-05 12:03:23 +01:00
Wim Taymans
f08e247051 Merge branch 'master' into 0.11 2012-02-17 09:01:56 +01:00
Thiago Santos
39bad1d6ca wrappercamerabinsrc: Put source to null when resetting caps
It seems that v4l2src isn't happy when switching formats on ready
state, it works when putting it to NULL. Keep this workaround in
wrappercamerabinsrc while v4l2src isn't fixed.

Fixes #849832
2012-02-16 22:51:21 -03:00
Wim Taymans
2fca270f19 Merge branch 'master' into 0.11
Conflicts:
	gst/mpegtsdemux/mpegtsbase.c
	gst/mpegtsdemux/mpegtspacketizer.c
	gst/mpegtsdemux/tsdemux.c
	gst/mve/gstmvedemux.c
2012-02-16 14:33:20 +01:00
Thiago Santos
2ce709cf4a wrappercamerabinsrc: Put source in NULL when it fails changing state
When source is being reset to change caps, check the return of
the state syncing function to avoid leaving the source in an
unconsistent state.
2012-02-16 01:30:23 -03: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
Sebastian Dröge
2a255cca8b wrappercamerabinsrc: GstBaseCameraSrc is the base class, not GstBin 2012-01-09 08:40:48 +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
36fbb8eea4 basecamerabinsrc: remove redundant functions
gst_bin_get_by_interface should be enough for applications.
Haven't seen anyone using those other than wrappercamerabinsrc.
2011-12-22 16:17:56 -03:00
Thiago Santos
d9e13c4268 camerabin2: remove unused helper function
This drop_eos_probe function is not used anymore, remove it
2011-12-22 16:13:59 -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
Thiago Santos
88e3d82201 wrappercamerabinsrc: Push newsegments on video capture start
Pushing newsegments to inform muxers about the start time of the
video buffer timestamps.
2011-12-20 14:46:26 -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
9364d13c02 camerabin2: viewfinderbin: use faster cast macro
Use cast macro without type checks when we know it should work.
2011-11-28 18:48:52 -03:00
Thiago Santos
b5f97fd033 camerabin2: viewfinderbin: Link elements directly to use faster version
ffmpegcolorspace and videoscale should always link successfully, use
the fast pad linking version instead of calling the generic helper
function.
2011-11-28 18:48:52 -03:00
Thiago Santos
f6d47a4206 camerabin2: micro optimize linking some more 2011-11-28 18:48:51 -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
0a9387c43c Merge branch 'master' into 0.11
Conflicts:
	ext/opus/gstopusdec.c
	ext/opus/gstopusenc.c
	ext/opus/gstopusparse.c
	gst/audiovisualizers/gstwavescope.c
	gst/filter/Makefile.am
	gst/filter/gstfilter.c
	gst/filter/gstiir.c
	gst/playondemand/gstplayondemand.c
2011-11-23 11:08:39 +01: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
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
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
Wim Taymans
59b4bcd27e Merge branch 'master' into 0.11 2011-11-10 12:14:19 +01: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
Wim Taymans
dbdaa23742 Merge branch 'master' into 0.11
Conflicts:
	gst/colorspace/colorspace.c
2011-11-09 12:19:04 +01:00