There may be two or more threads involved here however the important
interaction is the use of ogg->seeK_event_drop_till value that was only
set in the push-mode seek-event thread and could race with upstream
sending e.g. and EOS (or data).
Scenario is this:
1. oggdemux performs a seek to near the end of the file to try and find
the duration. ogg->push_state is set to PUSH_DURATION.
2. Seek is picked up by the dedicated seek event thread and sets
ogg->seek_event_drop_till to the seek event's seqnum.
3. Most operations are blocked or dropped waiting on the duration to
be determined and processing continues until a duration is found.
4. Two branching options for how this ultimately plays out
4a. The source is too fast and we receive an EOS event which is dropped
because ogg->push_state == PUSH_DURATION. In this case everything
works.
4b. We hit our 'almost at the end' check in
gst_ogg_pad_handle_push_mode_state() and attempt to seek back to the
beginning (or to a user-provided seek). This seek is marshalled to
the seek event thread without setting ogg->seek_event_drop_till but
with change ogg->push_state = PUSH_PLAYING. If an EOS event or
e.g. buffers arrive from upstream before the seek event thread has
picked up the seek event, then the EOS/data is processed as if it
came as a result of the seek event. This is the case that fails.
The fix is two-fold:
1. Preemptively set ogg->seek_event_drop_till when setting the seek
event so that data and other events can be dropped correctly.
2. In addition to dropping and EOS events while ogg->push_state ==
PUSH_DURATION, also drop any EOS events that are received before the
seek event has been processed by also tracking the seqnum of the seek.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1196>
below commit change the window resize thread and cause viv-fb backend
hang, need move resize code after window->open is called. Otherwise,
the resize message will send to a thread that not start running and
window resize call will waiting forever.
Commit: b887db1efe
glwindow: fix racy resize updates
Take locks around resize handling and marshall all resizes to the
windowing thread by default.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1195>
If GST_GL_WINDOW is unset but GST_GL_PLATFORM=egl, then we were choosing
to create an GstGLDisplayEGL directly instead of going through the any
more specific windowing system implementation (X11, Wayland).
The 'create an GstGLDisplayEGL when GST_GL_PLATFORM=egl' was a fallback
as we did not have entries for all EGL-using window systems previously.
Now that we do, the fallback can be removed. An EGLDisplay can still
be created by setting GST_GL_WINDOW=egl or as one option.
Fixup of https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1154
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1169>
While this was already possible through the GLContext machinary, this simply
request an alpha channel by default and fallback if this is not possible. This
obsolete some RPi Dispmanx hack, since this is near equivalent will allow see
through when playgin WebM Alpha or other transparent files.
Application are still free to pass their own EGLContext attribute, this is
specially for the case the application let GStreamer chose (e.g. gst-launch).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1176>
If the converter configuration is set to not fill any borders, or if the
border fill color is not full opaque, then the pad has to be handled
as potentially transparent and can't be considered to obscure another
one.
This prevents pads from being wrongly skipped and doing alpha-blending
with uninitialized memory.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1172>
AV12 is an internally conceived format that is actually the
combination of NV12 and an alpha plane.
This format is to add to gstreamer's webM transparency support for
vp8 and vp9. To this end, two I420 streams are independently decoded
simultaneously for the actual content and the alpha plane respectively
and these are then combined into A420.
This patch adds GL conversion support so that it is possible to convert
from AV12 to RGBA for the purposes of rendering it on a display.
The reverse conversion is also supplied.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1152>
AV12 is an internally conceived format that is actually
the combination of NV12 and an alpha plane.
This format is to add to gstreamer's webM
transparency support for vp8 and vp9. To this end, two
I420 streams are independently decoded simultaneously for
the actual content and the alpha plane respectively
and these are then combined into A420.
Since most hardware decoders output NV12, this patch adds
NV12+A to make the same workflow possible.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1152>
A420 is a four planar format similar to I420 but with an extra buffer
for alpha values.
A common use of the gl stack is for GPU format conversions using
shaders, in which case one can use glupload, glcolorconvert and
gldownload elements to upload their buffer to the GPU context, perform
the conversion on the GPU itself and then retrieve the data to CPU
context.
A420 was not supported. This patch adds said support mainly by adding
the corresponding shader to perform the conversion and updating the
supported caps.
Both A420->RGBA and RGBA->A420 conversions are supported.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1153>
The issue can be reproduced on a computer with a Radeon graphics card
when trying to force GStreamer Editing Services to use GL for video
mixing in GESSmartMixer, instead of the GstCompositor that smart mixer
would normally use. This change causes the resulting video stream to
have "video/x-raw(memory:GLMemory) ... texture-target: 2D" caps (instead
of "video/x-raw ..." caps). At the PlaySink stage of the pipeline, a
GstGLImageSinkBin is plugged, with a GstGLColorBalance on it. For some
reason that is still to be debugged (and out of the scope of this
patch), gst_gl_filter_set_caps() is never called on that color balance
element, leaving filter->in_texture_target set to its default
GST_GL_TEXTURE_TARGET_NONE value. The incomplete _create_shader() logic
does the rest and silently generates a shader code that doesn't build.
This is the command I use to reproduce the issue (I'm not sure if I
would be able to isolate the issue in a simple pipeline, though):
GST_PLUGIN_FEATURE_RANK=vaapih265enc:NONE,vaapih264enc:NONE,vaapisink:NONE,vaapidecodebin:NONE,vaapipostproc:NONE,vaapih265dec:NONE,vaapivc1dec:NONE,vaapih264dec:NONE,vaapimpeg2dec:NONE,vaapijpegdec:NONE,glvideomixer:260
ges-launch-1.0 +clip /tmp/video.mp4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1159>
While so far it worked, we are about to introduce a format that break this
assuming. We have a format which consist of NV12 with alpha, and this format
does not have a direct mapping of the component against their plane indexes.
Fix this by using gst_video_format_info_component() introduced in 1.18 for
this purpose.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1151>
e.g. if running a dual wgl/egl built library, then egl will always
succeed in creating the GstGLContext because almost anything could
support egl, as long as eglGetDisplay() works.
wgl, however has a check for the correct display type so should move
earlier in the tried list.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1154>
Improves throughput of the total convert and blend process and allows
for higher performance across slightly more threads.
Also make use of video aggregator's task pool for blending as well in
order to reduce the number of threads.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1129>