Commit graph

4086 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
851557af20 codecs: fix gir generation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1218>
2020-04-26 19:26:32 +02:00
Víctor Manuel Jáquez Leal
23e99a7a77 codecs: set sys frame num before new_picture()
Derive classes might need to operate on the current frame at their
new_picture() vmethod, so it would be needed to set system_frame_number
on picture before calling the vmethod.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1209>
2020-04-23 19:54:17 +00:00
Seungha Yang
8325e42ade codecs: Fix some documentation
Add missing "transfer full" annotation, etc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>
2020-04-22 23:20:44 +00:00
Seungha Yang
a89b819191 codecs: Add new baseclass for VP8 decoder
This implemenation is similar to VP9 but much simpler than it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>
2020-04-22 23:20:44 +00:00
Seungha Yang
9524e6adec vp9decoder: Fix small typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>
2020-04-22 23:20:44 +00:00
Seungha Yang
d72fcbe18a codecs: Reorganize the order of vfunc
... to the order in which it is actually called

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>
2020-04-22 23:20:44 +00:00
Seungha Yang
ba07768ca4 h264decoder: Don't handle gap frame num for the first picture
If the first picture is not IDR, it would have non-zero frame_num
but it's not gap. We should skip gap frame handling in that case
2020-04-20 13:55:49 +00:00
Seungha Yang
6a7ea29084 h264decoder: Add some debug messages 2020-04-20 13:55:49 +00:00
Víctor Manuel Jáquez Leal
a3395167a1 codecs: h264picture: typo in GstH264PictureField enum 2020-04-19 18:40:12 +02:00
Seungha Yang
eeb3dd6605 h265parser: Fix some coverity issues
- Remove useless comparison
- Fix invalid memory access

CID: 1461477, 1461476, 1461475, 1461474, 1461279
2020-04-13 12:28:14 +00:00
Seungha Yang
5a29917a63 codecs: Add minimal state validation
... to prevent requesting decoding before the preparation.
For instance, baseclass should not request decoding a picture if there
is no parsed valid headers, since subclass is most likely
not ready to decoding it.
2020-04-09 19:33:56 +00:00
Seungha Yang
a2f68762b0 h265parser: Add APIs to allow update VPS/SPS/PPS
gst_h265_parser_parse_{vps,sps,pps} APIs were used to parse VPS/SPS/PPS and
also in order to update parser's internal state at once. Meanwhile
gst_h265_parse_{vps,sps,pps} APIs are to parse VPS/SPS/PPS without state update.
This commit introduces new APIs so that only accepted VPS/SPS/PPS by user
can be updated to be used by parser.
2020-04-09 19:33:56 +00:00
Seungha Yang
a61549cbde h264parser: Add APIs to allow update SPS/PPS
gst_h264_parser_parse_{sps,pps} APIs were used to parse SPS/PPS and
also in order to update parser's internal state at once. Meanwhile
gst_h264_parse_{sps,pps} APIs are to parse SPS/PPS without state update.
This commit introduces new APIs so that only accepted SPS/PPS by user
can be updated to be used by parser.
2020-04-09 19:33:56 +00:00
Seungha Yang
1a09251699 h264parser: Parse all SEI payload type even if it's not handled by parser
... so that user can handle it from outside of parser API
2020-04-08 15:39:12 +00:00
Seungha Yang
db1ea18276 h264parser: Add support for creating picture timing SEI
This new method can make it possible to inject timecode meta into
h264 bitstream
2020-04-08 15:39:12 +00:00
Seungha Yang
28ce6c2a40 h264parser: Make GstH264PicTiming self-containing all the syntax information
... and store all parsed values.

We are storing pic_struct_present_flag although it's not part of
this SEI message but GstH264PicTiming includes it to clarify
following syntax values.
In addition to that, by adding CpbDpbDelaysPresentFlag, we don't need to
refer to VUI anymore.
2020-04-08 15:39:12 +00:00
Seungha Yang
c272dd3462 h264parser: Fix some misleading debug messages 2020-04-08 15:39:12 +00:00
Seungha Yang
5a675080c5 h264parser: Fix mismatched argument of declaration and definition 2020-04-08 15:39:12 +00:00
Thibault Saunier
b9e0ccd8b7 codecs: Add basic documentation stubs 2020-04-08 08:47:46 -04:00
Nicolas Dufresne
b79c949789 codecs: h264: Fix DPB size calculation
As per specification in A.3.1 h) and A.3.2 f), the maximum size of the DPB is
16. Fix the maximum in the fine and fix the formula to use MIN instead of MAX
so that we no longer always use the maximum for the profile/level.
2020-04-07 07:53:27 +00:00
Jan Schmidt
46f994871f adaptivedemux: Handle instant rate change requests directly
Downstream demuxers will first send seek events upstream to us.
Do the right thing with instant rate change requests by handling them
immediately.
2020-04-02 11:26:46 +00:00
Jan Schmidt
1c79b39896 adaptivedemux: Don't ignore gst_segment_do_seek() return result
gst_segment_do_seek() can fail, so don't ignore the return result
2020-04-02 11:26:46 +00:00
Seungha Yang
ce09ceb106 h265parser: Add a helper method to create SEI nal unit
Add an API to create raw SEI nal unit. This would be useful in case
an user want to create SEI nal data and inject the SEI nal data
into bitstream.
2020-04-02 09:20:11 +00:00
Nicolas Dufresne
7b8c071f9c codecs: h264dpb: Don't leak pic_list GArray
The contents was cleared, but the array was never released.
2020-03-31 09:34:05 -04:00
Nicolas Dufresne
bd7db13412 codecs: h264: Do not ignore end_picture() return value
If decoding failed because end_picture() failed, set the picture to
nonexisting, this way output_picture() will be skipped. This avoids confusing
special cases in output_picture() implementation.
2020-03-31 09:34:05 -04:00
Seungha Yang
a1e8109aa8 h264parser: Add a helper method to create and inject raw SEI data
Add an API to create raw SEI nal unit. This would be useful in case
an user want to create SEI nal data and inject the SEI nal data
into bitstream.
2020-03-30 07:59:10 +00:00
Seungha Yang
f94157c949 nalutils: Introduce NAL writer helper methods
Add helper methods for writing h264 and h265 NAL
2020-03-30 07:59:10 +00:00
Seungha Yang
5f6884a1c0 h264parser: Expose SEI clear function to public
gsth265parser does it already. Although corresponding API of h265parser is
gst_h265_sei_free, _clear suffix is more consistent naming for h264parser
since there are gst_h264_{sps,pps}_clear().
2020-03-30 07:59:10 +00:00
Seungha Yang
e65d06dc6a h265parser: Fix registered user data SEI leak
... and add fix for the SEI data in gst_h265_sei_copy()
2020-03-23 15:21:42 +00:00
Seungha Yang
ef14a032c1 h265parser: Do not allocate too large size of memory for registered user data SEI
Don't be confused by the unit of payload size (i.e., bits and bytes)
Also this need a documentation with Since mark
2020-03-23 15:21:42 +00:00
Seungha Yang
9e429fad3e h264parser: Do not allocate too large size of memory for registered user data SEI
Don't be confused by the unit of payload size (i.e., bits and bytes)
Also this need a documentation with Since mark
2020-03-23 14:11:11 +00:00
Victor Manuel Jaquez Leal
efcabce98e libs: codecparser: add missing unstable api warning
mpeg4 and vp8 parsers didn't show that compilation warning as the
others parsers.
2020-03-16 18:07:54 +01:00
yychao
adc3d12741 tsdemux: Add support for AC4
According to following two specs, add support for AC4 in tsdemux.

1. ETSI TS 103 190-2 V1.2.1 (2018-02) : Annex D (normative): AC-4 in MPEG-2 transport streams
2. ETSI EN 300 468 V1.16.1 (2019-08) : Annex D (normative):Service information implementation of AC-3, EnhancedAC-3, and AC-4 audio in DVB systems
2020-03-09 21:54:09 +00:00
Seungha Yang
5609d8751c h265decoder: Pass max_dpb_size to new_sequence vfunc
same as we are doing in h264decoder
2020-03-08 16:11:35 +09:00
Seungha Yang
353013fcaa h265parser: Store NumDeltaPocs of reference for hardware accelerators
That's the value of NumDeltaPocs[RefRpsIdx] and we might be able to derive
the value from given sps and slice header.
Because well known hardware implementations refer to the value, however,
storing the value makes things easier.

Following is the list of hardware implementations
* DXVA2: ucNumDeltaPocsOfRefRpsIdx
* NVDEC/VDPAU: NumDeltaPocsOfRefRpsIdx
2020-03-07 12:20:03 +09:00
Seungha Yang
ba3430a059 h265decoder: Fix for output and removal picture from DPB
See C.5.2.2 Output and removal of pictures from the DPB.

