Commit graph

290 commits

Author SHA1 Message Date
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