1
mirror of https://code.videolan.org/videolan/vlc synced 2024-08-18 23:45:06 +02:00

macosx: replace previous A→B loop implementation

This commit is contained in:
Felix Paul Kühne 2019-03-25 17:10:48 +01:00
parent a82e9a0350
commit d42c089e61
5 changed files with 1 additions and 51 deletions

View File

@ -60,9 +60,6 @@
- (void)repeatAll;
- (void)repeatOff;
- (void)shuffle;
- (void)setAtoB;
- (void)resetAtoB;
- (void)updateAtoB;
- (void)volumeUp;
- (void)volumeDown;

View File

@ -53,7 +53,6 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
@interface VLCCoreInteraction ()
{
float f_currentPlaybackRate;
vlc_tick_t timeA, timeB;
float f_maxVolume;
@ -412,48 +411,6 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
[_playerController displayOSDMessage:_NS("Repeat Off")];
}
- (void)setAtoB
{
if (!timeA) {
input_thread_t * p_input = pl_CurrentInput(getIntf());
if (p_input) {
msg_Dbg(getIntf(), "Setting A value");
timeA = var_GetInteger(p_input, "time");
input_Release(p_input);
}
} else if (!timeB) {
input_thread_t * p_input = pl_CurrentInput(getIntf());
if (p_input) {
msg_Dbg(getIntf(), "Setting B value");
timeB = var_GetInteger(p_input, "time");
input_Release(p_input);
}
} else
[self resetAtoB];
}
- (void)resetAtoB
{
msg_Dbg(getIntf(), "Resetting A to B values");
timeA = 0;
timeB = 0;
}
- (void)updateAtoB
{
if (timeB) {
input_thread_t * p_input = pl_CurrentInput(getIntf());
if (p_input) {
vlc_tick_t currentTime = var_GetInteger(p_input, "time");
if ( currentTime >= timeB || currentTime < timeA)
var_SetInteger(p_input, "time", timeA);
input_Release(p_input);
}
}
}
- (void)jumpToTime:(vlc_tick_t)time
{
input_thread_t * p_input = pl_CurrentInput(getIntf());

View File

@ -270,7 +270,6 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
- (void)updateMainMenu
{
[[o_main mainMenu] setupMenus];
[[VLCCoreInteraction sharedInstance] resetAtoB];
}
- (BOOL)hasInput

View File

@ -854,8 +854,7 @@
- (IBAction)toggleAtoBloop:(id)sender
{
// re-write the following using VLCPlayerController
[[VLCCoreInteraction sharedInstance] setAtoB];
[_playerController setABLoop];
}
- (IBAction)goToSpecificTime:(id)sender

View File

@ -571,8 +571,6 @@ static const float f_min_window_height = 307.;
- (void)updateTimeSlider
{
[self.fspanel updatePositionAndTime];
[[VLCCoreInteraction sharedInstance] updateAtoB];
}
- (void)updateName