Steve Lhomme
c50fdba621
remove unneeded vlc_modules.h includes
2 years ago
Steve Lhomme
10edd6b917
use vlc_filter_UnloadModule instead of multiple local calls
It's better suited for filter_t.
2 years ago
Steve Lhomme
648cd8839a
filters: load "video converter" filters with vlc_filter_LoadModule()
2 years ago
Marvin Scholz
ec76e1cde3
vout: VLCSampleBufferDisplay: specify bitmap byte order
Fixes a warning about the implicit conversion of enum type:
implicit conversion from enumeration type 'enum CGImageAlphaInfo'
to different enumeration type 'CGBitmapInfo'
2 years ago
Steve Lhomme
65b813712c
display: remove redundant VOUT_DISPLAY_CHANGE_DISPLAY_FILLED
If the display filling mode of the video changed, the video placement has changed as well.
Display modules don't actually care about the aspect ratio, just where they're supposed to stretch the video.
2 years ago
Steve Lhomme
0c10d95148
display: remove redundant VOUT_DISPLAY_CHANGE_ZOOM
If the zoom of the video changed, the video placement has changed as well.
Display modules don't actually care about the aspect ratio, just where they're supposed to stretch the video.
2 years ago
Steve Lhomme
4ab62d06f8
display: notify display modules when the picture placement changed
In many cases that's what they really care about. Not the display size or display filled value.
2 years ago
Steve Lhomme
83f01e9321
VLCSampleBufferDisplay: remove write-only sys->place
2 years ago
Steve Lhomme
301cc26428
vout_subpictures: place rendered regions in display coordinates
Only for display modules that render regions separately.
2 years ago
Steve Lhomme
d824725009
VLCSampleBufferDisplay: use the picture format of SPU when dealing with buffer mapping
Missing parts from 4f37f30c69 .
2 years ago
Steve Lhomme
df71e59703
VLCSampleBufferDisplay: assume the video area is the same as the "original" area
2 years ago
Steve Lhomme
17bc969d45
vlc_spu: assume display module that can render subpicture regions can scale it
We already require these display modules to be able to place and scale/stretch the video picture.
2 years ago
Steve Lhomme
7b5664c013
vout_subpictures: handle zoomed placement in the core
The zooming factor is applied once in the core, no need to make the display module compute it.
2 years ago
Steve Lhomme
f9434a9530
vout_subpictures: set the part of the region picture to display in the picture
The picture format already has a way to set cropping values in the picture.
We just need a clone of the picture to change the metadata.
2 years ago
Steve Lhomme
f684513739
VLCSampleBufferDisplay: handle subpicture region scaling
2 years ago
Steve Lhomme
41525773d6
vlc_subpictures: set the source offset in a separate fields
So we can get rid of the whole video_format_t.
2 years ago
Steve Lhomme
f4247dcedb
vout_subpictures: set the rendered region placement dimensions using the region format
So we have all placement fields set for the display modules.
2 years ago
Steve Lhomme
d65ee1fc23
vlc_subpictures: replace rendered position with a display placement
For now only the x/y part of the placement structure are used.
2 years ago
Steve Lhomme
83181fa907
vlc_subpicture: replace the rendered regions by a vector of subpicture_region_rendered
2 years ago
Steve Lhomme
4f37f30c69
VLCSampleBufferDisplay: use the picture format of SPU when dealing with buffer mapping
We already use the picture pitch.
We map the picture to a texture that is rendered using the buffer dimensions.
The other format is mostly used for positioning.
2 years ago
Alexandre Janniaux
933c2d055c
VLCSampleBufferDisplay: remove double const qualifier
2 years ago
Alexandre Janniaux
550ce6e1d8
VLCSampleBufferDisplay: remove kCGImageByteOrderDefault
kCGImageByteOrderDefault is the default value anyway (= 0 <<< 12) [^1]
and it's not available in older SDK we support.
[^1]: https://developer.apple.com/documentation/coregraphics/cgimagebyteorderinfo/kcgimagebyteorderdefault
2 years ago
Steve Lhomme
6d9b2a0929
vlc_list: split reading from a const list a non-const list
Items read from a const list should also be const.
The start of the listing needs a matching const/non-const pointer.
2 years ago
Steve Lhomme
473a66cb48
vout: read SPU regions as const
2 years ago
Steve Lhomme
2d53d9ca27
vout: pass the SPU regions to render as const
The display module should not need to modify them.
2 years ago
Steve Lhomme
f599d4c4f8
subpicture: use a separate type to pass a list of SPU regions to render
It contains only the useful fields from subpicture_t.
A display module should not need to know about channels, order, ephemer, fade,
etc.
2 years ago
Steve Lhomme
d6ffd5bc35
subpicture: use helper functions for vlc_spu_regions
2 years ago
Steve Lhomme
3d610be9f0
subpicture: use vlc_list for regions
This separates the region type from its container.
The drawback is that it makes the structure bigger. But we get plenty
of helpers. There might be other containers suitable but we use a mix of
append and prepend.
3 years ago
Steve Lhomme
e26bb6f497
vout: samplebufferdisplay: remove extra white spaces
2 years ago
Steve Lhomme
98d856aa95
vout: samplebufferdisplay: Pass regions as const in RegionBackingFrame()
2 years ago
Steve Lhomme
f4dc24aff5
vout: samplebufferdisplay: Don't modify the region picture
The i_visible_pitch is not used here. We should not modify the incoming
pictures.
2 years ago
Maxime Chapelet
f5116997fd
vout: samplebufferdisplay: Allocate decoder device properly
Allocate a new decoder device for each converter instead of allocating it once statically
3 years ago
Maxime Chapelet
bf442dcb0b
vout: samplebufferdisplay: Delete converter when display closes
Also hold converter's decoder device properly
3 years ago
Maxime Chapelet
03a668f85d
vout: samplebufferdisplay: Move converter functions
Move CVPX converter functions' to the top of source file
3 years ago
Maxime Chapelet
e182156498
vout: samplebufferdisplay: Rename converter functions
Refactor CVPX converter functions' name and parameters for consistency
3 years ago
Maxime Chapelet
629d4a3430
vout: new native display renderer for Apple platforms
This new module provides the ability to render Core Video pixel buffers pictures into an AVSampleBufferDisplayLayer.
Pictures decoded by a software decoder are converted to Core Video pixel buffers and picture decoded by the VideoToolbox decoder are rendered directly.
With this native API, rendering will be able to handle HDR tone-mapping natively without using OpenGL/libplacebo as it will be backed by Metal.
It also opens the ability to handle Picture in Picture mode on supported Darwin platforms with upcoming additional work.
It currently have the limitation to not support spherical video as it doesn't seems to be feasible at this time.
This module has the highest priority and will be the first vout display to be opened.
3 years ago