waylandsink: Remove dependency with dri2
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
waylandsink: Enable moving wayland video sink window
This patch enables moving wayland sink window
using touch or mouse pointer.
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
This patch enables moving wayland sink window
using touch or mouse pointer.
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
jpegparse: change caps/prio to be picked by decodebin2
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
kmssink: Increase num of held buffers to fix video tearing
Increased to 4 from 2.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Increased to 4 from 2.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
waylandsink: added missing dependencies
wayland: workaround for UV offset issue
Creating the framebuffer with padded height will render the
complete buffer and the color info will not get affected.
But the strides will appear on top and bottom of the frame.
This is a hack not a solution.
Creating the framebuffer with padded height will render the
complete buffer and the color info will not get affected.
But the strides will appear on top and bottom of the frame.
This is a hack not a solution.
wayland:drm interface changes according to wayland1.0 protocol
drm interface API is modified according to the wayland 1.0 protocol
and fixes the compilation issues
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
drm interface API is modified according to the wayland 1.0 protocol
and fixes the compilation issues
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
WIP: wayland: update to support drm/dri
This way we can directly share YUV buffers from decoder to compositor,
with no copy.
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
This way we can directly share YUV buffers from decoder to compositor,
with no copy.
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
configure: fix wayland check
Get rid of cruft we don't need, and make work properly
when wayland is installed in a non-standard prefix, by
not overriding WAYLAND_CFLAGS and WAYLAND_LIBS for no
reason.
https://bugzilla.gnome.org/show_bug.cgi?id=688407
Get rid of cruft we don't need, and make work properly
when wayland is installed in a non-standard prefix, by
not overriding WAYLAND_CFLAGS and WAYLAND_LIBS for no
reason.
https://bugzilla.gnome.org/show_bug.cgi?id=688407
waylandsink: Port to 1.0 protocol
- The globals are now notified through a wl_registry object
- Since surface state is double buffered in the compositor it is now necessary
to call wl_surface_commit to atomically update surface state
- Implement the ping/pong protocol which the compositor uses to check the
client is still alive
- SHM buffers are now allocated through a pool
- It is necessary to make the surface top level before the contents will be
presented by the compositor
- Adopt the new event handling - through wl_display_dispatch
- Update the configure check to look for Wayland 1.0
https://bugzilla.gnome.org/show_bug.cgi?id=688407
- The globals are now notified through a wl_registry object
- Since surface state is double buffered in the compositor it is now necessary
to call wl_surface_commit to atomically update surface state
- Implement the ping/pong protocol which the compositor uses to check the
client is still alive
- SHM buffers are now allocated through a pool
- It is necessary to make the surface top level before the contents will be
presented by the compositor
- Adopt the new event handling - through wl_display_dispatch
- Update the configure check to look for Wayland 1.0
https://bugzilla.gnome.org/show_bug.cgi?id=688407
waylandsink: fail gracefully with an error message if we can't connect to wayland
g_return_val_if_fail() is not for error handling, it's for
catching programming errors in public API.
Fixes problem with generic/states unit test.
Conflicts:
ext/wayland/gstwaylandsink.c
g_return_val_if_fail() is not for error handling, it's for
catching programming errors in public API.
Fixes problem with generic/states unit test.
Conflicts:
ext/wayland/gstwaylandsink.c
Revert "WIP: wayland: update to support drm/dri"
This reverts commit 97a2321f6ca06d31152e29eebefb8a3a46d386e0.
This reverts commit 97a2321f6ca06d31152e29eebefb8a3a46d386e0.
Revert "waylandsink: added missing dependencies"
This reverts commit 862e361582d7844f8926d9b3b5169fdbeeecc220.
This reverts commit 862e361582d7844f8926d9b3b5169fdbeeecc220.
kmssink: header file alignment with latest libdce release
libdce header file name changed from dce.h to libdce.h in the
latest release and this patch is to change the dce.h to libdce.h
in the c files incuded it.
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
libdce header file name changed from dce.h to libdce.h in the
latest release and this patch is to change the dce.h to libdce.h
in the c files incuded it.
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
DEBIAN: Removed delivery of gstwaylandsink.so
DEBIAN: removed wayland compilation
DEBIAN: debianization
vp8dec: set rank to NONE, ffdec_vp8 is preferred
vp8dec is a fair bit slower than ffdec_vp8, so ensure vp8dec is only
used when specifically requested.
vp8dec is a fair bit slower than ffdec_vp8, so ensure vp8dec is only
used when specifically requested.
dri2videosink: fix performance issue with software decoders
When I420 is selected, we allocate a normal memory buffer as
bo memory is uncached, and will be slower than normal memory.
The buffer is copied to bo memory when displayed.
This fixes slow VP8 video.
When I420 is selected, we allocate a normal memory buffer as
bo memory is uncached, and will be slower than normal memory.
The buffer is copied to bo memory when displayed.
This fixes slow VP8 video.
waylandsink: added missing dependencies
pvrvideosink: link explicitly with DRI2 library
pvrvideosink: fix rendering of sources with a non-nultiple-of-32 stride
This multiple of 32 stride is a limitation of the lower layer, so we
have to copy the input when this is not what we get.
This multiple of 32 stride is a limitation of the lower layer, so we
have to copy the input when this is not what we get.
h264parse: disable passthrough when we might see B frames
Passthrough mode will bypass parsing of poc values, which the
decoder may need in order to perform frame reordering.
In the 1.0 port, this will all be removed as reordering will be
pushed back into the decoder, with no need for poc parsing here.
Passthrough mode will bypass parsing of poc values, which the
decoder may need in order to perform frame reordering.
In the 1.0 port, this will all be removed as reordering will be
pushed back into the decoder, with no need for poc parsing here.
omxcamerabinsrc: use the modes we know are working
The "video" modes are meant for a higher resolution video stream,
while the "preview" mode is for what is actually implemented in
omx_camera. Modes 0 and 3 are the modes that I've been testing
most of the time, and they're known to (kinda) work, so best not
to have more test surface than necessary.
The "video" modes are meant for a higher resolution video stream,
while the "preview" mode is for what is actually implemented in
omx_camera. Modes 0 and 3 are the modes that I've been testing
most of the time, and they're known to (kinda) work, so best not
to have more test surface than necessary.
kmssink: fix bo leak
This was the root cause of the remaining issue with the device
failing to be opened as master after being closed.
This was the root cause of the remaining issue with the device
failing to be opened as master after being closed.
dri2videosink: Added GST_PERFORMANCE traces, in order to measure latencies
h264parse: fix AU chunking for interlaced streams
It was sending SEI chunks alone on a test stream, confusing
a decoder which expected AU alignment.
It was sending SEI chunks alone on a test stream, confusing
a decoder which expected AU alignment.
h264parse: simulate passthrough mode when it is scheduled
When we are meant to be in passthrough mode, but are waiting till
we know the video resolution before setting passthrough mode,
send all data as we received it to simulate passthrough mode,
so our not-quite-passthrough setup is as unobtrusive as possible.
When we are meant to be in passthrough mode, but are waiting till
we know the video resolution before setting passthrough mode,
send all data as we received it to simulate passthrough mode,
so our not-quite-passthrough setup is as unobtrusive as possible.
h264parse: use num-reorder-frames from caps if not found in stream
The stream information is optional, and since ducatih264enc now
sets this on the caps, use it in case it's not in the stream.
The stream information is optional, and since ducatih264enc now
sets this on the caps, use it in case it's not in the stream.
kmssink: mark connector-name property as non-construct
This avoids it being called with "" at start.
This avoids it being called with "" at start.
kmssink: allow specifying a connector with a type based name
Allowed are type, type-index, and typeindex (eg, DVI-A, DVI-A-1,
DVI-A1, etc). Indices are 1 based to match what xrandr says.
Allowed are type, type-index, and typeindex (eg, DVI-A, DVI-A-1,
DVI-A1, etc). Indices are 1 based to match what xrandr says.
pvrvideosink: remove -strided caps remnants, and allow up to 2048 height
Using a height higher than 1080 would cause -strided caps to be used,
and this could happen for 1080 high video with padding.
Using a height higher than 1080 would cause -strided caps to be used,
and this could happen for 1080 high video with padding.
h264parser: make poc ordering cross IDR boundaries
poc is local to IDR boundaries, but if we want to reorder frames
based on it, we need it global as a B frame with presentation
timestamp before an IDR frame may be encoded after it.
poc is local to IDR boundaries, but if we want to reorder frames
based on it, we need it global as a B frame with presentation
timestamp before an IDR frame may be encoded after it.
pvrvideosink: lock writes to render_rect
kmssink: make automatic connector selection the default
kmssink: allow automatic selection of connector
As valid connector values are 1-7, allow 0 for automatic selection.
Also make the property unsigned while we're here.
As valid connector values are 1-7, allow 0 for automatic selection.
Also make the property unsigned while we're here.
kmssink: do not unref a NULL buffer on error
There are error paths where the buffer may not have been set yet.
There are error paths where the buffer may not have been set yet.
pvrvideosink: call _got_window_handle after creating a window
The X overlay interface semantics call for this.
The X overlay interface semantics call for this.
dri2videosink: call _got_window_handle when creating a window
The X overlay interface semantics call for this.
The X overlay interface semantics call for this.
h264parser: fix poc value resetting on IDR pictures
For reasons which are unclear, but may well boil down to
"an IDR slice isn't the same as an IDR picture", the
idr_pic_flag isn't set iff the slice type is IDR. Since
the poc decoding algorithm in the H264 spec does different
things depending on whether the current picture is IDR or
not, replacing the slice type test with the idr_pic_flag
test fixes poc based reordering on at least one sample,
without breaking another. All the samples (admittedly not
many of them) I have now seem to reorder correctly.
For reasons which are unclear, but may well boil down to
"an IDR slice isn't the same as an IDR picture", the
idr_pic_flag isn't set iff the slice type is IDR. Since
the poc decoding algorithm in the H264 spec does different
things depending on whether the current picture is IDR or
not, replacing the slice type test with the idr_pic_flag
test fixes poc based reordering on at least one sample,
without breaking another. All the samples (admittedly not
many of them) I have now seem to reorder correctly.
codecparsers: use the new start code scanner where appropriate
mpeg4parser: speed up scan for start codes
While some may be suspicious of the call to memchr, GCC is
expected to have an intrinsic definition for it, which should
see it turned into a set of asm opcodes tailored for the task.
While some may be suspicious of the call to memchr, GCC is
expected to have an intrinsic definition for it, which should
see it turned into a set of asm opcodes tailored for the task.
kmssink: remove GstVideoContext implementation
We now rely one libdce to provide the fd, so all elements that will
make use dce will share the same fd through libdce, no need of the
VideoContext use.
Moreover, in our case the VideoContext was not actually working as if we
implemented it in, for example ducatividdec, we ended up having the issues unsolved
when using playbin2 as the dec and the sink are not linked at the time their
states are set to PAUSED, and the user would be in charge of setting the fd,
which is far from being optimal.
We now rely one libdce to provide the fd, so all elements that will
make use dce will share the same fd through libdce, no need of the
VideoContext use.
Moreover, in our case the VideoContext was not actually working as if we
implemented it in, for example ducatividdec, we ended up having the issues unsolved
when using playbin2 as the dec and the sink are not linked at the time their
states are set to PAUSED, and the user would be in charge of setting the fd,
which is far from being optimal.
kms: Use dce to get device instead of doing it ourself
This way we do not need to bother about using the GstVideoContext as
we share the fd through libdce.
This way we do not need to bother about using the GstVideoContext as
we share the fd through libdce.
kmssink: wind down the drm machinery on reset
kmssink: fix leak
kmssink: make fb_id the right type the DRM API expects
kmssink: do not free mode, we do not own it
dri2videosink: pipe through gst-indent
dri2videosink: heed to map/unmap events
When the window is minimized, we want to stop displaying the
video.
When the window is minimized, we want to stop displaying the
video.
h264parse: add num-reorder-frames to the caps, if present
This value is the number of frames that we need to buffer
when doing manual frame reordering, so downstream needs to
know about it.
This value is the number of frames that we need to buffer
when doing manual frame reordering, so downstream needs to
know about it.
h264parser: fix poc memory of past reference frame
We need to remember these values for possible later use.
This fixes reordering on some samples.
We need to remember these values for possible later use.
This fixes reordering on some samples.
h264parser: rename variables from spec naming to gst naming
While it's easier to use if the variables are named after what
they are called in the spec, it doesn't match what GStreamer
code uses, so change it to match this, and add a comment at
the declaration sites to give the corresponding spec naming.
While it's easier to use if the variables are named after what
they are called in the spec, it doesn't match what GStreamer
code uses, so change it to match this, and add a comment at
the declaration sites to give the corresponding spec naming.
dri2videosink: fix locking bug
Do not unlock a mutex we did not lock. Call sites do take and
release the lock in the first place.
Do not unlock a mutex we did not lock. Call sites do take and
release the lock in the first place.
WIP: wayland: update to support drm/dri
This way we can directly share YUV buffers from decoder to compositor,
with no copy.
This way we can directly share YUV buffers from decoder to compositor,
with no copy.
wayland: compile against older wayland
waylandsink: Fix warnings, proper structuring, dead code removal, adding doc section.
waylandsink: Fix in shell_surface_set_fullscreen
waylandsink: More fixes -- update to Wayland 0.85 protocol -- Added shell surface -- Added format query for shm format -- Create the window based on width and height of video extracted from upstream caps.
Update with new APIs in wayland-client.
More Fixes: * Adding buffer_alloc * perform buffer_damage before surface_attach * Fix typo, Remove Dead code etc.
Initial Commit: Adding Wayland Video Sink
dri2videosink: fix caps leak
h264parse: attach picture order count to buffers
They go in OFFSET_END for now, which isn't ideal.
They go in OFFSET_END for now, which isn't ideal.
h264parser: add poc calculation
Only for type 0 at the moment, which is what the sample I have
uses.
Only for type 0 at the moment, which is what the sample I have
uses.
dri2videosink: fix cropping with software decoders
Normal elements send a crop event, but ducati has another
per-buffer system to attach a crop rectangle. When a buffer
has no crop rectangle, but we received a crop event, use
the crop event data instead.
This fixes borders being wrongly displayed with software
decoders.
Normal elements send a crop event, but ducati has another
per-buffer system to attach a crop rectangle. When a buffer
has no crop rectangle, but we received a crop event, use
the crop event data instead.
This fixes borders being wrongly displayed with software
decoders.
h264parse: do not send PPS and SPS alone in byte-stream mode
They could be sent alone for interlaced streams, which would
confuse the ducati decoder which expects more data after them.
They could be sent alone for interlaced streams, which would
confuse the ducati decoder which expects more data after them.
dri2videosink, pvrvideosink: Accept height up to 2048 pixels
This is what hw actually limits to.
This is what hw actually limits to.
pvrvideosink: Limit size to 1080p as it is a hardware limitation
dri2videosink: Limit size to 2k as it is the maximum size the hardware handles
dri2videosink: Limit size to 1080p as it is a hardware limitation
h264parse: do not use VUI values if they were not found in the stream
drm: do not dereference a NULL pointer
If omap_bo_new fails, return NULL early.
If omap_bo_new fails, return NULL early.
drm: do not dereference a NULL pointer
If omap_bo_new fails, return NULL early.
If omap_bo_new fails, return NULL early.
drm: add a signal for notifying when a buffer is returned to the pool
Add a pkg-config file for the drm lib
drm and dri: Enhance debug messages
dri2 and drm: Pass through gst-indent
drmbufferpool: fix dmabuf leak
As the comment in gst_drm_buffer_initialize says, gst_buffer_set_dma_buf
does not take ownership of the passed dmabuf, so unref it when done.
As the comment in gst_drm_buffer_initialize says, gst_buffer_set_dma_buf
does not take ownership of the passed dmabuf, so unref it when done.
codecparsers: mpeg4: do not expect a marker bit where not specified
Fixes #672447.
Fixes #672447.
dri2videosink: fix a crash on resizing the window
dri2videosink: deinterlaced interlaced input
This might miss some cases (single memcpy and non memcpy), but this
takes care of the sample I have.
This might miss some cases (single memcpy and non memcpy), but this
takes care of the sample I have.
dri2videosink: DRI2 stride has a pixel constraint, not a byte one
The hardware wants the stride to be a multiple of 32 pixels, not 32
bytes, so packed formats with 2 bytes per pixel will need aligning
to 64 bytes, not 32, to match 32 pixels.
The hardware wants the stride to be a multiple of 32 pixels, not 32
bytes, so packed formats with 2 bytes per pixel will need aligning
to 64 bytes, not 32, to match 32 pixels.
dri2videosink: fix window/video width confusion
Also since we copy more than one plane at once when possible,
avoid double copies if libgstvideo allows us to do so.
Also since we copy more than one plane at once when possible,
avoid double copies if libgstvideo allows us to do so.
dri2videosink: copy correct number of bytes for interlaved foramts
The width of a component is expressed in pixels, and not bytes,
so we need to multiply by the pixel stride to get the width in bytes.
The width of a component is expressed in pixels, and not bytes,
so we need to multiply by the pixel stride to get the width in bytes.
dri2videosink: copy buffers which do not match strides dri2 needs
dri2videosink: bump rank to PRIMARY + 1
To match the preferred usage priority.
To match the preferred usage priority.
kmssink: bump rank to PRIMARY + 1
To match the preferred usage priority.
To match the preferred usage priority.
dri2videosink: destroy context only whe window is destroyed
This avoids using the X lock after it was destroyed, as buffers
may be destroyed later, and need to use the context.
This avoids using the X lock after it was destroyed, as buffers
may be destroyed later, and need to use the context.
h264parse: add num-ref-frames in caps
This is the number of reference frames needed for reordering frames
by presentation time.
This is the number of reference frames needed for reordering frames
by presentation time.
h264parse: delay setting passthrough mode when waiting to known resolution
This makes a difference on a particular interlaced clip, which looks very
wrong with this patch, and looked even wronger without.
This makes a difference on a particular interlaced clip, which looks very
wrong with this patch, and looked even wronger without.
dri2: link libgstdrm in-tree
kms: add missing backslash in lib list
kmssink: link to our in-tree libgstbasevideo
h264parse: do not use a buffer after it was unreffed
In some cases, the frame buffer may be replaced by a new buffer,
making the local cache invalid.
In some cases, the frame buffer may be replaced by a new buffer,
making the local cache invalid.
h264parse: split interlaced fields in separate packets
ducatih264dec requires such fields to be in separate AUs.
ducatih264dec requires such fields to be in separate AUs.
Revert "h264parse: disable some optimizations with AVC input"
I now have a fix for the bundling of interlaced NAL units in a
single AU that was tripping ducatih264dec, so we can revert this
stopgap and go back to the faster parsing.
This reverts commit 37257ba09895d567c06e44e1f5c58cb54851fb38.
I now have a fix for the bundling of interlaced NAL units in a
single AU that was tripping ducatih264dec, so we can revert this
stopgap and go back to the faster parsing.
This reverts commit 37257ba09895d567c06e44e1f5c58cb54851fb38.
pvrvideosink: fix unwanted scaling on cropped videos
When a video with crop rectangle was used, the window was created with
the uncropped size, and kept that way after the crop event was received,
leading to a slight scaling of the video (and likely slight aspect ratio
change as well).
This is fixed by resizing the window to the cropped size when it changes.
When a video with crop rectangle was used, the window was created with
the uncropped size, and kept that way after the crop event was received,
leading to a slight scaling of the video (and likely slight aspect ratio
change as well).
This is fixed by resizing the window to the cropped size when it changes.
h264parse: wait to get resolution before pushing buffers
ducatih264dec wants resolution in caps, so we have to wait for it
to become known before pushing the first buffer, so it includes caps
with the resolution.
This fixes prerolling on the disney-sample.mpg test file.
ducatih264dec wants resolution in caps, so we have to wait for it
to become known before pushing the first buffer, so it includes caps
with the resolution.
This fixes prerolling on the disney-sample.mpg test file.
drmbufferpool: give this code a separate debug category
and add a couple logs while we're at it
and add a couple logs while we're at it