If the number of pictures in the DPB is greater than or equal to
sps_max_dec_pic_buffering_minus1[HighestTid] + 1, then the picture
should be outputted.
2020-03-07 12:20:03 +09:00
Seungha Yang
8b0d5e1272 meson: codecs: Don't install header
This library is not intended to be public. APIs are likely to
change over time and should not be disclosed to people yet.
2020-03-06 16:44:01 +09:00
Seungha Yang
fdf06fa363 h264decoder: Rename some internals
No more a part of d3d11 implementation
2020-03-05 15:27:42 +00:00
Seungha Yang
f487648b03 vp9decoder: Update document
s/GstH264Picture/GstVp9Picture/g and minor update since this baseclass
is no more d3d11 specific one.
2020-03-05 15:27:42 +00:00
Seungha Yang
82f1d5e8be codecs: Change output_picture() to mandatory implementation
GstVideoCodecFrame is expected to be consumed by subclass
per output_picture(). So the implementation cannot be optional.
2020-03-05 15:27:42 +00:00
Seungha Yang
83b056cb77 h265decoder: Port to nal type classification macro
... and remove namespaceless macro methods from baseclass
2020-03-05 23:22:39 +09:00
Seungha Yang
959320264a h265parser: Add helper macro for nal type classification
Add some macros to remove code duplication and to make it more readable
2020-03-05 23:22:34 +09:00
Nicolas Dufresne
56c3b40c30 h264picture: Add system_frame_num
This allow cross-referencing GstH264Picture and GstVideoCodecFrame.
2020-03-05 03:06:16 +00:00
Nicolas Dufresne
2b9ffa8f54 h264parser: Add some fixmes
Some of the syntax element do not use the spec name, which makes them harder
to find in the spec.
2020-03-05 03:06:16 +00:00
Nicolas Dufresne
c6b8157dd6 codecs: Pass the max_dpb_size to new_segment virtual
On new_segment, the decoder is expected to negotiate. The decoder may want to
pre-allocate the needed buffers. Pass the max_dpb_size as this is needed to
determin how many buffers should be allocated.
2020-03-05 03:06:16 +00:00
Nicolas Dufresne
f3f60f5a4c codecs: Add missing auto cleanup funcs 2020-03-05 03:06:16 +00:00
Nicolas Dufresne
00d04784d3 Move CODEC base classes into it's own library
This introduce a library which contains a set of base classes which
handles the parsing and the state tracking for the purpose of decoding
different CODECs. Currently H264, H265 and VP9 are supported. These
bases classes are used to decode with low level decoding API like DXVA,
NVDEC, VDPAU, VAAPI and V4L2 State Less decoders. The new library is
named gstreamer-codecs-1.0 / libgstcodecs.
2020-03-05 03:06:16 +00:00
Dominique Leuenberger
e12e67099b build: Fix build on systems with wayland-client headers in non-default location
Add a missing dependency to wl_client_dep for the wayland build. Some distros
have the wayland-client headers not installed in /usr/include (which is perfectly
valid, the pkg-config .pc file gives the right feedback).
2020-03-04 07:10:39 +00:00
Matthew Waters
7127e88389 vulkan/window/xcb: implement keyboard support 2020-03-03 05:00:50 +00:00
Matthew Waters
8c53bcd404 vulkan/window/xcb: implement mouse event support 2020-03-03 05:00:50 +00:00
Matthew Waters
52a9135a2b vulkan/swapper: add get_surface_rectangles
Retrieve the input, output and covered rectangles.
2020-03-03 05:00:50 +00:00
Matthew Waters
af19fa94f4 vulkan/display: implement thread-safe find_window() 2020-03-03 05:00:50 +00:00
Matthew Waters
0ea427823e vulkan/window: add support for mouse/keyboard events 2020-03-03 05:00:50 +00:00
Yeongjin Jeong
454147d269 vp9parser: Add new API for parsing superframe info
Some elements are using their own implementations for superframe parsing.
To reduce redundant code, we need to add API to the parser.
2020-03-02 01:31:38 +09:00
Jan Schmidt
8e3472faee webrtc: Use the dtlssrtenc rtp-sync property
Instead of synchronising at the ICE transport, do clock sync for the
RTP stream at the DTLS transport via the dtlssrtpenc rtp-sync
property. This avoids delaying RTCP while waiting until it is time
to output an RTP packet when rtcp-mux is enabled.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1212
2020-02-27 12:30:32 +00:00
Jan Schmidt
69ef74d96a h265parser: Skip unused bits in an SEI.
Alternative approach to 18b54f8d34
that skips all bits in a broken SEI correctly.
2020-02-25 09:33:47 +00:00
Stéphane Cerveau
98f8bb4e7e Revert "h265parser: Skip unused SEI bits differently"
This reverts commit 18b54f8d34.
2020-02-25 09:33:47 +00:00
Dylan Yip
0c798c8771 h265parse: Fix offset by one error in pic timing SEI
Offset by one error causes a free/malloc error when parsing pic timing
SEI messages.
2020-02-25 09:33:47 +00:00
Matthew Waters
bd31caf0b0 vkswapper: keep a reference on the input buffer until present is finished
Otherwise, there may be a very small period of time where the buffer can
be freed while being presented.
2020-02-18 15:52:22 +11:00
Sebastian Dröge
b2e7739364 webrtc/dtlstransport: Proxy DTLS connection state from the DTLS elements to the transport
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/758
2020-01-19 11:16:34 +00:00
Stéphane Cerveau
b481edd745 h264parser: add MDCV and CLL SEI message parsing
Allow to parse SEI message for:
- mastering display colour volume
- Light level infomation

