Commit graph

23523 commits

Author SHA1 Message Date
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
6e86b322d7 docs: add wasapi elements 2018-03-10 11:41:54 +00:00
Tim-Philipp Müller
c2bcc2711a meson: fix build when msdk is not found 2018-03-09 23:59:16 +00:00
Wang,Fei
1192a598ee tests: add msdkh264enc element unit test
https://bugzilla.gnome.org/show_bug.cgi?id=793236
2018-03-09 10:48:11 -09: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
Hyunjun Ko
b08b8ddae3 msdk: manage MSDK surfaces seperately
Currently a gst buffer has one mfxFrameSurface when it's allocated and
can't be changed.
This is based on that the life of gst buffer and mfxFrameSurface would
be same.
But it's not true. Sometimes even if a gst buffer of a frame is finished
on downstream,
mfxFramesurface coupled with the gst buffer is still locked, which means
it's still being used in the driver.

So this patch does this.
Every time a gst buffer is acquired from the pool, it confirms if the
surface coupled with the buffer is unlocked.
If not, replace it with new unlocked one.
In this way, user(decoder or encoder) doesn't need to manage gst buffers
including locked surface.

To do that, this patch includes the following:
1. GstMsdkContext
- Manages MSDK surfaces available, used, locked respectively as the
following:
  1\ surfaces_avail : surfaces which are free and unused anywhere
  2\ surfaces_used : surfaces coupled with a gst buffer and being used
now.
  3\ surfaces_locked : surfaces still locked even after the gst buffer
is released.

- Provide an api to get MSDK surface available.
- Provide an api to release MSDK surface.

2. GstMsdkVideoMemory
- Gets a surface available when it's allocated.
- Provide an api to get an available surface with new unlocked one.
- Provide an api to release surface in the msdk video memory.

3. GstMsdkBufferPool
- In acquire_buffer, every time a gst buffer is acquired, get new
available surface from the list.
- In release_buffer, it confirms if the buffer's surface is unlocked or
not.
  - If unlocked, it is put to the available list.
  - If still locked, it is put to the locked list.

This also fixes bug #793525.

https://bugzilla.gnome.org/show_bug.cgi?id=793413
https://bugzilla.gnome.org/show_bug.cgi?id=793525
2018-03-08 11:37:12 -09:00
Michael Tretter
d156163c82 configure.ac: enable largefile support if possible
https://bugzilla.gnome.org/show_bug.cgi?id=793103
2018-03-08 11:19:29 -05:00
Tim-Philipp Müller
fd3bb44031 tests: player: disable broken test_play_media_info test
Until someone can be bothered to debug + fix it.

https://bugzilla.gnome.org/show_bug.cgi?id=787372
https://bugzilla.gnome.org/show_bug.cgi?id=787374
2018-03-05 19:37:52 +00:00
Guillaume Desmottes
6dd997541c h265parser: allow partial matching on range extension profile
Best to return a valid profiles rather than no profile if bitstream uses
a not standard profile.

https://bugzilla.gnome.org/show_bug.cgi?id=793876
2018-03-05 13:22:12 -05:00
Guillaume Desmottes
9f25fcdfc9 h265parse: add support for 'Format range extensions profiles'
Those profiles have been introduced in version 2 of the HEVC spec
(A.3.5).

https://bugzilla.gnome.org/show_bug.cgi?id=793876
2018-03-05 13:22:12 -05:00
Guillaume Desmottes
977af86e8b h265parser: parse extra profile fields
Those fields have been introduced in version 2 and later to define new
profiles like the format range extensions profiles (A.3.5).

NOTE: This patch breaks the parser ABI, rebuild needed.

https://bugzilla.gnome.org/show_bug.cgi?id=793876
2018-03-05 13:21:33 -05:00
Guillaume Desmottes
d252f503fc h265parser: decouple GstH265Profile and GstH265ProfileIDC
We used to have the same enum to represent H265 profiles and idc values.
Those are no longer the same with extension profiles defined from
version 2 of the spec.
Split those enums so the semantic of each is clearer and we'll be able
to add extension profiles to GstH265Profile.

Also add gst_h265_profile_tier_level_get_profile() to retrieve the
GstH265Profile from the GstH265ProfileTierLevel. It will be used to
implement the detection of extension profiles.

