Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
f2f9b875
Commit
f2f9b875
authored
Jun 01, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: CAS: added profiles and implemented profile switcher
parent
3fb41a93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
2 deletions
+73
-2
modules/gui/macosx/ConvertAndSave.m
modules/gui/macosx/ConvertAndSave.m
+73
-2
No files found.
modules/gui/macosx/ConvertAndSave.m
View file @
f2f9b875
...
...
@@ -26,9 +26,15 @@
#import <vlc_common.h>
#import <vlc_url.h>
@interface
VLCConvertAndSave
()
@property
(
readwrite
,
retain
)
NSArray
*
profileNames
;
@property
(
readwrite
,
retain
)
NSArray
*
profileValueList
;
@property
(
readwrite
,
retain
)
NSMutableArray
*
currentProfile
;
@end
@implementation
VLCConvertAndSave
@synthesize
MRL
=
_MRL
,
outputDestination
=
_outputDestination
;
@synthesize
MRL
=
_MRL
,
outputDestination
=
_outputDestination
,
profileNames
=
_profileNames
,
profileValueList
=
_profileValueList
,
currentProfile
=
_currentProfile
;
static
VLCConvertAndSave
*
_o_sharedInstance
=
nil
;
...
...
@@ -48,6 +54,22 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
return
_o_sharedInstance
;
}
-
(
void
)
dealloc
{
if
(
_MRL
)
[
_MRL
release
];
if
(
_outputDestination
)
[
_outputDestination
release
];
if
(
_profileNames
)
[
_profileNames
release
];
if
(
_profileValueList
)
[
_profileValueList
release
];
if
(
_currentProfile
)
[
_currentProfile
release
];
[
super
dealloc
];
}
-
(
void
)
awakeFromNib
{
[
_window
setTitle
:
_NS
(
"Convert & Save"
)];
...
...
@@ -60,6 +82,49 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[
_destination_lbl
setStringValue
:
_NS
(
"Choose Destination"
)];
[
_destination_filename_stub_lbl
setStringValue
:
_NS
(
"Choose an output location"
)];
[
_destination_filename_lbl
setHidden
:
YES
];
_profileNames
=
[[
NSArray
alloc
]
initWithObjects
:
@"Video - H.264 + MP3 (MP4)"
,
@"Video - VP80 + Vorbis (Webm)"
,
@"Video - H.264 + MP3 (TS)"
,
@"Video - Dirac + MP3 (TS)"
,
@"Video - Theora + Vorbis (OGG)"
,
@"Video - Theora + Flac (OGG)"
,
@"Video - MPEG-2 + MPGA (TS)"
,
@"Video - WMV + WMA (ASF)"
,
@"Video - DIV3 + MP3 (ASF)"
,
@"Audio - Vorbis (OGG)"
,
@"Audio - MP3"
,
@"Audio - MP3 (MP4)"
,
@"Audio - FLAC"
,
@"Audio - CD"
,
_NS
(
"Custom"
),
nil
];
/* We are using the same format as the Qt4 intf here:
* Container(string), transcode video(bool), transcode audio(bool),
* use subtitles(bool), video codec(string), video bitrate(integer),
* scale(float), fps(float), width(integer, height(integer),
* audio codec(string), audio bitrate(integer), channels(integer),
* samplerate(integer), subtitle codec(string), subtitle overlay(bool) */
_profileValueList
=
[[
NSArray
alloc
]
initWithObjects
:
@"mp4;1;1;0;h264;0;0;0;0;0;mpga;128;2;44100;0;1"
,
@"webm;1;1;0;VP80;2000;0;0;0;0;vorb;128;2;44100;0;1"
,
@"ts;1;1;0;h264;800;1;0;0;0;mpga;128;2;44100;0;0"
,
@"ts;1;1;0;drac;800;1;0;0;0;mpga;128;2;44100;0;0"
,
@"ogg;1;1;0;theo;800;1;0;0;0;vorb;128;2;44100;0;0"
,
@"ogg;1;1;0;theo;800;1;0;0;0;flac;128;2;44100;0;0"
,
@"ts;1;1;0;mp2v;800;1;0;0;0;mpga;128;2;44100;0;0"
,
@"asf;1;1;0;WMV2;800;1;0;0;0;wma2;128;2;44100;0;0"
,
@"asf;1;1;0;DIV3;800;1;0;0;0;mp3;128;2;44100;0;0"
,
@"ogg;1;1;0;none;800;1;0;0;0;vorb;128;2;44100;none;0"
,
@"raw;1;1;0;none;800;1;0;0;0;mp3;128;2;44100;none;0"
,
@"mp4;1;1;0;none;800;1;0;0;0;mpga;128;2;44100;none;0"
,
@"raw;1;1;0;none;800;1;0;0;0;flac;128;2;44100;none;0"
,
@"wav;1;1;0;none;800;1;0;0;0;s16l;128;2;44100;none;0"
,
nil
];
[
_profile_pop
removeAllItems
];
[
_profile_pop
addItemsWithTitles
:
_profileNames
];
}
-
(
void
)
toggleWindow
...
...
@@ -77,6 +142,13 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
-
(
IBAction
)
profileSelection
:(
id
)
sender
{
NSInteger
index
=
[
sender
indexOfSelectedItem
];
if
(
index
!=
([
sender
numberOfItems
]
-
1
))
{
if
(
_currentProfile
)
[
_currentProfile
release
];
_currentProfile
=
[[
NSMutableArray
alloc
]
initWithArray
:
[[
_profileValueList
objectAtIndex
:
index
]
componentsSeparatedByString
:
@";"
]];
}
}
-
(
IBAction
)
customizeProfile
:(
id
)
sender
...
...
@@ -150,7 +222,6 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
return
NO
;
}
@end
...
...
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