Set to caps if necessary.

Fix #958
2020-01-07 08:55:28 +00:00
Seungha Yang
2a3205b294 vulkan/window/win32: Don't post any WinProc message to parent window
Posting any message to parent seems to be pointless. That might break
parent window.
Regardless of the posting, parent window can catch mouse event
and also any keyboard events will be handled by parent window by default.
2019-12-22 09:16:42 +00:00
Yeongjin Jeong
3f2240498b h265parser: Add simple GstH265Profile/string public utilites
It makes more simplifies the conversion between GstH265Profile and string.
2019-12-20 15:43:55 +00:00
Stéphane Cerveau
6bc0e9527e remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
Matthew Waters
52ff97d085 vulkan/image: expose initialization function for subclasses 2019-12-09 01:49:30 +00:00
Matthew Waters
1c6f3e4b84 vulkan/macos: link directly to MoltenVK
It's currently the only sane way we can use MoltenVK functions to
integrate with Metal API.

It also removes the need to specify the VK_ICD_FILENAMES environment
variable pointing to MoltenVK_icd.json.
2019-12-09 01:49:30 +00:00
Matthew Waters
81d1e16b6b vulkan: move fullscreenquad object to library
It's useful and extensible enough to be used by us and other elements
2019-12-04 07:20:27 +00:00
Matthew Waters
dee29aa8e7 vulkan: fix up some gir annotations 2019-12-04 07:20:27 +00:00
Matthew Waters
c7526a6f68 vulkan: priviatise _invoke_on_main()
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1132
2019-12-03 10:17:29 +00:00
Matthew Waters
24d096597b vulkan: implement caching and reuse of a couple of vulkan resources
Includes a new GstVulkanHandlePool base class for pooling different
resources togther.  The descriptor cache object is ported to
GstVulkanHandlePool with the exact same functionality.

A new GstVulkanFenceCache is also implemented for caching fences
which is used internally by GstVulkanDevice for creating or reusing
fences.

The existing GstVulkanTrashFenceList object now caches trash objects.
2019-11-28 23:27:21 +00:00
Matthew Waters
5177c24a7e vulkan/trash: remove free functions covered by GstVulkanHandle 2019-11-28 23:27:21 +00:00
Matthew Waters
615022ad93 vulkan: split vkfullscreenrender into two
Part 1 is a base class (vkvideofilter) that handles instance, device,
queue retrieval and holding that has been moved to the library
Part 2 is a fullscreenrenderquad that is still in the plugin that
performs all of the previous vulkan-specific functionality.
2019-11-28 23:27:21 +00:00
Matthew Waters
960784af1f vulkan/handle: add some handle types 2019-11-28 23:27:21 +00:00
Matthew Waters
a7c2aa473f vulkan/image: don't rely on weak-ref notifies for views
Weak refs don't quite work here correctly as there is always a race with
taking the lock between find_view() and remove_view().  If find_view()
returns a view that is going to removed by remove_view() then we have an
interesting situation.

