Commit Graph

95954 Commits

Author SHA1 Message Date
Pierre Ynard e9705c553c youtube.lua: &fmt=hd URL parameter to leverage "adaptive" formats
This provides experimental support to play again all available video
resolutions, by combining audio and video "adaptive" elementary streams
using an input slave. Not in use by default; use at your own risks.

Again, by allowing to select resolutions lower than 360p, this also
provides mitigation against the throttling issue.

Ref #10237, #27227
2023-02-14 16:42:07 +00:00
Pierre Ynard b88da3715b youtube.lua: split stream URL parsing into separate function 2023-02-14 16:42:07 +00:00
Pierre Ynard 94d5e1aa65 youtube.lua: &fmt={audio,video} URL parameters for "adaptive" formats
This extends the old &fmt=[itag] URL syntax that we still supported all
along to force format selection, and allows choosing from "adaptive"
elementary streams without knowledge of itag specifics and in accordance
with normal resolution preferences.

This also allows playing only the audio part of music videos and
skipping the download of the video part entirely, greatly reducing
bitrate and providing mitigation against the throttling issue.

Ref #10237, #27227
2023-02-14 16:42:07 +00:00
Pierre Ynard aa2032bb2e youtube.lua: generic support for YouTube "adaptive" formats
Formats listed under that label are audio-only or video-only elementary
streams, but offer choice encompassing the full array of supported
resolutions, qualities and codecs; whereas classic multiplexed formats
have long been dwindling down to only two formats now, 720p and 360p, or
even 360p only for some content.

For now, these "adaptive" formats are only used if explicitly requested
by itag number.

Ref #10237
2023-02-14 16:42:07 +00:00
Pierre Ynard b916319907 youtube.lua: split stream format selection into separate function 2023-02-14 16:42:07 +00:00
Pierre Ynard 7d9722f206 youtube.lua: lazy initialization for fetching descrambling javascript
This makes more sense and will simplify code flow.
2023-02-14 16:42:07 +00:00
Pierre Ynard b5c12e5ed1 youtube.lua: update comments about fmt URL parameter
Link to old Wikipedia page revision where itag parameter formats were
actually still described.
2023-02-14 16:42:07 +00:00
Pierre Ynard 12b739ef68 youtube.lua: declare proper local scope for working variables 2023-02-14 16:42:07 +00:00
Pierre Ynard 91aac3a2fa youtube.lua: disable broken call in dead code 2023-02-14 16:42:07 +00:00
Pierre Ynard 9bbdd152cb youtube.lua: disable broken "n" descrambling for now
All it achieves at the moment is wasting CPU time, slowing down playback
startup, and distracting users with extraneous warnings.

Ref #27227
2023-02-14 16:42:07 +00:00
Pierre Ynard 5bab61310f youtube.lua: support YouTube Shorts URLs 2023-02-14 16:42:07 +00:00
Steve Lhomme 61c9cbe24f goom: initialize the video format with video_format_Init()
Do not rely on calloc to get proper values.
2023-02-14 14:36:20 +00:00
Steve Lhomme 6dc1c5a457 goom: explicitely set the output as full range 2023-02-14 14:36:20 +00:00
Steve Lhomme 82bca6ae86 goom: use plane_CopyPixels()
The destination stribe may not be the same as the source.
2023-02-14 14:36:20 +00:00
Kerrick Staley 27042bbbe4 Enlarge buttons in remote-control web UI 2023-02-14 14:21:38 +00:00
Alexandre Janniaux 774266e886 videotoolbox: add encoder implementation
The encoder is able to process CVPixelBuffer (chroma CVP*) as input.

Note that this encoder will asynchronously signal its codec extradata at
the first i-frame encoded.

It currently disable B-frame generation since VideotoolBox requires
reordering to happen in the output too, moving the enabling to another
merge request.

Fixes #25152
2023-02-14 13:36:36 +00:00
Alexandre Janniaux edae2a6e75 videotoolbox: refactor error path
Refactor error path to avoid locking before returning to the end of the
function just because the end of the function expects to unlock.
2023-02-14 13:36:36 +00:00
Alexandre Janniaux 5a480ad35b codec: videotoolbox: move into subdirectory
Prepare the split of videotoolbox decoder and the integration of the
encoder code by moving to a separate subdirectory.
2023-02-14 13:36:36 +00:00
Romain Vimont adcec0edcc opengl: accept vout format change
If the core requests to change the vout format (because it added filters
having a different format), recreate the interop and the filters to
accept the new format without an additional converter.
2023-02-14 11:36:04 +00:00
Romain Vimont 4da11af993 vout: update format only if chroma changed alone
The core is not ready to support size changes via the "update format"
mechanism.

Attempt to update the vout format only when the only difference between
the old and new format is the chroma.

Refs #1021
2023-02-14 11:36:04 +00:00
Romain Vimont e831af370b vout: update format after filters
The vout is created first, based on the input format. Then filters
(filter_t) could be added, possibly producing pictures in a different
format.

      input ---> filters --->    MISMATCH    [I420] vout
            I420         RGBA

To avoid a mismatch between the output of the last filter and the
expected format of the vout input, a converter was added when necessary
to compensate:

      input ---> filters ---> converter ---> [I420] vout
            I420         RGBA           I420

But this was often a waste, and it caused problems for opaque formats.

Instead, request the vout to adapt itself to the actual format produced
by the last filter. If it can, we can avoid an additional converter.

      input ---> filters --->    MISMATCH    [I420] vout
            I420         RGBA

      input ---> filters ------------------> [RGBA] vout
            I420         RGBA

