Fabian Orccon
71c4355b1c
sys: shm: Define shm_enable and shm_deps before escape meson subdir
...
Fixes meson configure in tests if the shm plugin is disabled
Fixes #1664
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2534 >
2021-09-18 22:13:55 +00:00
Stéphane Cerveau
da9e012e8a
plugins-sys: allow per feature registration
...
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2116 >
2021-04-09 19:23:40 +00: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
Tim-Philipp Müller
f218ec2794
Remove autotools build system
2019-10-14 13:54:27 +01:00
Thibault Saunier
47a49f3381
docs: Build documentation with hotdoc
2019-05-13 17:00:00 -04:00
Thibault Saunier
7fe3f36ac8
Minor documentation fixes
2019-05-13 11:36:27 -04:00
Josep Torra
498dc9a84d
shmsrc: delay fd removal until there's no uses
...
This fixes the remaining race condition with the fd by delaying
the removal until last pipe ref.
Unexpected critical/warning: gst_poll_fd_has_error: assertion 'fd->fd
>= 0' failed
Stack trace:
gst_debug_get_stack_trace (gstinfo.c:2788)
gst_check_log_critical_func (gstcheck.c:281)
g_logv (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2:0x7fdd4efa0a40)
g_log (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2:0x7fdd4efa0c6b)
gst_poll_fd_has_error (gstpoll.c:1217)
gst_shm_src_create (gstshmsrc.c:364)
gst_push_src_create (gstpushsrc.c:131)
gst_base_src_get_range (gstbasesrc.c:2521)
gst_base_src_loop (gstbasesrc.c:2845)
gst_task_func (gsttask.c:328)
default_func (gsttaskpool.c:69)
https://bugzilla.gnome.org/show_bug.cgi?id=797203
2018-10-10 13:42:05 -04:00
Josep Torra
eb1665ff22
shmsrc: fixes a crash when is-live is true due a race condition
...
There's a race condition when is-live is set to true and the shmsrc
element releases the pipe in the transition from PLAYING to PAUSED.
To avoid it this change ensures that _create method takes the pipe
and increases the use_count in one operation protected by object lock.
Also perform apropriate protections when releasing the pipe.
https://bugzilla.gnome.org/show_bug.cgi?id=797203
2018-10-10 13:42:05 -04:00
Olivier Crête
a3f395d921
shmsrc: Remove commented out code
2018-10-10 13:07:50 -04:00
Aleix Conchillo Flaqué
5078116889
shmsink: do not keep locking if element is unlocked
...
https://bugzilla.gnome.org/show_bug.cgi?id=797260
2018-10-10 12:02:44 -04:00
Nirbheek Chauhan
5177f7c7ee
meson: host_system is 'ios' when building for iOS
...
The cross file sets this value, and we use 'ios' in Cerbero.
2018-08-17 04:07:24 +05:30
Nirbheek Chauhan
2a452f2a5d
meson: Fix shm librt dep check on macOS, iOS, and *BSD
2018-08-15 19:34:56 +05:30
Nirbheek Chauhan
b55dfb5313
Add feature options for almost all plugins
...
The only plugins remaining are those that haven't been ported to Meson
yet, and msdk. Also, the tests are still automagic.
https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 19:04:38 +05:30
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
Sebastian Dröge
1b3b3677cc
shmsink: Fix compilation with latest GLib
...
g_object_ref() forwards its arguments type.
gstshmsink.c: In function ‘gst_shm_sink_allocator_alloc_locked’:
/usr/include/glib-2.0/gobject/gobject.h:512:32: error: passing argument 3 of ‘gst_memory_init’ from incompatible pointer type [-Werror=incompatible-pointer-types]
#define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj))
^
gstshmsink.c:292:45: note: in expansion of macro ‘g_object_ref’
gst_memory_init (memory, params->flags, g_object_ref (self), NULL,
^~~~~~~~~~~~
2018-03-20 16:16:19 +02:00
Olivier Crête
e19e02db93
shmsink: Block in preroll_wait on unlock
...
The correct behaviour of anything stuck in the ->render() function
between ->unlock() and ->unlock_stop() is to call
gst_base_sink_wait_preroll() and only return an error if this returns an
error, otherwise, it must continue where it left off!
https://bugzilla.gnome.org/show_bug.cgi?id=774950
2017-12-19 17:41:43 -05:00
Marcin Lewandowski
9a128603c9
smhsink: Check return values of functions working on memory
...
https://bugzilla.gnome.org/show_bug.cgi?id=768530
2017-12-19 17:32:19 -05:00
Alessandro Decina
6e3f493a96
meson: fix potentially undefined shm_deps variable
2017-07-20 18:52:19 +10:00
Nicolas Dufresne
eab6cd8d6d
meson: Enable shm unit test
2017-06-21 15:15:37 -04:00
Nicolas Dufresne
af338de2b8
meson: Enable building shm plugin
2017-06-21 13:45:04 -04:00
Nicolas Dufresne
809d313493
shmpipe: Should not use glib type without ifdef
...
The shmpipe should build without GLIB.
2017-06-21 13:42:31 -04:00
Sebastian Dröge
634cd87c76
gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
...
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:23 +03: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
Samuel Maroy
1e77971dff
shmsink: continue polling after EINTR
...
https://bugzilla.gnome.org/show_bug.cgi?id=779856
2017-03-10 15:51:11 -05:00
Sebastian Dröge
0102caf06d
shm: Change example pipelines to something that actually works
...
Enforce exactly the same raw video format on both sides, include a
videoconvert and queue before the video sink and make the shm area a
little bit bigger so that things don't get stuck.
2017-02-13 13:32:14 +02:00
Marcin Lewandowski
b2880cdd03
shmsrc: Do not call gst_poll_remove_fd upon stop if reading was never started
...
https://bugzilla.gnome.org/show_bug.cgi?id=768365
2016-07-04 12:52:29 +02: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
Matt Crane
eba01f84e5
shmsink: fix possible deadlock in _render()/ _allocator_free()
...
Drop object lock before unrefing memory, otherwise the object
lock might be taken again from the allocator and then things
deadlock.
https://bugzilla.gnome.org/show_bug.cgi?id=760551
2016-01-16 21:46:28 +00: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
Edward Hervey
af49c109e4
shmpipe: Ensure string received from recv() is NULL-terminated
...
We will be doing string operations on it later.
CID #1292830
2015-04-20 14:21:09 +02:00
Guillaume Emont
48880ea6c7
shmsink: add an shm-area-name property
...
The shm-area-property tells the name of the shm area used by the element. This
is useful for cases where shmsink is not able to clean up (calling
shm_unlink()), e.g. if it is in a sandbox.
https://bugzilla.gnome.org/show_bug.cgi?id=675134
2015-04-02 18:11:37 -04:00
Olivier Crête
db09922842
shmsink: Allocate enough memory to do alignment
...
https://bugzilla.gnome.org/show_bug.cgi?id=731093
2014-06-02 21:43:34 -04:00
Edward Hervey
b2e037b7de
shm: Don't leak GstShmPipe
...
By reordering the leaking code path to before the allocation
CID #1212153
2014-05-13 11:41:42 +02:00
Vincent Penquerc'h
5feeee62c8
shm: remove dead code
...
Coverity 1139683
2014-04-09 11:00:22 +01:00
Aleix Conchillo Flaqué
fd27bdf5f0
shm: call close() after shutdown()
...
shutdown() doesn't close the file descriptor so we leak sockets if we
don't call close().
https://bugzilla.gnome.org/show_bug.cgi?id=724077
2014-02-10 18:53:44 -05:00
Aleix Conchillo Flaqué
f5a1ccd0de
shm: use shutdown() instead of close()
...
we make sure both ends get notified when the socket is closed by using
shutdown() instead of close().
https://bugzilla.gnome.org/show_bug.cgi?id=724077
2014-02-10 18:03:18 -05:00
Olivier Crête
77b339bf5c
shmsink: Document that socket-path may change
2014-01-03 11:18:06 -05:00
Olivier Crête
93abc06ae8
shmsink: Change default shm size to 64 MiB
...
The original size of 256k was too small for anything where
one would want to use shm. If the buffer's size needs to be limit, it is
better to use buffer-time in most cases anyway.
2014-01-03 11:16:42 -05:00
Aleix Conchillo Flaque
44807dcc1a
shmsink: unref buffer if no clients are connected
...
If no client has received the command, unref the buffer. This will
make sure that the shared memory area does not get filled with buffers
no one knows about.
https://bugzilla.gnome.org/show_bug.cgi?id=702684
2013-06-19 18:36:19 -04:00
Aleix Conchillo Flaque
8b00e02f16
shmsink: propagate events to basesink class
...
https://bugzilla.gnome.org/show_bug.cgi?id=702597
2013-06-18 19:14:14 -04:00
Sebastian Dröge
e51cd4fe2f
gst: Add better support for static plugins
2013-04-15 15:59:22 +02:00
Olivier Crête
6e9ff0a160
shm: Make sure the zero-sized array is always last in the struct
...
https://bugzilla.gnome.org/show_bug.cgi?id=696681
2013-03-28 14:37:03 -04:00
Josep Torra
87e053386a
shmsink: Use correct print format specifiers to fix compiler warnings
2013-03-10 21:21:17 +01:00
Olivier Crête
48b9fa2c24
shmsink: Add custom allocator to allow for zero-copy shared memory use
2013-02-28 18:46:02 -05:00
Olivier Crête
df321edeaf
shm: Don't leak socket path
2013-02-28 18:13:44 -05:00
Blake Tregre
c175c6b3d0
shm: use O_CLOEXEC where appropriate in shmpipe
...
https://bugzilla.gnome.org/show_bug.cgi?id=684339
2013-02-28 12:35:45 -05:00
Olivier Crête
684811cddf
shmsink: Error out if memory area is smaller than buffer
2013-02-27 21:05:38 -05:00
Olivier Crête
7a77b41d6a
shm: Make sure to not allocate blocks larger than the shared mem area
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681359
2013-02-27 20:57:56 -05:00
Tim-Philipp Müller
68a34d2a60
shm: don't use deprecated threading API
2013-02-11 12:01:19 +00:00