In theory, the number and type of views for an image are relatively
constant and should not change one they've been set up which means that
it is actually practical to perform pool-like reference counting here
where the image holds a pool of different views that it can give out
as necessary.
2019-11-28 23:27:21 +00:00
Matthew Waters
4f3051fd2d vulkan: add a couple of missing fence unrefs 2019-11-28 23:27:21 +00:00
Thiago Santos
3c5e5f8b85 adaptivedemux: fix 'utc now' gdatetime creation
It broke after removal of usage of GTimeVal that was deprecated,
it requires seconds in this unix-based creation instead of microseconds.

The downside here is that it will create an extra object just to be
discarded in order to add the microsecond part to it.

It would end up segfaulting as it would return a NULL value
2019-11-20 22:16:15 +00:00
Andrew Branson
8de7b41015 photography: Add additional settings relevant to Android
Exposure mode property, extra colour tone values (aqua, emboss, sketch, neon), extra scene modes (backlight, flowers, AR, HDR).
Missing vmethods for exposure mode, analog gain, lens focus, colour temperature, min & max exposure time

Contribs by Mohammed Sameer <msameer@foolab.org>, Adam Pigg <adam@piggz.co.uk>
2019-11-18 23:10:04 +00:00
Matthew Waters
9f4b043161 vulkan/queue: be sure to take a lock around command submission
This ensures that only one thread is submitting commands at a time as
required by the Vulkan specification.
2019-11-14 07:10:16 +00:00
Matthew Waters
0c3eec57f2 vulkan: make new trash objects ref the fence
Avoids gst_vulkan_fence_ref at each call site of the trash object
creation
2019-11-13 22:27:59 +00:00
Matthew Waters
4e467e0082 vulkan/wayland: advertise the current surface size
Avoids vkswapper from creating a 0x0 output VkSurface and failing
2019-11-13 22:27:59 +00:00
Jan Schmidt
c0561fb916 meson: Fix plugin symbol export for C++ sources/plugins
The symbol visibility=hidden flag was only being applied to C
compilation, so plugins implemented in C++ would leak extra symbols
than the 2 _get_desc() and _register().

That also showed that the gst-libs opencv C++ lib was not marking
symbols for export correctly because the BUILDING_GST_OPENCV define
wasn't in the C++ args, so fix that too.
2019-11-12 13:00:42 +00:00
Fuwei Tang
c810b73472 vc1parser : fix a miswrite 2019-11-11 02:12:34 +00:00
Matthew Waters
0d57c1817b vkhandle: expose a printf format specifier for a vulkan handle 2019-11-11 11:04:59 +11:00
Matthew Waters
4b491182ae vkdescriptor: set the GError on the 'too many allocations' case 2019-11-11 11:04:59 +11:00
Matthew Waters
982e06ef87 vkswapper: add inherit support
Used on android
2019-11-11 11:04:59 +11:00
Matthew Waters
332f1742d2 vkswapper: output specific values when swapchain flags fail 2019-11-11 11:04:59 +11:00
Matthew Waters
08928541c6 vulkan: add android WSI integration 2019-11-11 11:04:59 +11:00
Nirbheek Chauhan
e0a70d1a0a vulkan: Fix build on ios
These little bits were missed during the refactor in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/821
2019-11-10 19:27:06 +05:30
Seungha Yang
0a2d24d010 vulkan: Fix build on Windows
gstvkwindow_win32.c(166): error C2065: 'msg_source': undeclared identifier
2019-11-08 23:42:08 +09:00
Edward Hervey
7bceb6c3ff bad: Avoid using deprecated API
GTimeval is deprecated
2019-11-08 10:43:08 +00:00
Matthew Waters
670d0a8e88 vulkan: remove the private struct from the public struct
Remove any references to CamelTypePrivate from the public CamelType
struct.  They can be accessed as needed using
camel_type_get_instance_private().
2019-11-07 20:01:57 +00:00
Matthew Waters
32b3387ae6 vulkan: implement proper descriptor set handling
The major functionality gain this provides is proper reference counting
for a descriptor set.  Overall this allows us to create descriptor sets
when they are needed (or reused from a cache) without violating any of
vulkan's object synchronisation requirements.

As there are a fixed number of sets available in a pool, the number of
descriptors in elements is currently hardcoded to 32.  This can be extended
in a future change to create pools on the fly if that limit is ever overrun.
2019-11-07 20:01:57 +00:00
Matthew Waters
1c89096b4f vulkan/fence: add always-signalled fence type
Allows a cleaner control flow when there is no fence available for use
with the trash list.  An always signalled fence type will always return
TRUE for gst_vulkan_fence_is_signalled.
2019-11-07 20:01:57 +00:00
Matthew Waters
212b313e29 vulkan: add handle type for arbitrary vulkan handles
Serve two purposes:
1. refcounting of vulkan handles with associated destruction.  When
   combined with the trash list, the user can ensure destruction at
   the correct time according to the vulkan rules.