If the vout does not support the new format (or does not accept to
update its format), a converter is still added like before.

Co-authored-by: Alexandre Janniaux <ajanni@videolabs.io>
2023-02-14 11:36:04 +00:00
Romain Vimont 0095945c27 opengl: interop: hold video context
The video context must not be destroyed while the interop is alive.
2023-02-14 11:36:04 +00:00
Claudio Cambra b3ffbdb67d macosx: Use reveal in finder methods in data types rather than reimplement in menu controller
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra 2e2f547177 macosx: Make VLCInputItem conform to VLCLocallyManipulableItemProtocol
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra 74905b620f macosx: Make VLCMediaLibraryItemProtocol inherit VLCLocallyManipulableItemProtocol
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra a0bcafed88 macosx: Make VLCMediaLibraryAlbum, VLCMediaLibraryGenre, and VLCMediaLibraryArtist inherit VLCAbstractMediaLibraryAudioGroup
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra 00757c97a4 macosx: Conform VLCAbstractMediaLibraryAudioGroup to VLCLocallyManipulableItemProtocol
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra e7d9b1b869 macosx: Add VLCAbstractMediaLibraryAudioGroup
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra bc6b4f5eb7 macosx: Make VLCMediaLibraryMediaItem conform to VLCLocallyManipulableItemProtocol
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra 4a5a1b837e macosx: Remove unnecessary iterateMediaItemsWithBlock declaration in VLCMediaLibraryGenre
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra 6b16f1ed20 macosx: Add VLCLocallyManipulableItemProtocol
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra fc1ec2eb75 macosx: Fix crash on trying to access VLCAbstractMediaLibraryItem smallArtworkMRL property
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra d07778e8f0 macosx: Make VLCLibraryImageCache accept real VLCAbstractMediaLibraryItem rather than protocol
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra d0d6ee0520 macosx: Make media library item classes inherit VLCAbstractMediaLibraryItem, remove duplicated code
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Claudio Cambra 360bb7172a macosx: Add VLCAbstractMediaLibraryItem class to eliminate duplication of certain protocol property and method implementations
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-02-14 10:43:23 +00:00
Thomas Guillem ff1316724f es_out: don't decode paused decoders
This avoid to fill up the decoder FIFO for nothing (ESes will be flushed
on resume).
2023-02-14 09:55:37 +00:00
Thomas Guillem 44a4e0b0b3 es_out: pause newly created decoders during next-frame 2023-02-14 09:55:37 +00:00
Thomas Guillem c2f303cc7d vout: render next frame asynchronously
Smoother next-frame (when repeating next-frame key) and fix the next
frame sometime not being displayed, just after a seek.

Refs #2951
2023-02-14 09:55:37 +00:00
Thomas Guillem e44306672c vout: add vout_control_ReleaseAndWake
Release and wake the control within the same lock instance.

Will be used by the next commit
2023-02-14 09:55:37 +00:00
Thomas Guillem 0306d70a52 vout: return an error if there is no new pictures to display next
Instead of reporting an error when the current picture fail to refresh
(unlikely).
2023-02-14 09:55:37 +00:00
Thomas Guillem 9fe30c65ae vout: remove now unused duration in vout_NextPicture 2023-02-14 09:55:37 +00:00
Thomas Guillem ea93b2c847 input: add a workaround for next-frame
Don't hack the buffering values, but fake the buffering state: tell the
input_thread to demux() until the vout has a picture.

Fixes #2951
2023-02-14 09:55:37 +00:00
Alexandre Janniaux fe1c31bcd2 lua: extension: reindent after previous changes
Previous changes were transforming the error path as early return,
leaving a potential indentation level for each commit that could be
removed. This commit is removing them.

No functional changes.
2023-02-14 09:36:23 +00:00
Alexandre Janniaux 8ca59d74f2 lua: extension: refactor early return
This commit doesn't change indentation just yet, to make the change more
obvious.
2023-02-14 09:36:23 +00:00
Alexandre Janniaux 3d5f263c65 lua: extension: refactor early return
This commit doesn't change indentation just yet, to make the change more
obvious.
2023-02-14 09:36:23 +00:00
Alexandre Janniaux cca0ff9ce4 lua: extension: refactor error path to goto
Split the normal path and error path and move the release behind the
error label to remove the handling of the `b_ok` state in the normal
path.

Since returning an error only makes the processing forward to the next
extension to be run, and doesn't fail completely, the label is named
"discard" to signal it will only discard the current extension.
2023-02-14 09:36:23 +00:00
Alexandre Janniaux 822f5b414a lua: extension: reindent after previous changes
Previous changes were transforming the error path as early return,
leaving a potential indentation level to be removed. This commit is
removing it.

No functional changes.
2023-02-14 09:36:23 +00:00
Alexandre Janniaux 2af078646f lua: extension: refactor error as early return
This commit doesn't change indentation just yet, to make the change more
obvious.
2023-02-14 09:36:23 +00:00
Alexandre Janniaux d9e7889a18 lua: extension: don't cast calloc
calloc returns a `void*` which is automatically casted into any pointer
type in C code.
2023-02-14 09:36:23 +00:00
Alexandre Janniaux 60e981eb90 lua: extension: reindent after previous changes
Previous changes were transforming the error path as early return,
leaving a potential indentation level for each commit that could be
removed. This commit is removing them.

No functional changes.
2023-02-14 09:36:23 +00:00