https://bugzilla.gnome.org/show_bug.cgi?id=793876
2018-03-05 13:19:42 -05:00
Tim-Philipp Müller
076809ebd5 Release 1.13.90 2018-03-03 22:39:39 +00:00
Tim-Philipp Müller
1d7e8d730c Update docs 2018-03-03 22:39:27 +00:00
Sebastian Dröge
2b4f8ab027 iqa: Fix build with latest aggregator API changes 2018-03-02 21:53:47 +02:00
Nicolas Dufresne
9865904d88 Revert "h265parse: early set src caps when input not byte-stream"
This reverts commit 93d29e8030.
2018-03-02 10:37:53 -05:00
Nicolas Dufresne
7e45b9f03f Revert "h264parse: early set src caps when input is avc"
This reverts commit 5ac886d85a.
2018-03-02 10:37:45 -05:00
Mathieu Duponchelle
47208072bf meson: enable more warnings 2018-03-01 18:44:30 +01:00
Tim-Philipp Müller
a0cc9d1af0 Remove schroedinger plugin
No upstream (website disappeared), no maintainer, and
pretty much a fringe format anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=776215
2018-03-01 15:24:39 +00:00
Mathieu Duponchelle
39d408f3d6 Port to latest GstAggregator segment API
The aggregator segment is now exposed on the src pad

https://bugzilla.gnome.org/show_bug.cgi?id=793946
2018-03-01 15:37:06 +01:00
Nirbheek Chauhan
c2956036b8 wasapi: Increase rank to prefer over directsoundsrc
Directsoundsrc/sink have multiple issues, most of which cannot be
fixed at all because the API is deprecated and is implemented as a
compatibility wrapper around WASAPI since Vista.

Users and developers should now use the wasapisrc/sink elements, and
future development efforts should go towards that.
2018-03-01 15:33:18 +05:30
Mathieu Duponchelle
7771488edb mxfmux: instantiate adapter at the correct place 2018-02-28 23:46:44 +01:00
Tim-Philipp Müller
341228ea04 docs: add new audiolatency element to docs and update docs for git 2018-02-28 00:06:41 +00:00
Nirbheek Chauhan
5089ab3428 audiolatency: Fix string format specifier and use microseconds everywhere
Should fix warnings or build errors on 32-bit platforms and on Windows.

Also clarify in logging that all timestamps are in microseconds.
2018-02-28 00:59:42 +05:30
Nirbheek Chauhan
307865ec7a audiolatency: Fix cerbero build failure
Average latency is a 64-bit integer.

https://ci.gstreamer.net/job/GStreamer-master/9962/
2018-02-28 00:41:20 +05:30
Alicia Boya García
4d1b6882be x265enc: Add format example for option-string
https://bugzilla.gnome.org/show_bug.cgi?id=793881
2018-02-27 13:56:57 -05:00
Nirbheek Chauhan
3fb81536ce audiolatency: New plugin for measuring audio latency
Measures the audio latency between the source pad and the sink pad by
outputting period ticks on the source pad and measuring how long they
take to arrive on the sink pad.

Very useful for quantifying latency improvements in audio pipelines.
This plugin was particularly useful during development of the
low-latency features of the wasapi plugin.

https://bugzilla.gnome.org/show_bug.cgi?id=793839
2018-02-27 23:54:28 +05:30
Chris Bass
2863a55a89 ttml: Add support for IMSC 1.0.1 fillLineGap attribute
Strictly speaking, the TTML spec requires that text backgrounds extend
only to the font height of the related text, rather than to the vertical
distance between lines. The result of this is that there will typically
be vertical gaps between line backgrounds through which moving video can
be seen. Since this was unnacceptable to some content providers, v1.0.1
of the IMSC spec (which profiles TTML) adds a new attribute,
itts:fillLineGap[1], that allows content authors to specify that clients
should extend text backgrounds such that there are no gaps between
lines. This attribute is also going to be included in the next release
of EBU-TT-D.

This patch adds support for fillLineGap to ttmlparse and ttmlrender.

[1] https://www.w3.org/TR/ttml-imsc1.0.1/#itts-fillLineGap