2. avoids polluting our API with 32-bit vs 64-bit integer/pointers
   differences as exposed through the vulkan API.  on 32-bit, vulkan
   non-dispatchable handles are 64-bit integers and on 64-bit, they
   are pointers.
2019-11-07 20:01:57 +00:00
Matthew Waters
f738c1f138 vulkan: fix non-dispatchable handles on 32-bit platforms
non-dispatchable handles are 64-bit integers on 32-bit platforms
2019-11-07 20:01:57 +00:00
Matthew Waters
7a1bb3001a vulkan: use VK_NULL_HANDLE in more places
Fixes compiler warnings on 32-bit platforms assigning a void * to a
64-bit integer value.
2019-11-07 20:01:57 +00:00
Matthew Waters
116549b561 vulkan: use the provided VKAPI_ATTR for the debug callback
Ensures that we get the calling convention correct for the platform we
are using.
2019-11-07 20:01:57 +00:00
Matthew Waters
a2aa17278a vulkan: dump surface information 2019-11-07 20:01:57 +00:00
Matthew Waters
b55134a4dd vulkan: print criticals/warnings for vulkan errors/warnings
Simplifies finding the erronous cases in using the Vulkan API
incorrectly.
2019-11-07 20:01:57 +00:00
Matthew Waters
475a2b0acd vulkan/image: use the full video info for returning vulkan formats
We may need some colorspace information for returning sRGB vs no sRGB.
2019-11-07 20:01:57 +00:00
Niels De Graef
d8f61515d8 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-11-06 14:27:46 +00:00
Aaron Boxer
6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Edward Hervey
ef16d7558f mpegtsmux: Add SCTE-35 support
This adds two properties:
* scte-35-pid: If not 0, enables the SCTE-35 support for the current
  program. This will write the proper PMT and send SCTE-35 NULL
  commands (i.e. heartbeats) at a regular interval
* scte-35-null-interval: This specifies the interval at which the
  NULL commands should be sent

Sending SCTE-35 commands is done by creating the appropriate SCTE-35
GstMpegtsSection and then sending them on the muxer. See the
associated example
2019-10-31 12:31:27 +00:00
Edward Hervey
6a9108884c mpegts: Add support for SCTE-35 sections
Not all commands are supported, but the most common ones are.
Both parsing and packetizing is supported
2019-10-31 12:31:27 +00:00
Ratchanan Srirattanamet
b91ff666f8 camerabin2: preview: remove redundant property setting on appsink
Commit 8a56a7de6d (camerabin2: preview:
Appsink doesn't need to sync) add a line that set the "sync" property on
the appsink. However, the author seems to forget that there's another
property setting on appsink a few lines below.

It's very likely that the added line is required because the original
line doesn't take effect (maybe because it's too late). But for whatever
reason, the original line is now redundant. So, I remove it in this
commit.
2019-10-20 20:07:04 +00:00
Alistair Buxton
8ba1b8146f meson: use gir_init_section in GstTranscoder
GstTranscoder adds extra_args for gir which call gst_init() during
introspection. These extra arguments are the same as the standard
ones defined in the top level meson.build as "git_init_section",
However, the top level definition also ensures an empty plugin
repository is used.

Because GstTranscoder does not use the standard args, plugins get
loaded when it is introspected. Since some of the plugins fail
without specific hardware, this causes #1100.

This patch makes it use gir_init_section.

