Commit graph

3365 commits

Author SHA1 Message Date
Seungha Yang
373580c7be msdk: Fix invalid return type build warning
void function cannot have return value

gst-plugins-bad/sys/msdk/gstmsdkbufferpool.c(332): warning C4098:
'gst_msdk_buffer_pool_release_buffer': ...
2018-12-25 16:14:36 +09:00
Sebastian Dröge
c47fac42cd decklinkvideosink: Fix support for raw CEA608 input and add support for raw CEA708 input
The former was only considering the first byte pair, for the latter we
have to convert raw CEA708 cc_data into CDP.
2018-12-19 00:20:26 +02:00
Xavier Claessens
f49da047dc Fix build when we have tinyalsa but not its header 2018-12-18 21:08:10 +00:00
Nicolas Dufresne
5b372a9707 kmssink: Accept underscore in property
Otherwise sdi_mode and similar properties would be canonicalised to
sdi-mode.
2018-12-18 16:36:57 +01:00
Guillaume Desmottes
cbff147f71 kmssink: fix tmp_kmsmem leaks
configure_mode_setting() keeps a ref on tmp_kmsmem which is released in
gst_kms_sink_show_frame().
But if for some reason configure_mode_setting() is re-called before
showing a frame or if none is showed this memory was leaked.
2018-12-18 15:44:23 +01:00
Tim-Philipp Müller
6ca10c633d Remove acmmp3dec and acmenc plugins
ACM is an ancient legacy API, and there's no point in
keeping it around for a licensed mp3 decoder now that
mp3 patents have expired and we have a decoder in -good.

We didn't ship this in cerbero anyway. If there's a good
case for the AAC encoder (which is LC only anyway) someone
should write a new plugin based on current APIs, that can
actually be built out of the box.

Fixes #850
2018-12-18 10:06:59 +00:00
Tim-Philipp Müller
f102c61397 meson: build vdpau plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
97cc93d621 meson: build tinyalsa plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
807227cef2 meson: build vcdsrc plugin 2018-12-17 09:12:53 +00:00
Sebastian Dröge
48f48cc4ba closedcaption: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A
As a side-effect we can now actually store the line offset in the
line21dec element, and have to perform fewer transformations in the
decklink elements (which were also buggy as they assumed a single byte
triplet per meta).
2018-12-15 21:31:28 +00:00
Justin Kim
18c8557836 sys: applemedia: meson: Add dependencies by using appleframeworks
gst-build#13
2018-12-14 12:22:51 +09:00
Matthew Waters
0842187e6e nvdec: Rely on upstream's value for interlace-mode with hevc
The nvdec API doesn't seem to produce interlacing information with hevc
streams so rely on upstreams value for interlace-mode
2018-12-12 21:21:57 +00:00
Haihao Xiang
88586b4149 msdk: change the wait time for encoder and vpp
In MSDK samples, the wait time for encoder, decoder and vpp is
300000. Let's set the wait time to the same value in msdk plugin
2018-12-12 17:24:00 +00:00
Haihao Xiang
51dc388783 msdk: correct the error message
It is VPP session instead of Encoder session
2018-12-12 17:24:00 +00:00
Haihao Xiang
718b7d0b5d msdk: check the created context against NULL pointer
gst_msdk_context_new_with_parent() may return NULL
2018-12-12 17:24:00 +00:00
Haihao Xiang
801189c02f msdk: decrease the reference count of object
Otherwise there are reference leaks if failed to clone or join a
mfx session
2018-12-12 17:24:00 +00:00
Haihao Xiang
43e5eaeda1 msdk: assign the returned value to status variable
Othervise the subsequent check will use the stale value of status
variable
2018-12-12 17:24:00 +00:00
Xiang, Haihao
9a9e01a1a5 msdkh265enc: output main-10 bitstream if the input is P010_10LE
Tested on KBL using the following command:
gst-launch-1.0 videotestsrc num_buffers=100 ! video/x-raw,format=P010_10LE ! \
msdkh265enc ! filesink location=a.hevc

This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/829
2018-12-12 09:00:13 +00:00
Xiang, Haihao
9711a21008 msdkh265enc: add P010_10LE to the sink pad template 2018-12-12 09:00:13 +00:00
Xiang, Haihao
ba1f162401 msdkh265enc: re-add the sink pad template
We will add more profiles in the sink caps of msdkh265enc, so let
msdkh265enc re-add the sink pad template. Note this change doesn't
impact any capability
2018-12-12 09:00:13 +00:00
Xiang, Haihao
f45d5dc8bc msdkenc: handle P010_10LE input format
Note it is up to each codec to support P010_10LE format
2018-12-12 09:00:13 +00:00
Xiang, Haihao
506835a484 msdkenc: use macro GST_VIDEO_INFO_FORMAT if possible 2018-12-12 09:00:13 +00:00
Matthew Waters
59c5ae2817 decklink: calculate the decklink output time from the internal clock
Fixes the time calculations when dealing with a slaved clock (as
will occur with more than one decklink video sink), when performing
flushing seeks causing stalls in the output timeline, pausing.

Tighten up the calculations by relying solely on the internal time
(from the internal clock) for determining when to schedule display
frames instead attempting to track pause lengths from the external
clock and converting to internal time.  This results in a much easier
offset calculation for choosing the output time and ensures that the
clock is always advancing when we need it to.

This is fixup to the 'monotonically increasing output timestamps' goal
in: bf849e9a69
2018-12-12 13:29:32 +11:00
Matthew Waters
b907187ade androidmedia: also install java sources
As needed by our ndk-build integration
2018-12-07 07:46:27 +00:00
Naveen Cherukuri
936f89a0d5 kmssink: Avoiding get_property to take ownership of object members
Double free will happen if application frees string retuned by _get_property
2018-12-04 12:23:48 +01:00
Xiang, Haihao
0e7e425bb9 msdk: add missing breaks 2018-12-03 07:09:56 +00:00
Xiang, Haihao
a1aae3fd92 msdk: fix the wrong operator
The condition is for video memory only, so the operator should be
& instead of |
2018-12-03 07:09:56 +00:00
Tim-Philipp Müller
2b8659a3ef meson: build opencv and ipcpipeline examples
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/576
2018-11-29 12:29:50 +00:00
Jordan Petridis
1f562870ee Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 14:18:26 +00:00
Xiang, Haihao
b0d22f8cb4 msdk: remove unnecessary assignment
CodecProfile will be set in MFXVideoDECODE_DecodeHeader() to match
the input stream. Setting the hard-coded profile here will mislead
user that msdkh265dec supports a special profile only.
2018-11-26 16:47:17 +00:00
Xiang, Haihao
b38f8d301c msdk: update the sink and src caps of msdkh265dec
Now hevc 10bit video can be decoded correctly, so update the sink
and src caps accordingly.

