Commit graph

351 commits

Author SHA1 Message Date
Matthew Waters
640a65bf96 gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2098>
2021-03-22 14:34:36 +11:00
Tim-Philipp Müller
510e8ef8cb docs: fix element names in section headers
Hopefully that'll make hotdoc pick up the docs for these elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1428>
2020-07-10 19:22:29 +00:00
Thibault Saunier
059e8ff44a docs: Document basecamerabinsrc 2020-06-23 13:02:57 -04:00
Mathieu Duponchelle
a048ce81d4 plugins: uddate gst_type_mark_as_plugin_api() calls 2020-06-06 00:40:42 +02:00
Sebastian Dröge
74f2f733be plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-04 13:33:16 -04:00
Niels De Graef
d8f61515d8 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-11-06 14:27:46 +00:00
Aaron Boxer
6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Tim-Philipp Müller
f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00
VaL Doroshchuk
daa47b8dc1 GstViewfinderBin: Fix typo in videoscale's name element
If user's video sink has been changed, it is unable to fetch
videoscale element by name and link to the video sink.
2019-09-16 08:24:42 +00:00
Mathieu Duponchelle
102b1346e7 doc: fix element section documentations
Element sections were not rendered anymore after the hotdoc
port, fixing this revealed a few incorrect links.
2019-05-25 16:58:13 +02:00
Thibault Saunier
47a49f3381 docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00
Xavier Claessens
83d0623293 Meson: Generate pc file for all plugins in bad
https://bugzilla.gnome.org/show_bug.cgi?id=794568
2018-04-25 11:08:09 +01:00
Nicolas Dufresne
4261692187 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00
Thibault Saunier
78022a6e0c docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Nicolas Dufresne
eb2dae8fd6 Rename plugin filesnames to match plugin names
- libgstgtksink.so -> libgstgtk.so
- libgstteletextdec.so -> libgstteletex.so
- libgstcamerabin2.so -> libgstcamerabin.so
- libgstonvif.so -> libgstrtponvif.so (meson only)
- sdp -> sdpelem (avoid clash with libgstsdp)
- gstsiren -> siren
- libgstkmssink.so -> libgstkms.so

https://bugzilla.gnome.org/show_bug.cgi?id=779344
2017-03-08 20:04:23 -05:00
Nirbheek Chauhan
42af2d66d8 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Matej Knopp <matej.knopp@gmail.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:35:54 +01:00
Tim-Philipp Müller
dae928f14c camerabin: update docs section 2016-07-08 14:42:18 +01:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Vineeth TM
7c42ba97d7 plugins-bad: Fix example pipelines
rename gst-launch --> gst-launch-1.0
replace old elements with new elements(ffmpegcolorspace -> videoconvert, ffenc_** -> avenc_**)
fix caps in examples

https://bugzilla.gnome.org/show_bug.cgi?id=759432
2015-12-15 10:30:49 +00:00
Anders Jonsson
3fb2222470 camerabin2: Fix string typo
https://bugzilla.gnome.org/show_bug.cgi?id=753241
2015-08-05 09:15:07 -04:00
Thiago Santos
f9f6bbf4f5 wrappercamerabinsrc: handle when source creation fail
Remember to set the source to NULL state as adding it to the pipeline
will set it to the READY state.
2015-05-01 19:45:00 -03:00
Thiago Santos
fc4f95bb7c wrappercamerabinsrc: fix element linking order
Video source should be linked to videocrop and not to
videoconvert as it is done in the main linking path
2015-05-01 19:44:40 -03:00
Thiago Santos
2690cd33ce wrappercamerabinsrc: remove unused code
The structure is created and never used anymore. Remove it.
2015-04-27 21:14:09 -03:00
Thiago Santos
5e0e02553d wrappercamerabinsrc: use digitalzoom element
Replace videocrop ! videoscale ! capsfilter with the digitalzoom
bin that has the same pipeline internally and already updates
the capsfilter automatically when caps change, removing this code
from wrappercamerabinsrc and making it cleaner.
2015-04-27 21:14:09 -03:00
Thiago Santos
ca96378ebf digitalzoom: change videocrop parameters before passing caps event
Avoids one extra uneeded renegotiation if the elements are already
configured to their final property values when the caps event
goes through.

Also avoids hitting bug https://bugzilla.gnome.org/show_bug.cgi?id=748344
2015-04-27 21:14:02 -03:00
Thiago Santos
239cb53e06 digitalzoom: also skip internal pipeline in upstream caps query
To avoid going through our capsfilter which would limit the choices.
2015-04-27 21:13:55 -03:00
Thiago Santos
539db6f68b digitalzoom: prevent assertion when caps is any 2015-04-27 21:13:55 -03:00
Thiago Santos
3a70cf5667 camerabin: digitalzoom: create a bin element for digital zooming
It contains videocrop ! videoscale ! capsfilter and implements digital
zooming.

At this moment, it is a private element of the camerabin plugin.

This will remove some code used in wrappercamerabinsrc to make
code clearer and digitalzoom can potentially be used by other
applications in the future, it has nothing camerabin specific.
2015-04-27 21:13:47 -03:00
Tim-Philipp Müller
699452ef31 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:59:32 +01:00
Thiago Santos
c6f4e4cfd8 wrappercamerabinsrc: Rework cropping for zoom and dimension reduction
wrappercamerabinsrc has a videocrop element to be used for
zooming and for cropping when input caps is different when used
with the GstPhotography interface. The zooming part needs
the following elements:

