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
5d6ac80b
Commit
5d6ac80b
authored
Mar 01, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed track synchronization panel (close #6233)
parent
91df5145
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
232 additions
and
182 deletions
+232
-182
extras/package/macosx/Resources/English.lproj/SyncTracks.xib
extras/package/macosx/Resources/English.lproj/SyncTracks.xib
+193
-157
modules/gui/macosx/TrackSynchronization.h
modules/gui/macosx/TrackSynchronization.h
+5
-2
modules/gui/macosx/TrackSynchronization.m
modules/gui/macosx/TrackSynchronization.m
+33
-23
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+1
-0
No files found.
extras/package/macosx/Resources/English.lproj/SyncTracks.xib
View file @
5d6ac80b
This diff is collapsed.
Click to expand it.
modules/gui/macosx/TrackSynchronization.h
View file @
5d6ac80b
/*****************************************************************************
* TrackSynchronization.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2011 VLC authors and VideoLAN
* Copyright (C) 2011 Felix Paul Kühne
* Copyright (C) 2011
-2012
VLC authors and VideoLAN
* Copyright (C) 2011
-2012
Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
...
...
@@ -37,6 +37,7 @@
IBOutlet
id
o_av_minus_btn
;
IBOutlet
id
o_av_plus_btn
;
IBOutlet
id
o_av_value_fld
;
IBOutlet
id
o_av_stp
;
/* Subtitles / Video */
IBOutlet
id
o_sv_lbl
;
...
...
@@ -44,10 +45,12 @@
IBOutlet
id
o_sv_advance_minus_btn
;
IBOutlet
id
o_sv_advance_plus_btn
;
IBOutlet
id
o_sv_advance_value_fld
;
IBOutlet
id
o_sv_advance_stp
;
IBOutlet
id
o_sv_speed_lbl
;
IBOutlet
id
o_sv_speed_minus_btn
;
IBOutlet
id
o_sv_speed_plus_btn
;
IBOutlet
id
o_sv_speed_value_fld
;
IBOutlet
id
o_sv_speed_stp
;
}
/* generic */
...
...
modules/gui/macosx/TrackSynchronization.m
View file @
5d6ac80b
/*****************************************************************************
* TrackSynchronization.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2011 VLC authors and VideoLAN
* Copyright (C) 2011 Felix Paul Kühne
* Copyright (C) 2011
-2012
VLC authors and VideoLAN
* Copyright (C) 2011
-2012
Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
...
...
@@ -81,6 +81,9 @@ static VLCTrackSynchronization *_o_sharedInstance = nil;
[
o_av_value_fld
setFloatValue
:
0
.
0
];
[
o_sv_advance_value_fld
setFloatValue
:
0
.
0
];
[
o_sv_speed_value_fld
setFloatValue
:
1
.
0
];
[
o_av_stp
setFloatValue
:
0
.
0
];
[
o_sv_advance_stp
setFloatValue
:
0
.
0
];
[
o_sv_speed_stp
setFloatValue
:
1
.
0
];
input_thread_t
*
p_input
=
pl_CurrentInput
(
p_intf
);
...
...
@@ -99,27 +102,35 @@ static VLCTrackSynchronization *_o_sharedInstance = nil;
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
];
NSLog
(
@"new audio delay: %lld"
,
var_GetTime
(
p_input
,
"audio-delay"
)
);
[
o_av_value_fld
setDoubleValue
:
var_GetTime
(
p_input
,
"audio-delay"
)
/
1000000
.];
[
o_sv_advance_value_fld
setDoubleValue
:
var_GetTime
(
p_input
,
"spu-delay"
)
/
1000000
.];
[
o_sv_speed_value_fld
setFloatValue
:
var_GetFloat
(
p_input
,
"sub-fps"
)];
vlc_object_release
(
p_input
);
}
[
o_av_stp
setDoubleValue
:
[
o_av_value_fld
doubleValue
]];
[
o_sv_advance_stp
setDoubleValue
:
[
o_sv_advance_value_fld
doubleValue
]];
[
o_sv_speed_stp
setDoubleValue
:
[
o_sv_speed_value_fld
doubleValue
]];
}
-
(
IBAction
)
avValueChanged
:(
id
)
sender
{
if
(
sender
==
o_av_minus_btn
)
[
o_av_value_fld
set
FloatValue
:
[
o_av_value_fld
float
Value
]
-
0
.
5
];
[
o_av_value_fld
set
DoubleValue
:
[
o_av_value_fld
double
Value
]
-
0
.
5
];
if
(
sender
==
o_av_plus_btn
)
[
o_av_value_fld
setFloatValue
:
[
o_av_value_fld
floatValue
]
+
0
.
5
];
[
o_av_value_fld
setDoubleValue
:
[
o_av_value_fld
doubleValue
]
+
0
.
5
];
if
(
sender
==
o_av_stp
)
[
o_av_value_fld
setDoubleValue
:
[
o_av_stp
doubleValue
]];
else
[
o_av_stp
setDoubleValue
:
[
o_av_value_fld
doubleValue
]];
input_thread_t
*
p_input
=
pl_CurrentInput
(
p_intf
);
if
(
p_input
)
{
int64_t
i_delay
=
[
o_av_value_fld
floatValue
]
*
1000000
;
var_SetTime
(
p_input
,
"audio-delay"
,
i_delay
);
var_SetTime
(
p_input
,
"audio-delay"
,
[
o_av_value_fld
doubleValue
]
*
1000000
.
);
vlc_object_release
(
p_input
);
}
...
...
@@ -128,17 +139,21 @@ static VLCTrackSynchronization *_o_sharedInstance = nil;
-
(
IBAction
)
svAdvanceValueChanged
:(
id
)
sender
{
if
(
sender
==
o_sv_advance_minus_btn
)
[
o_sv_advance_value_fld
set
FloatValue
:
[
o_sv_advance_value_fld
float
Value
]
-
0
.
5
];
[
o_sv_advance_value_fld
set
DoubleValue
:
[
o_sv_advance_value_fld
double
Value
]
-
0
.
5
];
if
(
sender
==
o_sv_advance_plus_btn
)
[
o_sv_advance_value_fld
setFloatValue
:
[
o_sv_advance_value_fld
floatValue
]
+
0
.
5
];
[
o_sv_advance_value_fld
setDoubleValue
:
[
o_sv_advance_value_fld
doubleValue
]
+
0
.
5
];
if
(
sender
==
o_sv_advance_stp
)
[
o_sv_advance_value_fld
setDoubleValue
:
[
o_sv_advance_stp
doubleValue
]];
else
[
o_sv_advance_stp
setDoubleValue
:
[
o_sv_advance_value_fld
doubleValue
]];
input_thread_t
*
p_input
=
pl_CurrentInput
(
p_intf
);
if
(
p_input
)
{
int64_t
i_delay
=
[
o_sv_advance_value_fld
floatValue
]
*
1000000
;
var_SetTime
(
p_input
,
"spu-delay"
,
i_delay
);
var_SetTime
(
p_input
,
"spu-delay"
,
[
o_sv_advance_value_fld
doubleValue
]
*
1000000
.
);
vlc_object_release
(
p_input
);
}
...
...
@@ -152,24 +167,19 @@ static VLCTrackSynchronization *_o_sharedInstance = nil;
if
(
sender
==
o_sv_speed_plus_btn
)
[
o_sv_speed_value_fld
setFloatValue
:
[
o_sv_speed_value_fld
floatValue
]
+
0
.
5
];
if
(
sender
==
o_sv_speed_stp
)
[
o_sv_speed_value_fld
setFloatValue
:
[
o_sv_speed_stp
floatValue
]];
else
[
o_sv_speed_stp
setFloatValue
:
[
o_sv_speed_value_fld
floatValue
]];
input_thread_t
*
p_input
=
pl_CurrentInput
(
p_intf
);
if
(
p_input
)
{
var_SetFloat
(
p_input
,
"sub-fps"
,
[
o_
av
_value_fld
floatValue
]
);
var_SetFloat
(
p_input
,
"sub-fps"
,
[
o_
sv_speed
_value_fld
floatValue
]
);
vlc_object_release
(
p_input
);
}
}
-
(
void
)
controlTextDidChange
:(
NSNotification
*
)
aNotification
{
if
(
[
aNotification
object
]
==
o_av_value_fld
)
[
self
avValueChanged
:
self
];
else
if
(
[
aNotification
object
]
==
o_sv_advance_value_fld
)
[
self
svAdvanceValueChanged
:
self
];
else
if
(
[
aNotification
object
]
==
o_sv_speed_value_fld
)
[
self
svSpeedValueChanged
:
self
];
}
@end
modules/gui/macosx/intf.m
View file @
5d6ac80b
...
...
@@ -1412,6 +1412,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
[
o_playlist
updateRowSelection
];
[
o_mainwindow
updateWindow
];
[
self
updateDelays
];
[
self
updateMainMenu
];
}
...
...
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