https://bugzilla.gnome.org/show_bug.cgi?id=787071
2018-02-27 16:27:47 +02:00
Tim-Philipp Müller
29d112dfd1 docs: plugins: add some more elements
Many will still be missing corresponding doc
sections in the source code though.
2018-02-26 11:22:02 +00:00
Nirbheek Chauhan
05a37d3791 wasapi: Clarify usage of low-latency property, add myself as author
The low-latency property is *always* safe to enable, so applications
that do realtime communication should set it, and the elements will
automatically configure WASAPI to use the lowest possible device
period, and the audioringbuffer in audiobasesink will also be
configured accordingly.

Applications can also use exclusive mode during capture and playback
for the lowest possible latency if they know that the device will not
be used by any other application.

In this mode, the latency-time and buffer-time properties will be
completely ignored.
2018-02-26 16:23:11 +05:30
Nirbheek Chauhan
995059dc87 wasapi: Add a property for trying the AudioClient3 API
The AudioClient3 API is only available on Windows 10, and we will
automatically detect when it is available and use it.

However, using it for capturing audio with low latency and without
glitches seems to require setting the realtime priority of the entire
pipeline to "critical", which we cannot do from inside the element.

Hence, we can only enable that by default for wasapisink since
apps should be able to safely set the low-latency property to TRUE if
they need low-latency capture or playback.
2018-02-26 16:23:11 +05:30
Nirbheek Chauhan
f7d0ce2477 wasapi: Set realtime thread priority at runtime
Use LoadLibrary() to set the thread characteristics at runtime so it
works automagically regardless of where or how the plugin was built.
2018-02-26 16:23:11 +05:30
Nirbheek Chauhan
0cb11c15ed wasapi: Use IAudioClient3 interface when available
This allows us to request ultra-low-latency device periods even in
shared mode. However, this requires good drivers and Windows 10, so
we only enable this when we detect that we are running on Windows 10
at runtime.

You can forcibly disable this feature on Windows 10 by setting
GST_WASAPI_DISABLE_AUDIOCLIENT3=1 in the environment.
2018-02-26 16:23:11 +05:30
Nirbheek Chauhan
16af66ee95 wasapi: __uuidof is simply not available in C
Fix comment, and don't try to use it at all.
2018-02-26 16:23:11 +05:30
Nirbheek Chauhan
28874e15ff wasapi: Set a default category for util functions
Without this, they all go to the default category where they can be
missed
2018-02-26 16:23:11 +05:30
Nirbheek Chauhan
14b2d6b27a wasapi: Use a macro for HRESULT failure paths
Saves a lot of boilerplate across all files.
2018-02-26 16:23:11 +05:30
Sreerenj Balachandran
751e85fa45 checksumsink: remove src pad template from sink element
https://bugzilla.gnome.org/show_bug.cgi?id=793774
2018-02-23 23:32:44 +00:00
Hyunjun Ko
14f0186741 msdk: remove unused code
There's unused code remaining since MSDK bufferpool patches landed.

https://bugzilla.gnome.org/show_bug.cgi?id=793741
2018-02-23 14:30:56 -09:00
Jan Alexander Steffens (heftig)
37a9e0fff9 srt: Add support for streamheaders to sinks
https://bugzilla.gnome.org/show_bug.cgi?id=793503
2018-02-23 15:29:57 -05:00
Jan Alexander Steffens (heftig)
8a5dab1c06 srt: Refactor gst_srt_*_sink_send_buffer, extract send
https://bugzilla.gnome.org/show_bug.cgi?id=793503
2018-02-23 15:29:57 -05:00
Jan Alexander Steffens (heftig)
7463a93620 srt: Add gst_srt_base_sink_stop
https://bugzilla.gnome.org/show_bug.cgi?id=793503
2018-02-23 15:29:57 -05:00
Jan Alexander Steffens (heftig)
4039bdbaac srt: Remove unused queued_buffers field
https://bugzilla.gnome.org/show_bug.cgi?id=793503
2018-02-23 15:29:57 -05:00
Sreerenj Balachandran
1c81bf4bdc msdkenc: remove unnecessary memset
https://bugzilla.gnome.org/show_bug.cgi?id=791479
2018-02-22 12:32:45 -09:00