capsfilter ! videocrop ! videoscale ! capsfilter

The capsfilters should always have the same caps to ensure the
zooming is done and preserves dimensions, unless when it is needed
to do more cropping due to input dimensions those caps
need to be modified accordingly to preserve the output dimensions.

This, however, makes it hard to get caps negotiation to work properly
as we need to have different caps in the capsfilters to account for
the extra cropping needed. It could be simple for fixed caps but it
gets tricky with unfixed ones.

To solve this, this patch splits the zooming and dimension reduction
cropping into 2 separate videocrop elements. The first one does
the dimension cropping, which is only needed when the GstPhotography
API is used and the source provides a caps that is different than
what is requested, while the second is dedicated to zoom crop only.

The first part of the pipeline goes from:

src ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter

to

src ! videocrop ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter

It might add an extra overhead in the image capture as the image might need
to be cropped twice but this can be solved by enabling videocrop to use
crop metas so only the later one does the real cropping.

It also makes the code a bit simpler.
2015-04-24 15:12:47 -03:00
Thiago Santos
524e536a91 wrappercamerabinsrc: remove obsolete comment
This is already handled in another place and doesn't make sense
in the function context anymore
2015-04-24 15:12:47 -03:00
Thiago Santos
7b834cb0b3 wrappercamerabinsrc: error out if source fails to prepare for capture
Post an error when preparing the image capture through photography
interface fails
2015-04-24 15:12:46 -03:00
Thiago Santos
0c04f2f0ff wrappercamerabinsrc: intersect instead of compare for equality
Intersect is enough to check if the requested caps are compatible
with what the source is going to provide. Equality will be too strict.
2015-04-24 15:12:46 -03:00
Thiago Santos
af1dda2ecd wrappercamerabinsrc: fix typo 2015-04-24 15:12:46 -03:00
Thiago Santos
70193761b8 wrappercamerabinsrc: Reset zoom element caps to go to viewfinder mode
Avoids not-negotiated failures related to using image capture caps
still when adjusting to go back to viewfinder.
2015-04-21 10:00:44 -03:00
Thiago Santos
ef5b7ca93e wrappercamerabinsrc: fix leak of drain query
gst_pad_peer_query doesn't take ownership of the query object
2015-04-21 10:00:44 -03:00
Thiago Santos
b74770bd05 wrappercamerabinsrc: Refactor internal pipeline
Remove tee and output-selector and just link the source
pad to the outputs we want as needed.

The way we need to prioritize caps negotiation and allocation
queries depending on the mode enabled is too custom to be
handled using tee and output-selector.
This provides more flexibility and doesn't get in the way of proper
handling of negotiation and allocation queries.
2015-04-21 10:00:44 -03:00
Thiago Santos
5a1c73a105 wrappercamerabinsrc: remove unused attribute and related pad probe
The variable was never set to true and can be removed along
with the probe in which it used to act
2015-04-10 16:23:25 -03:00
Thiago Santos
187d4441eb camerabin: remove hack around bug 648359
It is already fixed
2015-03-14 18:29:28 +00:00
Thiago Santos
888414ed11 camerabin: remove deprecated g_atomic function
We depend on 2.32 already
2015-03-14 18:29:28 +00:00
Thiago Santos
5c20c2e211 wrappercamerabinsrc: fix pad leak
Only get the pad if it is really going to be used to avoid
leaking it
2015-03-14 18:29:28 +00:00
Mohammed Hassan
d49dbefd6c camerabin: update zoom param spec if video source changes its max-zoom
If the video source happens to allow max-zoom to be greater than our maximum hard coded
value of 10 then the user cannot set anything greater than our maximum specified in the
param spec. We have to update our param spec to prevent glib from capping the value

https://bugzilla.gnome.org/show_bug.cgi?id=745740
2015-03-08 16:00:49 -03:00
Oleksij Rempel
e8a3973b8f camerabin2: check negotiated caps avoid reseting of the pipe
To avoid useless renegotiation of the pipe we can check for
negotiated caps on src_filter and compare it with requested
filter. If the caps intersect, avoid restart.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>

https://bugzilla.gnome.org/show_bug.cgi?id=672610
2015-03-04 07:56:51 -03:00
Thiago Santos
04e2a38ae3 wrappercamerabinsrc: fix deadlock with pad object lock
The image capture mutex and the pad object lock would cause a race
if the pad query was made right when the image probe was running.

The image probe needs the capture mutex and the querying would need
the pad object lock.
2015-01-05 21:33:47 -03:00
Thiago Santos
42b510fd1b wrappercamerabinsrc: simplify weird if/else clause
It is not an if/else situation but an if error abort otherwise
just continue. Remove else to make it more readable
2015-01-05 17:59:08 -03:00
Thiago Santos
882018e6dd wrappercamerabinsrc: do not set source state with lock
It might be racy with the image probe thread as it uses the capture
mutex just like the start-capture handler from camerabin. The
start-capture would be waiting for the source's streaming thread
to stop to be able to set the source state to ready while the
probe would be blocked waiting to acquire the capture mutex.
It causes a deadlock.
2014-12-26 23:07:39 -03:00
Thiago Santos
6fa077f465 wrappercamerabinsrc: use the drain query instead of flush
The flush might clear any pending captures that are still in
queues being processed while the drain query will wait for those
to be properly done
2014-12-26 23:07:39 -03:00
Tim-Philipp Müller
95c211dc49 Add some missing G_END_DECLS 2014-10-28 21:42:31 +00:00
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