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
496bd7cd
Commit
496bd7cd
authored
Jul 26, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: respond to updated synchro values
parent
9d00cb58
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
34 deletions
+30
-34
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+2
-1
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+1
-28
modules/gui/macosx/TrackSynchronization.h
modules/gui/macosx/TrackSynchronization.h
+1
-0
modules/gui/macosx/TrackSynchronization.m
modules/gui/macosx/TrackSynchronization.m
+13
-0
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+2
-1
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+11
-4
No files found.
modules/gui/macosx/MainWindow.h
View file @
496bd7cd
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
IBOutlet
id
o_video_view
;
IBOutlet
id
o_video_view
;
IBOutlet
id
o_split_view
;
IBOutlet
id
o_split_view
;
IBOutlet
id
o_sidebar_view
;
IBOutlet
id
o_sidebar_view
;
IBOutlet
id
o_chosen_category_lbl
;
BOOL
b_dark_interface
;
BOOL
b_dark_interface
;
BOOL
b_video_playback_enabled
;
BOOL
b_video_playback_enabled
;
...
@@ -97,7 +98,7 @@
...
@@ -97,7 +98,7 @@
-
(
void
)
updateTimeSlider
;
-
(
void
)
updateTimeSlider
;
-
(
void
)
updateVolumeSlider
;
-
(
void
)
updateVolumeSlider
;
-
(
void
)
updateWindow
;
-
(
void
)
updateWindow
;
-
(
void
)
update
Titl
e
;
-
(
void
)
update
Nam
e
;
-
(
void
)
setPause
;
-
(
void
)
setPause
;
-
(
void
)
setPlay
;
-
(
void
)
setPlay
;
-
(
void
)
setRepeatOne
;
-
(
void
)
setRepeatOne
;
...
...
modules/gui/macosx/MainWindow.m
View file @
496bd7cd
...
@@ -62,25 +62,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -62,25 +62,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
-
(
id
)
initWithContentRect
:(
NSRect
)
contentRect
styleMask
:(
NSUInteger
)
styleMask
-
(
id
)
initWithContentRect
:(
NSRect
)
contentRect
styleMask
:(
NSUInteger
)
styleMask
backing
:(
NSBackingStoreType
)
backingType
defer
:(
BOOL
)
flag
backing
:(
NSBackingStoreType
)
backingType
defer
:(
BOOL
)
flag
{
{
/* FIXME: this should enable the SnowLeopard window style, however, it leads to ugly artifacts
* needs some further investigation! -- feepk */
BOOL
b_useTextured
=
YES
;
if
(
[[
NSWindow
class
]
instancesRespondToSelector
:
@selector
(
setContentBorderThickness
:
forEdge
:
)]
)
{
b_useTextured
=
NO
;
// styleMask ^= NSTexturedBackgroundWindowMask;
// styleMask ^= NSTexturedBackgroundWindowMask;
}
self
=
[
super
initWithContentRect
:
contentRect
styleMask
:
styleMask
//& ~NSTitledWindowMask
self
=
[
super
initWithContentRect
:
contentRect
styleMask
:
styleMask
//& ~NSTitledWindowMask
backing:
backingType
defer
:
flag
];
backing:
backingType
defer
:
flag
];
[[
VLCMain
sharedInstance
]
updateTogglePlaylistState
];
[[
VLCMain
sharedInstance
]
updateTogglePlaylistState
];
// FIXME: see above...
if
(
!
b_useTextured
)
[
self
setContentBorderThickness
:
28
.
0
forEdge
:
NSMinYEdge
];
/* we want to be moveable regardless of our style */
/* we want to be moveable regardless of our style */
[
self
setMovableByWindowBackground
:
YES
];
[
self
setMovableByWindowBackground
:
YES
];
...
@@ -219,21 +207,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -219,21 +207,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
self
updateVolumeSlider
];
[
self
updateVolumeSlider
];
}
}
-
(
void
)
becomeMainWindow
{
[
o_sidebar_view
setBackgroundColor
:
[
NSColor
colorWithCalibratedRed
:
0
.
820
green:
0
.
843
blue:
0
.
886
alpha:
1
.
0
]];
[
super
becomeMainWindow
];
}
-
(
void
)
resignMainWindow
{
[
o_sidebar_view
setBackgroundColor
:
[
NSColor
colorWithCalibratedWhite
:
0
.
91
alpha
:
1
.
0
]];
[
super
resignMainWindow
];
}
#pragma mark -
#pragma mark -
#pragma mark Button Actions
#pragma mark Button Actions
...
@@ -462,7 +435,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -462,7 +435,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
}
}
}
-
(
void
)
update
Titl
e
-
(
void
)
update
Nam
e
{
{
input_thread_t
*
p_input
;
input_thread_t
*
p_input
;
...
...
modules/gui/macosx/TrackSynchronization.h
View file @
496bd7cd
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
+
(
VLCTrackSynchronization
*
)
sharedInstance
;
+
(
VLCTrackSynchronization
*
)
sharedInstance
;
-
(
IBAction
)
toggleWindow
:(
id
)
sender
;
-
(
IBAction
)
toggleWindow
:(
id
)
sender
;
-
(
IBAction
)
resetValues
:(
id
)
sender
;
-
(
IBAction
)
resetValues
:(
id
)
sender
;
-
(
void
)
updateValues
;
/* Audio / Video */
/* Audio / Video */
-
(
IBAction
)
avValueChanged
:(
id
)
sender
;
-
(
IBAction
)
avValueChanged
:(
id
)
sender
;
...
...
modules/gui/macosx/TrackSynchronization.m
View file @
496bd7cd
...
@@ -89,6 +89,19 @@ static VLCTrackSynchronization *_o_sharedInstance = nil;
...
@@ -89,6 +89,19 @@ static VLCTrackSynchronization *_o_sharedInstance = nil;
}
}
}
}
-
(
void
)
updateValues
{
input_thread_t
*
p_input
=
pl_CurrentInput
(
p_intf
);
if
(
p_input
)
{
[
o_av_value_fld
setFloatValue
:
var_GetTime
(
p_input
,
"audio-delay"
)
/
1000000
];
[
o_sv_advance_value_fld
setFloatValue
:
var_GetTime
(
p_input
,
"spu-delay"
)
/
1000000
];
[
o_sv_speed_value_fld
setFloatValue
:
var_GetFloat
(
p_input
,
"sub-fps"
)];
vlc_object_release
(
p_input
);
}
}
-
(
IBAction
)
avValueChanged
:(
id
)
sender
-
(
IBAction
)
avValueChanged
:(
id
)
sender
{
{
if
(
sender
==
o_av_minus_btn
)
if
(
sender
==
o_av_minus_btn
)
...
...
modules/gui/macosx/intf.h
View file @
496bd7cd
...
@@ -176,10 +176,11 @@ struct intf_sys_t
...
@@ -176,10 +176,11 @@ struct intf_sys_t
-
(
void
)
playbackModeUpdated
;
-
(
void
)
playbackModeUpdated
;
-
(
void
)
updateVolume
;
-
(
void
)
updateVolume
;
-
(
void
)
updatePlaybackPosition
;
-
(
void
)
updatePlaybackPosition
;
-
(
void
)
update
Titl
e
;
-
(
void
)
update
Nam
e
;
-
(
void
)
playlistUpdated
;
-
(
void
)
playlistUpdated
;
-
(
void
)
updateInfoandMetaPanel
;
-
(
void
)
updateInfoandMetaPanel
;
-
(
void
)
updateMainWindow
;
-
(
void
)
updateMainWindow
;
-
(
void
)
updateDelays
;
-
(
void
)
initStrings
;
-
(
void
)
initStrings
;
-
(
BOOL
)
application
:(
NSApplication
*
)
o_app
openFile
:(
NSString
*
)
o_filename
;
-
(
BOOL
)
application
:(
NSApplication
*
)
o_app
openFile
:(
NSString
*
)
o_filename
;
...
...
modules/gui/macosx/intf.m
View file @
496bd7cd
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
#import "eyetv.h"
#import "eyetv.h"
#import "simple_prefs.h"
#import "simple_prefs.h"
#import "CoreInteraction.h"
#import "CoreInteraction.h"
#import "TrackSynchronization.h"
#import <AddressBook/AddressBook.h>
/* for crashlog send mechanism */
#import <AddressBook/AddressBook.h>
/* for crashlog send mechanism */
#import <Sparkle/Sparkle.h>
/* we're the update delegate */
#import <Sparkle/Sparkle.h>
/* we're the update delegate */
...
@@ -261,7 +262,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
...
@@ -261,7 +262,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
break
;
break
;
case
INPUT_EVENT_ITEM_META
:
case
INPUT_EVENT_ITEM_META
:
case
INPUT_EVENT_ITEM_INFO
:
case
INPUT_EVENT_ITEM_INFO
:
[[
VLCMain
sharedInstance
]
update
Titl
e
];
[[
VLCMain
sharedInstance
]
update
Nam
e
];
[[
VLCMain
sharedInstance
]
updateInfoandMetaPanel
];
[[
VLCMain
sharedInstance
]
updateInfoandMetaPanel
];
break
;
break
;
case
INPUT_EVENT_BOOKMARK
:
case
INPUT_EVENT_BOOKMARK
:
...
@@ -276,11 +277,12 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
...
@@ -276,11 +277,12 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
break
;
break
;
case
INPUT_EVENT_ITEM_NAME
:
case
INPUT_EVENT_ITEM_NAME
:
[[
VLCMain
sharedInstance
]
update
Titl
e
];
[[
VLCMain
sharedInstance
]
update
Nam
e
];
break
;
break
;
case
INPUT_EVENT_AUDIO_DELAY
:
case
INPUT_EVENT_AUDIO_DELAY
:
case
INPUT_EVENT_SUBTITLE_DELAY
:
case
INPUT_EVENT_SUBTITLE_DELAY
:
[[
VLCMain
sharedInstance
]
updateDelays
];
break
;
break
;
case
INPUT_EVENT_DEAD
:
case
INPUT_EVENT_DEAD
:
...
@@ -1231,9 +1233,14 @@ unsigned int CocoaKeyToVLC( unichar i_key )
...
@@ -1231,9 +1233,14 @@ unsigned int CocoaKeyToVLC( unichar i_key )
[
o_mainwindow
updateWindow
];
[
o_mainwindow
updateWindow
];
}
}
-
(
void
)
update
Title
-
(
void
)
update
Delays
{
{
[
o_mainwindow
updateTitle
];
[[
VLCTrackSynchronization
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
updateValues
)
withObject
:
nil
waitUntilDone
:
NO
];
}
-
(
void
)
updateName
{
[
o_mainwindow
updateName
];
}
}
-
(
void
)
updatePlaybackPosition
-
(
void
)
updatePlaybackPosition
...
...
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