This lock "protects" two things:
- The need-update boolean which can more easily be protected by the
playlist lock.
- The "node", whose lifetime is not correctly handled anyway.
User interfaces should only add new items under the playlist or the
media library nodes. In particular, they have no business adding or
removing SD items.
This removes the insertion offset parameter to playlist_Add(),
playlist_AddExt() and playlist_AddInput().
intf_InsertItem() was the only occurrence where the offset was zero,
a side effect of how the command line is parsed backward. This is now
done explicitly with playlist_NodeAddInput().
A non-zero positive offset made no sense, since:
- the number of children of a node can change asynchronously while the
playlist lock,
- the back-end asserted or triggered undefined behaviour if the offset
was out of range.
DBus was the only occurrence of this bug (see also #17451 comment:4),
and has been fixed in an earlier change.
In all remaining call sites, the offset was PLAYLIST_END. This removes
the parameter which would otherwise constitute a useless constant.
They are set but never used. In practice, the (following) position
parameter determines whether the item is inserted or appended. A
positive position means insertion; PLAYLIST_END means appendment.
The mentioned commit removes the last parameter of playlist_AddInput,
causing an error diagnostic when trying to build gui/macosx (due to
too many arguments being passed).
These changes simply adjust the function-call so that it uses the
right number of arguments, by dropping the (now removed) last
argument, effectively fixing the build.
Signed-off-by: Tristan Matthews <tmatth@videolan.org>
playlist_DeleteFromInput() requires recursive search through the whole
playlist to find the correct playlist item. This only makes sense if
the playlist item or playlist item ID are not known.
Passing a playlist item parameter to a locked playlist function cannot
make sense. This replaces the parameter with a boolean to select the
playlist or media lirary - like playlist_AddInput().
The prototype bug was introduced ed0b72e3 before the playlist tree
locking was defined/implemented, and somehow did not get corrected
until now.
Nodes are not supposed to have real input items. The parameter was
always NULL, except when copying another node, in which case it did not
matter whether it was or was not NULL.
Convert/Save dialog has had option to specify 'start time' but
no option for setting 'stop time' in the interface. The backend
'stop-time' option was already present. This patch simply adds
and enables the edit widget for end time in Qt interface.
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
Previously for items with no metadata, the whole area
right to the coverart was empty, which could be a bit
confusing. This change will make sure we always display
at least the item name, if it has no title.
Due to auto layout issues the fullscreen controller window would use
a huge height on some older OS X versions (tested on 10.7), which would
cause rendering some controls to hang.
As a quick fix, this commit disables the possibility to adjust the
height on OS X versions lower than 10.10.
This fixes an issue where VLC would crash on 10.7 doe to usage of the
CGColor method on NSColor which was only introduce in 10.8, leading
to a crash on 10.7.
This will add a fallback mechanism that uses a
normal layer-backed NSView with a dark but still
slightly transparent background on macOS versions
that do not support NSVisualEffectView.
Additionally it will allow compilation with older
SDK's that have no NSVisualEffectView defined.
If compiled with such an SDK, support for
NSVisualEffectView is disabled completely, so
even when running the compiled VLC version
on 10.10 or higher it will use the old fallback
view, as the SDK it was compiled with had not the
necessary definitions.
This introduces a new fullscreen controller
which uses NSVisualEffectView for it's background
and the icons that are used throughout the rest of
the macOS user interface, hence making it more
consistent with the overall look of VLC.
Additionally the new fullscreen controller is
resizable and, as it already used to be, can be
move around on the screen.
The user interface is now described in a interface
builder file (xib) instead of doing everything in
code. This allows easy usage of autolayout, which
is heavily used to allow adaption of the
buttons/sliders depending on the panel width and
height.
The only V4L2 controls "without" minima and maxima are the 64-bits
integers. Those are not handled properly by the Qt UI anyway, since
neither the QSpinBox nor the Q(Abstract)Slider support the proper
range of values.
Adds dedicated method for trying to set the given file as subtitle.
Deduplicate code from three places.
Also removes superfluous add to recent media list.