This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/720
2018-11-26 16:47:17 +00:00
Xiang, Haihao
2b0923842a msdk: set right BitDepth and Shift for P010 mfx frame
BitDepth is 10 and Shitf must be set to 1 when creating P010 mfx
frame in MSDK
2018-11-26 16:47:17 +00:00
Xiang, Haihao
fda4918cc8 msdk: don't use hard-coded video format
Some codecs may support varied formats, e.g. HEVC may support NV12
and P010_10LE etc
2018-11-26 16:47:17 +00:00
Xiang, Haihao
27ab7fb40f msdk: adjust the RT format for P010 surface
According to VA API, VA_RT_FORMAT_YUV420_10 is expected for P010
surface
2018-11-26 16:47:17 +00:00
Xiang, Haihao
eeb58f64c2 msdk: create VA_FOURCC_P010 surface from dmabuf 2018-11-26 16:47:17 +00:00
Xiang, Haihao
7d58424611 msdk: VA_FOURCC_P010 frame lock
P010 and NV12 have the same layout, so we may reuse the code in
gst_msdk_frame_lock()
2018-11-26 16:47:17 +00:00
Xiang, Haihao
f72c825194 msdk: map MFX_FOURCC_P010 to VA_FOURCC_P010 2018-11-26 16:47:17 +00:00
Xiang, Haihao
dc070a8306 msdk: make sure the surface data is set for GST_VIDEO_FORMAT_P010_10LE
P010_10LE and NV12 have the same layout, so we may reuse the code.
2018-11-26 16:47:17 +00:00
Haihao Xiang
54451b7303 msdk: map GST_VIDEO_FORMAT_P010_10LE to MFX_FOURCC_P010 2018-11-26 16:47:17 +00:00
Xiang, Haihao
1d97a6f00e msdk: add an assert in gst_msdk_frame_lock() for unhandled formats
We will add support for more formats, e.g. P010, Adding an assert
here may catch the error early
2018-11-26 16:47:17 +00:00
Haihao Xiang
1c0160513b msdk: use separate src caps for msdkh265dec
We will add more formats in the src caps of msdkh265dec, so let
msdkh265dec uses separate src caps. Note it doesn't change any
capability
2018-11-26 16:47:17 +00:00
Xiang, Haihao
1bfd1b2bf9 msdk: Make sure a variable is initialized when it is used
Previously alloc_info is initialized when both thiz->initialized
and thiz->allocation_caps are true, but only thiz->initialized is
checked when alloc_info is used.
2018-11-26 16:13:44 +00:00
Xiang, Haihao
38cf42f90f msdk: Close fd handle
Otherwise it will result in resource leak if mem == NULL
2018-11-26 16:13:44 +00:00
Matthew Waters
d67d866eb9 decklink: fixup internal time tracking over buffering pauses
Instead of relying on buffers after a state change to PLAYING to always start
from 0, track the amount of time we have spent outside playing but not changed
state to PAUSED.
2018-11-26 17:57:45 +11:00
Seungha Yang
d2e87e6a31 meson: Fix Windows CUDA dependency check
Python returns 'None' string for unknown environment
2018-11-26 11:31:06 +09:00
Seungha Yang
d3a6eb7977 nvh265enc: Fix email address typo 2018-11-25 23:31:37 +00:00
Seungha Yang
c75907d23c nvenc: Fix undefined reference build error on MSVC and CUDA 9.1 2018-11-25 23:31:37 +00:00
Seungha Yang
3cd1d0c7bc nvenc: Fix MSVC build error C2121 2018-11-25 23:31:37 +00:00
Seungha Yang
6bf5ba993d nvenc: Add meson build with Windows support
Note that, since Nvidia does not provide nvEncodeAPI.lib file,
find_library() couldn't be used for build on Windows.
This patch changes to load nvEncodeAPI(64).dll or libnvidia-encode.so
in runtime
2018-11-25 23:31:37 +00:00
Seungha Yang
6051c47bfe nvdec: Add meson build with Windows support 2018-11-25 23:31:37 +00:00
Seungha Yang
4e314d6f80 nvdec: Drop dynlink interface and use NVIDIA CODEC SDK instead
dynlink_* was introduced since CUDA Toolkit 9.x but it's deprecated from 10.0.
Instead of using #ifdef hack, shipping nvidia headers of NVIDA CODEC SDK
can make build/code simple
2018-11-25 23:31:37 +00:00
Seungha Yang
67a84254ae nvdec/nvenc: Shipping NVIDA Codec SDK headers
Add cuvidec.h, nvcuvid.h and nvEncodeAPI.h of NVIDIA Codec SDK 8.2.16
2018-11-25 23:31:37 +00:00
Víctor Manuel Jáquez Leal
09dbe83e5d msdk: don't declare headers in meson
This partially reverts commit 0bae648353.

The compiler tells ninja the header dependency, then there is
no need to add them explicity.
2018-11-23 17:10:24 +01:00
Víctor Manuel Jáquez Leal
0bae648353 msdk: declare headers in meson 2018-11-23 13:50:20 +01:00
Wangfei
409d4ff30e msdkdec: move output-order out of decode bass class.
Since output-order is a deprecated attribute, move it out of decode
bass class and configure it in each sub decoder class who need it.

https://bugzilla.gnome.org/show_bug.cgi?id=796853
2018-11-23 12:26:40 +00:00
Víctor Manuel Jáquez Leal
eaa1bd93e8 msdk: add support for open sourced MediaSDK
MediaSDK has been released as open source [1], but the directories
where it installs its files, are different from the binary only
distribution.

This patch adds to the libraries path the directory /lib. Also it
is defined in meson if the include directory has the mfx/ prefix,
something that is already handled in autotools.

1. https://github.com/Intel-Media-SDK/MediaSDK
2018-11-22 17:31:58 +01:00
Seungha Yang
b44d2702ca meson: Fix invalid keyword warning
"required" keyword is not a valid argument for has_header()

WARNING: Passed invalid keyword argument "required".
WARNING: This will become a hard error in the future.
2018-11-13 09:02:21 +00:00
Sebastian Dröge
1d0d395b5c decklinkvideosink: Cast result of bitwise-or of multiple enum values to the enum again
In C++ the bitwise-or results in an int, and ints are not implicitely
cast to enums.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/25#note_78122
2018-11-13 10:02:57 +02:00
Nirbheek Chauhan
09f814a00a d3dvideosink: Remove unused variable
Fixes a compiler warning.
2018-11-13 09:55:56 +05:30
Sebastian Dröge
96490b83a4 decklinkvideosink: Add support for outputting closed captions 2018-11-12 14:10:03 +00:00
Jochen Henneberg
15fc39c296 avdtputil: Remove dead code
These function are not used at all, using them together with the
transport-volume property from avdtpsrc may end up in a binding loop so
we better remove the functions.
2018-11-12 08:00:26 +00:00
Jochen Henneberg
bac0e14eae avdtpsrc: Fix transport-volume write
If properties are proxied through GBinding this can work only if the
proxied property keeps it's own value. The previous implementation will
read the original value if the proxied property signals a change and
thus nothing will happen.
2018-11-12 08:00:26 +00:00
Joshua M. Doe
5b179991bc dshowsrcwrapper: add implementation of GstDeviceMonitor
Right now this only works for video. An attempt was made at adding
monitoring following the example winks, but it seems the only devices that
can be easily detected are KS sources, which winks already handles.
2018-11-09 09:52:40 +00:00
Joshua M. Doe
912ff02a21 dshowsrcwrapper: refactor device selection, filter creation, and caps retrieval
This allows a future GstDeviceProvider to more easily query devices and caps.
2018-11-09 09:52:40 +00:00
Joshua M. Doe
e70af38d4e dshowsrcwrapper: add get_property implementation to sources 2018-11-09 09:52:40 +00:00
Joshua M. Doe
8f7641bf3c dshowvideosrc: handle empty strings for device and device-name
The device and device-name properties should treat NULL and empty strings the same
2018-11-09 09:52:40 +00:00
Joshua M. Doe
73a84148d3 dshowvideosrc: delay selecting device until source is started
The previous behaviour had issues when setting one of the device properties
after _get_caps had been called. The device shouldn't be locked in until after
_start has been called.
2018-11-09 09:52:40 +00:00
Joshua M. Doe
4b4535b35c dshowvideosrc: fix template caps to reflect actual supported caps 2018-11-09 09:52:40 +00:00
Joshua M. Doe
659e5d08ac dshowsrcwrapper: add some helpful debug statements 2018-11-09 09:52:40 +00:00
Joshua M. Doe
1449411e39 ksvideosrc: initialize pointer to satisfy MSVC 2018-11-08 15:42:51 +00:00
Joshua M. Doe
ca90ecef9c ksvideosrc: support 'Y16 ' FOURCC as GRAY16_LE
The FLIR Boson USB provides 16-bit grayscale video using this FOURCC.
2018-11-08 15:42:51 +00:00
Joshua M. Doe
6c53d696dd ksvideosrc: gracefully handle device prop when empty string 2018-11-08 15:42:51 +00:00
Sebastian Dröge
2d0243fc68 decklinkvideosrc: Search from line 1 again if we didn't find closed captions at the same line as before 2018-11-07 16:07:25 +00:00
Jordan Petridis
1e887f9b12
meson: avoid unkown variables in the msdk tests 2018-11-06 23:48:58 +02:00
admin
8af8fd62dd decklinkvideosink: fix segfault when audiosink is closed before videosink 2018-11-06 17:19:16 +00:00
Florent Thiéry
23b0172ee9 msdk: fix intel sdk libdir path
the 2018.3.1 intel sdk release places libraries into /lib64 instead of
/lib/lin_x64 or /lib/x64, this commit adds /lib64 to the libdir
locations list

Fixes #815
2018-11-06 13:08:45 +00:00
Seungha Yang
f4dc780168 d3dvideosink: Fix calculating buffer size of packed format
The Pitch (i.e., stride) of D3DLOCKED_RECT structure is already
respecting required stride value.
2018-11-06 11:51:39 +00:00
Seungha Yang
6c6d351665 d3dvideosink: Set actual buffer size to buffer pool
If configured size of buffer pool and actual buffer size are mismatched,
pool will do unwanted buffer resize.