Fixes #1100.
2019-10-19 13:58:50 +01:00
Tim-Philipp Müller
f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00
Philipp Zabel
0cc7d6f093 codecparsers: h264: record pic_order_cnt elements size
Some hardware decoders, for example Hantro G1, have to be told the
size of the pic_order_cnt related syntax elements pic_order_cnt_lsb,
delta_pic_order_cnt_bottom, delta_pic_order_cnt[0], and
delta_pic_order_cnt[1] in bits.
2019-10-12 06:21:20 +02:00
Philipp Zabel
d0d65fa875 codecparsers: h264: record dec_ref_pic_marking() size
Some hardware decoders, for example Hantro G1, have to be told the size
of the dec_ref_pic_marking() syntax element in bits. Record the size so
it can be passed on to the hardware.
2019-10-12 06:21:20 +02:00
Seungha Yang
6f2ab31d10 h265parser: Calculate short term RPS size in slice header
The calculated size of short_term_ref_pic_set is not a part of
HEVC syntax but the value is used by some stateless decoders
(e.g., vaapi, dxva, vdpau and nvdec) for the purpose of skipping
parsing the syntax by the accelerator.
2019-10-12 02:44:35 +00:00
Seungha Yang
29d4db0f8f h265parser: Add H265 slice segment header documentation
Adding brief description for each value.
2019-10-12 02:44:35 +00:00
Seungha Yang
968a3508e1 h264parser: Expose parsed GstH264PPS::pic_scaling_matrix_present_flag 2019-10-11 19:43:22 +00:00
Seungha Yang
093caa8431 h264parser: Expose all parsed flags of slice header
Add num_ref_idx_active_override_flag and sp_for_switch_flag to
member of GstH264SliceHdr. No reason to hiding them and
some decoder implementations (e.g., DXVA) rely on externally parsed header
data which can be provided by h264parser.
2019-10-11 19:43:22 +00:00
Seungha Yang
1e38255c97 vulkan: Fix build on Windows
* Fix meson build script for Windows. Since the Vulkan dependency
object was declared by us in case of Windows, the dependency object
shouldn't be used for finding header

* Fix build error by including Windows specific header
gstvkdisplay.c(563): error C2065: 'VK_KHR_WIN32_SURFACE_EXTENSION_NAME': undeclared identifier
2019-09-25 22:14:40 +09:00
Matthew Waters
34ff895040 vulkan: remove VkImageView from the memory
There can be multiple views per image for different subresource ranges
or planes in multi-planer images.
2019-09-25 11:11:02 +00:00
Matthew Waters
452bb72292 vkbuffer: remove buffer view from the memory
It's only really useful for texture buffers which we currently do not
use.
2019-09-25 11:11:02 +00:00
Matthew Waters
5165f2509b build/vulkan: fix copy-paste error in gstvkconfig.h 2019-09-25 11:11:02 +00:00
Matthew Waters
a03d0a2638 vulkan: remove the winsys-specific headers from gst/vulkan/vulkan.h
Allows not having wayland, xcb, Cocoa, UIKit, windows.h included in the
public GstVulkan API.
2019-09-25 11:11:02 +00:00
Matthew Waters
82e86573b8 vulkan: implement command buffer reuse
Using a similar design for reference counting as
GstBuffer/GstBufferPool.
2019-09-19 02:01:35 +00:00
Matthew Waters
2af2402880 vulkan: add device provider implementation 2019-09-17 13:02:44 +10:00
Matthew Waters
5f76c84feb vulkan: split physical device from logical device 2019-09-17 13:02:44 +10:00
Matthew Waters
863e785770 vulkan: expose various flags to string methods 2019-09-17 13:02:44 +10:00
Matthew Waters
407dab607f vulkan: only pass the device/instance/display in to *_handle_*() functions
We don't need to change the pointer value in these functions.
2019-09-17 13:02:43 +10:00
Matthew Waters
cd28c77413 vulkan/window/ios: fix race on window startup
1. The iOS create_surface implementation needs to call out to the main
thread to create the window (UIKit requirement)
2. get_surface() can be called and will attempt to create the VkSurface
from an invalid view/layer.

Also pass the layer for MoltenVK so we don't get pesky 'UIView function
not called on main thread' warnings.
2019-09-16 03:15:39 +00:00
Matthew Waters
656a0cde84 vulkan: create the macos/ios-specific displays 2019-09-16 03:15:39 +00:00
Matthew Waters
96b2413616 vulkan: install public gstvkdebug.h header 2019-09-16 03:15:39 +00:00
Matthew Waters
08b53ca456 vulkan: fix build with older API headers
The protected memory flags were only added later as was the
multi-instance flag.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1081
2019-09-11 23:59:53 +00:00
Matthew Waters
2b7050120e vulkan: dump most of the device information
Dump anything that can be queried using the physical device like features,
limits, queue properties, memory properties.
2019-09-11 20:22:56 +10:00
Askar Safin
c881e0a505 gst-player: fix bug with changing playback direction
Fix gst_event_new_seek call in gst-libs/gst/player/gstplayer.c

