diff options
Diffstat (limited to 'lvc/resources')
46 files changed, 340 insertions, 0 deletions
diff --git a/lvc/resources/__init__.py b/lvc/resources/__init__.py new file mode 100644 index 0000000..005041d --- /dev/null +++ b/lvc/resources/__init__.py @@ -0,0 +1,21 @@ +import os.path +import glob +import sys + +def image_path(name): + return os.path.join(resources_dir(), 'images', name) + +def converter_scripts(): + return glob.glob(os.path.join(resources_dir(), 'converters', '*.py')) + + +def resources_dir(): + if in_py2exe(): + directory = os.path.join(os.path.dirname(sys.executable), "resources") + else: + directory = os.path.dirname(__file__) + return os.path.abspath(directory) + +def in_py2exe(): + return (hasattr(sys,"frozen") and + sys.frozen in ("windows_exe", "console_exe")) diff --git a/lvc/resources/converters/android.py b/lvc/resources/converters/android.py new file mode 100644 index 0000000..ffe73f2 --- /dev/null +++ b/lvc/resources/converters/android.py @@ -0,0 +1,61 @@ +from lvc.converter import FFmpegConverterInfo +from lvc.basicconverters import MP4 + +class AndroidConversion(FFmpegConverterInfo): + media_type = 'android' + extension = 'mp4' + parameters = ('-acodec aac -ac 2 -ab 160k ' + '-vcodec libx264 -preset slow -profile:v baseline -level 30 ' + '-maxrate 10000000 -bufsize 10000000 -f mp4 -threads 0 ') + simple = MP4 + +y = AndroidConversion('Galaxy Y', 320, 240) +mini = AndroidConversion('Galaxy Mini', 320, 240) +ace = AndroidConversion('Galaxy Ace', 480, 320) +admire = AndroidConversion('Galaxy Admire', 480, 320) +charge = AndroidConversion('Galaxy Charge', 800, 480) +s = AndroidConversion('Galaxy S / SII / S Plus', 800, 480) +siii = AndroidConversion('Galaxy SIII', 1280, 720) +nexus = AndroidConversion('Galaxy Nexus', 1280, 720) +tab = AndroidConversion('Galaxy Tab', 1024, 600) +tab_10 = AndroidConversion('Galaxy Tab 10.1', 1280, 800) +note = AndroidConversion('Galaxy Note', 1280, 800) +note = AndroidConversion('Galaxy Note II', 1920, 1080) +infuse = AndroidConversion('Galaxy Infuse', 1280, 800) +epic = AndroidConversion('Galaxy Epic', 800, 480) + +samsung_devices = ('Samsung', [y, mini, ace, admire, charge, s, siii, nexus, + tab, tab_10, note, infuse, epic]) + +wildfire = AndroidConversion('Wildfire', 320, 240) +desire = AndroidConversion('Desire', 800, 480) +incredible = AndroidConversion('Droid Incredible', 800, 480) +thunderbolt = AndroidConversion('Thunderbolt', 800, 480) +evo = AndroidConversion('Evo 4G', 800, 480) +sensation = AndroidConversion('Sensation', 960, 540) +rezound = AndroidConversion('Rezound', 1280, 720) +onex = AndroidConversion('One X', 1280, 720) + +htc_devices = ('HTC', [wildfire, desire, incredible, thunderbolt, evo, + sensation, rezound, onex]) + +droid = AndroidConversion('Droid', 854, 480) +droid_x2 = AndroidConversion('Droid X2', 1280, 720) +razr = AndroidConversion('RAZR', 960, 540) +xoom = AndroidConversion('XOOM', 1280, 800) + +motorola_devices = ('Motorola', [droid, droid_x2, razr, xoom]) + +zio = AndroidConversion('Zio', 800, 480) + +sanyo_devices = ('Sanyo', [zio]) + +small = AndroidConversion('Small (480x320)', 480, 320) +normal = AndroidConversion('Normal (800x480)', 800, 480) +large720 = AndroidConversion('Large (720p)', 1280, 720) +large1080 = AndroidConversion('Large (1080p)', 1920, 1080) + +more_devices = ('More Devices', [small, normal, large720, large1080]) + +converters = [samsung_devices, htc_devices, motorola_devices, sanyo_devices, + more_devices] diff --git a/lvc/resources/converters/apple.py b/lvc/resources/converters/apple.py new file mode 100644 index 0000000..88dc973 --- /dev/null +++ b/lvc/resources/converters/apple.py @@ -0,0 +1,28 @@ +from lvc.converter import FFmpegConverterInfo +from lvc.basicconverters import MP4 + +class AppleConversion(FFmpegConverterInfo): + media_type = 'apple' + extension = 'mp4' + parameters = ('-acodec aac -ac 2 -ab 160k ' + '-vcodec libx264 -preset slow -profile:v baseline -level 30 ' + '-maxrate 10000000 -bufsize 10000000 -vb 1200k -f mp4 ' + '-threads 0') + simple = MP4 + + +DEFAULT_SIZE = (480, 320) + +ipod = AppleConversion('iPod Nano/Classic', *DEFAULT_SIZE) +ipod_touch = AppleConversion('iPod Touch', 640, 480) +ipod_retina = AppleConversion('iPod Touch 4+', 960, 640) +iphone = AppleConversion('iPhone', 640, 480) +iphone_retina = AppleConversion('iPhone 4+', 960, 640) +iphone_5 = AppleConversion('iPhone 5', 1920, 1080) +ipad = AppleConversion('iPad', 1024, 768) +ipad_retina = AppleConversion('iPad 3', 1920, 1080) +apple_tv = AppleConversion('Apple TV', 1280, 720) +universal = AppleConversion('Apple Universal', 1280, 720) + +converters = [ipod, ipod_touch, ipod_retina, iphone, iphone_retina, iphone_5, + ipad, ipad_retina, apple_tv, universal] diff --git a/lvc/resources/converters/others.py b/lvc/resources/converters/others.py new file mode 100644 index 0000000..13ad3b0 --- /dev/null +++ b/lvc/resources/converters/others.py @@ -0,0 +1,20 @@ +from lvc.converter import FFmpegConverterInfo + +class PlaystationPortable(FFmpegConverterInfo): + media_type = 'other' + extension = 'mp4' + parameters = ('-b 512000 -ar 24000 -ab 64000 ' + '-f psp -r 29.97').split() + + +class KindleFire(FFmpegConverterInfo): + media_type = 'other' + extension = 'mp4' + parameters = ('-acodec aac -ab 96k -vcodec libx264 ' + '-preset slow -f mp4 -crf 22').split() + + +psp = PlaystationPortable('Playstation Portable', 320, 240) +kindle_fire = KindleFire('Kindle Fire', 1224, 600) + +converters = [psp, kindle_fire] diff --git a/lvc/resources/images/android-icon-off.png b/lvc/resources/images/android-icon-off.png Binary files differnew file mode 100644 index 0000000..5948f4c --- /dev/null +++ b/lvc/resources/images/android-icon-off.png diff --git a/lvc/resources/images/android-icon-on.png b/lvc/resources/images/android-icon-on.png Binary files differnew file mode 100644 index 0000000..85be5be --- /dev/null +++ b/lvc/resources/images/android-icon-on.png diff --git a/lvc/resources/images/apple-icon-off.png b/lvc/resources/images/apple-icon-off.png Binary files differnew file mode 100644 index 0000000..947bfae --- /dev/null +++ b/lvc/resources/images/apple-icon-off.png diff --git a/lvc/resources/images/apple-icon-on.png b/lvc/resources/images/apple-icon-on.png Binary files differnew file mode 100644 index 0000000..9949653 --- /dev/null +++ b/lvc/resources/images/apple-icon-on.png diff --git a/lvc/resources/images/arrow-down-off.png b/lvc/resources/images/arrow-down-off.png Binary files differnew file mode 100644 index 0000000..368079f --- /dev/null +++ b/lvc/resources/images/arrow-down-off.png diff --git a/lvc/resources/images/arrow-down-on.png b/lvc/resources/images/arrow-down-on.png Binary files differnew file mode 100644 index 0000000..8963b5b --- /dev/null +++ b/lvc/resources/images/arrow-down-on.png diff --git a/lvc/resources/images/audio.png b/lvc/resources/images/audio.png Binary files differnew file mode 100644 index 0000000..4d59605 --- /dev/null +++ b/lvc/resources/images/audio.png diff --git a/lvc/resources/images/clear-icon.png b/lvc/resources/images/clear-icon.png Binary files differnew file mode 100644 index 0000000..5b054fa --- /dev/null +++ b/lvc/resources/images/clear-icon.png diff --git a/lvc/resources/images/convert-button-off.png b/lvc/resources/images/convert-button-off.png Binary files differnew file mode 100644 index 0000000..307a8bd --- /dev/null +++ b/lvc/resources/images/convert-button-off.png diff --git a/lvc/resources/images/convert-button-on.png b/lvc/resources/images/convert-button-on.png Binary files differnew file mode 100644 index 0000000..2a66c76 --- /dev/null +++ b/lvc/resources/images/convert-button-on.png diff --git a/lvc/resources/images/convert-button-stop.png b/lvc/resources/images/convert-button-stop.png Binary files differnew file mode 100644 index 0000000..cb09a97 --- /dev/null +++ b/lvc/resources/images/convert-button-stop.png diff --git a/lvc/resources/images/converted_to-icon.png b/lvc/resources/images/converted_to-icon.png Binary files differnew file mode 100644 index 0000000..14ee6d3 --- /dev/null +++ b/lvc/resources/images/converted_to-icon.png diff --git a/lvc/resources/images/dropoff-icon-off.png b/lvc/resources/images/dropoff-icon-off.png Binary files differnew file mode 100644 index 0000000..e182d49 --- /dev/null +++ b/lvc/resources/images/dropoff-icon-off.png diff --git a/lvc/resources/images/dropoff-icon-on.png b/lvc/resources/images/dropoff-icon-on.png Binary files differnew file mode 100644 index 0000000..1dfd88f --- /dev/null +++ b/lvc/resources/images/dropoff-icon-on.png diff --git a/lvc/resources/images/dropoff-icon-small-off.png b/lvc/resources/images/dropoff-icon-small-off.png Binary files differnew file mode 100644 index 0000000..186a7e6 --- /dev/null +++ b/lvc/resources/images/dropoff-icon-small-off.png diff --git a/lvc/resources/images/dropoff-icon-small-on.png b/lvc/resources/images/dropoff-icon-small-on.png Binary files differnew file mode 100644 index 0000000..476ea49 --- /dev/null +++ b/lvc/resources/images/dropoff-icon-small-on.png diff --git a/lvc/resources/images/error-icon.png b/lvc/resources/images/error-icon.png Binary files differnew file mode 100644 index 0000000..656b2c3 --- /dev/null +++ b/lvc/resources/images/error-icon.png diff --git a/lvc/resources/images/item-completed.png b/lvc/resources/images/item-completed.png Binary files differnew file mode 100644 index 0000000..1400eda --- /dev/null +++ b/lvc/resources/images/item-completed.png diff --git a/lvc/resources/images/item-delete-button-off.png b/lvc/resources/images/item-delete-button-off.png Binary files differnew file mode 100644 index 0000000..12cd239 --- /dev/null +++ b/lvc/resources/images/item-delete-button-off.png diff --git a/lvc/resources/images/item-delete-button-on.png b/lvc/resources/images/item-delete-button-on.png Binary files differnew file mode 100644 index 0000000..45786e5 --- /dev/null +++ b/lvc/resources/images/item-delete-button-on.png diff --git a/lvc/resources/images/item-error.png b/lvc/resources/images/item-error.png Binary files differnew file mode 100644 index 0000000..710ff61 --- /dev/null +++ b/lvc/resources/images/item-error.png diff --git a/lvc/resources/images/lvc-logo.png b/lvc/resources/images/lvc-logo.png Binary files differnew file mode 100644 index 0000000..fce15e4 --- /dev/null +++ b/lvc/resources/images/lvc-logo.png diff --git a/lvc/resources/images/other-icon-off.png b/lvc/resources/images/other-icon-off.png Binary files differnew file mode 100644 index 0000000..a6c76f2 --- /dev/null +++ b/lvc/resources/images/other-icon-off.png diff --git a/lvc/resources/images/other-icon-on.png b/lvc/resources/images/other-icon-on.png Binary files differnew file mode 100644 index 0000000..6c60edc --- /dev/null +++ b/lvc/resources/images/other-icon-on.png diff --git a/lvc/resources/images/progressbar-base.png b/lvc/resources/images/progressbar-base.png Binary files differnew file mode 100644 index 0000000..298a6b6 --- /dev/null +++ b/lvc/resources/images/progressbar-base.png diff --git a/lvc/resources/images/queued-icon.png b/lvc/resources/images/queued-icon.png Binary files differnew file mode 100644 index 0000000..d4e9242 --- /dev/null +++ b/lvc/resources/images/queued-icon.png diff --git a/lvc/resources/images/settings-base_center.png b/lvc/resources/images/settings-base_center.png Binary files differnew file mode 100644 index 0000000..d5f3065 --- /dev/null +++ b/lvc/resources/images/settings-base_center.png diff --git a/lvc/resources/images/settings-base_left.png b/lvc/resources/images/settings-base_left.png Binary files differnew file mode 100644 index 0000000..a0f10c2 --- /dev/null +++ b/lvc/resources/images/settings-base_left.png diff --git a/lvc/resources/images/settings-base_right.png b/lvc/resources/images/settings-base_right.png Binary files differnew file mode 100644 index 0000000..14456eb --- /dev/null +++ b/lvc/resources/images/settings-base_right.png diff --git a/lvc/resources/images/settings-depth_center.png b/lvc/resources/images/settings-depth_center.png Binary files differnew file mode 100644 index 0000000..fb5f586 --- /dev/null +++ b/lvc/resources/images/settings-depth_center.png diff --git a/lvc/resources/images/settings-depth_left.png b/lvc/resources/images/settings-depth_left.png Binary files differnew file mode 100644 index 0000000..a13694b --- /dev/null +++ b/lvc/resources/images/settings-depth_left.png diff --git a/lvc/resources/images/settings-depth_right.png b/lvc/resources/images/settings-depth_right.png Binary files differnew file mode 100644 index 0000000..5ddd21f --- /dev/null +++ b/lvc/resources/images/settings-depth_right.png diff --git a/lvc/resources/images/settings-dropdown-bottom-bg.png b/lvc/resources/images/settings-dropdown-bottom-bg.png Binary files differnew file mode 100644 index 0000000..bc650f8 --- /dev/null +++ b/lvc/resources/images/settings-dropdown-bottom-bg.png diff --git a/lvc/resources/images/settings-icon-off.png b/lvc/resources/images/settings-icon-off.png Binary files differnew file mode 100644 index 0000000..340b516 --- /dev/null +++ b/lvc/resources/images/settings-icon-off.png diff --git a/lvc/resources/images/settings-icon-on.png b/lvc/resources/images/settings-icon-on.png Binary files differnew file mode 100644 index 0000000..be008d4 --- /dev/null +++ b/lvc/resources/images/settings-icon-on.png diff --git a/lvc/resources/images/showfile-icon.png b/lvc/resources/images/showfile-icon.png Binary files differnew file mode 100644 index 0000000..7f9040f --- /dev/null +++ b/lvc/resources/images/showfile-icon.png diff --git a/lvc/resources/nsis/lvc-logo.ico b/lvc/resources/nsis/lvc-logo.ico Binary files differnew file mode 100644 index 0000000..007a929 --- /dev/null +++ b/lvc/resources/nsis/lvc-logo.ico diff --git a/lvc/resources/nsis/modern-wizard.bmp b/lvc/resources/nsis/modern-wizard.bmp Binary files differnew file mode 100644 index 0000000..d8ea8d9 --- /dev/null +++ b/lvc/resources/nsis/modern-wizard.bmp diff --git a/lvc/resources/nsis/plugins/nsProcess.dll b/lvc/resources/nsis/plugins/nsProcess.dll Binary files differnew file mode 100644 index 0000000..4355d4a --- /dev/null +++ b/lvc/resources/nsis/plugins/nsProcess.dll diff --git a/lvc/resources/nsis/plugins/nsProcess.nsh b/lvc/resources/nsis/plugins/nsProcess.nsh new file mode 100644 index 0000000..76642e0 --- /dev/null +++ b/lvc/resources/nsis/plugins/nsProcess.nsh @@ -0,0 +1,21 @@ +!define nsProcess::FindProcess `!insertmacro nsProcess::FindProcess`
+
+!macro nsProcess::FindProcess _FILE _ERR
+ nsProcess::_FindProcess /NOUNLOAD `${_FILE}`
+ Pop ${_ERR}
+!macroend
+
+
+!define nsProcess::KillProcess `!insertmacro nsProcess::KillProcess`
+
+!macro nsProcess::KillProcess _FILE _ERR
+ nsProcess::_KillProcess /NOUNLOAD `${_FILE}`
+ Pop ${_ERR}
+!macroend
+
+
+!define nsProcess::Unload `!insertmacro nsProcess::Unload`
+
+!macro nsProcess::Unload
+ nsProcess::_Unload
+!macroend
diff --git a/lvc/resources/windows/README b/lvc/resources/windows/README new file mode 100644 index 0000000..bcc603e --- /dev/null +++ b/lvc/resources/windows/README @@ -0,0 +1,7 @@ +This directory contains resources files for the windows port. + +---- gtkrc --- + +Taken from +http://art.gnome.org/download/themes/gtk2/1203/GTK2-ClearlooksVisto.tar.bz2 +and modified for Libre Video Converter diff --git a/lvc/resources/windows/gtkrc b/lvc/resources/windows/gtkrc new file mode 100755 index 0000000..45a6969 --- /dev/null +++ b/lvc/resources/windows/gtkrc @@ -0,0 +1,182 @@ +# Clearlooks-Visto by Marius M. M. < devilx at gdesklets dot org> +# This theme is GPLed :) + +gtk-icon-sizes = "panel-menu=16,16:panel=22,22" + +style "clearlooks-default" +{ + GtkButton::default_border = { 0, 0, 0, 0 } + GtkButton::default_outside_border = { 0, 0, 0, 0 } + GtkRange::trough_border = 0 + + GtkWidget::focus_padding = 1 + + GtkPaned::handle_size = 6 + + GtkRange::slider_width = 15 + GtkRange::stepper_size = 15 + GtkScrollbar::min_slider_length = 30 + GtkCheckButton::indicator_size = 12 + GtkMenuBar::internal-padding = 0 + + GtkTreeView::expander_size = 14 + GtkTreeView::odd_row_color = "#EBF5FF" + GtkExpander::expander_size = 16 + + xthickness = 1 + ythickness = 1 + + fg[NORMAL] = "#505050" + fg[ACTIVE] = "#505050" + fg[SELECTED] = "#ffffff" + fg[INSENSITIVE] = "#9B9B9B" + + bg[NORMAL] = "#F5F5F5" + bg[ACTIVE] = "#f9f9f9" + bg[PRELIGHT] = "#888888" + bg[SELECTED] = "#095fb2" + bg[INSENSITIVE] = "#888888" + + base[NORMAL] = "#ffffff" + base[ACTIVE] = "#095fb2" + base[PRELIGHT] = "#FFFFFF" + base[INSENSITIVE]= "#ffffff" + base[SELECTED] = "#095fb2" + + text[INSENSITIVE]= "#9B9B9B" + text[SELECTED] = "#ffffff" + text[ACTIVE] = "#ffffff" + + engine "clearlooks" + { + contrast = 1.1 + menubarstyle = 2 # 0 = flat, 1 = sunken, 2 = flat gradient + menuitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient), 2 = 3d-ish (button) + listviewitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient) + progressbarstyle = 1 # 0 = candy bar, 1 = flat + } +} + + +style "clearlooks-progressbar" = "clearlooks-default" +{ + fg[PRELIGHT] = "#ffffff" + xthickness = 1 + ythickness = 1 + +} + +style "clearlooks-wide" = "clearlooks-default" +{ + xthickness = 2 + ythickness = 2 +} + +style "clearlooks-button" = "clearlooks-default" +{ + xthickness = 3 + ythickness = 3 +} + +style "clearlooks-notebook" = "clearlooks-wide" +{ + bg[NORMAL] = "#FAFAFA" +} + +style "clearlooks-tasklist" = "clearlooks-default" +{ + xthickness = 5 + ythickness = 3 +} + +style "clearlooks-menu" = "clearlooks-default" +{ + xthickness = 2 + ythickness = 1 +} + +style "clearlooks-menubar" = "clearlooks-default" +{ + xthickness = 2 + ythickness = 2 + base[PRELIGHT] = "#63E62E" + base[SELECTED] = "#4DB224" +} + +style "clearlooks-menu-item" = "clearlooks-default" +{ + xthickness = 2 + ythickness = 3 + fg[PRELIGHT] = "#ffffff" + text[PRELIGHT] = "#ffffff" +} + +style "clearlooks-tree" = "clearlooks-default" +{ + xthickness = 2 + ythickness = 2 +} + +style "clearlooks-frame-title" = "clearlooks-default" +{ + fg[NORMAL] = "#505050" +} + +style "clearlooks-panel" = "clearlooks-default" +{ + xthickness = 3 + ythickness = 3 +} + +style "clearlooks-tooltips" = "clearlooks-default" +{ + xthickness = 4 + ythickness = 4 + bg[NORMAL] = { 1.0,1.0,0.75 } +} + +style "clearlooks-combo" = "clearlooks-default" +{ + xthickness = 1 + ythickness = 2 +} + +style "metacity-frame" +{ + bg[SELECTED] = "#095fb2" + fg[SELECTED] = "#ffffff" +} + +class "GtkWidget" style "clearlooks-default" +class "GtkButton" style "clearlooks-button" +class "GtkCombo" style "clearlooks-button" +class "GtkRange" style "clearlooks-wide" +class "GtkFrame" style "clearlooks-wide" +class "GtkMenu" style "clearlooks-menu" +class "GtkEntry" style "clearlooks-button" +class "GtkMenuItem" style "clearlooks-menu-item" +class "GtkStatusbar" style "clearlooks-wide" +class "GtkNotebook" style "clearlooks-notebook" +class "GtkProgressBar" style "clearlooks-progressbar" +class "*MenuBar*" style "clearlooks-menubar" +class "GtkMenuBar*" style "clearlooks-menubar" +class "MetaFrames" style "metacity-frame" + +widget_class "*MenuItem*" style "clearlooks-menu-item" + +widget_class "*.GtkComboBox.GtkButton" style "clearlooks-combo" +widget_class "*.GtkCombo.GtkButton" style "clearlooks-combo" + +widget_class "*.tooltips.*.GtkToggleButton" style "clearlooks-tasklist" +widget "gtk-tooltips" style "clearlooks-tooltips" + +widget_class "*.GtkTreeView.GtkButton" style "clearlooks-tree" +widget_class "*.GtkCTree.GtkButton" style "clearlooks-tree" +widget_class "*.GtkList.GtkButton" style "clearlooks-tree" +widget_class "*.GtkCList.GtkButton" style "clearlooks-tree" +widget_class "*.GtkFrame.GtkLabel" style "clearlooks-frame-title" + +widget_class "*.GtkNotebook.*.GtkEventBox" style "clearlooks-notebook" +widget_class "*.GtkNotebook.*.GtkViewport" style "clearlooks-notebook" + +widget_class "*MenuBar*" style "clearlooks-menubar" |