Fixes #801
2018-11-06 11:51:39 +00:00
Seungha Yang
dee5201392 d3dvideosink: Use lock/cond to wait internal window construction
We can save one (or possibly more) sleep time by using lock/cond
2018-11-06 11:51:39 +00:00
Seungha Yang
b3279c3fce d3dvideosink: Don't leak GThread object
Need to call g_thread_join() to avoid leak
2018-11-06 11:51:39 +00:00
Seungha Yang
c9b204ea87 d3dvideosink: Print lock/unlock log with trace debug level 2018-11-06 11:51:39 +00:00
Seungha Yang
2a3207bfc1 d3dvideosink: Remove white space 2018-11-06 11:51:39 +00:00
Matthew Waters
dff857463a applemedia: install plugin pkg-config file 2018-11-06 14:35:46 +11:00
Joshua M. Doe
1a360a1c65 decklinkvideosrc: respect pixel format property even if mode is set to auto
Before this patch, if mode=auto and video-format!=auto, video-format would
always be ignored, and get set to 8bit-yuv, or if detected to be RGB444, then
it would be set to 8bit-argb. This change respects video-format if it is set
to 10bit-yuv (v210) or 8bit-bgra, even when mode=auto.

Closes #772
2018-11-05 08:52:11 -05:00
Sebastian Dröge
3d8a0b8996 decklinkvideosrc: Add support for extracing CEA608 according to S334-1 Annex A
https://bugzilla.gnome.org/show_bug.cgi?id=797363
2018-11-01 19:21:47 +02:00
Nirbheek Chauhan
55134df54c meson: Add a feature option for the MSDK plugin 2018-10-28 14:54:52 +00:00
Joshua M. Doe
6c7ba14247 dshowsrcwrapper: add device-index property to sources
This allows users to more easily select different devices without having
to first get the device or device-name.

https://bugzilla.gnome.org/show_bug.cgi?id=797338
2018-10-27 21:58:30 +01:00
Joshua M. Doe
5caefc1e0c dshowsrcwrapper: update CMake build instructions
GStreamer 1.8 is minimum version, and remove paragraph about 32 vs 64-bit build

https://bugzilla.gnome.org/show_bug.cgi?id=797338
2018-10-27 21:58:30 +01:00
Joshua M. Doe
a6d193bb1e dshowsrcwrapper: support building 32- and 64-bit with CMake
https://bugzilla.gnome.org/show_bug.cgi?id=797338
2018-10-27 21:58:30 +01:00
Joshua M. Doe
1569264d1e dshowsrcwrapper: add debug category for general dshowsrcwrapper
https://bugzilla.gnome.org/show_bug.cgi?id=797338
2018-10-27 21:58:30 +01: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
Seungha Yang
f106a10994 msdk: Fix building on MSVC
And add missing #ifdef _WIN32 for MSVC build

https://bugzilla.gnome.org/show_bug.cgi?id=797211
2018-10-02 04:04:24 +05:30
Seungha Yang
44ecf53d1c msdk: Fix meson build
gst-plugins-bad\sys\msdk\meson.build:57:4: ERROR:  File msdk-enum.c does not exist.

https://bugzilla.gnome.org/show_bug.cgi?id=797211
2018-10-02 04:04:24 +05:30
Matthew Waters
17f0271aa0 decklinkvideosink: fix build
../sys/decklink/gstdecklinkvideosink.cpp:1006:11: error: ‘GstDecklinkVideoSink {aka struct _GstDecklinkVideoSink}’ has no member named ‘scheduled_stop_time’
     self->scheduled_stop_time = start_time;
           ^
2018-09-12 22:38:56 +10:00
Matthew Waters
946cbbccc1 decklink: wait for stop with a timeout
Decklink sometimes does not notify us through the callback that it has
stopped scheduled playback either because it was uncleanly shutdown
without an explicit stop or for unknown other reasons.

Wait on the cond for a short amount of time before checking if scheduled
playback has stopped without notification.

https://bugzilla.gnome.org/show_bug.cgi?id=797130
2018-09-12 21:17:13 +10:00
Matthew Waters
bf849e9a69 decklink: start scheduled playback in paused
This is part of a much larger goal to always keep the frames we schedule to
decklink be always increasing.  This also allows us to avoid using both the
sync and async frame display functions which aren't recomended to be used
together.

If the output timestatmsp is not always increasing decklink seems to hold
onto the latest frame and may cause a flash in the output if the played
sequence has a framerate less than the video output.

Scenario is play for N seconds, pause, flushing seek to some other position,
play again.  Each of the play sequences would normally start at 0 with
the decklink time.  As a result, the latest frame from the previous sequence
is kept alive waiting for it's timestamp to pass before either dropping
(if a subsequent frame in the new sequence overrides it) or displayed
causing the out of place frame to be displayed.

This is also supported by the debug logs from the decklink video sink
element where a ScheduledFrameCompleted() callback would not occur for
the frame until the above had happened.

It was timing related as to whether the frame was displayed based
on the decklink refresh cycle (which seems to be 16ms here),
when the frame was scheduled by the sink and the difference between
the 'time since vblank' of the two play requests (and thus start times
of scheduled playback).

https://bugzilla.gnome.org/show_bug.cgi?id=797130
2018-09-12 21:16:27 +10:00
Matthew Waters
87077d20de decklinkaudiosink: fix debug string copy-paste error
Stopping != Starting
2018-09-12 20:37:47 +10:00
Nirbheek Chauhan
f62b7fd712 wasapi: Remove code that sets thread priority
This is now handled directly in gstaudiosrc/sink, and we were setting
it in the wrong thread anyway. prepare() is not the same thread as
sink_write() or src_read().
2018-09-11 01:00:21 +05:30
Nirbheek Chauhan
0146ad219e meson: Fix applemedia dependencies on iOS
These were accidentally not being found because they were incorrectly
specified.
2018-09-01 21:48:54 +05:30
Matthew Waters
7dc7607475 androidmedia/meson: we also depend on gmodule and orc 2018-08-31 18:08:55 +10:00
Devarsh Thakkar
7d79378895 kmssink: Add "restore-crtc" property
This adds "restore-crtc" property using which one
can restore previous crtc mode.

By default it is enabled, if CRTC was already
active with a valid mode and kmssink set a new mode
on CRTC using force-modesetting.

This helps user restore previous crtc mode and get
the previous session back after running a kmssink
pipeline involving a force-modesetting.

For e.g. When running a kmssink pipeline on rpi
using force-modesetting on tty console, it was giving
a blank screen after pipeline, and now with help of restore-crtc
functionality, CRTC is set with previous crtc mode
previously active on tty console.

Edited-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

https://bugzilla.gnome.org/show_bug.cgi?id=797025
2018-08-29 14:17:51 -04:00
Nicolas Dufresne
531709e5bf kmssink: Document possible advance usage
This adds a mention about modetest command line tool and adds an example
on how to use the connector/plane-properties.

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 12:03:52 -04:00
Nicolas Dufresne
2f30287b5f kmssink: Escape DRM property names
This allow setting properties that contains spaces. The spaces are
replaced with '-'. As an example, one can set the connector proper
"scaling mode" with the following:

  ... ! kmssink connector-properties="s,scaling-mode=1"

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 12:03:52 -04:00
Nicolas Dufresne
63dca26fac kmssink: Add 'plane-properties' property
This is similar to 'connector-properties' but will change
selected plane properties instead.

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 11:57:39 -04:00
Nicolas Dufresne
203b41b510 kmssink: Generalize setting DRM object properties
https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 11:57:37 -04:00
Guillaume Desmottes
71ab97cba6 kmssink: add 'connector-properties' prop
Can be used to pass custom connector properties to DRM. Properties can
be enumerated using modetest tool. These properties can then be applied
with the following gst-launch-1.0 syntax. Note that the name of the
structure is ignored.

  ... ! kmssink connector-properties="s,props1=value,props2=value"

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 11:55:19 -04:00
Nirbheek Chauhan
4af7637012 meson: Add build files for androidmedia and opensles
Note that androidmedia requires Android gstgl
2018-08-29 14:58:19 +05:30
Vivia Nikolaidou
4ca76e0c12 decklink: Only use drop-frame flag for 29.97 and 59.94 FPS
Otherwise it can cause errors in gstvideotimecode.c because drop-frame
is not defined for any other frame rate (e.g. 24000/101)

https://blog.frame.io/2017/07/17/timecode-and-frame-rates/