If rate >= 0.0, then previous code doesn't set end of segment. So, the end of segment
will be in place where previous seek put it. This is not neccesary end of media file
(in case of reverse playback). So if we play video backward for some time and then
switched to forward playing, we will get EOS somewhere in the middle of media file.
This commit always sets end of segment, thus fixing this bug
2019-09-04 15:19:39 +00:00
Wangfei
4bc46b902d h265parse lib: fix missing condition when parse PPS
Follow h265 spec(04/2015), log2_max_transform_skip_block_size_minus2
should get with condition when transform_skip_enabled_flag is 1.
2019-08-31 23:22:44 +00:00
Yeongjin Jeong
fdab54611b vulkan: Fix some confusing typos
Seems to have been copy pasted from around gl element
2019-08-29 11:19:37 +00:00
Yeongjin Jeong
94671be428 vulkan/xcb: Don't try to create xcb window with non-xcb display
Non-xcb display does not have a xcb_connection and trying
to create xcb window with wild pointer can cause segfault.
2019-08-29 11:19:37 +00:00
Saunier Thibault
7a66b16d97 Import GstTranscoder 2019-08-28 13:02:13 +00:00
Matthew Waters
87311d404e vulkan/swapper: add a couple of missing g_clear_error()'s 2019-08-28 10:34:39 +00:00
Matthew Waters
542af25eb1 vulkan/build: conditionally depend on Vulkan-1.0.gir
Vulkan-1.0.gir is new in gobject-introspection >= 1.61.1
2019-08-28 10:34:39 +00:00
Matthew Waters
c237c8de6a vulkandisplay: silence an unused but set error with no enable winsys implementations 2019-08-28 10:34:39 +00:00
Matthew Waters
09883b6a6b vulkan/swapper: check queue present return later
During resizes, the VkQueuePresent can return OUT_OF_DATE and if a buffer
is displayed returning OUT_OF_DATE it would error out and stop the pipeline.

We already have a explicit check for OUT_OF_DATE and the same general
error check in the statements following so just use that code.
2019-08-28 10:34:39 +00:00
Matthew Waters
d1f8f7436d vulkan/swapper: destroy the surface in finalize
Fixes a leak of the VkSurface object.
2019-08-28 10:34:39 +00:00
Matthew Waters
cac1487479 vulkan/swapper: set some values to NULL in error conditions
So that they are not double free()-ed.
2019-08-28 10:34:39 +00:00
Matthew Waters
be9c9e44f1 vulkan/error: add the error value in hex and decimal
Provides more information for what may be an 'Unknown' error.
2019-08-28 10:34:39 +00:00
Matthew Waters
5ab92e05d8 vulkanswapper: disconnect window signals before any internal resources
Otherwise, it's racy whether the necessary resources are available in
the signal callbacks on destruction.
2019-08-28 10:34:39 +00:00
Aaron Boxer
40212aaf00 h265parse: add support for SEI registered user data 2019-08-26 18:14:17 -04:00
Mathieu Duponchelle
42adb02a10 docstrings: port ulinks to markdown links 2019-08-23 20:14:12 +02:00
Matthew Waters
b43651cf99 vulkandisplay: Also free the GSource
NULL checking the main_context does not help as we've just destroyed the
GMainContext and set that field to NULL, not to mention it's unnecessary.

Fixes a leak of display's GSource.
2019-08-22 17:28:19 +10:00
Matthew Waters
1b7e83c584 vulkandisplay: free the list of windows on destruction
They may not have had an explicit removal from the subclass.
2019-08-22 17:02:07 +10:00
Matthew Waters
fc9f047885 vulkandisplay: fix use-after-free with removal of window
g_list_delete_link() free()'s the list node so any access after that is
a use-after-free.
2019-08-22 14:55:40 +10:00
Matthew Waters
e83df1759d vulkan/xcb: display->windows is a list of allocated GWeakRef
Don't access them as plain GstVulkanWindow objects.
2019-08-22 14:54:30 +10:00
Wangfei
55db6413d7 h26[45]parser: Fix emulation prevention byte detection
Add a separate epb_cache variable to the codecparser NalReader to
detect Emulation Prevention Bytes separately from the main bit cache.

This fixes problems where the existing logic can mistakenly detect
multiple EPB with a sequence like: 0x00 0x00 0x03 0x00 0x03. In that
case, the 5th byte should not be regarded as an EPB.
2019-08-19 05:01:24 +00:00
Matthew Waters
db157428ee vulkan/ios: keep track of surface changes 2019-08-14 13:45:31 +10:00
Matthew Waters
c8614bf4da vulkan/ios: initialize the frame to the parent's 2019-08-14 13:45:31 +10:00