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
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 @@
...
@@ -26,9 +26,15 @@
#import <vlc_common.h>
#import <vlc_common.h>
#import <vlc_url.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
@implementation
VLCConvertAndSave
@synthesize
MRL
=
_MRL
,
outputDestination
=
_outputDestination
;
@synthesize
MRL
=
_MRL
,
outputDestination
=
_outputDestination
,
profileNames
=
_profileNames
,
profileValueList
=
_profileValueList
,
currentProfile
=
_currentProfile
;
static
VLCConvertAndSave
*
_o_sharedInstance
=
nil
;
static
VLCConvertAndSave
*
_o_sharedInstance
=
nil
;
...
@@ -48,6 +54,22 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
...
@@ -48,6 +54,22 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
return
_o_sharedInstance
;
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
-
(
void
)
awakeFromNib
{
{
[
_window
setTitle
:
_NS
(
"Convert & Save"
)];
[
_window
setTitle
:
_NS
(
"Convert & Save"
)];
...
@@ -60,6 +82,49 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
...
@@ -60,6 +82,49 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[
_destination_lbl
setStringValue
:
_NS
(
"Choose Destination"
)];
[
_destination_lbl
setStringValue
:
_NS
(
"Choose Destination"
)];
[
_destination_filename_stub_lbl
setStringValue
:
_NS
(
"Choose an output location"
)];
[
_destination_filename_stub_lbl
setStringValue
:
_NS
(
"Choose an output location"
)];
[
_destination_filename_lbl
setHidden
:
YES
];
[
_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
-
(
void
)
toggleWindow
...
@@ -77,6 +142,13 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
...
@@ -77,6 +142,13 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
-
(
IBAction
)
profileSelection
:(
id
)
sender
-
(
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
-
(
IBAction
)
customizeProfile
:(
id
)
sender
...
@@ -150,7 +222,6 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
...
@@ -150,7 +222,6 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
return
NO
;
return
NO
;
}
}
@end
@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