https://bugzilla.gnome.org/show_bug.cgi?id=797037
2018-08-28 15:23:48 +03:00
Philipp Zabel
62a194c781 kmssink: configure mode setting from video info
drmModeGetFB returns -EINVAL for multi-planar framebuffers. Instead of
depending on the framebuffer dimensions to select the mode, use width
and height from GstVideoInfo, which was used to create the framebuffer
in the first place.  This enables kmssink to display multi-planar
formats such as I420 or NV12 with modesetting enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=796985
2018-08-21 11:49:55 -04:00
Jerome Laheurte
203d1825c5 ksvideosrc: fix device enumeration when hotplugging a camera
Since both audio and video capture devices declare the KSCATEGORY_CAPTURE interface,
plugging a camera that supports both could result in an audio device being mistaken
for a video one.

https://bugzilla.gnome.org/show_bug.cgi?id=796958
2018-08-19 16:58:22 -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
a93bb626c9 meson: Add an option for the applemedia plugin 2018-08-14 19:48:28 +05:30
Nirbheek Chauhan
10fcddedc2 wasapi: Fix build with Windows 8.1 SDK
With the Windows 8.1 SDK, the v1 of the AUDCLNT_STREAMOPTIONS enum is
defined which only has NONE and RAW, so it's not only defined when
AudioClient3 is available.

Add a meson check for the symbol. This is not needed for Autotools
because there we build against the MinGW audioclient.h which is still
at v1 of the AudioClient interface.
2018-08-08 01:03:53 +05:30
Alessandro Decina
c9226e6e80 meson: enable applemedia 2018-08-03 12:51:28 +10:00
Nirbheek Chauhan
fa03f81c64 wasapisrc: Correctly disable provide-clock
`#ifdef` will, of course, evaluate to 1 in this case. We want `#if`.
2018-08-02 18:27:46 +05:30
Christoph Reiter
5a1b37b1f3 wasapisink: fix regression in shared mode segment size
In commit fd806628a8 (839cc3926 in the stable branch) I changed the
segment size to match exactly the buffer size.  I missed that this is
only valid in exclusive mode and in shared mode the buffer size is
a multiple of the device period.

Revert the logic for the shared mode.

https://bugzilla.gnome.org/show_bug.cgi?id=796354

https://bugzilla.gnome.org/show_bug.cgi?id=796858
2018-08-02 17:00:03 +05:30
Nirbheek Chauhan
60542ec970 meson: Add option for winks plugin
This was accidentally missed.
2018-08-01 03:44:07 +05:30
Nicolas Dufresne
638677cca6 meson: Generate bluez.h instead of bluez-interface.h
This is a recent regression, the meson code was ported to use the meson
gnome module helpers, but the generated file was changed to
bluez-interface.h.
2018-07-27 22:17:56 -04:00
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
Gary Bisson
9a34dd8c2a kmssink: Add support for mxsfb-drm driver
The mxsfb-drm driver has been added to the kernel long ago and will now
be the default display driver for NXP i.MX28, i.MX6SX and i.MX7D
processors so now is a good time to add it to kmssink.

Also, this is used in the upcoming i.MX8MQ and i.MX8MM processors.

https://bugzilla.gnome.org/show_bug.cgi?id=796873
2018-07-25 07:53:45 -04:00
Matthew Waters
a9b40eebc0 decklink: keep the internal time we send to decklink always increasing
Otherwise decklink seems to hold onto the latest frame and may cause a
flash in the output if the played sequence has a framerate less than the
video output.

Scenario is play for N seconds, pause, flushing seek to some other position,
play again.  Each of the play sequences would normally start at 0 with
the decklink time.  As a result, the latest frame from the previous sequence
is kept alive waiting for it's timestamp to pass before either dropping
(if a subsequent frame in the new sequence overrides it) or displayed
causing the out of place frame to be displayed.

This is also supported by the debug logs from the decklink video sink
element where a ScheduledFrameCompleted() callback would not occur for
the frame until the above had happened.

It was timing related as to whether the frame was displayed based
on the decklink refresh cycle (which seems to be 16ms here),
when the frame was scheduled by the sink and the difference between
the 'time since vblank' of the two play requests (and thus start times
of scheduled playback).
2018-07-10 21:22:04 +10:00
Arun Raghavan
c43e74d885 bluez: Expose transport volume as a property on avdtpsrc
This can be handy if we want to track Bluetooth volume changes from the
device, or if we want to set it.

https://bugzilla.gnome.org/show_bug.cgi?id=787020
2018-07-09 06:40:24 +05:30
Sreerenj Balachandran
dd981d4953 msdkdec: Fix latency calculation
Use async_depth for latency calcuation instead of
the length of Tasks array which could be NULL since we
don't do the msdk decoder init in set_format().
2018-07-03 18:38:04 -08:00
Sreerenj Balachandran
84c33be0c0 msdk: Set 16 bit alignment for width
According to MediaSDK specification,
Width must be a multiple of 16 and Height must be a multiple
of 16 for progressive frame sequence and a multiple of 32 otherwise.

This patch sets a 16 bit alignment for width and 32 bit alignment
for height as default.

https://bugzilla.gnome.org/show_bug.cgi?id=796566
2018-07-02 16:50:46 -08:00
Sreerenj Balachandran
d63a1b4e3f msdkdec: avoid early destruction of frame in dynamic resolution change
In cases where we do hard resest, the current code destroys the frame
which has new resolution bit early and this causes buffer_unmap
warnings. Keep an extra ref to the frame internally to avoid this.
2018-07-02 16:50:02 -08:00
Sreerenj Balachandran
1250af8f09 msdkdec: vc1: Fix handling of advanced profile elementary stream
Advanced profile elementary streams may not have codec_data
always. So make sure we don't do anything with null buffer.
2018-07-02 16:49:23 -08:00
Sreerenj Balachandran
ad6162e99b msdkdec: Fix advanced profile vc1 decode when codec_data presents
The gst-msdk decoders only support packetized formats for
all codecs except VC1. For VC1, it supports codec_data for advanced
profiles and this codec_data wan't submitting to MSDK's DecodeHeader APIs.
Make sure the subclass deocders correctly configured so that
the codec_data buffers are in place in the internal adapter for
MediaSDK's DecoderHeader usage.
2018-07-02 16:48:11 -08:00
Sreerenj Balachandran
9efb4c9179 msdkdec: Fix the PTS of output frames
Currently we use the gst_video_decoder_get_oldest_frame()
to get the old pending frame to output. But this is not correct
if pts re-ordering required. This patch uses a custom made
get_old_frame() which accounts the PTS too similar to the
v4l2decoder.

https://bugzilla.gnome.org/show_bug.cgi?id=796699
2018-07-02 16:42:20 -08:00
Sreerenj Balachandran
5c88da4a4c msdkdec: Remove dead code
We are not using any ExtendedParams for decoding.
2018-07-02 16:41:58 -08:00
Sreerenj Balachandran
1e95c03c7d msdk: dec: Add dynamic-configuration change support
The patch adds a serios of changes to support dynamic resolution
change and efficient utilization of resources.
Major changes:

-- Use MSDK's apis to retrieve the headers instead of only relying
on upsteram notification. For eg: avc decoder requires SEI header
information for dpb count calculation which we don't get from caps.

-- For all codecs other than VP9, we force the reset of decoder
if resoultion changes to fit with gstreamer flow. VP9 enfource
the hard reset only if the new resolution is bigger.

-- delay the src caps setting till msdk api's invokation in
handle_frame to avoid caching multiple configuration values

-- ensure pool negotiation is based on decoder's allocation_caps.

--dynamic resoluttion change use an explicit allocation_query
to reclaim the buffers before closing the decoder (thanks to v4l2dec)

--In case if we don't get upstream notification of res change (for eg,
this can can happen for vp9 frames with ivfheader where ivfparse
is not able to notify the dynamic changes), we handle the the case
based on MFX_ERR_INCOMPATIBLE_VIDEO_PARAM which is the return value
of MFXVideoDECODE_DecodeFrameAsync

-- calculate the minimum surfaces to be preallocated based on
msdk suggestion, downstream requirement, async depth and scratch surface
count for smooth display.

