Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
4fe8a647
Commit
4fe8a647
authored
Jul 10, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: stability improvements
parent
14d5ddef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
40 deletions
+37
-40
modules/gui/macosx/CoreInteraction.h
modules/gui/macosx/CoreInteraction.h
+0
-2
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+37
-38
No files found.
modules/gui/macosx/CoreInteraction.h
View file @
4fe8a647
...
...
@@ -26,8 +26,6 @@
#import <vlc_interface.h>
@interface
VLCCoreInteraction
:
NSObject
{
intf_thread_t
*
p_intf
;
BOOL
b_lockAspectRatio
;
}
+
(
VLCCoreInteraction
*
)
sharedInstance
;
...
...
modules/gui/macosx/CoreInteraction.m
View file @
4fe8a647
...
...
@@ -71,17 +71,12 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
object:
nil
];
}
-
(
void
)
applicationWillFinishLaunching
:(
NSNotification
*
)
o_notification
{
p_intf
=
VLCIntf
;
}
#pragma mark -
#pragma mark Playback Controls
-
(
void
)
play
{
playlist_t
*
p_playlist
=
pl_Get
(
p_i
ntf
);
playlist_t
*
p_playlist
=
pl_Get
(
VLCI
ntf
);
bool
empty
;
PL_LOCK
;
...
...
@@ -91,12 +86,12 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
if
(
empty
)
[[[
VLCMain
sharedInstance
]
open
]
openFileGeneric
];
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_PLAY_PAUSE
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_PLAY_PAUSE
);
}
-
(
void
)
stop
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_STOP
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_STOP
);
/* Close the window directly, because we do know that there
* won't be anymore video. It's currently waiting a bit. */
[[[
self
voutView
]
window
]
orderOut
:
self
];
...
...
@@ -104,129 +99,133 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
-
(
void
)
faster
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_FASTER
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_FASTER
);
}
-
(
void
)
slower
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_SLOWER
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_SLOWER
);
}
-
(
void
)
normalSpeed
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_RATE_NORMAL
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_RATE_NORMAL
);
}
-
(
void
)
previous
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_PREV
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_PREV
);
}
-
(
void
)
next
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_NEXT
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_NEXT
);
}
-
(
void
)
forward
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_JUMP_FORWARD_SHORT
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_JUMP_FORWARD_SHORT
);
}
-
(
void
)
backward
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_JUMP_BACKWARD_SHORT
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_JUMP_BACKWARD_SHORT
);
}
-
(
void
)
shuffle
{
vlc_value_t
val
;
playlist_t
*
p_playlist
=
pl_Get
(
p_i
ntf
);
playlist_t
*
p_playlist
=
pl_Get
(
VLCI
ntf
);
var_Get
(
p_playlist
,
"random"
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
var_Set
(
p_playlist
,
"random"
,
val
);
if
(
val
.
b_bool
)
{
//vout_OSDMessage(
p_i
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Random On" ) );
//vout_OSDMessage(
VLCI
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Random On" ) );
config_PutInt
(
p_playlist
,
"random"
,
1
);
}
else
{
//vout_OSDMessage(
p_i
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Random Off" ) );
//vout_OSDMessage(
VLCI
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Random Off" ) );
config_PutInt
(
p_playlist
,
"random"
,
0
);
}
p_i
ntf
->
p_sys
->
b_playmode_update
=
true
;
p_i
ntf
->
p_sys
->
b_intf_update
=
true
;
VLCI
ntf
->
p_sys
->
b_playmode_update
=
true
;
VLCI
ntf
->
p_sys
->
b_intf_update
=
true
;
}
-
(
void
)
repeatAll
{
playlist_t
*
p_playlist
=
pl_Get
(
p_i
ntf
);
playlist_t
*
p_playlist
=
pl_Get
(
VLCI
ntf
);
var_SetBool
(
p_playlist
,
"repeat"
,
NO
);
var_SetBool
(
p_playlist
,
"loop"
,
YES
);
config_PutInt
(
p_playlist
,
"repeat"
,
NO
);
config_PutInt
(
p_playlist
,
"loop"
,
YES
);
//vout_OSDMessage(
p_i
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Repeat All" ) );
//vout_OSDMessage(
VLCI
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Repeat All" ) );
p_i
ntf
->
p_sys
->
b_playmode_update
=
true
;
p_i
ntf
->
p_sys
->
b_intf_update
=
true
;
VLCI
ntf
->
p_sys
->
b_playmode_update
=
true
;
VLCI
ntf
->
p_sys
->
b_intf_update
=
true
;
}
-
(
void
)
repeatOne
{
playlist_t
*
p_playlist
=
pl_Get
(
p_i
ntf
);
playlist_t
*
p_playlist
=
pl_Get
(
VLCI
ntf
);
var_SetBool
(
p_playlist
,
"repeat"
,
YES
);
var_SetBool
(
p_playlist
,
"loop"
,
NO
);
config_PutInt
(
p_playlist
,
"repeat"
,
YES
);
config_PutInt
(
p_playlist
,
"loop"
,
NO
);
//vout_OSDMessage(
p_i
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Repeat One" ) );
//vout_OSDMessage(
VLCI
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Repeat One" ) );
p_i
ntf
->
p_sys
->
b_playmode_update
=
true
;
p_i
ntf
->
p_sys
->
b_intf_update
=
true
;
VLCI
ntf
->
p_sys
->
b_playmode_update
=
true
;
VLCI
ntf
->
p_sys
->
b_intf_update
=
true
;
}
-
(
void
)
repeatOff
{
playlist_t
*
p_playlist
=
pl_Get
(
p_i
ntf
);
playlist_t
*
p_playlist
=
pl_Get
(
VLCI
ntf
);
var_SetBool
(
p_playlist
,
"repeat"
,
NO
);
var_SetBool
(
p_playlist
,
"loop"
,
NO
);
config_PutInt
(
p_playlist
,
"repeat"
,
NO
);
config_PutInt
(
p_playlist
,
"loop"
,
NO
);
//vout_OSDMessage(
p_i
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Repeat Off" ) );
//vout_OSDMessage(
VLCI
ntf, SPU_DEFAULT_CHANNEL, "%s", _( "Repeat Off" ) );
p_i
ntf
->
p_sys
->
b_playmode_update
=
true
;
p_intf
->
p_sys
->
b_intf_update
=
true
;
VLCI
ntf
->
p_sys
->
b_playmode_update
=
true
;
VLCIntf
->
p_sys
->
b_intf_update
=
true
;
}
// CAVE: [o_main manageVolumeSlider]
-
(
void
)
volumeUp
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_VOL_UP
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_VOL_UP
);
}
-
(
void
)
volumeDown
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_VOL_DOWN
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_VOL_DOWN
);
}
-
(
void
)
mute
{
var_SetInteger
(
p_i
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_VOL_MUTE
);
var_SetInteger
(
VLCI
ntf
->
p_libvlc
,
"key-action"
,
ACTIONID_VOL_MUTE
);
}
-
(
void
)
setVolume
:
(
int
)
i_value
{
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
int
i_volume_step
=
config_GetInt
(
p_intf
->
p_libvlc
,
"volume-step"
);
aout_VolumeSet
(
p_playlist
,
i_value
*
i_volume_step
);
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
audio_volume_t
i_volume
=
(
audio_volume_t
)
i_value
;
int
i_volume_step
;
i_volume_step
=
config_GetInt
(
VLCIntf
->
p_libvlc
,
"volume-step"
);
aout_VolumeSet
(
p_playlist
,
i_volume
*
i_volume_step
);
}
#pragma mark -
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment