For providers that don't support dynamic probing, just fall back to doing
a static one on start() to make the UI developers life easier.
This also means that the monitor doesn't need to call _can_monitor() before
calling start.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/353>
In case a plugin filename was renamed with the plugin being in the registry cache
the features were not loaded after the rename:
1) Cache of old/gone filename was loaded, features added
2) New filename was loaded, features where not added because
they were already found in the registry.
3) In the end stale cache entries for files which are no longer there
are removed, including the wanted features.
4) The cache gets updated without the features.
Fix this by also checking at (2) that the found feature is from the loaded plugin
and not from some stale cache entry.
This affected directsoundsink where libgstdirectsoundsink.dll was renamed
to libgstdirectsound.dll, losing the directsoundsink element in the process.
Fixes#290
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/102>
Otherwise the proxy pad of the ghost pad still stays linked to some
element inside the bin, which is not allowed anymore according to the
topology.
In 2.0 this should be fixed more generically from inside GstGhostPad but
currently there is no way to get notified that the ghost pad is
unparented.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/553>
There is a race-condition that can trigger the assertion in
gst_bus_add_signal_watch_full():
If gst_bus_add_signal_watch_full() is called immediately after
gst_bus_remove_signal_watch() then bus->priv->signal_watch may still be set
because gst_bus_source_dispose() or gst_bus_source_finalize() was not yet
called.
This happens if the corresponding GMainContext has the source queued for
dispatch. In this case, the following dispatch will only unref and delete
the signal_watch because it was already destroyed. Any pending messages
will remain until a new watch is installed.
So bus->priv->signal_watch can be cleared immediately when the watch is
removed. This avoid the race condition.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/543>
Instead do everything it did as part of GObject::constructed() and
change the function to always return TRUE.
gst_ghost_pad_construct() was meant to be called by subclasses right
after construction of the object to finish construction as it can fail
in theory. In practice it's impossible for it to fail, even more so if
called directly from GObject::constructed(): The only failure condition
is if the newly created proxy pad already has a parent, which is
impossible at this point as nothing else can have a reference to it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/540>
Since glib 2.64, gthreadpool will start waiting on a GCond immediately upon
creation. This can cause issues if we fork *before* actually using the
threadpool since we will then be signalling that GCond ... from another process
and that will never work.
Instead, delay creationg of thread pools until the very first time we need
them. This introduces a minor (un-noticeable) delay when needing a new thread
but fixes the issues for all users of GSTreamer that will call gst_init, then
fork and actually start pipelines.
See https://gitlab.gnome.org/GNOME/glib/-/issues/2131 for more context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/531>
When compiling for 32bit ios arm, the static assert that the
GstClockEntryImpl smaller or equal to the struct _GstClockEntryImpl
triggered. (they were 12bytes off).
To fix this, the padding is increased by 12 bytes (on 32bit).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/525>
These can be passed to gst_type_mark_as_plugin_api, to inform
plugin cache generation.
For now a single flag is specified, "IGNORE_ENUM_MEMBERS", it
can be used for dynamically generated enums to avoid documenting
environment-specific enumeration members. An example is
GstX265EncTune.
This can be used to mark additional types exposed by plugins (i.e.
enums, flags and GObjects) via properties, signals or pad templates as
plugin API. They can then be picked up by the documentation for the
plugin.
Not all types exposed by plugins are documented automatically because
they might come from an external library and should be documented from
there instead.
Nowadays we are only waking up the head entry waiting if either the head
entry is unscheduled (which is handled some lines above already), or
when the head entry specifically is woken up because a new entry became
the new head entry.
We're not waking up *all* entries anymore whenever any entry in the last
was unscheduled.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/500>
We already have a mutex in each clock entry anyway and need to make use
of that mutex in most cases when the status changes. Removal of the
atomic operations and usage of the mutex instead simplifies the code
considerably.
The only downside is that unscheduling a clock entry might block for the
time it needs for the waiting thread to go from checking the status of
the entry to actually waiting, which is not a lot of code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/500>
Otherwise it can happen that unscheduling a clock id never takes place
and instead it is waiting until the normal timeout. This can happen if
the wait thread checks the status and sets it to busy, then the
unschedule thread sets it to unscheduled and signals the condition
variable, and then the waiting thread starts waiting. As condition
variables don't have a state (unlike Windows event objects), we have to
remember ourselves in a new boolean flag protected by the entry mutex
whether it is currently signalled, and reset this after waiting.
Previously this was not a problem because a file descriptor was written
to for waking up, and the token was left on the file descriptor until
the read from it for waiting.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/500>
This was effectively disabled in 1.0 with the intent of maybe re-enabling it.
The problem is that caching duration at a bin level doesn't make much sense
since there might be queueing/buffering taking place internally and therefore
the duration reported might have no correlation to what is actually being
outputted.
Remove commented code and fixmes, and update documentation
Fixes#4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/489>
We must not retry fclose() on EINTR as POSIX states:
After the call to fclose(), any use of stream results in undefined
behavior.
We ensure above with fflush() and fsync() that everything is written out
so chances of running into EINTR are very low. Nonetheless assume that
the file can't be safely renamed, we'll just try again on the next
opportunity.
CID #1462697
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/465>
...instead of a file descriptor so buffered I/O is used when writing
the binary cache. This boosts performance at startup, particularly on
network filesystems where writes may be quite slow.
Fixes gstreamer#545.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/458>
For value types that aren't subclassable, just check the type directly.
For flags, compare against the fundamental type directly instead of going through
the more expensive recursive check of `G_TYPE_CHECK_VALUE_TYPE()`
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/453>