https://bugzilla.gnome.org/show_bug.cgi?id=796566
2018-07-02 16:17:49 -08:00
Tim-Philipp Müller
22b885fd02 winks: Update for g_type_class_add_private() deprecation in recent GLib
Untested
2018-06-24 12:27:09 +02:00
Tim-Philipp Müller
65c5b9a4f6 msdk: Update for g_type_class_add_private() deprecation in recent GLib
Untested.
2018-06-24 12:22:27 +02:00
Tim-Philipp Müller
a992a3b48b uvch264src: get rid of unnecessary private struct 2018-06-24 00:07:59 +02:00
Nirbheek Chauhan
dd3e7325b0 decklink: Fix warning about HRESULT not being unsigned int 2018-06-20 11:38:17 +05:30
Jan Schmidt
39365948ff androidmedia: Invert the transform matrix from the decoder
The transform from mediacodec applies to the texture coords, but
GStreamer affine meta applies to the video geometry, which is the
opposite - so invert it to get display correct for decoders
that require transforming
2018-06-15 05:01:20 +10:00
Wang,Fei
10f57b73f3 msdk: vpp: remove mfxExtVPPDoUse from vpp filters.
According to msdk spec, there are two ways to enable filters:
1: Filters can be enabled by adding a filter ID
to mfxExtVPPDoUse. In this case, default filter parameters are used
2: Add filter configuration structures directly to mfxVideoParam.

Using 1 with 2 is optional but legal. Unfortunately it won't work
with some specific use cases like Detail/EdgeEnhancement.
Let's stick with option2 which works fine for all VPP operations.

https://bugzilla.gnome.org/show_bug.cgi?id=796468
2018-06-07 15:31:54 -08:00
Sreerenj Balachandran
c4809aa16c msdk: vpp: set passthrough from set_caps method for code clarity
Call passthrough setting method from set_caps so that
msdk initialize subroutine looks more clear.
2018-06-07 15:30:23 -08:00
Sreerenj Balachandran
665f4a140f mskd: vpp: error out gracefully instead of segfaulting if Init failed
Since we do the MSDK initializing in set_caps(), a FALSE
return may still cause the invokation of set_caps() again
and this will leads to buffer allocation and other mess-up.
So make sure the msdk initialized correctly before trying
to do any buffer allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=796465
2018-06-07 15:29:29 -08:00
Sreerenj Balachandran
6cd12cb6a1 msdk: vpp: Add filters to VideoParm before doing the Query
Make sure all the enabled filter structures are added in the
mfxVideoParm before doing the VPPQuery so that msdk
can do the input param validation

https://bugzilla.gnome.org/show_bug.cgi?id=796465
2018-06-07 15:28:44 -08:00
Edward Hervey
30644c4063 vdpau: Run gst-indent 2018-06-06 07:50:21 +02:00
Sreerenj Balachandran
8c7a457669 msdk: vpp: fix the filter count in mfxExtVPPDoUse
Repostion the mfxExtVPPDoUse enabling code
so that it will get the filter algorithm count correctly.
2018-06-05 17:01:13 -08:00
Jan Schmidt
30e5cbcb42 dvb: Fix typo in comment termination 2018-06-01 17:07:19 +10:00
Alessandro Decina
948866a673 dvb: update my email address 2018-06-01 16:39:03 +10:00
Alessandro Decina
a8391ca2cd dvb: camconditionalaccess: fix wrong license headers
Update the license blurb in camconditionalaccess.[hc] from GPL to LGPL.
The plugin is LGPL and the GPL header in those two files was just a
copy/paste mistake.
2018-06-01 16:39:03 +10:00
Sreerenj Balachandran
3f2314a1a9 msdk: vpp: don't use NV12 as vpp default output for DMABuf usecase
Using NV12 layout in dmabuf mode giving mis-aligned
VPP output with the media-driver. Keep the NV12 support
(so that we can file the bug agianst msdk or mediadriver),
but lower the ordering so that BGRA picks as default.

NV12 issue can be reproduced with explicit capfilter:
vidoetestsrc ! msdkvpp ! video/x-raw\(memory:DMABuf\),format=NV12 ! glimagesink
2018-05-30 16:29:41 -08:00
Sreerenj Balachandran
57b9875260 msdk: enc: Add supprot for dmabuf-import
MediaSDK requires all the input buffers to be
pre-allocated during init phase and this won't work with
current design of GStreamer or gst-msdk. But this can be
done in future once we have a solution for:
https://bugzilla.gnome.org/show_bug.cgi?id=795747

There is a workaround possible as per
https://github.com/Intel-Media-SDK/MediaSDK/issues/155#issuecomment-381790504
by faking the mem-id during MFXInit.
This patch enabling it in gst-msdk by replacing the MemID of mfxSurface
with dmabuf-backed vasurface dynamically.

Important: v4l2 ! msdkenc won't work without a copy because
of the GMMLib (https://github.com/intel/gmmlib) memory restrictions.

https://bugzilla.gnome.org/show_bug.cgi?id=794817
2018-05-30 16:26:27 -08:00
Sreerenj Balachandran
a972d76784 msdk: vpp: Add supprot for dmabuf-import
MediaSDK requires all the input and output buffers to be
pre-allocated during init phase and this won't work with
current design of GStreamer or gst-msdk. But this can be
done with https://bugzilla.gnome.org/show_bug.cgi?id=795747

There is a workaround possible as per
https://github.com/Intel-Media-SDK/MediaSDK/issues/155#issuecomment-381790504
by faking the mem-id during MFXInit.
This patch do this in gst-msdk by replacing the MemID of mfxSurface
with dmabuf-backed vasurface dynamically.

Important: v4l2 ! msdkvpp won't work without a copy because
of the GMMLib (https://github.com/intel/gmmlib) memory restrictions.

https://bugzilla.gnome.org/show_bug.cgi?id=794817
2018-05-30 16:24:24 -08:00
Sreerenj Balachandran
a7b7939dd7 msdk: Add method to replace internal VASurface of mfxFrameSurface
Added a utility method to replace the MemID (interanl VASurfaceID)
associated with the mfxFrameSurface. This is usefull for dmabuf-import
where we need to replace the memID dynamically

https://bugzilla.gnome.org/show_bug.cgi?id=794817
2018-05-30 16:23:44 -08:00
Sreerenj Balachandran
62d2d8ebf9 msdk: Add method to export dmabuf to VASurface
Exporting DRM_PRIME fd to VASurface requires direct
invocation of VA api VACreateSurface with
VASurfaceAttribExternalBufferDescriptor and other
necessary surface attributes.

https://bugzilla.gnome.org/show_bug.cgi?id=794817
2018-05-30 16:22:49 -08:00
Christoph Reiter
3b1c7ef8e4 wasapisink: recover from low buffer levels in shared mode
In case the wasapi buffer levels got low in shared mode we would still wait until
more buffer is available until writing something in it, which means we could never
catch up and recover.

Instead only wait for a new buffer in case the existing one is full and always write
what we can. Also don't loop until all data is written since the base class can handle
that for us and under normal circumstances this doesn't happen anyway.

This only works in shared mode, as in exclusive mode we have to exactly
fill the buffer and always have to wait first.

This fixes noisy (buffer underrun) playback with the wasapisink under load.

https://bugzilla.gnome.org/show_bug.cgi?id=796354
2018-05-25 19:06:37 +05:30
Christoph Reiter
0aed64426b wasapisink: fix a rounding error when calculating the buffer frame count
The calculation for the frame count in the non-aligned case resulted in
a one too low buffer frame count.

This resulted in:
1) exclusive mode not working as the frame count has to match
   exactly there.
2) Buffer underruns in shared mode as the current write() code doesn't
   handle catching up to low buffer levels (fixed in the next commit)

To fix just use the wasapi API to get the buffer size which will always
be correct.

https://bugzilla.gnome.org/show_bug.cgi?id=796354
2018-05-25 19:06:16 +05:30
Christoph Reiter
ffb8476a38 wasapisink: fix missing unlock in case IAudioClient_Start fails
https://bugzilla.gnome.org/show_bug.cgi?id=796354
2018-05-25 19:05:57 +05:30
Christoph Reiter
2d98a5c1d7 wasapi: use FAILED to detect errors
S_FALSE is a valid return value which does not indicate an error.
For example IAudioClient_Stop() returns S_FALSE when it is already stopped.
Use the FAILED macro instead which just checks if an error occured or not.

This fixes spurious warnings when using the wasapisink element.

https://bugzilla.gnome.org/show_bug.cgi?id=796280
2018-05-23 13:24:00 +05:30
Christoph Reiter
adb1df3bc1 wasapi: Don't pass CoTaskMemFree to g_clear_pointer
CoTaskMemFree has a different calling convention than GDestroyNotify
and things crash at least with MinGW.

https://bugzilla.gnome.org/show_bug.cgi?id=796280
2018-05-23 13:24:00 +05:30
Edward Hervey
07a3bf0e8f dvb: Fix string copy wiht strlen() argument
This is a new warning introduced by gcc 8

We already check just before that we have enough space, just do a regular
memcpy with the full string size.

camswclient.c:87:3: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
2018-05-19 11:03:08 +02:00
Seungha Yang
535adfee37 nvenc: Fix build warning error
'cuDeviceComputeCapability' was deprecated as of CUDA 5.0

gstnvenc.c: In function ‘gst_nvenc_create_cuda_context’:
gstnvenc.c:290:9: error: ‘cuDeviceComputeCapability’ is deprecated [-Werror=deprecated-declarations]
         && cuDeviceComputeCapability (&maj, &min, cdev) == CUDA_SUCCESS) {
         ^

https://bugzilla.gnome.org/show_bug.cgi?id=796203
2018-05-18 10:43:39 +01:00
Sreerenj Balachandran
0bdcf51baf msdk: Add conditional build for vp9 decoder
https://bugzilla.gnome.org/show_bug.cgi?id=796119
2018-05-15 16:33:00 -08:00
Sreerenj Balachandran
955c927189 msdk: dec: Add VP9 decoder
https://bugzilla.gnome.org/show_bug.cgi?id=796119
2018-05-15 16:32:22 -08:00
Sreerenj Balachandran
dec0953517 msdk: allow building against open sourced msdk
Building against mfx_dispatcher is used to search for
headers in PREFIX/include/mfx/ only (commit: 62f04e801b),
but it is just PREFIX/include with open source msdk version.

https://bugzilla.gnome.org/show_bug.cgi?id=796118
2018-05-15 16:31:02 -08:00
Vivia Nikolaidou
31aafdbea5 decklink: Fix crash with closed-captions signal and 10-bit input
Only free the parser if there is one. If the format hadn't changed but
had always been 10-bit, there might genuinely be no parser.

https://bugzilla.gnome.org/show_bug.cgi?id=796030
2018-05-11 17:39:35 +03:00
Vivia Nikolaidou
752d2bb6e3 decklinkvideosrc: Don't check for closed captions when there's no signal
Otherwise the gst_decklink_video_format_from_type() call spams the logs
with one "Unknown pixel format 0x0" line per frame.
2018-05-11 16:42:08 +03:00
Sreerenj Balachandran
54482a54d8 msdk:dec: Add new propery to dump frames in decoded order
The new property "output-order" can be set to either "display" order
which is the default where frames will be outputting in display order,
or "decoded-order" which will be outputting the frames in decoded order.

The "decoded order" output is generally useful for debugging. But there
are few
customers who use it for low-latency streaming. For eg if the customer
already knows that the stream doesn't have b-frames (which means no
algorithm requires for display order calculation), then they can use
"decoded-order"
output to skip some of the DPB logic to avoid the frame accumulation at
start-up.

The root cause of the above issue is a bit of unclarity in h264 spec +
lazy implementation of many H264 encoders; This is well handled in
gstreamer-vaapi using "low-latency" property:
https://bugzilla.gnome.org/show_bug.cgi?id=762509

https://bugzilla.gnome.org/show_bug.cgi?id=795783
2018-05-07 14:12:10 -08:00
Sreerenj Balachandran
a372c05f06 msdk: dec: inform msdk if the buffer contains a complete frame
For packetized input, inform the msdk that the buffer has
a complete frame or complementary field pairs. For decoding,
this means that the decoder can proceed with this buffer without
waiting for the start of the next frame, which effectively reduces
decoding latency.

https://bugzilla.gnome.org/show_bug.cgi?id=795783
2018-05-07 14:11:34 -08:00
Sreerenj Balachandran
978bcf8aa6 msdk: dec: reset async depth to one
Currently we use an async depth of 4 as default (based on
recommendations
in msdk apps), which indicates how many asynchronous operations an
application performs
before the application explicitly synchronizes the result. As a result,
we
queue four frames in decoder which might not be good approach for
live streaming.

This patch reset the async-depth to 1 as default so that we do sync for
each frame we decode without queuing. Customer can play with already
exposed "async-depth" property for other use cases

https://bugzilla.gnome.org/show_bug.cgi?id=795783
2018-05-07 14:11:14 -08:00
Seungha Yang
3e5378163a nvdec: Add support VP8/VP9 decoding
NVIDIA video decoder supports VP8 and VP9 decoding

https://bugzilla.gnome.org/show_bug.cgi?id=795823
2018-05-05 18:13:00 +10:00
Sreerenj Balachandran
cb1eb650c6 msdk: enc: Add dmabuf-export support
Current implementation is only supporting dmabuf-export
through DMABufCapsfeatures.
MSDK dmabuf fds are not mappable and dmabuf-import
is not yet supported too (#794817).

https://bugzilla.gnome.org/show_bug.cgi?id=795707
2018-05-02 14:52:24 -08:00
Sreerenj Balachandran
e1a90f1ec9 msdkvpp: Disable passthrough if memory capsfeature changes
So far msdk produced dmabuf fds are non-mappable.
If user wants to download the content of underlined surfaces,
dmabufcapsfeature negotiated pipeline will fail. So if the input surface
is dmabuf and downstream doesn't have support for dmabuf capsfeatures,
we do the vpp (no passthrough) and produce the mappable videomemory
buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=794946
2018-04-30 12:40:32 -08:00
Sreerenj Balachandran
ef6e186801 msdk: vpp: Add dmabuf-export support
Currenly, the dmabuf buffer pool can be negotiated
only through DMABuf capsfeatures.
This will not allow to negotiate dmabuf support with
v4l2src (v4l2src ! msdkvpp) where v4l2src always export
the dmabuf based memory with out using the DMABuf capsfeatures.
So it requires fix based on:
https://bugzilla.gnome.org/show_bug.cgi?id=794817

https://bugzilla.gnome.org/show_bug.cgi?id=794946
2018-04-30 12:39:52 -08:00
Jan Schmidt
7cebaa4fb4 nvdec: Add colorimetry info to the caps
Output any colorimetry information extracted from the stream
into the caps.
2018-04-28 23:11:15 +10:00
Jan Schmidt
de1b0e3447 nvdec: Use gst_video_info_to_caps to build caps.
Don't build caps directly, as that won't add any GstVideoInfo
newer fields (such as colorimetry) automatically.
2018-04-27 16:10:12 +10:00
Nicolas Dufresne
673e7a74d5 kmssink: Add 24bit RGB support
https://bugzilla.gnome.org/show_bug.cgi?id=794186
2018-04-26 10:35:09 -04:00
Sreerenj Balachandran
76bbefe3b0 msdk: vpp: Add YV12, YUY2 and BGRx formats to template 2018-04-25 12:33:16 -08:00
Sreerenj Balachandran
96c6a04d7a msdk: Add more video format mapping
BGRx format can be supported with Msdk's RGB4
2018-04-25 12:33:08 -08:00
Sreerenj Balachandran
5184f85d77 msdk: vpp: Allocation query fixes
prpose_allocation:
-- always instantiate a pool for for upstream
-- use async_depth + 1 as min buffer count

decide_allocation:
-- always create a new bufferpool for source pad.
Each of the msdk element has to create it's own mfxsurfacepool
which is an msdk contraint. For eg: Each Msdk component (vpp, dec and
enc)
will invoke the external Frame allocator for video-memory usage
So sharing the pool between gst-msdk elements might not be a good idea.

https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-25 12:33:00 -08: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
Jan Schmidt
e496f398ec nvenc: Remove GST_USE_UNSTABLE_API defines
GstGL is no longer unstable API since moving to -base
2018-04-25 02:44:14 +10:00
Jan Schmidt
02c2b0b275 nvenc: Use the HAVE_NVENC_GST_GL define instead of HAVE_GST_GL
Fix compiling against the GL interop by gating includes
on the right header
2018-04-25 02:44:14 +10:00
Seungha Yang
3f318ecb96 nvh265enc: Add Nvidia GPU based HEVC encoder
https://bugzilla.gnome.org/show_bug.cgi?id=795037
2018-04-25 01:59:30 +10:00
Seungha Yang
5f95094f39 nvencbase: Define sinkpad template in subclass
https://bugzilla.gnome.org/show_bug.cgi?id=795037
2018-04-25 01:59:30 +10:00
Seungha Yang
6242dae832 nvenc: Add debug catagory for nvh264enc
https://bugzilla.gnome.org/show_bug.cgi?id=795037
2018-04-25 01:59:30 +10:00
Edward Hervey
44390d9d1d decklinkvideosrc: Add support for extracting Closed Caption
If the "output-cc" property is set to TRUE and there is CC present
in the VBI Ancillary Data, they will be extracted and set on the
outgoing buffer as GstVideoCaptionMeta.

Only CDP packets are supported.

https://bugzilla.gnome.org/show_bug.cgi?id=773863
2018-04-23 16:16:06 +02:00
Tim-Philipp Müller
79c13988e4 Fix code indentation 2018-04-22 18:27:37 +01:00
Tim-Philipp Müller
595392d187 dx9screenscapsrc: consolidate UNLOCK 2018-04-22 18:25:34 +01:00
Tim-Philipp Müller
5e372f71b6 meson: fbdev: fix 'invalid keyword argument' meson warnings
Required is not a valid kwarg for cc.has_header()
2018-04-20 11:46:07 +01:00
Devarsh Thakkar
d0575a0bd1 kmssink: Add new entry for Xilinx DRM Driver
This adds entry for new DRM driver from xilinx
called "xlnx" which supports atomic modesetting.

We have kept entry for older DRM driver "xilinx_drm"
for backward compatility with a note describing
deprecation.

Signed-off-by: Devarsh Thakkar <devarsht@xilinx.com>

https://bugzilla.gnome.org/show_bug.cgi?id=795228
2018-04-18 21:15:04 +02:00
Nirbheek Chauhan
9118cc7a19 wasapisrc: Don't provide a clock based on WASAPI's clock
The clock seems to have a lot of drift (or we're using it incorrectly)
which causes buffers to be late on the sink and get dropped.

Disable till someone can investigate whether our usage of the API is
incorrect (it looked correct to me) or if something is wrong.
2018-04-18 15:05:29 +05:30
Snir Sheriber
73cd1aa9dc nvdec/nvenc: Support CUDA Toolkit 9
Since cuda-tools 9.0, nvcuvid.h is replaced by dynlink_nvcuvid.h.
This patch changes nvdec to use run-time dynamic linking if
cuda-tools version >= 9.
nvenc does not require any change since its necessary headers are
still available.

https://bugzilla.gnome.org/show_bug.cgi?id=791724
2018-04-17 23:33:04 +10:00
Sreerenj Balachandran
142ad9dbad msdk: jpegdec: Fix non-interleaved sample decode
Using the default value (InterleavedDec == MFX_SCANTYPE_UNKNOWN)
causing issues with non-interleaved sample decode. Ideally the usage
of MFXVideoDECODE_DecodeHeader should fix these type of issue, but
it seems to be not. But hardcoding the InterleaveDec to
MFX_SCANTYPE_NONINTERLEAVED
is fixing the problem and fortunately msdk seems to be taking care of
Interleaved samples
too .So let's hardcode it for now.

https://bugzilla.gnome.org/show_bug.cgi?id=793787
2018-04-16 14:37:21 -08:00
Nirbheek Chauhan
ff17a404b3 wasapi: Call CoIn/Uninitialize() around prepare()
Seems to be required for exclusive mode and also for all
initialization on Windows 7

https://bugzilla.gnome.org/show_bug.cgi?id=795274
2018-04-16 19:35:07 +05:30
Garima Gaur
8e6375c08b resindvd, uvch264src, dx9screencapsrc: fix clock ref leaks in error paths
https://bugzilla.gnome.org/show_bug.cgi?id=776376
2018-04-12 19:07:19 +01:00
Garima Gaur
70fbcf9c0f bluez: avdtpsrc: fix caps leak in error code paths
https://bugzilla.gnome.org/show_bug.cgi?id=776085
2018-04-12 18:19:32 +01:00
Nirbheek Chauhan
5409cd4920 wasapi: Handle return value of WaitForSingleObject
The wait could've failed for whatever reason, we should handle that.
2018-04-10 05:16:54 +05:30
Nirbheek Chauhan
0a518c9be1 wasapi: Call _Start if the client was _Reset
Otherwise we will wait forever in WaitForSingleObject because we forgot
to start the client again after _Stop is called in reset().

https://bugzilla.gnome.org/show_bug.cgi?id=795114
2018-04-10 05:16:54 +05:30
Nirbheek Chauhan
c427860a20 wasapi: Don't open the device in get_caps()
We can just return the template caps till the device is opened when
going from READY -> PAUSED. This fixes a CRITICAL when calling
ELEMENT_ERROR before the ringbuffer is allocated.

Also fixes a couple of leaks in error conditions.

https://bugzilla.gnome.org/show_bug.cgi?id=794611
2018-04-09 17:28:11 +05:30
Nirbheek Chauhan
b7653925db wasapi: Only use audioclient3 when low-latency
Causes glitches on very slow CPU machines or VMs, and our
out-of-the-box experience should be good.

https://bugzilla.gnome.org/show_bug.cgi?id=794497
2018-04-06 23:11:18 +05:30
Nirbheek Chauhan
41a4a8fe0d wasapi: Don't derive device period from latency time
This seems to cause glitches on devices with low CPU availability,
such as virtual machines. Maybe even actual machines under high load.

https://bugzilla.gnome.org/show_bug.cgi?id=794497
2018-04-06 23:11:11 +05:30
U. Artie Eoff
275d754156 msdk: fix plugin load on implementations with only HW support
We can't assume that MSDK always supports SW implementation
on all platforms.  Thus, msdk_is_available should check for
ANY implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=794991
2018-04-04 17:31:14 -08:00
Nirbheek Chauhan
fc989ce544 wasapi: Squelch warning about %x and HRESULT
HRESULT is always a 32-bit value, as is guint.
2018-04-04 18:36:38 +05:30
Nirbheek Chauhan
affb0182c6 wasapisrc: Implement loopback recording
Now, when you set loopback=true on wasapisrc, the `device` property
should refer to a sink (render) device for loopback recording.

If the `device` property is not set, the default sink device is used.
2018-04-04 01:12:23 +05:30
Tim-Philipp Müller
f7352ecc5c msdk: fix meson syntax 2018-04-03 19:22:01 +01:00
Sreerenj Balachandran
e4b4f09496 msdk: vpp : Add frame rate control
https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-03 11:10:20 -08:00
Sreerenj Balachandran
c0ea4bdafb msdk: vpp : Add force-aspect-ratio property
https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-03 10:39:45 -08:00
Sreerenj Balachandran
fb8c536393 msdk: Add more scaling filter algorithms
https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-03 10:39:35 -08:00
Sreerenj Balachandran
51b6345dc4 msdk: vpp: Add support for horizontal and vertical mirroring
https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-03 10:39:24 -08:00
Sreerenj Balachandran
108c8fde7f msdk: vpp: Add detail/edge enhancement tuning
https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-03 10:39:13 -08:00
Sreerenj Balachandran
93c5dd2478 msdk: vpp: Add ProAmp(colorbalance) support
Added Hue, Saturation, Brightness and Contrast tuning support.

Fixme: Add GstColorBalanceInterface support

https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-03 10:39:02 -08:00
Sreerenj Balachandran
f5a3d3d799 msdk: vpp: Add deinterlacing support
https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-03 10:38:52 -08:00
Sreerenj Balachandran
36e81744d1 msdk: vpp:Add more filters
-- Add Denoise
-- Add Rotation

https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-03 10:38:41 -08:00
Sreerenj Balachandran
d3d89f02b3 msdk: Add VPP element
https://bugzilla.gnome.org/show_bug.cgi?id=793705
2018-04-03 10:38:19 -08:00
Hyunjun Ko
35b6411d4d msdk: dec: rename the function to what it means more exactly.
https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-04-02 15:55:55 -08:00
Hyunjun Ko
90491d889a msdk: allocator: libva: check if it's already using dmabuf when mapping
As long as we negotiate the "DMABuf" capsfeatures for now, map can't be
working. So we need to confirm not to do it if using DMABuf memory.

https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-04-02 15:49:32 -08:00
Daeseok Youn
faa892fb48 nvbaseenc: fix build warnings with HAVE_NVENC_GST_GL
fix following error:
gstnvbaseenc.c: In function ‘gst_nv_base_enc_set_context’:
gstnvbaseenc.c:451:17: error: unused variable ‘nvenc’ [-Werror=unused-variable]
   GstNvBaseEnc *nvenc = GST_NV_BASE_ENC (element);
                 ^

https://bugzilla.gnome.org/show_bug.cgi?id=794896
2018-04-02 19:42:15 +01:00
Nirbheek Chauhan
29c785ef28 decklink: Fix MinGW warnings due to MSVC-specific pragmas
https://bugzilla.gnome.org/show_bug.cgi?id=794652#c7
2018-03-31 11:16:38 +05:30
Hyunjun Ko
cdc591dbc0 msdkdec: use dmabuf if possible
https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-03-30 11:06:40 -08:00
Hyunjun Ko
ea92da6e54 msdk: dmabuf support
This patch includes:
1\ Implements MsdkDmaBufAllocator and allocation of msdk dmabuf memroy.
2\ Each msdk dmabuf memory include its own msdk surface kept by GQuark.
3\ Adds new option GST_BUFFER_POOL_OPTION_MSDK_USE_DMABUF

https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-03-30 11:06:05 -08:00
Hyunjun Ko
5df06545ef msdk: adds new function to get dmabuf information from surface.
https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-03-30 11:05:16 -08:00
Hyunjun Ko
bd8ffcb29d msdk: allocator: get dmabuf handle during allocation if required
https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-03-30 11:04:28 -08:00
Hyunjun Ko
c3438b5a0f msdk: generalize the parameter of msdk video memory functions
There needs to be generalized for the parameter from
GstVideoMsdkVideoMemory to GstMemory.

Thus we can call these functions if using DMABuf memory.

https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-03-30 11:03:00 -08:00
Hyunjun Ko
762eb97092 msdk: specify the way to find a proper cached response by request
The current way to find proper response by just comparing request's
value is wrong.  We need to compare the size of a frame and the
number of suggested frames.

Refer to the sample in https://github.com/Intel-Media-SDK/samples.

https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-03-30 11:02:26 -08:00
Paul Kocialkowski
a53019068d kmssink: Add support for the Allwinner DRM driver (sun4i-drm)
This adds the sun4i DRM driver to the list of DRM drivers in kmssink.
The driver allows displaying video in either the main plane or an
overlay plane.

https://bugzilla.gnome.org/attachment.cgi?bugid=794839
2018-03-30 09:16:39 -04:00
Sreerenj Balachandran
e40dc51fcd msdk: dec: remove framerate field from sink caps template
Removes unessential field framerate for decoder so that negotiation
works even if framerate is not provided from upstream.

https://bugzilla.gnome.org/show_bug.cgi?id=789752
2018-03-29 13:06:41 -08:00
Hyunjun Ko
1955ffed3f msdk: dec: set framerate to the driver only if provided
For example, if framerate 0/1 is provided from upstream, the driver
fails to configure and complain about it.

We can let it go and make the driver assuming framerate itself.

https://bugzilla.gnome.org/show_bug.cgi?id=789752
2018-03-29 12:41:48 -08:00
Hyunjun Ko
0eaf3bdcd9 msdk: h265dec: remove framerate field from sink caps template
Removes unessential field framerate for decoder so that negotiation
works even if framerate is not provided from upstream.

https://bugzilla.gnome.org/show_bug.cgi?id=789752
2018-03-29 12:40:34 -08:00
Sreerenj Balachandran
f1f148fe7c msdk: Don't set extended coding options for JPEG encode
MJPEG doesn't have support for extended coding options

https://bugzilla.gnome.org/show_bug.cgi?id=793873
2018-03-29 11:56:19 -08:00
Nirbheek Chauhan
90f6e6c097 decklink: Use g_thread_new instead of g_thread_create
It's deprecated, and causes a build failure in Cerbero because we pass
-DG_DISABLE_DEPRECATED.
2018-03-27 12:51:19 +05:30
Takeshi Sato
beab2ee4dc decklink: fix initialization fails in windows binary
There is no log of gst_decklink_com_thread () which initializes COM.
The initialization part is not valid with #ifdef MSC_VER.
Windows binaries are built with gcc.
As with other codes, it was avoidable by setting it to G_OS_WIN32
instead of MSC_VER.

https://bugzilla.gnome.org/show_bug.cgi?id=794652
2018-03-27 12:04:05 +05:30
Nirbheek Chauhan
a08d333e56 wasapi: Print the hresult hex value on error
This helps figure out precisely what error enum value was returned,
which can be necessary when the description is too generic
2018-03-27 12:02:21 +05:30
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
Tim-Philipp Müller
1da3cd56a0 wasapi: try to satisfy both mingw and msvc
Fix-up for previous commit, hopefully.
2018-03-18 14:13:52 +00:00
Nicolas Dufresne
9387a936b5 kmssink: Add Amlogic upstreamer DRM driver support
Amlogic Upstream driver is named meson, not to be confuse with the build
system.
2018-03-18 09:50:51 -04:00
Tim-Philipp Müller
ca4cbaef24 wasapi: fix indentation 2018-03-17 23:52:31 +00:00
Tim-Philipp Müller
ec5c3cb714 wasapi: fix unresolved symbol linker error with vs2017 on win10
ERROR: unresolved external symbol PKEY_AudioEngine_DeviceFormat

Apparently the order of the header includes matters, and initguid.h
must be included first. Let's hope this doesn't break anything on
the other toolchains.

https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/ceff4e2d-8f63-4ab6-b09b-fdac65d62a80/pkeyaudioenginedeviceformat-link-error?forum=windowspro-audiodevelopment
2018-03-17 23:48:13 +00:00
Hyunjun Ko
52f669bf43 msdk: libva: remove unnecessary code and comments
https://bugzilla.gnome.org/show_bug.cgi?id=794276
2018-03-13 14:21:40 -08:00
Hyunjun Ko
6547b638c5 msdk: adds new debug category
https://bugzilla.gnome.org/show_bug.cgi?id=794276
2018-03-13 14:20:50 -08:00
Hyunjun Ko
443b3c98fa msdk: fix typo
https://bugzilla.gnome.org/show_bug.cgi?id=794276
2018-03-13 14:18:23 -08:00
Wang,Fei
0c69867d52 msdk: Fix the I420 video format support
Make sure I420 surface mapping works as expected by using
YV12 format and swap U/V plane's offset and pitches.

https://bugzilla.gnome.org/show_bug.cgi?id=793865
2018-03-13 13:54:17 -08:00
Nirbheek Chauhan
16b9e1e444 wasapi: Minor fixes for debug logging 2018-03-10 18:54:59 +05:30
Nirbheek Chauhan
1019537344 meson: Add deviceprovider changes to directsoundsrc
These were missed when they were added to Makefile.am
2018-03-10 18:54:59 +05:30
Nirbheek Chauhan
a2f5485893 wasapi: Guard IAudioClient2 structs and enums
These are already defined in the audioclient.h provided by the latest
MinGW headers, and the existing #ifndef were obviously wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=794197
2018-03-10 18:54:59 +05:30
Tim-Philipp Müller
c2bcc2711a meson: fix build when msdk is not found 2018-03-09 23:59:16 +00:00
Sreerenj Balachandran
bdbc1d0bef msdk: Fix the misspelled file name in meson build 2018-03-09 10:33:22 -09:00
Emilio Pozuelo Monfort
898e01fe29 wasapi: ship audioclient3 header in tarballs
https://bugzilla.gnome.org/show_bug.cgi?id=794197
2018-03-09 11:42:13 +00:00
Hyunjun Ko
4918430858 msdk: enc: fix missing some frames to be encoded
There was not handling the end of encoding sequence in encoder.
This patch does drain any remaining internal streams while decoder
already does this.

Document says:
"To mark the end of the encoding sequence, call this function with a
NULL surface
pointer. Repeat the call to drain any remaining internally cached
bitstreams—one
frame at a time—until MFX_ERR_MORE_DATA is returned."

https://bugzilla.gnome.org/show_bug.cgi?id=793236
2018-03-08 11:39:25 -09:00
Hyunjun Ko
8a3630ffd7 msdk: dec: fix leaks when flushing
https://bugzilla.gnome.org/show_bug.cgi?id=793708
2018-03-08 11:38:52 -09:00
Hyunjun Ko
c9faf0d612 msdk: manage child sessions on parent GstMsdkContext
Sometimes parent context is released before its children get released.
In this case MFXClose of parent session fails.

To make sure that child sessions are closed before closing a parent
session,
Parent context needs to manage child sessions and close them first when
it's released.

https://bugzilla.gnome.org/show_bug.cgi?id=793412
2018-03-08 11:38:30 -09:00
Hyunjun Ko
37ef61586a msdk: dec: remove code to manage buffers with locked surface
https://bugzilla.gnome.org/show_bug.cgi?id=793413
2018-03-08 11:37:52 -09:00