Projects
Multimedia
selene
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
selene.changes
Changed
@@ -1,4 +1,31 @@ ------------------------------------------------------------------- +Sat May 7 07:12:54 UTC 2016 - sor.alexei@meowr.ru + +- Update to version 16.3.3 (changes since 16.2.7): + * Add options for copying audio and video track without + re-encoding. + * Use the first embedded subtitle track if an external subtitle + file is not found. + * Add support for encoding files with multiple audio/subtitle + tracks. + * Add support for encoding HEVC video in MKV. + * Add libkate-tools as a dependency for encoding subtitles in + OGG files. + * Remove dependency on ffmpeg2theora tool which is unmaintained. + Theora video will be encoded with ffmpeg/avconv. + * Add option to set default language for files with multiple + tracks. + * Add option to keep or delete temporary files after successful + encode. + * Closing the progress window after a batch is finished will + take user to main window instead of quitting the application. + * Fix encoding mode being not set correctly for Vorbis. + * Fix decimal numbers being not loaded correctly from preset file + on non-English systems. + * Fix 'Too many open files' error on converting many files. + * Code cleanup and minor changes. + +------------------------------------------------------------------- Fri Mar 4 07:46:25 UTC 2016 - sor.alexei@meowr.ru - Update to 16.2.7 (changes since 16.2.4):
View file
selene.spec
Changed
@@ -16,9 +16,9 @@ # -%define _version 16.2.7~261~ubuntu16.04.1 +%define _version 16.3.3~280~ubuntu16.04.1 Name: selene -Version: 16.2.7 +Version: 16.3.3 Release: 0 Summary: GUI audio-video converter for GNU/Linux License: GPL-3.0+ @@ -29,6 +29,7 @@ Patch0: %{name}-fix-makefile.patch BuildRequires: fdupes BuildRequires: gettext +BuildRequires: pkg-config BuildRequires: update-desktop-files BuildRequires: vala BuildRequires: pkgconfig(gdk-x11-3.0) @@ -47,7 +48,6 @@ Requires: vorbis-tools Requires: x264 Recommends: %{name}-lang -Recommends: ffmpeg2theora Recommends: gpac Recommends: opus-tools Recommends: sox
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/debian/bzr-builder.manifest -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/debian/bzr-builder.manifest
Changed
@@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}~261 -lp:selene revid:tony.george.kol@gmail.com-20160227182550-yg3cb2supft07jkb +# bzr-builder format 0.3 deb-version {debupstream}~280 +lp:selene revid:tony.george.kol@gmail.com-20160324033841-1imldyf28r0eailg
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/debian/changelog -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/debian/changelog
Changed
@@ -1,20 +1,11 @@ -selene (16.2.7~261~ubuntu16.04.1) xenial; urgency=low +selene (16.3.3~280~ubuntu16.04.1) xenial; urgency=low * Auto build. - -- Tony George <teejee2008@gmail.com> Sat, 27 Feb 2016 18:38:28 +0000 + -- Tony George <teejee2008@gmail.com> Thu, 24 Mar 2016 03:49:10 +0000 -selene (16.2.7) trusty; urgency=medium +selene (16.3.3) trusty; urgency=medium - * Added new option for trimming audio and video files + * Fixed: 'Too many open files' error on converting many files - * Added support for using MPV as the media player backend - - * Added option to auto-crop and reset cropping values for multiple - files on the batch edit window - - * Added zoom and fullscreen options to media player - - * Various minor changes - - -- Tony George <tony.george.kol@gmail.com> Sat, 27 Feb 2016 14:00:00 +0530 + -- Tony George <tony.george.kol@gmail.com> Wed, 23 Mar 2016 10:00:00 +0530
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/debian/control -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/debian/control
Changed
@@ -11,7 +11,7 @@ Package: selene Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, realpath, rsync, mediainfo, ffmpeg | libav-tools, mplayer | mplayer2, vorbis-tools, x264, lame, mkvtoolnix -Recommends: opus-tools, vpx-tools, ffmpeg2theora, gpac, sox, x265, libfdk-aac0 +Recommends: opus-tools, vpx-tools, libkate-tools, gpac, sox, x265, libfdk-aac0 Description: Audio-video converter for Linux. Utility for converting audio and video files to OGG,OGV, MKV,MP4,WEBM,OPUS,AAC,FLAC,MP3 and WAV formats. Provides a simple
View file
selene_16.3.3~280~ubuntu16.04.1.tar.xz/po/selene-cs.po
Added
@@ -0,0 +1,1772 @@ +# Czech translation for selene +# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 +# This file is distributed under the same license as the selene package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: selene\n" +"Report-Msgid-Bugs-To: teejee2008@gmail.com\n" +"POT-Creation-Date: 2016-03-13 12:05+0530\n" +"PO-Revision-Date: 2016-03-15 06:29+0100\n" +"Last-Translator: Radek Otáhal <radek.otahal@email.cz>\n" +"Language-Team: Czech <cs@li.org>\n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2014-08-25 19:08+0000\n" +"X-Generator: Poedit 1.5.4\n" + +#: MediaPlayerWindow.vala:1093 +msgid "100%" +msgstr "100%" + +#: MediaPlayerWindow.vala:1095 +msgid "200%" +msgstr "200%" + +#: MediaPlayerWindow.vala:1087 +msgid "25%" +msgstr "25%" + +#: MediaPlayerWindow.vala:1089 +msgid "50%" +msgstr "50%" + +#: MediaPlayerWindow.vala:1091 +msgid "75%" +msgstr "75%" + +#: EncoderConfigWindow.vala:528 EncoderConfigWindow.vala:529 +msgid "" +"<b>AAC-ELD</b>\n" +"Enhanced Low Delay Profile for real-time communication\n" +"\n" +msgstr "" +"<b>AAC-ELD</b>\n" +"Enhanced Low Delay profil pro real-time komunikaci\n" +"\n" + +#: EncoderConfigWindow.vala:524 +msgid "" +"<b>AAC-LC (Recommended)</b>\n" +"MPEG-2 Low-complexity (LC) combined with MPEG-4 Perceptual Noise " +"Substitution (PNS)\n" +"\n" +msgstr "" +"<b>AAC-LC (Doporučeno)</b>\n" +"MPEG-2 Low-complexity (LC) kombinovaný s MPEG-4 Perceptual Noise " +"Substitution (PNS)\n" +"\n" + +#: EncoderConfigWindow.vala:527 +msgid "" +"<b>AAC-LD</b>\n" +"Low Delay Profile for real-time communication\n" +"\n" +msgstr "" +"<b>AAC-LD</b>\n" +"Low Delay profil pro real-time komunikaci\n" +"\n" + +#: EncoderConfigWindow.vala:1073 +msgid "" +"<b>Additional Options</b>\n" +"These options will be passed to the encoder\n" +"on the command line. Please do not specify\n" +"any options that are already provided by the GUI." +msgstr "" +"<b>Dodatečné volby</b>\n" +"Tyto volby budou předány do enkodéru\n" +"příkazovým řádkem. Nespecifikujte prosím\n" +"žádné volby, které je možné nastavit pomocí GUI." + +#: EncoderConfigWindow.vala:651 +msgid "<b>Adjustments:</b>" +msgstr "<b>Přizpůsobení:</b>" + +#: AppConfigWindow.vala:152 +msgid "<b>Backup Directory</b>" +msgstr "<b>Adresář pro zálohu</b>" + +#: EncoderConfigWindow.vala:564 +msgid "<b>Channels & Sampling:</b>" +msgstr "<b>Kanály & Vzorkování:</b>" + +#: EncoderConfigWindow.vala:1012 +msgid "" +"<b>Compression Vs Device Compatibility</b>\n" +"'High' profile gives the best compression.\n" +"Change this to 'Baseline' or 'Main' only if you are encoding\n" +"for a particular device (mobiles,PMPs,etc) which does not\n" +"support the 'High' profile" +msgstr "" +"<b>Komprese vs kompatibilita zařízení</b>\n" +"'High' profil odpovídá nejlepší kompresi.\n" +"Změňte na 'Baseline' nebo 'Main' pouze pokud kódujete\n" +"pro zařízení (mobil, PMP,atd) které nepodporuje\n" +"profil 'High'" + +#: EncoderConfigWindow.vala:976 +msgid "" +"<b>Compression Vs Encoding Speed</b>\n" +"Slower presets give better compression and smaller files\n" +"but take more time to encode." +msgstr "" +"<b>Komprese vs rychlost kódování</b>\n" +"Pomalejší = lepší komprese a menší soubory,\n" +"ale kódování bude trvat déle." + +#: EncoderConfigWindow.vala:957 +msgid "" +"<b>Compression Vs Quality</b>\n" +"Smaller values give better quality video and larger files" +msgstr "" +"<b>Komprese vs kvalita</b>\n" +"Menší hodnota = lepší kvalita videa a větší soubory" + +#: AppConfigWindow.vala:347 +msgid "<b>Default Language</b>" +msgstr "<b>Výchozí jazyk</b>" + +#: EncoderConfigWindow.vala:1320 +msgid "" +"<b>Embed</b> - Subtitle files will be combined with the output file.\n" +"These subtitles can be switched off since they are added as a separate track" +msgstr "" +"<b>Embed</b> - Titulky budou zkombinovány s výstupním souborem.\n" +"Tyto titulky mohou být vypnuty jelikož jsou přidány jako samostatná stopa" + +#: AppConfigWindow.vala:285 +msgid "" +"<b>Encoder</b>\n" +"Use the 'ffmpeg' encoding tool from the FFmpeg project (Recommended)\n" +"\n" +msgstr "" +"<b>ffmpeg</b>\n" +"Použít 'ffmpeg' encoding tool z FFmpeg projektu (Doporučeno)\n" +"\n" + +#: EncoderConfigWindow.vala:764 +msgid "<b>Fade:</b>" +msgstr "<b>Přechod:</b>" + +#: EncoderConfigWindow.vala:291 +msgid "<b>File Format:</b>" +msgstr "<b>Formát souboru:</b>" + +#: AppConfigWindow.vala:396 +msgid "<b>File Handling</b>" +msgstr "<b>Manipulace se soubory</b>" + +#: EncoderConfigWindow.vala:526 +msgid "" +"<b>HE-AAC v2</b>\n" +"AAC-LC + SBR + PS (Parametric Stereo)\n" +"\n" +msgstr "" +"<b>HE-AAC v2</b>\n" +"AAC-LC + SBR + PS (Parametric Stereo)\n" +"\n" + +#: EncoderConfigWindow.vala:525 +msgid "" +"<b>HE-AAC</b>\n" +"AAC-LC + SBR (Spectral Band Replication)\n" +"\n" +msgstr "" +"<b>HE-AAC</b>\n" +"AAC-LC + SBR (Spectral Band Replication)\n" +"\n" + +#: AppConfigWindow.vala:198 +msgid "<b>Main Window</b>" +msgstr "<b>Hlavní okno</b>" + +#: EncoderConfigWindow.vala:530 +msgid "" +"<b>Note:</b>\n" +"HE-AAC and HE-AACv2 are used for low-bitrate encoding while HE-LD and HE-ELD " +"are used for real-time communication. HE-AAC is suitable for bit rates " +"between 48 to 64 kbps (stereo) while HE-AACv2 is suitable for bit rates as " +"low as 32 kbps." +msgstr "" +"<b>Poznámka:</b>\n" +"HE-AAC a HE-AACv2 jsou používány pro low-bitrate kódování zatímco HE-LD a HE-" +"ELD jsou používány pro real-time komunikaci. HE-AAC je vhodné pro bit rates " +"mezi 48 až 64 kbps (stereo) zatímco HE-AACv2 je vhodné pro bit rates nižší " +"než 32 kbps." + +#: EncoderConfigWindow.vala:829 +msgid "<b>Other Effects:</b>" +msgstr "<b>Ostatní efekty:</b>" + +#: AppConfigWindow.vala:107 +msgid "<b>Output Directory</b>" +msgstr "<b>Adresář pro výstup</b>" + +#: AppConfigWindow.vala:250 +msgid "<b>Preferred Tools</b>" +msgstr "<b>Preferované nástroje</b>" + +#: EncoderConfigWindow.vala:348 +msgid "<b>Preset:</b>" +msgstr "<b>Předvolba:</b>" + +#: EncoderConfigWindow.vala:2271 +msgid "" +"<b>Quality Vs Encoding Speed</b>\n" +"\n" +"<b>Best:</b> Best quality, slower\n" +"<b>Good:</b> Good quality, faster\n" +"<b>Realtime:</b> Fastest" +msgstr "" +"<b>Kvalita vs rychlost kódování</b>\n" +"\n" +"<b>Nejlepší:</b> Nejlepší kvalita, pomalejší\n" +"<b>Dobrá:</b> Dobrá kvalita, rychlejší\n" +"<b>Realtime:</b> Nejrychlejší" + +#: EncoderConfigWindow.vala:2273 +msgid "" +"<b>Quality Vs Encoding Speed</b>\n" +"\n" +"Smaller values = Better quality, slower\n" +"Larger value = Lower quality, faster\n" +msgstr "" +"<b>Kvalita vs rychlost kódování</b>\n" +"\n" +"Menší hodnoty = Lepší kvalita, pomalejší\n" +"Větší hodnoty = Menší kvalita, rychlejší\n" + +#: EncoderConfigWindow.vala:2281 +msgid "" +"<b>Quality Vs Encoding Speed</b>\n" +"Higher values speed-up encoding at the expense of quality.\n" +"Lower values improve quality at the expense of encoding speed." +msgstr "" +"<b>Kvalita vs rychlost kódování</b>\n" +"Vyšší hodnoty urychlí kódování na úkor kvality.\n" +"Nižší hodnoty vylepší kvalitu na úkor rychlosti kódování." + +#: EncoderConfigWindow.vala:1322 +msgid "" +"<b>Render</b> - Subtitles are rendered/burned on the video.\n" +"These subtitles cannot be switched off since they become a part of the video" +msgstr "" +"<b>Render</b> - Titulky budou renderovány/\"vypálené\" do videa.\n" +"Tyto titulky nemohou být vypnuty jelikož jsou součástí videa" + +#: EncoderConfigWindow.vala:1233 +msgid "<b>Resample:</b>" +msgstr "<b>Převzorkování:</b>" + +#: EncoderConfigWindow.vala:1132 +msgid "<b>Resize:</b>" +msgstr "<b>Změna velikosti:</b>" + +#: EncoderConfigWindow.vala:620 +msgid "<b>SOX Audio Processing:</b>" +msgstr "<b>SOX Audio zpracování:</b>" + +#: AppConfigWindow.vala:284 +msgid "" +"<b>avconv</b>\n" +"Use the 'avconv' encoding tool from the Libav project\n" +"\n" +msgstr "" +"<b>avconv</b>\n" +"Použít 'avconv' encoding tool z Libav projektu\n" +"\n" + +#: MainWindow.vala:944 +msgid "A-Bitrate" +msgstr "A-Bitrate" + +#: MainWindow.vala:820 +msgid "A-Ch" +msgstr "A-Ch" + +#: MainWindow.vala:742 +msgid "A-Fmt" +msgstr "A-Fmt" + +#: MainWindow.vala:860 +msgid "A-Sampling" +msgstr "A-Sampling" + +#: EncoderConfigWindow.vala:2717 EncoderConfigWindow.vala:2736 +msgid "AAC-ELD" +msgstr "AAC-ELD" + +#: EncoderConfigWindow.vala:2700 EncoderConfigWindow.vala:2709 +#: EncoderConfigWindow.vala:2728 +msgid "AAC-LC" +msgstr "AAC-LC" + +#: EncoderConfigWindow.vala:2715 EncoderConfigWindow.vala:2734 +msgid "AAC-LD" +msgstr "AAC-LD" + +#: EncoderConfigWindow.vala:315 +msgid "AC3 Audio (*.ac3)" +msgstr "AC3 Audio (*.ac3)" + +#: MainWindow.vala:234 +msgid "Abort" +msgstr "Zastavit" + +#: MainWindow.vala:292 +msgid "About" +msgstr "O aplikaci" + +#: MainWindow.vala:344 MainWindow.vala:2586 +msgid "Add File(s)" +msgstr "Přidat soubor(y)" + +#: MainWindow.vala:327 +msgid "Add File(s)..." +msgstr "Přidat soubor(y)..." + +#: MainWindow.vala:2590 +msgid "Add Folder(s)" +msgstr "Přidat adresář(e)" + +#: MainWindow.vala:337 +msgid "Add Folder(s)..." +msgstr "Přidat adresář(e)..." + +#: MainWindow.vala:1757 +msgid "Add New Preset" +msgstr "Přidat novou předvolbu" + +#: MainWindow.vala:2892 MainWindow.vala:2918 MainWindow.vala:3052 +msgid "Add some files to the file list" +msgstr "Přidejte soubory do seznamu souborů" + +#: MainWindow.vala:2906 +msgid "Add some videos to the file list" +msgstr "Přidejte videa do seznamu souborů" + +#: MainWindow.vala:2632 +#, c-format +msgid "Adding (%d/%d): '%s'" +msgstr "Přidává se (%d/%d): '%s'" + +#: MainWindow.vala:2622 +msgid "Adding..." +msgstr "Přidává se..." + +#: EncoderConfigWindow.vala:860 +msgid "Adjust Stereo for Headphones" +msgstr "Nastavit Stereo pro sluchátka" + +#: MediaPlayerWindow.vala:362 +msgid "Advanced Mode" +msgstr "Pokročilý mód" + +#: MainWindow.vala:1188 +msgid "Album" +msgstr "Album" + +#: Main.vala:693 +msgid "All files removed" +msgstr "Všechny soubory vyjmuty" + +#: MainWindow.vala:2962 +msgid "An audio-video converter for Linux" +msgstr "Audio-video konvertor pro Linux" + +#: MainWindow.vala:268 +msgid "Application Settings" +msgstr "Nastavení aplikace" + +#: MainWindow.vala:1157 +msgid "Artist" +msgstr "Umělci" + +#: AboutWindow.vala:322 +#, c-format +msgid "Artists" +msgstr "Umělci" + +#: EncoderConfigWindow.vala:410 +msgid "Audio" +msgstr "Audio" + +#: EncoderConfigWindow.vala:379 +msgid "Author" +msgstr "Autor" + +#: AboutWindow.vala:314 +#, c-format +msgid "Authors" +msgstr "Autoři" + +#: EncoderConfigWindow.vala:2695 +msgid "Auto" +msgstr "Auto" + +#: EncoderConfigWindow.vala:1794 EncoderConfigWindow.vala:1819 +#: EncoderConfigWindow.vala:1837 EncoderConfigWindow.vala:1863 +#: EncoderConfigWindow.vala:1894 EncoderConfigWindow.vala:1911 +#: EncoderConfigWindow.vala:2295 EncoderConfigWindow.vala:2320 +#: EncoderConfigWindow.vala:2345 +msgid "Average Bitrate" +msgstr "Průměrný Bitrate" + +#: EncoderConfigWindow.vala:2297 EncoderConfigWindow.vala:2322 +#: EncoderConfigWindow.vala:2347 +msgid "Average Bitrate (2-pass)" +msgstr "Průměrný Bitrate (2 průchody)" + +#: AboutWindow.vala:285 +msgid "Back" +msgstr "Zpět" + +#: MainWindow.vala:241 +msgid "Background" +msgstr "Pozadí" + +#: MediaPlayerWindow.vala:476 +msgid "Basic Mode" +msgstr "Základní mód" + +#: EncoderConfigWindow.vala:665 +msgid "Bass (lower freq)" +msgstr "Bass (nižší freq)" + +#: EncoderConfigWindow.vala:1045 +msgid "Best" +msgstr "Nejlepší" + +#: MainWindow.vala:899 +msgid "Bitrate" +msgstr "Bitrate" + +#: EncoderConfigWindow.vala:462 EncoderConfigWindow.vala:942 +msgid "Bitrate (kbps)" +msgstr "Bitrate (kbps)" + +#: EncoderConfigWindow.vala:663 +msgid "Boost or cut the bass (lower) frequencies of the audio." +msgstr "Zesílení nebo potlačení nižších frekvencí zvuku." + +#: EncoderConfigWindow.vala:689 +msgid "Boost or cut the treble (upper) frequencies of the audio." +msgstr "Zesílení nebo potlačení vyšších frekvencí zvuku." + +#: BatchEditWindow.vala:210 +msgid "Bottom" +msgstr "Dole" + +#: MediaPlayerWindow.vala:247 +msgid "Bottom:" +msgstr "Dole:" + +#: MainWindow.vala:1770 +msgid "Browse" +msgstr "Procházet" + +#: MainWindow.vala:3248 +msgid "CPU: " +msgstr "CPU: " + +#: Main.vala:1212 Main.vala:1226 +msgid "Cancelled" +msgstr "Zrušeno" + +#: EncoderConfigWindow.vala:715 +msgid "Change audio pitch (shrillness) without changing audio tempo (speed)." +msgstr "Změna pronikavosti/intenzity zvuku bez změny tempa (rychlosti)." + +#: EncoderConfigWindow.vala:741 +msgid "" +"Change audio tempo (speed) without changing audio pitch (shrillness).\n" +"\n" +"WARNING: This will change the duration of the audio track" +msgstr "" +"Změna tempa (rychlosti) zvuku bez změny pronikavosti/intenzity.\n" +"\n" +"VAROVÁNÍ: Bude změněna délka audio stopy" + +#: EncoderConfigWindow.vala:583 +msgid "Channels" +msgstr "Kanály" + +#: MainWindow.vala:379 +msgid "Clear List" +msgstr "Smazat seznam" + +#: AboutWindow.vala:295 +msgid "Close" +msgstr "Zavřít" + +#: MainWindow.vala:1517 +msgid "Columns..." +msgstr "Sloupce..." + +#: MainWindow.vala:1313 +msgid "Comments" +msgstr "Komentáře" + +#: Main.vala:1051 Main.vala:1061 Main.vala:1069 +msgid "Completed" +msgstr "Dokončeno" + +#: EncoderConfigWindow.vala:1796 EncoderConfigWindow.vala:1865 +#: EncoderConfigWindow.vala:1896 EncoderConfigWindow.vala:2372 +msgid "Constant Bitrate" +msgstr "Konstantní Bitrate" + +#: EncoderConfigWindow.vala:1798 +msgid "Constant Bitrate (Strict)" +msgstr "Konstantní Bitrate (přesně)" + +#: Main.vala:967 Main.vala:1260 +msgid "Converting..." +msgstr "Převádí se..." + +#: MainWindow.vala:2284 +#, c-format +msgid "Converting: '%s'" +msgstr "Převádí se: '%s'" + +#: Main.vala:965 Main.vala:1258 +msgid "Converting: Enter (q) to quit or (p) to pause..." +msgstr "Probíhá převod: Stiskněte (q) pro ukončení nebo (p) pro pozastavení..." + +#: EncoderConfigWindow.vala:1507 EncoderConfigWindow.vala:1523 +#: EncoderConfigWindow.vala:1538 +msgid "Copy Audio" +msgstr "Zkopírovat audio" + +#: EncoderConfigWindow.vala:1442 EncoderConfigWindow.vala:1451 +#: EncoderConfigWindow.vala:1460 EncoderConfigWindow.vala:1467 +#: EncoderConfigWindow.vala:1478 +msgid "Copy Video" +msgstr "Zkopírovat video" + +#: AboutWindow.vala:272 AboutWindow.vala:289 +msgid "Credits" +msgstr "Zásluhy" + +#: MainWindow.vala:425 +msgid "Crop" +msgstr "Oříznout" + +#: BatchEditWindow.vala:159 +msgid "Crop Left" +msgstr "Oříznout vlevo" + +#: MainWindow.vala:1423 +msgid "Crop Video..." +msgstr "Oříznout video..." + +#: MainWindow.vala:409 MainWindow.vala:428 +msgid "Crop Videos" +msgstr "Oříznout video" + +#: MediaPlayerWindow.vala:267 +msgid "Cropped:" +msgstr "Oříznuto:" + +#: EncoderConfigWindow.vala:1148 EncoderConfigWindow.vala:1251 +msgid "Custom" +msgstr "Vlastní" + +#: MainWindow.vala:1764 +msgid "Delete Preset" +msgstr "Smazat předvolbu" + +#: MediaPlayerWindow.vala:458 +msgid "Delete Segment" +msgstr "Smazat segment" + +#: AppConfigWindow.vala:403 +msgid "Delete temporary files after successful encode" +msgstr "Smazat dočasné soubory po úspěšném dokončení kódování" + +#: EncoderConfigWindow.vala:1296 +msgid "Denominator" +msgstr "Jmenovatel" + +#: EncoderStatusWindow.vala:90 +msgid "Description" +msgstr "Popis" + +#: MediaPlayerWindow.vala:282 +msgid "Detect Borders" +msgstr "Detekovat meze" + +#: MediaPlayerWindow.vala:284 +msgid "Detect black borders in the video and set cropping parameters" +msgstr "Detekce černých hranic ve videu a nastavení parametrů oříznutí" + +#: MediaPlayerWindow.vala:856 +#, c-format +msgid "Detected Parameters: %d, %d, %d, %d" +msgstr "Detekované parametry: %d, %d, %d, %d" + +#: BatchEditWindow.vala:403 MediaPlayerWindow.vala:788 +msgid "Detecting borders..." +msgstr "Detekují se hranice..." + +#: DonationWindow.vala:54 +msgid "" +"Did you find this software useful?\n" +"\n" +"You can buy me a coffee or make a donation via PayPal to show your support. " +"Or just drop me an email and say Hi. This application is completely free and " +"will continue to remain that way. Your contributions will help in keeping " +"this project alive and improving it further.\n" +"\n" +"Feel free to send me an email if you find any issues in this application or " +"if you need any changes. Suggestions and feedback are always welcome.\n" +"\n" +"Thanks,\n" +"Tony George\n" +"(teejeetech@gmail.com)" +msgstr "" +"Shledali jste tento software užitečným?\n" +"\n" +"Můžete mi koupit kávu nebo poslat příspěvek prostřednictvím PayPal jako " +"projev vaší podpory. Nebo mi prostě jen pošlete mail s pozdravem. Tato " +"aplikace je zcela zdarma a zůstane tak i v budoucnu. Váš příspěvek pomůže " +"udržet tento projekt při životě a také jeho budoucí rozvoj.\n" +"\n" +"Napište mi mail pokud naleznete chybu nebo budete mít námět na vylepšení " +"této aplikace. Rada a zpětná vazba jsou vždy vítány.\n" +"\n" +"Díky,\n" +"Tony George\n" +"teejeetech@gmail.com" + +#: EncoderConfigWindow.vala:1505 EncoderConfigWindow.vala:1521 +#: EncoderConfigWindow.vala:1536 +msgid "Disable Audio" +msgstr "Zakázat Audio" + +#: EncoderConfigWindow.vala:1476 +msgid "Disable Video" +msgstr "Zakázat Video" + +#: EncoderConfigWindow.vala:1219 +msgid "Do not stretch or squeeze the video (Fit-To-Box)" +msgstr "Neroztahovat nebo stlačovat video (Fit-To-Box)" + +#: AboutWindow.vala:346 +#, c-format +msgid "Documenters" +msgstr "Dukumentátoři" + +#: DonationWindow.vala:36 MainWindow.vala:281 MainWindow.vala:282 +msgid "Donate" +msgstr "Darovat" + +#: DonationWindow.vala:74 +msgid "Donate with Google Wallet" +msgstr "Darovat přes Google Wallet" + +#: DonationWindow.vala:67 +msgid "Donate with PayPal" +msgstr "Darovat přes PayPal" + +#: AboutWindow.vala:354 +#, c-format +msgid "Donations" +msgstr "Darování" + +#: Main.vala:1046 +msgid "Done" +msgstr "Hotovo" + +#: ColumnSelectionDialog.vala:62 +msgid "Drag and drop to re-order" +msgstr "Uspořádat (drag and drop) " + +#: MainWindow.vala:2272 +msgid "Drag files on this window or click the 'Add' button" +msgstr "Přetáhněte soubory do tohoto okna nebo klikněte na 'Přidat soubory'" + +#: MainWindow.vala:648 +msgid "Duration" +msgstr "Trvání" + +#: BatchEditWindow.vala:267 +msgid "Edit" +msgstr "Editovat" + +#: MainWindow.vala:1837 +msgid "Edit Preset" +msgstr "Upravit předvolbu" + +#: EncoderConfigWindow.vala:390 +msgid "Email" +msgstr "Email" + +#: EncoderConfigWindow.vala:1632 +msgid "Embed / Soft Subs" +msgstr "Embed / Render titulky" + +#: EncoderConfigWindow.vala:2757 +msgid "Empty Preset Name" +msgstr "Prázdný název předvolby" + +#: EncoderStatusWindow.vala:45 MainWindow.vala:274 +msgid "Encoders" +msgstr "Enkodéry" + +#: EncoderConfigWindow.vala:449 EncoderConfigWindow.vala:925 +msgid "Encoding Mode" +msgstr "Režim kódování" + +#: MainWindow.vala:1827 +msgid "Encoding Script or Preset File" +msgstr "Skript pro kódování nebo soubor s předvolbou" + +#: MediaPlayerWindow.vala:328 +msgid "End (sec):" +msgstr "Konec (sec):" + +#: MediaPlayerWindow.vala:442 +msgid "End Segment" +msgstr "Konec segmentu" + +#: BatchEditWindow.vala:247 +msgid "EndPos" +msgstr "Konec" + +#: Main.vala:774 +msgid "Enter any key to Cancel..." +msgstr "Stiskněte jakoukoliv klávesu pro zrušení..." + +#: AppConfigWindow.vala:122 AppConfigWindow.vala:168 +msgid "Enter path or browse for directory" +msgstr "Zadejte cestu nebo vyhledejte adresář" + +#: Main.vala:1056 Utility.vala:108 +msgid "Error" +msgstr "Chyba" + +#: Main.vala:809 +msgid "Error: File missing" +msgstr "Chyba: Soubor chybí" + +#: EncoderConfigWindow.vala:1272 +msgid "Examples:" +msgstr "Příklady:" + +#: EncoderConfigWindow.vala:337 +msgid "Extension" +msgstr "Přípona" + +#: EncoderConfigWindow.vala:1076 +msgid "Extra Options" +msgstr "Dodatečné volby" + +#: EncoderConfigWindow.vala:317 +msgid "FLAC Audio (*.flac)" +msgstr "FLAC Audio (*.flac)" + +#: EncoderConfigWindow.vala:1269 +msgid "FPS Ratio" +msgstr "FPS poměr" + +#: EncoderConfigWindow.vala:776 +msgid "Fade In (seconds)" +msgstr "Zesílení (sekundy)" + +#: EncoderConfigWindow.vala:790 +msgid "Fade Out (seconds)" +msgstr "Zeslabení (sekundy)" + +#: EncoderConfigWindow.vala:804 +msgid "Fade Type" +msgstr "Typ přechodu" + +#: Main.vala:1072 +msgid "Failed" +msgstr "Selhalo" + +#: Utility.vala:1420 +msgid "Failed to set ownership" +msgstr "Selhala změna vlastnictví" + +#: EncoderConfigWindow.vala:991 +msgid "Fast" +msgstr "Rychlé" + +#: BatchEditWindow.vala:139 ColumnSelectionDialog.vala:76 MainWindow.vala:460 +msgid "File" +msgstr "Soubor" + +#: MainWindow.vala:1506 +msgid "File Info (Output)" +msgstr "Informace o souboru (výstup)" + +#: MainWindow.vala:1500 +msgid "File Info (Source)" +msgstr "Informace o souboru (zdroj)" + +#: AppConfigWindow.vala:209 +msgid "File View" +msgstr "Zobrazení souboru" + +#: Main.vala:673 +msgid "File added:" +msgstr "Soubor přidán:" + +#: Main.vala:687 +msgid "File removed:" +msgstr "Soubor odstraněn:" + +#: Main.vala:710 +#, c-format +msgid "Files will be saved in '%s'" +msgstr "Soubory budou uloženy v '%s'" + +#: Main.vala:713 +msgid "Files will be saved in source directory" +msgstr "Soubory budou uloženy ve vstupním adresáři" + +#: EncoderConfigWindow.vala:547 EncoderConfigWindow.vala:1116 +msgid "Filters" +msgstr "Filtry" + +#: MainWindow.vala:252 MainWindow.vala:254 MediaPlayerWindow.vala:291 +#: MediaPlayerWindow.vala:377 MediaPlayerWindow.vala:491 +msgid "Finish" +msgstr "Dokončit" + +#: EncoderConfigWindow.vala:1216 +msgid "Fits the video in a box of given width and height." +msgstr "Video bude umístěno v boxu o dané šířce a výšce." + +#: EncoderConfigWindow.vala:1928 +msgid "Fixed Bitrate" +msgstr "Fixní Bitrate" + +#: MainWindow.vala:1802 MainWindow.vala:1812 +msgid "Folder" +msgstr "Složka" + +#: MainWindow.vala:3067 +msgid "Following encoders were not found on your system:" +msgstr "Následující enkodéry nebyly ve vašem systémy nalezeny:" + +#: Main.vala:342 +msgid "Following utilities are not installed on your system:" +msgstr "Následující nástroje nejsou ve vašem systémy nainstalovány:" + +#: EncoderConfigWindow.vala:299 MainWindow.vala:691 +msgid "Format" +msgstr "Formát" + +#: EncoderConfigWindow.vala:426 EncoderConfigWindow.vala:898 +msgid "Format / Codec" +msgstr "Formát / kodek" + +#: EncoderStatusWindow.vala:153 +msgid "Found" +msgstr "Nalezeno" + +#: EncoderConfigWindow.vala:1241 +msgid "Frame Rate" +msgstr "Frame Rate" + +#: EncoderConfigWindow.vala:1243 +msgid "Frames/sec" +msgstr "Snímků/sec" + +#: MediaPlayerWindow.vala:1177 MediaPlayerWindow.vala:1181 +msgid "Fullscreen" +msgstr "Fullscreen" + +#: AppConfigWindow.vala:99 EncoderConfigWindow.vala:275 +msgid "General" +msgstr "Obecné" + +#: MainWindow.vala:1219 +msgid "Genre" +msgstr "Žánr" + +#: EncoderConfigWindow.vala:1047 +msgid "Good" +msgstr "Dobrá" + +#: EncoderConfigWindow.vala:2702 EncoderConfigWindow.vala:2711 +#: EncoderConfigWindow.vala:2730 +msgid "HE-AAC" +msgstr "HE-AAC" + +#: EncoderConfigWindow.vala:2704 EncoderConfigWindow.vala:2713 +#: EncoderConfigWindow.vala:2732 +msgid "HE-AAC v2" +msgstr "HE-AAC v2" + +#: EncoderConfigWindow.vala:819 +msgid "Half Sine" +msgstr "Polovina sinusovky" + +#: EncoderConfigWindow.vala:1195 +msgid "Height" +msgstr "Výška" + +#: MainWindow.vala:1779 MainWindow.vala:1781 MainWindow.vala:2228 +msgid "Info" +msgstr "Info" + +#: Main.vala:701 +msgid "Input queue is empty! Please add some files." +msgstr "Vstupní fronta je prázdná! Přidejte prosím soubory." + +#: Main.vala:252 +msgid "Input queue is empty! Please select files to convert." +msgstr "Vstupní fronta je prázdná! Vyberte prosím soubory k převodu." + +#: EncoderConfigWindow.vala:825 +msgid "Inverted Parabola" +msgstr "Invertovaná parabola" + +#: FileInfoWindow.vala:69 +msgid "Key" +msgstr "Klávesa" + +#: MediaPlayerWindow.vala:208 +msgid "Left:" +msgstr "Vlevo:" + +#: EncoderConfigWindow.vala:821 +msgid "Linear" +msgstr "Lineární" + +#: AppConfigWindow.vala:222 +msgid "List" +msgstr "Seznam" + +#: Main.vala:390 +msgid "Loading presets from:" +msgstr "Načíst předvolby z:" + +#: Main.vala:389 +msgid "Loading scripts from:" +msgstr "Načíst skripty z:" + +#: EncoderConfigWindow.vala:823 +msgid "Logarithmic" +msgstr "Logaritmické" + +#: EncoderConfigWindow.vala:1955 +msgid "Lossless" +msgstr "Bezeztrátový" + +#: EncoderConfigWindow.vala:319 +msgid "MP3 Audio (*.mp3)" +msgstr "MP3 Audio (*.mp3)" + +#: EncoderConfigWindow.vala:321 +msgid "MP4 Audio (*.mp4)" +msgstr "MP4 Audio (*.mp4)" + +#: EncoderConfigWindow.vala:2719 EncoderConfigWindow.vala:2738 +msgid "MPEG-2 AAC-LC" +msgstr "MPEG-2 AAC-LC" + +#: EncoderConfigWindow.vala:2721 EncoderConfigWindow.vala:2740 +msgid "MPEG-2 HE-AAC" +msgstr "MPEG-2 HE-AAC" + +#: EncoderConfigWindow.vala:2742 +msgid "MPEG-2 HE-AAC v2" +msgstr "MPEG-2 HE-AAC v2" + +#: EncoderConfigWindow.vala:309 +msgid "MPEG4 Video (*.mp4)" +msgstr "MPEG4 Video (*.mp4)" + +#: EncoderConfigWindow.vala:858 +msgid "" +"Makes audio easier to listen to on headphones. Adds 'cues' to the audio so " +"that when listened to on headphones the stereo image is moved from inside " +"your head (standard for headphones) to outside and in front of the listener " +"(standard for speakers)." +msgstr "" +"Usnadňuje poslech ve sluchátkách. Upraví zvuk takovým způsobem, že při " +"poslechu ve sluchátkách přesune stereo obraz z vaší hlavy (standard pro " +"sluchátka), tak aby k vám přicházel zepředu (standard pro reproduktory)." + +#: EncoderConfigWindow.vala:307 +msgid "Matroska Video (*.mkv)" +msgstr "Matroska Video (*.mkv)" + +#: EncoderConfigWindow.vala:843 +msgid "Maximize Volume Level (Normalize)" +msgstr "Normalizovat úroveň hlasitosti" + +#: EncoderConfigWindow.vala:841 +msgid "Maximize the volume level (loudness)" +msgstr "Maximalizace úrovně hlasitosti" + +#: EncoderConfigWindow.vala:993 +msgid "Medium" +msgstr "Střední" + +#: EncoderStatusWindow.vala:153 +msgid "Missing" +msgstr "Chybí" + +#: MainWindow.vala:3067 +msgid "Missing Encoders" +msgstr "Chybějící enkodéry" + +#: Utility.vala:1036 +msgid "Missing Icon" +msgstr "Chybějící ikona" + +#: Main.vala:343 +msgid "Missing Utilities" +msgstr "Chybějící nástroje" + +#: AppConfigWindow.vala:159 +msgid "Move source files after encoding is complete" +msgstr "Přesunout zdrojové soubory po dokončení kódování" + +#: EncoderConfigWindow.vala:505 +msgid "Music" +msgstr "Hudba" + +#: MediaPlayerWindow.vala:1165 MediaPlayerWindow.vala:1169 +msgid "Mute" +msgstr "Ztišit" + +#: MediaFile.vala:531 +msgid "N/A" +msgstr "N/A" + +#: EncoderConfigWindow.vala:356 +msgid "Name" +msgstr "Název" + +#: EncoderConfigWindow.vala:363 MainWindow.vala:1755 +msgid "New Preset" +msgstr "Nová předvolba" + +#: EncoderConfigWindow.vala:1146 EncoderConfigWindow.vala:1249 +#: EncoderConfigWindow.vala:1272 EncoderConfigWindow.vala:1978 +#: EncoderConfigWindow.vala:2020 EncoderConfigWindow.vala:2048 +#: EncoderConfigWindow.vala:2062 EncoderConfigWindow.vala:2093 +#: EncoderConfigWindow.vala:2113 +msgid "No Change" +msgstr "Bez změny" + +#: MainWindow.vala:2891 MainWindow.vala:2917 MainWindow.vala:3051 +msgid "No Files" +msgstr "Žádné soubory" + +#: BatchEditWindow.vala:397 BatchEditWindow.vala:461 +msgid "No Files Selected" +msgstr "Nevybrány žádné soubory" + +#: EncoderConfigWindow.vala:1630 +msgid "No Subtitles" +msgstr "Bez titulků" + +#: EncoderConfigWindow.vala:1227 +msgid "No Up-Scaling" +msgstr "Neprovádět Up-Scaling" + +#: MainWindow.vala:2905 +msgid "No Videos" +msgstr "Žádná videa" + +#: EncoderConfigWindow.vala:501 +msgid "None" +msgstr "Nic" + +#: Main.vala:342 +msgid "Not possible to continue!" +msgstr "Není možné pokračovat!" + +#: EncoderConfigWindow.vala:1287 +msgid "Numerator" +msgstr "Čitatel" + +#: EncoderConfigWindow.vala:311 +msgid "OGG Theora Video (*.ogv)" +msgstr "OGG Theora Video (*.ogv)" + +#: EncoderConfigWindow.vala:323 +msgid "OGG Vorbis Audio (*.ogg)" +msgstr "OGG Vorbis Audio (*.ogg)" + +#: DonationWindow.vala:95 +msgid "OK" +msgstr "OK" + +#: MainWindow.vala:1772 +msgid "Open Folder" +msgstr "Otevřít složku" + +#: MainWindow.vala:1477 +msgid "Open Log File" +msgstr "Otevřít Log" + +#: MainWindow.vala:1471 +msgid "Open Output Folder" +msgstr "Otevřít výstupní adresář" + +#: MainWindow.vala:1465 +msgid "Open Temp Folder" +msgstr "Otevřít dočasný adresář" + +#: MainWindow.vala:310 +msgid "Open output folder" +msgstr "Otevřít výstupní adresář" + +#: EncoderConfigWindow.vala:484 +msgid "Optimization" +msgstr "Optimalizace" + +#: EncoderConfigWindow.vala:325 +msgid "Opus Audio (*.opus)" +msgstr "Opus Audio (*.opus)" + +#: MainWindow.vala:308 +msgid "Output" +msgstr "Výstup" + +#: MainWindow.vala:225 MainWindow.vala:3032 MainWindow.vala:3034 +#: MediaPlayerWindow.vala:1157 +msgid "Pause" +msgstr "Pozastavit" + +#: Main.vala:1239 Main.vala:1244 +msgid "Paused" +msgstr "Pozastaveno" + +#: Main.vala:1242 +msgid "Paused: Enter (r) to resume..." +msgstr "Pozastaveno: Zadejte (r) pro pokračování..." + +#: EncoderConfigWindow.vala:717 +msgid "Pitch (shrillness)" +msgstr "Pitch (pronikavost)" + +#: MediaPlayerWindow.vala:1153 +msgid "Play" +msgstr "Přehrát" + +#: MainWindow.vala:1494 +msgid "Play File (Output)" +msgstr "Přehrát soubor (výstup)" + +#: MainWindow.vala:1488 +msgid "Play File (Source)" +msgstr "Přehrát soubor (zdroj)" + +#: MediaPlayerWindow.vala:790 +msgid "Please Wait..." +msgstr "Počkejte prosím..." + +#: EncoderConfigWindow.vala:2755 +msgid "Please enter a name for this preset" +msgstr "Zadejte prosím název pro tuto předvolbu" + +#: MainWindow.vala:3067 +msgid "Please install required packages or select another preset" +msgstr "Nainstalujte prosím požadované balíky nebo vyberte jinou předvolbu" + +#: EncoderConfigWindow.vala:641 +msgid "Please install the 'sox' package on your system to use this feature" +msgstr "" +"Pro použití těchto funkcí nainstalujte prosím balík 'sox' do vašeho systému." + +#: EncoderConfigWindow.vala:979 MainWindow.vala:1817 +msgid "Preset" +msgstr "Předvolba" + +#: MainWindow.vala:2166 +msgid "Preset deleted" +msgstr "Předvolba smazána" + +#: MainWindow.vala:3178 +msgid "Press 'Cancel' to abort shutdown" +msgstr "Stiskněte 'Zrušit' pro zrušení vypnutí" + +#: EncoderConfigWindow.vala:509 EncoderConfigWindow.vala:1015 +msgid "Profile" +msgstr "Profil" + +#: FileInfoWindow.vala:44 +msgid "Properties" +msgstr "Vlastnosti" + +#: EncoderConfigWindow.vala:473 EncoderConfigWindow.vala:960 +msgid "Quality" +msgstr "Kvalita" + +#: EncoderConfigWindow.vala:817 +msgid "Quarter Sine" +msgstr "Čtvrtina sinusovky" + +#: Main.vala:731 Main.vala:790 MediaFile.vala:46 +msgid "Queued" +msgstr "Ve frontě" + +#: MainWindow.vala:2620 +msgid "Reading file properties..." +msgstr "Načítají se vlastnosti souboru..." + +#: EncoderConfigWindow.vala:1049 +msgid "Realtime" +msgstr "Realtime" + +#: MainWindow.vala:1344 +msgid "Recorded Date" +msgstr "Datum záznamu" + +#: EncoderStatusWindow.vala:108 +msgid "Refresh" +msgstr "Obnovit" + +#: MainWindow.vala:386 +msgid "Remove File(s)" +msgstr "Odebrat soubor(y)" + +#: MainWindow.vala:367 +msgid "Remove Selected Items" +msgstr "Odebrat vybrané položky" + +#: EncoderConfigWindow.vala:682 EncoderConfigWindow.vala:708 +#: EncoderConfigWindow.vala:734 EncoderConfigWindow.vala:760 +msgid "Reset" +msgstr "Vynulovat" + +#: EncoderConfigWindow.vala:1201 +msgid "Resizing Method" +msgstr "Metoda" + +#: EncoderConfigWindow.vala:1139 +msgid "Resolution" +msgstr "Rozlišení" + +#: MainWindow.vala:3026 MainWindow.vala:3028 +msgid "Resume" +msgstr "Pokračovat" + +#: BatchEditWindow.vala:176 +msgid "Right" +msgstr "Vpravo" + +#: MainWindow.vala:445 +msgid "Right-click for more options" +msgstr "Pro více možností klikněte na pravé tlačítko " + +#: MediaPlayerWindow.vala:221 +msgid "Right:" +msgstr "Vpravo:" + +#: MainWindow.vala:246 +msgid "Run in background with lower priority" +msgstr "Spustit na pozadí s nižší prioritou" + +#: EncoderConfigWindow.vala:607 +msgid "SOX" +msgstr "SOX" + +#: EncoderConfigWindow.vala:570 +msgid "Sampling Rate (Hz)" +msgstr "Vzorkování (Hz)" + +#: AppConfigWindow.vala:113 +msgid "Save files in following location" +msgstr "Uložit soubory do následujícího umístění" + +#: MediaPlayerWindow.vala:204 +msgid "Scroll mouse wheel to adjust" +msgstr "Použijte kolečko myši pro nastavení" + +#: ColumnSelectionDialog.vala:42 +msgid "Select Columns" +msgstr "Vyberte sloupce" + +#: AppConfigWindow.vala:132 AppConfigWindow.vala:178 +msgid "Select Path" +msgstr "Vyberte cestu" + +#: MainWindow.vala:2270 +msgid "Select a script from the dropdown and click 'Start' to begin" +msgstr "Vyberte skript z nabídky a klikněte na 'Start' pro spuštění" + +#: MediaPlayerWindow.vala:364 +msgid "Select multiple segments" +msgstr "Vybrat více segmentů" + +#: BatchEditWindow.vala:398 BatchEditWindow.vala:462 +msgid "Select some files from the list" +msgstr "Vyberte nějaké soubory ze seznamu" + +#: MediaPlayerWindow.vala:400 +msgid "Select the segments to include in output file:" +msgstr "Vybrat segmenty pro výstupní soubor:" + +#: DonationWindow.vala:81 +msgid "Send Email" +msgstr "Odeslat email" + +#: MediaPlayerWindow.vala:342 MediaPlayerWindow.vala:352 +msgid "Set" +msgstr "Nastavit" + +#: MediaPlayerWindow.vala:353 +msgid "Set current playback position as ending position" +msgstr "Nastavit aktuální pozici přehrávání jako koncovou pozici " + +#: MediaPlayerWindow.vala:343 +msgid "Set current playback position as starting position" +msgstr "Nastavit aktuální pozici přehrávání jako počáteční pozici " + +#: EncoderConfigWindow.vala:1166 +msgid "" +"Set either Width or Height and leave the other as 0.\n" +"It will be calculated automatically.\n" +"\n" +"Setting both width and height is not recommended\n" +"since the video may get stretched or squeezed.\n" +"\n" +"Enable the 'Fit-To-Box' option to avoid changes to aspect ratio." +msgstr "" +"Nastavte buď šířku nebo výšku a ostatní nechte na 0.\n" +"Bude vypočítáno automaticky.\n" +"\n" +"Nastavení šířky i výšky současně není doporučeno\n" +"protože video by mohlo být zdeformováno.\n" +"\n" +"Povolte 'Fit-To-Box' volbu pro zachování poměru stran." + +#: MainWindow.vala:297 +msgid "Shutdown" +msgstr "Ukončení" + +#: MainWindow.vala:3004 +msgid "Shutdown Disabled" +msgstr "Ukončení zakázáno" + +#: MainWindow.vala:3001 +msgid "Shutdown Enabled" +msgstr "Ukončení povoleno" + +#: MainWindow.vala:302 +msgid "Shutdown system after completion" +msgstr "Vypnout systém po dokončení" + +#: MainWindow.vala:598 +msgid "Size" +msgstr "Velikost" + +#: MainWindow.vala:1418 +msgid "Skip File" +msgstr "Přeskočit soubor" + +#: EncoderConfigWindow.vala:995 +msgid "Slow" +msgstr "Pomalé" + +#: EncoderConfigWindow.vala:997 +msgid "Slower" +msgstr "Pomalejší" + +#: MainWindow.vala:2658 +msgid "Some files could not be added:" +msgstr "Některé soubory nelze přidat:" + +#: Main.vala:719 +#, c-format +msgid "Source files will be moved to '%s'" +msgstr "Zdrojové soubory budou přesunuty do '%s'" + +#: Main.vala:821 MediaPlayerWindow.vala:260 +msgid "Source:" +msgstr "Zdroj:" + +#: EncoderConfigWindow.vala:641 +msgid "Sox Not Installed" +msgstr "SOX není nainstalován" + +#: EncoderConfigWindow.vala:503 +msgid "Speech" +msgstr "Řeč" + +#: EncoderConfigWindow.vala:1033 +msgid "Speed" +msgstr "Rychlost" + +#: MainWindow.vala:216 MainWindow.vala:218 +msgid "Start" +msgstr "Start" + +#: MediaPlayerWindow.vala:314 +msgid "Start (sec):" +msgstr "Začátek (sec):" + +#: MediaPlayerWindow.vala:429 +msgid "Start Segment" +msgstr "Začátek segmentu" + +#: BatchEditWindow.vala:228 +msgid "StartPos" +msgstr "Začátek" + +#: Main.vala:705 +#, c-format +msgid "Starting batch of %d file(s):" +msgstr "Spouští se dávka %d souboru(ů):" + +#: EncoderStatusWindow.vala:98 MainWindow.vala:1376 +msgid "Status" +msgstr "Stav" + +#: Utility.vala:761 +msgid "Stopped" +msgstr "Zastaveno" + +#: Main.vala:1066 +msgid "Stopped!" +msgstr "Zastaveno!" + +#: EncoderConfigWindow.vala:1308 +msgid "Subs" +msgstr "Titulky" + +#: EncoderConfigWindow.vala:1325 +msgid "Subtitle Mode" +msgstr "Režim titulků" + +#: EncoderConfigWindow.vala:1341 +msgid "Subtitles" +msgstr "Titulky" + +#: EncoderConfigWindow.vala:989 +msgid "SuperFast" +msgstr "Superrychlé" + +#: MainWindow.vala:3180 +msgid "System shutdown" +msgstr "Vypnutí systému" + +#: MainWindow.vala:3187 +#, c-format +msgid "System shutdown was cancelled by user!" +msgstr "Vypnutí systému bylo zrušeno uživatelem!" + +#: Main.vala:225 +msgid "System will be shutdown after completion" +msgstr "Systém bude vypnut po dokončení" + +#: Main.vala:773 MainWindow.vala:3177 +msgid "System will shutdown in one minute!" +msgstr "Systém bude vypnut za jednu minutu!" + +#: EncoderConfigWindow.vala:743 +msgid "Tempo (speed)" +msgstr "Tempo (rychlost)" + +#: EncoderConfigWindow.vala:641 +msgid "The Sox utility was not found on your system" +msgstr "SOX nástroje nebyly ve vašem systému nalezeny." + +#: EncoderConfigWindow.vala:1198 +msgid "" +"The resizing filter affects the sharpness and compressibility of the video.\n" +"For example, the 'Lanzos' filter gives sharper video but the extra detail\n" +"makes the video more difficult to compress resulting in slightly bigger " +"files.\n" +"The 'Bilinear' filter gives smoother video (less detail) and smaller files." +msgstr "" +"Filtr má vliv na ostrost a kompresi videa.\n" +"Filtr 'Lanzos' například vytvoří ostřejší video, ale extra detaily ztíží \n" +"kompresi a vedou v důsledku k větším souborům.\n" +"Filtr 'Bilinear' vytvoří hladké video (méně detailů) a menší soubory." + +#: AboutWindow.vala:338 +#, c-format +msgid "Third Party Tools & Software" +msgstr "Nástroje třetích stran & Software" + +#: AppConfigWindow.vala:224 +msgid "Tiles" +msgstr "Dlaždice" + +#: MainWindow.vala:1250 +msgid "Title" +msgstr "Titul" + +#: EncoderStatusWindow.vala:76 +msgid "Tool" +msgstr "Nástroj" + +#: AppConfigWindow.vala:238 +msgid "Tools" +msgstr "Nástroje" + +#: BatchEditWindow.vala:193 +msgid "Top" +msgstr "Nahoře" + +#: MediaPlayerWindow.vala:234 +msgid "Top:" +msgstr "Nahoře:" + +#: MainWindow.vala:1281 +msgid "Track #" +msgstr "Stopa #" + +#: AboutWindow.vala:330 +#, c-format +msgid "Translators" +msgstr "Překladatelé" + +#: EncoderConfigWindow.vala:691 +msgid "Treble (upper freq)" +msgstr "Treble (vyšší freq)" + +#: MainWindow.vala:420 +msgid "Trim Duration" +msgstr "Vybrat část" + +#: MainWindow.vala:1428 +msgid "Trim Duration..." +msgstr "Vybrat část..." + +#: EncoderConfigWindow.vala:987 +msgid "UltraFast" +msgstr "Ultrarychlé" + +#: Main.vala:678 +msgid "Unknown format:" +msgstr "Neznámý formát:" + +#: Main.vala:391 +msgid "Using temp folder:" +msgstr "Použití dočasného adresáře:" + +#: MainWindow.vala:998 +msgid "V-Bitrate" +msgstr "V-Bitrate" + +#: MainWindow.vala:781 +msgid "V-Fmt" +msgstr "V-Fmt" + +#: MainWindow.vala:1117 +msgid "V-Fps" +msgstr "V-Fps" + +#: MainWindow.vala:1077 +msgid "V-Height" +msgstr "V-Výška" + +#: MainWindow.vala:1037 +msgid "V-Width" +msgstr "V-Šířka" + +#: FileInfoWindow.vala:70 +msgid "Value" +msgstr "Hodnota" + +#: EncoderConfigWindow.vala:1792 EncoderConfigWindow.vala:1817 +#: EncoderConfigWindow.vala:1835 EncoderConfigWindow.vala:1861 +#: EncoderConfigWindow.vala:1892 EncoderConfigWindow.vala:1909 +#: EncoderConfigWindow.vala:2343 EncoderConfigWindow.vala:2368 +msgid "Variable Bitrate" +msgstr "Proměnný Bitrate" + +#: EncoderConfigWindow.vala:2370 +msgid "Variable Bitrate (2pass)" +msgstr "Proměnný Bitrate (2 průchody)" + +#: EncoderConfigWindow.vala:2293 EncoderConfigWindow.vala:2318 +msgid "Variable Bitrate / CRF" +msgstr "Proměnný Bitrate / CRF" + +#: EncoderConfigWindow.vala:368 +msgid "Version" +msgstr "Verze" + +#: EncoderConfigWindow.vala:999 +msgid "VerySlow" +msgstr "Velmi pomalé" + +#: EncoderConfigWindow.vala:882 +msgid "Video" +msgstr "Video" + +#: EncoderConfigWindow.vala:1224 +msgid "" +"Video will not be resized if it's smaller than the given width and height" +msgstr "Velikost videa nebude změněna, pokud je menší než zadaná šířka a výška" + +#: DonationWindow.vala:88 +msgid "Visit Website" +msgstr "Navštívit webovou stránku" + +#: EncoderConfigWindow.vala:327 +msgid "WAV Audio (*.wav)" +msgstr "WAV Audio (*.wav)" + +#: Utility.vala:108 +msgid "Warning" +msgstr "Varování" + +#: Main.vala:228 +msgid "" +"Warning: User does not have Admin priviledges. '--shutdown' will be ignored." +msgstr "Varování: Uživatel nemá Admin oprávnění. '--vypnutí' bude ignorováno." + +#: EncoderConfigWindow.vala:313 +msgid "WebM Video (*.webm)" +msgstr "WebM Video (*.webm)" + +#: EncoderConfigWindow.vala:1186 +msgid "Width" +msgstr "Šířka" + +#: EncoderConfigWindow.vala:1169 +msgid "Width x Height" +msgstr "Šířka x výška" + +#: MainWindow.vala:2276 +msgid "" +"[Batch completed] Right-click for options or click 'Finish' to continue." +msgstr "" +"[Dokončeno] Pravým tlačítkem vyvolejte nabídku nebo klikněte na 'Dokončit' " +"pro pokračování." + +#: MainWindow.vala:2280 +msgid "[Paused] Click 'Resume' to continue or 'Stop' to abort." +msgstr "[Pozastaveno] Klikněte na 'Pokračovat' nebo na 'Zastavit' pro zrušení." + +#: AppConfigWindow.vala:274 +msgid "avconv / Libav" +msgstr "avconv / Libav" + +#: AppConfigWindow.vala:272 +msgid "ffmpeg" +msgstr "ffmpeg" + +#: AppConfigWindow.vala:319 +msgid "mplayer" +msgstr "mplayer" + +#: AppConfigWindow.vala:317 +msgid "mpv" +msgstr "mpv" + +#: MainWindow.vala:1888 +msgid "presets" +msgstr "předvolby" + +#: MainWindow.vala:1884 +msgid "scripts" +msgstr "skripty" + +#~ msgid "Lyrics:" +#~ msgstr "Lyrics:" + +#~ msgid "Subtitles:" +#~ msgstr "Titulky:" + +#~ msgid "" +#~ "\n" +#~ "\n" +#~ "Subtitle files should be present in the same folder\n" +#~ "and should start with same name." +#~ msgstr "" +#~ "\n" +#~ "\n" +#~ "Soubory s titulky a videem by měly být umístěny ve\n" +#~ "stejném adresáři a měly by mít stejný název." + +#~ msgid "<b>General</b>" +#~ msgstr "<b>Obecné</b>" + +#~ msgid "Add Preset" +#~ msgstr "Přidat předvolbu" + +#~ msgid "Add file(s)" +#~ msgstr "Přidat soubor(y)" + +#~ msgid "Backup Location" +#~ msgstr "Umístění zálohy" + +#~ msgid "CropVideo (L:T:R:B)" +#~ msgstr "Oříznutí obrazu (L:T:R:B)" + +#~ msgid "Do not move input files" +#~ msgstr "Nepřesunovat vstupní soubory" + +#~ msgid "Encoding Tool" +#~ msgstr "Nástroj" + +#~ msgid "File added: '%s'" +#~ msgstr "Soubor přidán: '%s'" + +#~ msgid "Format not supported:" +#~ msgstr "Formát není podporován" + +#~ msgid "" +#~ "Input queue is empty!\n" +#~ "Please add some files.\n" +#~ msgstr "" +#~ "Vstupní fronta je prázdná!\n" +#~ "Přidejte prosím soubory.\n" + +#~ msgid "Output Location" +#~ msgstr "Výstupní umístění" + +#~ msgid "Preview File" +#~ msgstr "Náhled souboru" + +#~ msgid "Queue is Empty" +#~ msgstr "Fronta je prázdná" + +#~ msgid "Simple" +#~ msgstr "Jednoduché" + +#~ msgid "Supported Formats:" +#~ msgstr "Podporované formáty:" + +#~ msgid "Unknown format: '%s'" +#~ msgstr "Neznámý formát: '%s'" + +#~ msgid "File(s) to convert" +#~ msgstr "Soubor(y) k převodu" + +#~ msgid "" +#~ "<b>Compression Vs Encoding Speed</b>\n" +#~ "Use a slower setting for better quality.\n" +#~ "The slowest setting is around 8 times slower than the fastest." +#~ msgstr "" +#~ "<b>Komprese vs rychlost kódování</b>\n" +#~ "Pomalejší = lepší kvalita.\n" +#~ "Nejpomalejší nastavení je asi 8x pomalejší než nejrychlejší nastavení." + +#~ msgid "Fast (--cpu-used=4)" +#~ msgstr "Rychle (--cpu-used=4)" + +#~ msgid "Fastest (--cpu-used=5)" +#~ msgstr "Nejrychleji (--cpu-used=5)" + +#~ msgid "Medium (--cpu-used=3)" +#~ msgstr "Střední (--cpu-used=3)" + +#~ msgid "Slow (--cpu-used=2)" +#~ msgstr "Pomalu (--cpu-used=2)" + +#~ msgid "Slower (--cpu-used=1)" +#~ msgstr "Pomaleji (--cpu-used=1)" + +#~ msgid "Slowest (--cpu-used=0)" +#~ msgstr "Nejpomaleji (--cpu-used=0)"
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/selene.geany -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/selene.geany
Changed
@@ -17,26 +17,30 @@ long_line_column=80 [files] -current_page=14 -FILE_NAME_0=2012;Vala;0;EUTF-8;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FUtility.vala;0;4 -FILE_NAME_1=959;Vala;0;EUTF-8;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMain.vala;0;4 -FILE_NAME_2=4619;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FEncoderConfigWindow.vala;0;4 -FILE_NAME_3=1687;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FFileInfoWindow.vala;0;4 +current_page=2 +FILE_NAME_0=23970;Vala;0;EUTF-8;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FUtility.vala;0;4 +FILE_NAME_1=1595;Vala;0;EUTF-8;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMain.vala;0;4 +FILE_NAME_2=22323;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FEncoderConfigWindow.vala;0;4 +FILE_NAME_3=2267;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FFileInfoWindow.vala;0;4 FILE_NAME_4=1516;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FAboutWindow.vala;0;4 -FILE_NAME_5=9178;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FAppConfigWindow.vala;0;4 -FILE_NAME_6=2129;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FColumnSelectionDialog.vala;0;4 -FILE_NAME_7=1682;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FEncoderStatusWindow.vala;0;4 -FILE_NAME_8=2082;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FCustomMessageDialog.vala;0;4 -FILE_NAME_9=2677;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FFFmpegBuilder.vala;0;4 +FILE_NAME_5=11248;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FAppConfigWindow.vala;0;4 +FILE_NAME_6=2124;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FColumnSelectionDialog.vala;0;4 +FILE_NAME_7=2436;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FEncoderStatusWindow.vala;0;4 +FILE_NAME_8=2607;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FCustomMessageDialog.vala;0;4 +FILE_NAME_9=3025;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FFFmpegBuilder.vala;0;4 FILE_NAME_10=4148;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FSimpleProgressWindow.vala;0;4 -FILE_NAME_11=629;Make;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2Fmakefile;0;4 -FILE_NAME_12=61166;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMainWindow.vala;0;4 -FILE_NAME_13=981;Conf;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fdebian%2Fcontrol;0;4 -FILE_NAME_14=420;None;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fdebian%2Fchangelog;0;4 -FILE_NAME_15=2244;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMediaPlayer.vala;0;4 -FILE_NAME_16=10003;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMediaFile.vala;0;4 -FILE_NAME_17=4505;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMediaPlayerWindow.vala;0;4 -FILE_NAME_18=1964;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FBatchEditWindow.vala;0;4 +FILE_NAME_11=78305;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMainWindow.vala;0;4 +FILE_NAME_12=981;Conf;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fdebian%2Fcontrol;0;4 +FILE_NAME_13=153;None;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fdebian%2Fchangelog;0;4 +FILE_NAME_14=3218;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMediaPlayer.vala;0;4 +FILE_NAME_15=16150;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMediaFile.vala;0;4 +FILE_NAME_16=22201;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Faptik-archive-manager%2Fsrc%2FViewArchiveWindow.vala;0;4 +FILE_NAME_17=9477;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Faptik%2Fsrc%2FPpaWindow.vala;0;4 +FILE_NAME_18=2475;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FBatchEditWindow.vala;0;4 +FILE_NAME_19=229;Make;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2Fmakefile;0;4 +FILE_NAME_20=1932;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fselene%2Fsrc%2FMediaPlayerWindow.vala;0;4 +FILE_NAME_21=15163;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Fconky-manager%2Fsrc%2FMainWindow.vala;0;4 +FILE_NAME_22=7102;Vala;0;EUTF-8;1;1;1;%2Fhome%2Fteejee%2Fprojects%2Flinux%2Faptik-battery-monitor%2Fsrc%2FBatteryStatsWindow.vala;0;4 [VTE] last_dir=/home/teejee @@ -67,3 +71,8 @@ ensure_convert_new_lines=false strip_trailing_spaces=false replace_tabs=false + +[editor] +line_wrapping=true +line_break_column=80 +auto_continue_multiline=true
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/selene.pot -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/selene.pot
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: selene 2.2\n" "Report-Msgid-Bugs-To: teejee2008@gmail.com\n" -"POT-Creation-Date: 2016-02-27 23:34+0530\n" +"POT-Creation-Date: 2016-03-24 09:07+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,42 +17,83 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: EncoderConfigWindow.vala:2501 +#: EncoderConfigWindow.vala:2094 msgid "" "\n" +"<b>Note:</b>\n" +"\n" +"1. Audio track will be copied directly to the output file without changes.\n" +"\n" +"2. Format of the audio track must be compatible with the selected file " +"format. For example, if the input file contains AAC audio and the selected " +"file format is WEBM, then encoding will fail - since WEBM does not support " +"AAC audio.\n" +"\n" +"3. Input file can be trimmed only in basic mode (single segment). Selecting " +"multiple segments using advanced mode will not work." +msgstr "" + +#: EncoderConfigWindow.vala:3012 +msgid "" +"\n" +"<b>Note:</b>\n" "\n" -"Subtitle files should be present in the same folder\n" -"and should start with same name." +"1. Supported subtitle file formats:" msgstr "" -#: MediaPlayerWindow.vala:1076 +#: EncoderConfigWindow.vala:2587 +msgid "" +"\n" +"<b>Note:</b>\n" +"\n" +"1. Video track will be copied to the output file without re-encoding.\n" +"\n" +"2. Format of the video track must be compatible with the selected container. " +"For example, if the input file contains H264 video and the selected file " +"format is WEBM, then encoding will fail (since WEBM does not support H264).\n" +"\n" +"3. If you are trimming the input file then select the basic mode (single " +"segment). Selecting multiple segments in advanced mode will not work." +msgstr "" + +#: BatchEditWindow.vala:85 BatchEditWindow.vala:88 +msgid "(Batch)" +msgstr "" + +#: MediaPlayerWindow.vala:1093 msgid "100%" msgstr "" -#: MediaPlayerWindow.vala:1078 +#: EncoderConfigWindow.vala:3032 +msgid "" +"2. External subtitle files must be present in the same location and start " +"with the same file name." +msgstr "" + +#: MediaPlayerWindow.vala:1095 msgid "200%" msgstr "" -#: MediaPlayerWindow.vala:1070 +#: MediaPlayerWindow.vala:1087 msgid "25%" msgstr "" -#: MediaPlayerWindow.vala:1072 +#: MediaPlayerWindow.vala:1089 msgid "50%" msgstr "" -#: MediaPlayerWindow.vala:1074 +#: MediaPlayerWindow.vala:1091 msgid "75%" msgstr "" -#: EncoderConfigWindow.vala:515 EncoderConfigWindow.vala:516 +#: EncoderConfigWindow.vala:669 EncoderConfigWindow.vala:670 msgid "" "<b>AAC-ELD</b>\n" "Enhanced Low Delay Profile for real-time communication\n" "\n" msgstr "" -#: EncoderConfigWindow.vala:511 +#: EncoderConfigWindow.vala:665 msgid "" "<b>AAC-LC (Recommended)</b>\n" "MPEG-2 Low-complexity (LC) combined with MPEG-4 Perceptual Noise " @@ -60,14 +101,14 @@ "\n" msgstr "" -#: EncoderConfigWindow.vala:514 +#: EncoderConfigWindow.vala:668 msgid "" "<b>AAC-LD</b>\n" "Low Delay Profile for real-time communication\n" "\n" msgstr "" -#: EncoderConfigWindow.vala:1023 +#: EncoderConfigWindow.vala:1425 msgid "" "<b>Additional Options</b>\n" "These options will be passed to the encoder\n" @@ -75,19 +116,23 @@ "any options that are already provided by the GUI." msgstr "" -#: EncoderConfigWindow.vala:638 +#: EncoderConfigWindow.vala:802 msgid "<b>Adjustments:</b>" msgstr "" -#: AppConfigWindow.vala:150 +#: EncoderConfigWindow.vala:554 +msgid "<b>Audio Encoder</b>" +msgstr "" + +#: AppConfigWindow.vala:158 msgid "<b>Backup Directory</b>" msgstr "" -#: EncoderConfigWindow.vala:551 -msgid "<b>Channels & Sampling:</b>" +#: EncoderConfigWindow.vala:727 +msgid "<b>Channels</b>" msgstr "" -#: EncoderConfigWindow.vala:970 +#: EncoderConfigWindow.vala:1357 msgid "" "<b>Compression Vs Device Compatibility</b>\n" "'High' profile gives the best compression.\n" @@ -96,59 +141,67 @@ "support the 'High' profile" msgstr "" -#: EncoderConfigWindow.vala:938 +#: EncoderConfigWindow.vala:1315 msgid "" "<b>Compression Vs Encoding Speed</b>\n" "Slower presets give better compression and smaller files\n" "but take more time to encode." msgstr "" -#: EncoderConfigWindow.vala:923 +#: EncoderConfigWindow.vala:1293 msgid "" "<b>Compression Vs Quality</b>\n" "Smaller values give better quality video and larger files" msgstr "" -#: EncoderConfigWindow.vala:1262 +#: AppConfigWindow.vala:366 +msgid "<b>Default Language</b>" +msgstr "" + +#: EncoderConfigWindow.vala:1702 msgid "" "<b>Embed</b> - Subtitle files will be combined with the output file.\n" "These subtitles can be switched off since they are added as a separate track" msgstr "" -#: AppConfigWindow.vala:274 +#: AppConfigWindow.vala:278 msgid "" "<b>Encoder</b>\n" "Use the 'ffmpeg' encoding tool from the FFmpeg project (Recommended)\n" "\n" msgstr "" -#: EncoderConfigWindow.vala:751 +#: EncoderConfigWindow.vala:964 msgid "<b>Fade:</b>" msgstr "" -#: EncoderConfigWindow.vala:287 -msgid "<b>File Format:</b>" +#: EncoderConfigWindow.vala:415 +msgid "<b>File Format</b>" msgstr "" -#: EncoderConfigWindow.vala:513 +#: AppConfigWindow.vala:420 +msgid "<b>File Handling</b>" +msgstr "" + +#: EncoderConfigWindow.vala:667 msgid "" "<b>HE-AAC v2</b>\n" "AAC-LC + SBR + PS (Parametric Stereo)\n" "\n" msgstr "" -#: EncoderConfigWindow.vala:512 +#: EncoderConfigWindow.vala:666 msgid "" "<b>HE-AAC</b>\n" "AAC-LC + SBR (Spectral Band Replication)\n" "\n" msgstr "" -#: AppConfigWindow.vala:196 +#: AppConfigWindow.vala:210 msgid "<b>Main Window</b>" msgstr "" -#: EncoderConfigWindow.vala:517 +#: EncoderConfigWindow.vala:671 msgid "" "<b>Note:</b>\n" "HE-AAC and HE-AACv2 are used for low-bitrate encoding while HE-LD and HE-ELD " @@ -157,19 +210,23 @@ "low as 32 kbps." msgstr "" -#: EncoderConfigWindow.vala:816 +#: EncoderConfigWindow.vala:1058 msgid "<b>Other Effects:</b>" msgstr "" -#: AppConfigWindow.vala:105 +#: AppConfigWindow.vala:106 msgid "<b>Output Directory</b>" msgstr "" -#: EncoderConfigWindow.vala:344 -msgid "<b>Preset:</b>" +#: AppConfigWindow.vala:265 +msgid "<b>Preferred Tools</b>" +msgstr "" + +#: EncoderConfigWindow.vala:475 +msgid "<b>Preset</b>" msgstr "" -#: EncoderConfigWindow.vala:2121 +#: EncoderConfigWindow.vala:2659 msgid "" "<b>Quality Vs Encoding Speed</b>\n" "\n" @@ -178,7 +235,7 @@ "<b>Realtime:</b> Fastest" msgstr "" -#: EncoderConfigWindow.vala:2123 +#: EncoderConfigWindow.vala:2661 msgid "" "<b>Quality Vs Encoding Speed</b>\n" "\n" @@ -186,141 +243,149 @@ "Larger value = Lower quality, faster\n" msgstr "" -#: EncoderConfigWindow.vala:2132 +#: EncoderConfigWindow.vala:2669 msgid "" "<b>Quality Vs Encoding Speed</b>\n" "Higher values speed-up encoding at the expense of quality.\n" "Lower values improve quality at the expense of encoding speed." msgstr "" -#: EncoderConfigWindow.vala:1264 +#: EncoderConfigWindow.vala:1704 msgid "" "<b>Render</b> - Subtitles are rendered/burned on the video.\n" "These subtitles cannot be switched off since they become a part of the video" msgstr "" -#: EncoderConfigWindow.vala:1175 -msgid "<b>Resample:</b>" +#: EncoderConfigWindow.vala:705 EncoderConfigWindow.vala:1607 +msgid "<b>Resample</b>" msgstr "" -#: EncoderConfigWindow.vala:1074 -msgid "<b>Resize:</b>" +#: EncoderConfigWindow.vala:1488 +msgid "<b>Resize</b>" +msgstr "" + +#: EncoderConfigWindow.vala:767 +msgid "<b>SOX Audio Processing</b>" msgstr "" -#: EncoderConfigWindow.vala:607 -msgid "<b>SOX Audio Processing:</b>" +#: EncoderConfigWindow.vala:1696 +msgid "<b>Subtitles</b>" msgstr "" -#: AppConfigWindow.vala:273 +#: EncoderConfigWindow.vala:1213 +msgid "<b>Video Encoder</b>" +msgstr "" + +#: AppConfigWindow.vala:277 msgid "" "<b>avconv</b>\n" "Use the 'avconv' encoding tool from the Libav project\n" "\n" msgstr "" -#: MainWindow.vala:677 +#: MainWindow.vala:958 msgid "A-Bitrate" msgstr "" -#: MainWindow.vala:622 +#: MainWindow.vala:832 msgid "A-Ch" msgstr "" -#: MainWindow.vala:598 +#: MainWindow.vala:754 msgid "A-Fmt" msgstr "" -#: MainWindow.vala:641 +#: MainWindow.vala:872 msgid "A-Sampling" msgstr "" -#: EncoderConfigWindow.vala:2556 EncoderConfigWindow.vala:2575 +#: EncoderConfigWindow.vala:3070 EncoderConfigWindow.vala:3089 msgid "AAC-ELD" msgstr "" -#: EncoderConfigWindow.vala:2539 EncoderConfigWindow.vala:2548 -#: EncoderConfigWindow.vala:2567 +#: EncoderConfigWindow.vala:3053 EncoderConfigWindow.vala:3062 +#: EncoderConfigWindow.vala:3081 msgid "AAC-LC" msgstr "" -#: EncoderConfigWindow.vala:2554 EncoderConfigWindow.vala:2573 +#: EncoderConfigWindow.vala:3068 EncoderConfigWindow.vala:3087 msgid "AAC-LD" msgstr "" -#: EncoderConfigWindow.vala:311 +#: EncoderConfigWindow.vala:438 msgid "AC3 Audio (*.ac3)" msgstr "" -#: MainWindow.vala:254 +#: MainWindow.vala:243 msgid "Abort" msgstr "" -#: MainWindow.vala:312 +#: MainWindow.vala:301 msgid "About" msgstr "" -#: MainWindow.vala:364 MainWindow.vala:2029 +#: MainWindow.vala:353 MainWindow.vala:2577 msgid "Add File(s)" msgstr "" -#: MainWindow.vala:347 +#: MainWindow.vala:336 msgid "Add File(s)..." msgstr "" -#: MainWindow.vala:2033 +#: MainWindow.vala:2581 msgid "Add Folder(s)" msgstr "" -#: MainWindow.vala:357 +#: MainWindow.vala:346 msgid "Add Folder(s)..." msgstr "" -#: MainWindow.vala:1178 +#: MainWindow.vala:1775 msgid "Add New Preset" msgstr "" -#: MainWindow.vala:2321 MainWindow.vala:2347 MainWindow.vala:2481 +#: MainWindow.vala:2883 MainWindow.vala:2909 MainWindow.vala:3044 msgid "Add some files to the file list" msgstr "" -#: MainWindow.vala:2335 +#: MainWindow.vala:2897 msgid "Add some videos to the file list" msgstr "" -#: MainWindow.vala:2075 +#: MainWindow.vala:2623 #, c-format msgid "Adding (%d/%d): '%s'" msgstr "" -#: MainWindow.vala:2065 +#: MainWindow.vala:2613 msgid "Adding..." msgstr "" -#: EncoderConfigWindow.vala:847 +#: EncoderConfigWindow.vala:1095 msgid "Adjust Stereo for Headphones" msgstr "" -#: MediaPlayerWindow.vala:358 +#: MediaPlayerWindow.vala:362 msgid "Advanced Mode" msgstr "" -#: MainWindow.vala:797 +#: MainWindow.vala:1204 MainWindow.vala:2766 msgid "Album" msgstr "" -#: Main.vala:674 +#: Main.vala:698 msgid "All files removed" msgstr "" -#: MainWindow.vala:2391 +#: MainWindow.vala:2954 msgid "An audio-video converter for Linux" msgstr "" -#: MainWindow.vala:288 +#: MainWindow.vala:277 msgid "Application Settings" msgstr "" -#: MainWindow.vala:785 +#: MainWindow.vala:1173 MainWindow.vala:2765 msgid "Artist" msgstr "" @@ -329,11 +394,35 @@ msgid "Artists" msgstr "" -#: EncoderConfigWindow.vala:406 +#: EncoderConfigWindow.vala:539 MainWindow.vala:1662 msgid "Audio" msgstr "" +#: MainWindow.vala:2763 +msgid "Audio Bitrate" +msgstr "" + +#: MainWindow.vala:2757 +msgid "Audio Channels" +msgstr "" + #: EncoderConfigWindow.vala:375 +msgid "Audio Encoder" +msgstr "" + +#: EncoderConfigWindow.vala:380 +msgid "Audio Filters" +msgstr "" + +#: MainWindow.vala:2755 +msgid "Audio Format" +msgstr "" + +#: MainWindow.vala:2758 +msgid "Audio Sampling Rate" +msgstr "" + +#: EncoderConfigWindow.vala:506 msgid "Author" msgstr "" @@ -342,20 +431,24 @@ msgid "Authors" msgstr "" -#: EncoderConfigWindow.vala:2534 +#: EncoderConfigWindow.vala:3048 msgid "Auto" msgstr "" -#: EncoderConfigWindow.vala:1661 EncoderConfigWindow.vala:1686 -#: EncoderConfigWindow.vala:1704 EncoderConfigWindow.vala:1730 -#: EncoderConfigWindow.vala:1761 EncoderConfigWindow.vala:1778 -#: EncoderConfigWindow.vala:2148 EncoderConfigWindow.vala:2171 -#: EncoderConfigWindow.vala:2194 +#: BatchEditWindow.vala:99 +msgid "Auto Crop" +msgstr "" + +#: EncoderConfigWindow.vala:2182 EncoderConfigWindow.vala:2207 +#: EncoderConfigWindow.vala:2225 EncoderConfigWindow.vala:2251 +#: EncoderConfigWindow.vala:2282 EncoderConfigWindow.vala:2299 +#: EncoderConfigWindow.vala:2683 EncoderConfigWindow.vala:2708 +#: EncoderConfigWindow.vala:2733 msgid "Average Bitrate" msgstr "" -#: EncoderConfigWindow.vala:2150 EncoderConfigWindow.vala:2173 -#: EncoderConfigWindow.vala:2196 +#: EncoderConfigWindow.vala:2685 EncoderConfigWindow.vala:2710 +#: EncoderConfigWindow.vala:2735 msgid "Average Bitrate (2-pass)" msgstr "" @@ -363,152 +456,166 @@ msgid "Back" msgstr "" -#: MainWindow.vala:261 +#: MainWindow.vala:250 msgid "Background" msgstr "" -#: MediaPlayerWindow.vala:472 +#: MediaPlayerWindow.vala:476 msgid "Basic Mode" msgstr "" -#: EncoderConfigWindow.vala:652 -msgid "Bass (lower freq)" +#: EncoderConfigWindow.vala:817 +msgid "Bass" msgstr "" -#: EncoderConfigWindow.vala:999 +#: EncoderConfigWindow.vala:1394 msgid "Best" msgstr "" -#: MainWindow.vala:659 +#: MainWindow.vala:912 MainWindow.vala:2762 msgid "Bitrate" msgstr "" -#: EncoderConfigWindow.vala:449 EncoderConfigWindow.vala:912 +#: EncoderConfigWindow.vala:598 EncoderConfigWindow.vala:1272 msgid "Bitrate (kbps)" msgstr "" -#: EncoderConfigWindow.vala:650 +#: EncoderConfigWindow.vala:815 msgid "Boost or cut the bass (lower) frequencies of the audio." msgstr "" -#: EncoderConfigWindow.vala:676 +#: EncoderConfigWindow.vala:853 msgid "Boost or cut the treble (upper) frequencies of the audio." msgstr "" -#: BatchEditWindow.vala:210 +#: BatchEditWindow.vala:221 msgid "Bottom" msgstr "" -#: MediaPlayerWindow.vala:243 +#: MediaPlayerWindow.vala:247 msgid "Bottom:" msgstr "" -#: MainWindow.vala:1198 +#: MainWindow.vala:1788 msgid "Browse" msgstr "" -#: MainWindow.vala:2672 +#: MainWindow.vala:3240 msgid "CPU: " msgstr "" -#: Main.vala:1230 Main.vala:1244 +#: Main.vala:1227 Main.vala:1241 msgid "Cancelled" msgstr "" -#: EncoderConfigWindow.vala:702 +#: EncoderConfigWindow.vala:891 msgid "Change audio pitch (shrillness) without changing audio tempo (speed)." msgstr "" -#: EncoderConfigWindow.vala:728 +#: EncoderConfigWindow.vala:929 msgid "" "Change audio tempo (speed) without changing audio pitch (shrillness).\n" "\n" "WARNING: This will change the duration of the audio track" msgstr "" -#: EncoderConfigWindow.vala:570 +#: EncoderConfigWindow.vala:735 msgid "Channels" msgstr "" -#: MainWindow.vala:399 +#: MainWindow.vala:387 msgid "Clear List" msgstr "" +#: MediaPlayerWindow.vala:659 +msgid "Clip" +msgstr "" + #: AboutWindow.vala:295 msgid "Close" msgstr "" -#: MainWindow.vala:1010 +#: MainWindow.vala:1536 msgid "Columns..." msgstr "" -#: MainWindow.vala:846 +#: MainWindow.vala:1329 MainWindow.vala:2770 msgid "Comments" msgstr "" -#: Main.vala:1069 Main.vala:1079 Main.vala:1087 +#: Main.vala:1062 Main.vala:1072 Main.vala:1080 msgid "Completed" msgstr "" -#: EncoderConfigWindow.vala:1663 EncoderConfigWindow.vala:1732 -#: EncoderConfigWindow.vala:1763 EncoderConfigWindow.vala:2220 +#: EncoderConfigWindow.vala:2184 EncoderConfigWindow.vala:2253 +#: EncoderConfigWindow.vala:2284 EncoderConfigWindow.vala:2760 msgid "Constant Bitrate" msgstr "" -#: EncoderConfigWindow.vala:1665 +#: EncoderConfigWindow.vala:2186 msgid "Constant Bitrate (Strict)" msgstr "" -#: Main.vala:985 Main.vala:1278 -msgid "Converting..." +#: Main.vala:972 Main.vala:1275 MainWindow.vala:2275 +msgid "Converting" msgstr "" -#: MainWindow.vala:1727 -#, c-format -msgid "Converting: '%s'" +#: Main.vala:970 Main.vala:1273 +msgid "Converting: Enter (q) to quit or (p) to pause..." msgstr "" -#: Main.vala:983 Main.vala:1276 -msgid "Converting: Enter (q) to quit or (p) to pause..." +#: EncoderConfigWindow.vala:1895 EncoderConfigWindow.vala:1911 +#: EncoderConfigWindow.vala:1926 +msgid "Copy Audio" +msgstr "" + +#: EncoderConfigWindow.vala:1830 EncoderConfigWindow.vala:1839 +#: EncoderConfigWindow.vala:1848 EncoderConfigWindow.vala:1855 +#: EncoderConfigWindow.vala:1866 +msgid "Copy Video" msgstr "" #: AboutWindow.vala:272 AboutWindow.vala:289 msgid "Credits" msgstr "" -#: MainWindow.vala:445 +#: MainWindow.vala:432 msgid "Crop" msgstr "" -#: BatchEditWindow.vala:159 +#: BatchEditWindow.vala:161 msgid "Crop Left" msgstr "" -#: MainWindow.vala:916 -msgid "Crop Video..." +#: BatchEditWindow.vala:85 MainWindow.vala:1442 MediaPlayerWindow.vala:122 +msgid "Crop Video" msgstr "" -#: MainWindow.vala:429 MainWindow.vala:448 +#: MainWindow.vala:416 MainWindow.vala:435 msgid "Crop Videos" msgstr "" -#: MediaPlayerWindow.vala:263 +#: MediaPlayerWindow.vala:267 msgid "Cropped:" msgstr "" -#: EncoderConfigWindow.vala:1090 EncoderConfigWindow.vala:1193 +#: EncoderConfigWindow.vala:1505 EncoderConfigWindow.vala:1625 msgid "Custom" msgstr "" -#: MainWindow.vala:1185 +#: MainWindow.vala:1782 msgid "Delete Preset" msgstr "" -#: MediaPlayerWindow.vala:454 +#: MediaPlayerWindow.vala:458 msgid "Delete Segment" msgstr "" -#: EncoderConfigWindow.vala:1238 +#: AppConfigWindow.vala:430 +msgid "Delete temporary files after successful encode" +msgstr "" + +#: EncoderConfigWindow.vala:1671 msgid "Denominator" msgstr "" @@ -516,20 +623,20 @@ msgid "Description" msgstr "" -#: MediaPlayerWindow.vala:278 +#: MediaPlayerWindow.vala:282 msgid "Detect Borders" msgstr "" -#: MediaPlayerWindow.vala:280 +#: MediaPlayerWindow.vala:284 msgid "Detect black borders in the video and set cropping parameters" msgstr "" -#: MediaPlayerWindow.vala:849 +#: MediaPlayerWindow.vala:856 #, c-format msgid "Detected Parameters: %d, %d, %d, %d" msgstr "" -#: BatchEditWindow.vala:403 MediaPlayerWindow.vala:781 +#: BatchEditWindow.vala:426 MediaPlayerWindow.vala:788 msgid "Detecting borders..." msgstr "" @@ -550,16 +657,16 @@ "(teejeetech@gmail.com)" msgstr "" -#: EncoderConfigWindow.vala:1405 EncoderConfigWindow.vala:1419 -#: EncoderConfigWindow.vala:1432 +#: EncoderConfigWindow.vala:1893 EncoderConfigWindow.vala:1909 +#: EncoderConfigWindow.vala:1924 msgid "Disable Audio" msgstr "" -#: EncoderConfigWindow.vala:1378 +#: EncoderConfigWindow.vala:1864 msgid "Disable Video" msgstr "" -#: EncoderConfigWindow.vala:1161 +#: EncoderConfigWindow.vala:1588 msgid "Do not stretch or squeeze the video (Fit-To-Box)" msgstr "" @@ -568,7 +675,7 @@ msgid "Documenters" msgstr "" -#: DonationWindow.vala:36 MainWindow.vala:301 MainWindow.vala:302 +#: DonationWindow.vala:36 MainWindow.vala:290 MainWindow.vala:291 msgid "Donate" msgstr "" @@ -585,7 +692,7 @@ msgid "Donations" msgstr "" -#: Main.vala:1064 +#: Main.vala:1057 msgid "Done" msgstr "" @@ -593,185 +700,185 @@ msgid "Drag and drop to re-order" msgstr "" -#: MainWindow.vala:1715 +#: MainWindow.vala:2263 msgid "Drag files on this window or click the 'Add' button" msgstr "" -#: MainWindow.vala:574 +#: MainWindow.vala:660 MediaPlayerWindow.vala:665 msgid "Duration" msgstr "" -#: BatchEditWindow.vala:267 +#: BatchEditWindow.vala:283 msgid "Edit" msgstr "" -#: MainWindow.vala:1271 +#: MainWindow.vala:1855 msgid "Edit Preset" msgstr "" -#: EncoderConfigWindow.vala:386 +#: EncoderConfigWindow.vala:517 msgid "Email" msgstr "" -#: EncoderConfigWindow.vala:1526 +#: EncoderConfigWindow.vala:2020 msgid "Embed / Soft Subs" msgstr "" -#: EncoderConfigWindow.vala:2596 +#: EncoderConfigWindow.vala:3110 msgid "Empty Preset Name" msgstr "" -#: EncoderStatusWindow.vala:45 MainWindow.vala:294 +#: AppConfigWindow.vala:280 +msgid "Encoder" +msgstr "" + +#: EncoderStatusWindow.vala:45 MainWindow.vala:283 msgid "Encoders" msgstr "" -#: EncoderConfigWindow.vala:436 EncoderConfigWindow.vala:899 +#: EncoderConfigWindow.vala:585 EncoderConfigWindow.vala:1253 msgid "Encoding Mode" msgstr "" -#: MainWindow.vala:1261 +#: MainWindow.vala:1845 msgid "Encoding Script or Preset File" msgstr "" -#: MediaPlayerWindow.vala:324 +#: MediaPlayerWindow.vala:328 msgid "End (sec):" msgstr "" -#: MediaPlayerWindow.vala:438 +#: MediaPlayerWindow.vala:663 +msgid "End Pos" +msgstr "" + +#: MediaPlayerWindow.vala:442 msgid "End Segment" msgstr "" -#: BatchEditWindow.vala:247 +#: BatchEditWindow.vala:262 msgid "EndPos" msgstr "" -#: Main.vala:755 +#: Main.vala:779 msgid "Enter any key to Cancel..." msgstr "" -#: AppConfigWindow.vala:120 AppConfigWindow.vala:166 +#: AppConfigWindow.vala:126 AppConfigWindow.vala:178 msgid "Enter path or browse for directory" msgstr "" -#: Main.vala:1074 Utility.vala:108 +#: Main.vala:1067 Utility.vala:108 msgid "Error" msgstr "" -#: Main.vala:790 +#: Main.vala:814 msgid "Error: File missing" msgstr "" -#: EncoderConfigWindow.vala:1214 -msgid "Examples:" -msgstr "" - -#: EncoderConfigWindow.vala:333 +#: EncoderConfigWindow.vala:462 msgid "Extension" msgstr "" -#: EncoderConfigWindow.vala:1026 +#: EncoderConfigWindow.vala:1428 msgid "Extra Options" msgstr "" -#: EncoderConfigWindow.vala:313 +#: EncoderConfigWindow.vala:440 msgid "FLAC Audio (*.flac)" msgstr "" -#: EncoderConfigWindow.vala:1211 -msgid "FPS Ratio" +#: EncoderConfigWindow.vala:979 +msgid "Fade In (sec)" msgstr "" -#: EncoderConfigWindow.vala:763 -msgid "Fade In (seconds)" -msgstr "" - -#: EncoderConfigWindow.vala:777 -msgid "Fade Out (seconds)" +#: EncoderConfigWindow.vala:999 +msgid "Fade Out (sec)" msgstr "" -#: EncoderConfigWindow.vala:791 +#: EncoderConfigWindow.vala:1019 msgid "Fade Type" msgstr "" -#: Main.vala:1090 +#: Main.vala:1083 msgid "Failed" msgstr "" -#: Utility.vala:1423 +#: Utility.vala:1434 msgid "Failed to set ownership" msgstr "" -#: EncoderConfigWindow.vala:953 +#: EncoderConfigWindow.vala:1342 msgid "Fast" msgstr "" -#: BatchEditWindow.vala:139 ColumnSelectionDialog.vala:76 MainWindow.vala:480 +#: BatchEditWindow.vala:140 ColumnSelectionDialog.vala:74 MainWindow.vala:471 msgid "File" msgstr "" -#: MainWindow.vala:999 +#: MainWindow.vala:1525 msgid "File Info (Output)" msgstr "" -#: MainWindow.vala:993 +#: MainWindow.vala:1519 msgid "File Info (Source)" msgstr "" -#: AppConfigWindow.vala:207 +#: AppConfigWindow.vala:222 msgid "File View" msgstr "" -#: Main.vala:654 +#: Main.vala:678 msgid "File added:" msgstr "" -#: Main.vala:668 +#: Main.vala:692 msgid "File removed:" msgstr "" -#: Main.vala:691 +#: Main.vala:715 #, c-format msgid "Files will be saved in '%s'" msgstr "" -#: Main.vala:694 +#: Main.vala:718 msgid "Files will be saved in source directory" msgstr "" -#: EncoderConfigWindow.vala:534 EncoderConfigWindow.vala:1058 +#: EncoderConfigWindow.vala:690 EncoderConfigWindow.vala:1471 msgid "Filters" msgstr "" -#: MainWindow.vala:272 MainWindow.vala:274 MediaPlayerWindow.vala:287 -#: MediaPlayerWindow.vala:373 MediaPlayerWindow.vala:485 +#: MainWindow.vala:261 MainWindow.vala:263 MediaPlayerWindow.vala:291 +#: MediaPlayerWindow.vala:377 MediaPlayerWindow.vala:491 msgid "Finish" msgstr "" -#: EncoderConfigWindow.vala:1158 +#: EncoderConfigWindow.vala:1584 msgid "Fits the video in a box of given width and height." msgstr "" -#: EncoderConfigWindow.vala:1795 +#: EncoderConfigWindow.vala:2316 msgid "Fixed Bitrate" msgstr "" -#: MainWindow.vala:1236 MainWindow.vala:1246 +#: MainWindow.vala:1820 MainWindow.vala:1830 msgid "Folder" msgstr "" -#: MainWindow.vala:2496 +#: MainWindow.vala:3059 msgid "Following encoders were not found on your system:" msgstr "" -#: Main.vala:330 +#: Main.vala:347 msgid "Following utilities are not installed on your system:" msgstr "" -#: EncoderConfigWindow.vala:295 MainWindow.vala:586 +#: EncoderConfigWindow.vala:423 MainWindow.vala:703 MainWindow.vala:2754 msgid "Format" msgstr "" -#: EncoderConfigWindow.vala:422 EncoderConfigWindow.vala:885 +#: EncoderConfigWindow.vala:562 EncoderConfigWindow.vala:1221 msgid "Format / Codec" msgstr "" @@ -779,61 +886,70 @@ msgid "Found" msgstr "" -#: EncoderConfigWindow.vala:1183 +#: EncoderConfigWindow.vala:1645 +msgid "Fps: Frames" +msgstr "" + +#: EncoderConfigWindow.vala:1662 +msgid "Fps: Seconds" +msgstr "" + +#: EncoderConfigWindow.vala:1616 msgid "Frame Rate" msgstr "" -#: EncoderConfigWindow.vala:1185 +#: EncoderConfigWindow.vala:1618 msgid "Frames/sec" msgstr "" -#: MediaPlayerWindow.vala:1160 MediaPlayerWindow.vala:1164 +#: MediaPlayerWindow.vala:1177 MediaPlayerWindow.vala:1181 msgid "Fullscreen" msgstr "" -#: AppConfigWindow.vala:97 EncoderConfigWindow.vala:271 +#: AppConfigWindow.vala:98 EncoderConfigWindow.vala:360 +#: EncoderConfigWindow.vala:401 msgid "General" msgstr "" -#: MainWindow.vala:809 +#: MainWindow.vala:1235 MainWindow.vala:2767 msgid "Genre" msgstr "" -#: EncoderConfigWindow.vala:1001 +#: EncoderConfigWindow.vala:1396 msgid "Good" msgstr "" -#: EncoderConfigWindow.vala:2541 EncoderConfigWindow.vala:2550 -#: EncoderConfigWindow.vala:2569 +#: EncoderConfigWindow.vala:3055 EncoderConfigWindow.vala:3064 +#: EncoderConfigWindow.vala:3083 msgid "HE-AAC" msgstr "" -#: EncoderConfigWindow.vala:2543 EncoderConfigWindow.vala:2552 -#: EncoderConfigWindow.vala:2571 +#: EncoderConfigWindow.vala:3057 EncoderConfigWindow.vala:3066 +#: EncoderConfigWindow.vala:3085 msgid "HE-AAC v2" msgstr "" -#: EncoderConfigWindow.vala:806 +#: EncoderConfigWindow.vala:1039 msgid "Half Sine" msgstr "" -#: EncoderConfigWindow.vala:1137 +#: EncoderConfigWindow.vala:1546 EncoderConfigWindow.vala:1555 msgid "Height" msgstr "" -#: MainWindow.vala:1213 MainWindow.vala:1215 MainWindow.vala:1671 +#: MainWindow.vala:1797 MainWindow.vala:1799 MainWindow.vala:2223 msgid "Info" msgstr "" -#: Main.vala:682 +#: Main.vala:706 msgid "Input queue is empty! Please add some files." msgstr "" -#: Main.vala:247 +#: Main.vala:257 msgid "Input queue is empty! Please select files to convert." msgstr "" -#: EncoderConfigWindow.vala:812 +#: EncoderConfigWindow.vala:1045 msgid "Inverted Parabola" msgstr "" @@ -841,63 +957,63 @@ msgid "Key" msgstr "" -#: MediaPlayerWindow.vala:204 +#: AppConfigWindow.vala:380 +msgid "Language" +msgstr "" + +#: MediaPlayerWindow.vala:208 msgid "Left:" msgstr "" -#: EncoderConfigWindow.vala:808 +#: EncoderConfigWindow.vala:1041 msgid "Linear" msgstr "" -#: AppConfigWindow.vala:220 +#: AppConfigWindow.vala:238 msgid "List" msgstr "" -#: Main.vala:378 +#: Main.vala:395 msgid "Loading presets from:" msgstr "" -#: Main.vala:377 +#: Main.vala:394 msgid "Loading scripts from:" msgstr "" -#: EncoderConfigWindow.vala:810 +#: EncoderConfigWindow.vala:1043 msgid "Logarithmic" msgstr "" -#: EncoderConfigWindow.vala:1822 +#: EncoderConfigWindow.vala:2343 msgid "Lossless" msgstr "" -#: Main.vala:804 Main.vala:807 -msgid "Lyrics:" -msgstr "" - -#: EncoderConfigWindow.vala:315 +#: EncoderConfigWindow.vala:442 msgid "MP3 Audio (*.mp3)" msgstr "" -#: EncoderConfigWindow.vala:317 +#: EncoderConfigWindow.vala:444 msgid "MP4 Audio (*.mp4)" msgstr "" -#: EncoderConfigWindow.vala:2558 EncoderConfigWindow.vala:2577 +#: EncoderConfigWindow.vala:3072 EncoderConfigWindow.vala:3091 msgid "MPEG-2 AAC-LC" msgstr "" -#: EncoderConfigWindow.vala:2560 EncoderConfigWindow.vala:2579 +#: EncoderConfigWindow.vala:3074 EncoderConfigWindow.vala:3093 msgid "MPEG-2 HE-AAC" msgstr "" -#: EncoderConfigWindow.vala:2581 +#: EncoderConfigWindow.vala:3095 msgid "MPEG-2 HE-AAC v2" msgstr "" -#: EncoderConfigWindow.vala:305 +#: EncoderConfigWindow.vala:432 msgid "MPEG4 Video (*.mp4)" msgstr "" -#: EncoderConfigWindow.vala:845 +#: EncoderConfigWindow.vala:1092 msgid "" "Makes audio easier to listen to on headphones. Adds 'cues' to the audio so " "that when listened to on headphones the stereo image is moved from inside " @@ -905,27 +1021,31 @@ "(standard for speakers)." msgstr "" -#: EncoderConfigWindow.vala:303 +#: EncoderConfigWindow.vala:430 msgid "Matroska Video (*.mkv)" msgstr "" -#: EncoderConfigWindow.vala:830 +#: EncoderConfigWindow.vala:1074 msgid "Maximize Volume Level (Normalize)" msgstr "" -#: EncoderConfigWindow.vala:828 +#: EncoderConfigWindow.vala:1071 msgid "Maximize the volume level (loudness)" msgstr "" -#: EncoderConfigWindow.vala:955 +#: EncoderConfigWindow.vala:1344 msgid "Medium" msgstr "" +#: EncoderConfigWindow.vala:1565 +msgid "Method" +msgstr "" + #: EncoderStatusWindow.vala:153 msgid "Missing" msgstr "" -#: MainWindow.vala:2496 +#: MainWindow.vala:3059 msgid "Missing Encoders" msgstr "" @@ -933,79 +1053,82 @@ msgid "Missing Icon" msgstr "" -#: Main.vala:331 +#: Main.vala:348 msgid "Missing Utilities" msgstr "" -#: AppConfigWindow.vala:157 +#: EncoderConfigWindow.vala:1712 +msgid "Mode" +msgstr "" + +#: AppConfigWindow.vala:166 msgid "Move source files after encoding is complete" msgstr "" -#: EncoderConfigWindow.vala:492 +#: EncoderConfigWindow.vala:644 msgid "Music" msgstr "" -#: MediaPlayerWindow.vala:1148 MediaPlayerWindow.vala:1152 +#: MediaPlayerWindow.vala:1165 MediaPlayerWindow.vala:1169 msgid "Mute" msgstr "" -#: MediaFile.vala:344 +#: MediaFile.vala:562 msgid "N/A" msgstr "" -#: EncoderConfigWindow.vala:352 +#: EncoderConfigWindow.vala:484 msgid "Name" msgstr "" -#: EncoderConfigWindow.vala:359 MainWindow.vala:1176 +#: EncoderConfigWindow.vala:490 MainWindow.vala:1773 msgid "New Preset" msgstr "" -#: EncoderConfigWindow.vala:1088 EncoderConfigWindow.vala:1191 -#: EncoderConfigWindow.vala:1214 EncoderConfigWindow.vala:1845 -#: EncoderConfigWindow.vala:1887 EncoderConfigWindow.vala:1915 -#: EncoderConfigWindow.vala:1929 EncoderConfigWindow.vala:1960 -#: EncoderConfigWindow.vala:1980 +#: EncoderConfigWindow.vala:1503 EncoderConfigWindow.vala:1623 +#: EncoderConfigWindow.vala:2366 EncoderConfigWindow.vala:2408 +#: EncoderConfigWindow.vala:2436 EncoderConfigWindow.vala:2450 +#: EncoderConfigWindow.vala:2481 EncoderConfigWindow.vala:2501 msgid "No Change" msgstr "" -#: MainWindow.vala:2320 MainWindow.vala:2346 MainWindow.vala:2480 +#: MainWindow.vala:2882 MainWindow.vala:2908 MainWindow.vala:3043 msgid "No Files" msgstr "" -#: BatchEditWindow.vala:397 BatchEditWindow.vala:461 +#: BatchEditWindow.vala:420 BatchEditWindow.vala:484 msgid "No Files Selected" msgstr "" -#: EncoderConfigWindow.vala:1524 +#: EncoderConfigWindow.vala:2018 msgid "No Subtitles" msgstr "" -#: EncoderConfigWindow.vala:1169 +#: EncoderConfigWindow.vala:1599 msgid "No Up-Scaling" msgstr "" -#: MainWindow.vala:2334 +#: MainWindow.vala:2896 msgid "No Videos" msgstr "" -#: EncoderConfigWindow.vala:488 +#: EncoderConfigWindow.vala:640 msgid "None" msgstr "" -#: Main.vala:330 +#: Main.vala:347 msgid "Not possible to continue!" msgstr "" -#: EncoderConfigWindow.vala:1229 +#: EncoderConfigWindow.vala:1654 msgid "Numerator" msgstr "" -#: EncoderConfigWindow.vala:307 +#: EncoderConfigWindow.vala:434 msgid "OGG Theora Video (*.ogv)" msgstr "" -#: EncoderConfigWindow.vala:319 +#: EncoderConfigWindow.vala:446 msgid "OGG Vorbis Audio (*.ogg)" msgstr "" @@ -1013,96 +1136,101 @@ msgid "OK" msgstr "" -#: MainWindow.vala:1200 +#: MainWindow.vala:1790 msgid "Open Folder" msgstr "" -#: MainWindow.vala:970 +#: MainWindow.vala:1496 msgid "Open Log File" msgstr "" -#: MainWindow.vala:964 +#: MainWindow.vala:1490 msgid "Open Output Folder" msgstr "" -#: MainWindow.vala:958 +#: MainWindow.vala:1484 msgid "Open Temp Folder" msgstr "" -#: MainWindow.vala:330 +#: MainWindow.vala:319 msgid "Open output folder" msgstr "" -#: EncoderConfigWindow.vala:471 +#: EncoderConfigWindow.vala:626 msgid "Optimization" msgstr "" -#: EncoderConfigWindow.vala:321 +#: EncoderConfigWindow.vala:448 msgid "Opus Audio (*.opus)" msgstr "" -#: MainWindow.vala:328 +#: MainWindow.vala:317 msgid "Output" msgstr "" -#: MainWindow.vala:245 MainWindow.vala:2461 MainWindow.vala:2463 -#: MediaPlayerWindow.vala:1140 +#: MainWindow.vala:234 MainWindow.vala:3024 MainWindow.vala:3026 +#: MediaPlayerWindow.vala:1157 msgid "Pause" msgstr "" -#: Main.vala:1257 Main.vala:1262 +#: Main.vala:1254 Main.vala:1259 msgid "Paused" msgstr "" -#: Main.vala:1260 +#: Main.vala:1257 msgid "Paused: Enter (r) to resume..." msgstr "" -#: EncoderConfigWindow.vala:704 -msgid "Pitch (shrillness)" +#: EncoderConfigWindow.vala:893 +msgid "Pitch" msgstr "" -#: MediaPlayerWindow.vala:1136 +#: MediaPlayerWindow.vala:1153 msgid "Play" msgstr "" -#: MainWindow.vala:987 +#: MainWindow.vala:1513 msgid "Play File (Output)" msgstr "" -#: MainWindow.vala:981 +#: MainWindow.vala:1507 msgid "Play File (Source)" msgstr "" -#: MediaPlayerWindow.vala:783 +#: AppConfigWindow.vala:326 +msgid "Player" +msgstr "" + +#: MediaPlayerWindow.vala:790 msgid "Please Wait..." msgstr "" -#: EncoderConfigWindow.vala:2594 +#: EncoderConfigWindow.vala:3108 msgid "Please enter a name for this preset" msgstr "" -#: MainWindow.vala:2496 +#: MainWindow.vala:3059 msgid "Please install required packages or select another preset" msgstr "" -#: EncoderConfigWindow.vala:628 +#: EncoderConfigWindow.vala:789 msgid "Please install the 'sox' package on your system to use this feature" msgstr "" -#: EncoderConfigWindow.vala:941 MainWindow.vala:1251 +#: EncoderConfigWindow.vala:163 EncoderConfigWindow.vala:1320 +#: MainWindow.vala:1835 msgid "Preset" msgstr "" -#: MainWindow.vala:1609 +#: MainWindow.vala:2184 msgid "Preset deleted" msgstr "" -#: MainWindow.vala:2602 +#: MainWindow.vala:3170 msgid "Press 'Cancel' to abort shutdown" msgstr "" -#: EncoderConfigWindow.vala:496 EncoderConfigWindow.vala:973 +#: EncoderConfigWindow.vala:649 EncoderConfigWindow.vala:1362 msgid "Profile" msgstr "" @@ -1110,27 +1238,27 @@ msgid "Properties" msgstr "" -#: EncoderConfigWindow.vala:460 EncoderConfigWindow.vala:926 +#: EncoderConfigWindow.vala:612 EncoderConfigWindow.vala:1298 msgid "Quality" msgstr "" -#: EncoderConfigWindow.vala:804 +#: EncoderConfigWindow.vala:1037 msgid "Quarter Sine" msgstr "" -#: Main.vala:712 Main.vala:771 MediaFile.vala:48 +#: Main.vala:736 Main.vala:795 MediaFile.vala:46 msgid "Queued" msgstr "" -#: MainWindow.vala:2063 +#: MainWindow.vala:2611 msgid "Reading file properties..." msgstr "" -#: EncoderConfigWindow.vala:1003 +#: EncoderConfigWindow.vala:1398 msgid "Realtime" msgstr "" -#: MainWindow.vala:858 +#: MainWindow.vala:1360 MainWindow.vala:2771 msgid "Recorded Date" msgstr "" @@ -1138,60 +1266,55 @@ msgid "Refresh" msgstr "" -#: MainWindow.vala:406 +#: MainWindow.vala:394 msgid "Remove File(s)" msgstr "" -#: MainWindow.vala:387 +#: MainWindow.vala:375 msgid "Remove Selected Items" msgstr "" -#: EncoderConfigWindow.vala:669 EncoderConfigWindow.vala:695 -#: EncoderConfigWindow.vala:721 EncoderConfigWindow.vala:747 +#: BatchEditWindow.vala:103 msgid "Reset" msgstr "" -#: EncoderConfigWindow.vala:1143 -msgid "Resizing Method" -msgstr "" - -#: EncoderConfigWindow.vala:1081 +#: EncoderConfigWindow.vala:1496 msgid "Resolution" msgstr "" -#: MainWindow.vala:2455 MainWindow.vala:2457 +#: MainWindow.vala:3018 MainWindow.vala:3020 msgid "Resume" msgstr "" -#: BatchEditWindow.vala:176 +#: BatchEditWindow.vala:181 msgid "Right" msgstr "" -#: MainWindow.vala:465 +#: MainWindow.vala:454 msgid "Right-click for more options" msgstr "" -#: MediaPlayerWindow.vala:217 +#: MediaPlayerWindow.vala:221 msgid "Right:" msgstr "" -#: MainWindow.vala:266 +#: MainWindow.vala:255 msgid "Run in background with lower priority" msgstr "" -#: EncoderConfigWindow.vala:594 +#: EncoderConfigWindow.vala:385 EncoderConfigWindow.vala:754 msgid "SOX" msgstr "" -#: EncoderConfigWindow.vala:557 +#: EncoderConfigWindow.vala:713 msgid "Sampling Rate (Hz)" msgstr "" -#: AppConfigWindow.vala:111 +#: AppConfigWindow.vala:114 msgid "Save files in following location" msgstr "" -#: MediaPlayerWindow.vala:200 +#: MediaPlayerWindow.vala:204 msgid "Scroll mouse wheel to adjust" msgstr "" @@ -1199,43 +1322,64 @@ msgid "Select Columns" msgstr "" -#: AppConfigWindow.vala:130 AppConfigWindow.vala:176 +#: AppConfigWindow.vala:137 AppConfigWindow.vala:189 msgid "Select Path" msgstr "" -#: MainWindow.vala:1713 +#: MainWindow.vala:2261 msgid "Select a script from the dropdown and click 'Start' to begin" msgstr "" -#: MediaPlayerWindow.vala:360 +#: MediaPlayerWindow.vala:364 msgid "Select multiple segments" msgstr "" -#: BatchEditWindow.vala:398 BatchEditWindow.vala:462 +#: BatchEditWindow.vala:421 BatchEditWindow.vala:485 msgid "Select some files from the list" msgstr "" -#: MediaPlayerWindow.vala:396 +#: MediaPlayerWindow.vala:400 msgid "Select the segments to include in output file:" msgstr "" +#: AppConfigWindow.vala:378 +msgid "" +"Selected language will be used for setting the default flag on the audio/" +"subtitle track" +msgstr "" + +#: MainWindow.vala:2221 +msgid "" +"Selene supports 2 types of presets:\n" +"\n" +"1) JSON presets with a '.json' file extension. Clicking the Edit button on " +"the toolbar will display a GUI for configuring the preset.\n" +"\n" +"2) Bash scripts with a '.sh' file extension. Clicking the Edit button will " +"open the script file in a text editor. Bash scripts are useful if you need " +"complete control over the encoding process. The script can use any set of " +"commands for encoding the input files. Selene will try to parse the output " +"and display the progress during encoding. See the sample scripts in '$HOME/." +"config/selene/scripts' for the syntax." +msgstr "" + #: DonationWindow.vala:81 msgid "Send Email" msgstr "" -#: MediaPlayerWindow.vala:338 MediaPlayerWindow.vala:348 +#: MediaPlayerWindow.vala:342 MediaPlayerWindow.vala:352 msgid "Set" msgstr "" -#: MediaPlayerWindow.vala:349 +#: MediaPlayerWindow.vala:353 msgid "Set current playback position as ending position" msgstr "" -#: MediaPlayerWindow.vala:339 +#: MediaPlayerWindow.vala:343 msgid "Set current playback position as starting position" msgstr "" -#: EncoderConfigWindow.vala:1108 +#: EncoderConfigWindow.vala:1525 msgid "" "Set either Width or Height and leave the other as 0.\n" "It will be calculated automatically.\n" @@ -1246,85 +1390,89 @@ "Enable the 'Fit-To-Box' option to avoid changes to aspect ratio." msgstr "" -#: MainWindow.vala:317 +#: MainWindow.vala:306 msgid "Shutdown" msgstr "" -#: MainWindow.vala:2433 +#: MainWindow.vala:2996 msgid "Shutdown Disabled" msgstr "" -#: MainWindow.vala:2430 +#: MainWindow.vala:2993 msgid "Shutdown Enabled" msgstr "" -#: MainWindow.vala:322 +#: MainWindow.vala:311 msgid "Shutdown system after completion" msgstr "" -#: MainWindow.vala:556 +#: MainWindow.vala:610 msgid "Size" msgstr "" -#: MainWindow.vala:911 +#: MainWindow.vala:1437 msgid "Skip File" msgstr "" -#: EncoderConfigWindow.vala:957 +#: EncoderConfigWindow.vala:1346 msgid "Slow" msgstr "" -#: EncoderConfigWindow.vala:959 +#: EncoderConfigWindow.vala:1348 msgid "Slower" msgstr "" -#: MainWindow.vala:2101 -msgid "Some files could not be opened:" +#: MainWindow.vala:2649 +msgid "Some files could not be added:" msgstr "" -#: Main.vala:700 +#: Main.vala:724 #, c-format msgid "Source files will be moved to '%s'" msgstr "" -#: Main.vala:802 MediaPlayerWindow.vala:256 +#: Main.vala:826 MediaPlayerWindow.vala:260 msgid "Source:" msgstr "" -#: EncoderConfigWindow.vala:628 +#: EncoderConfigWindow.vala:789 msgid "Sox Not Installed" msgstr "" -#: EncoderConfigWindow.vala:490 +#: EncoderConfigWindow.vala:642 msgid "Speech" msgstr "" -#: EncoderConfigWindow.vala:987 +#: EncoderConfigWindow.vala:1382 msgid "Speed" msgstr "" -#: MainWindow.vala:236 MainWindow.vala:238 +#: MainWindow.vala:225 MainWindow.vala:227 msgid "Start" msgstr "" -#: MediaPlayerWindow.vala:310 +#: MediaPlayerWindow.vala:314 msgid "Start (sec):" msgstr "" -#: MediaPlayerWindow.vala:425 +#: MediaPlayerWindow.vala:661 +msgid "Start Pos" +msgstr "" + +#: MediaPlayerWindow.vala:429 msgid "Start Segment" msgstr "" -#: BatchEditWindow.vala:228 +#: BatchEditWindow.vala:241 msgid "StartPos" msgstr "" -#: Main.vala:686 +#: Main.vala:710 #, c-format msgid "Starting batch of %d file(s):" msgstr "" -#: EncoderStatusWindow.vala:98 MainWindow.vala:871 +#: EncoderStatusWindow.vala:98 MainWindow.vala:1392 msgid "Status" msgstr "" @@ -1332,61 +1480,52 @@ msgid "Stopped" msgstr "" -#: Main.vala:1084 +#: Main.vala:1077 msgid "Stopped!" msgstr "" -#: EncoderConfigWindow.vala:1250 +#: EncoderConfigWindow.vala:1682 msgid "Subs" msgstr "" -#: EncoderConfigWindow.vala:1267 -msgid "Subtitle Mode" +#: MainWindow.vala:1665 +msgid "Subtitle" msgstr "" -#: EncoderConfigWindow.vala:1283 +#: EncoderConfigWindow.vala:390 EncoderConfigWindow.vala:1730 msgid "Subtitles" msgstr "" -#: Main.vala:804 Main.vala:807 -msgid "Subtitles:" -msgstr "" - -#: EncoderConfigWindow.vala:951 +#: EncoderConfigWindow.vala:1340 msgid "SuperFast" msgstr "" -#: EncoderConfigWindow.vala:2507 EncoderConfigWindow.vala:2510 -#: EncoderConfigWindow.vala:2513 EncoderConfigWindow.vala:2516 -msgid "Supported Formats:" -msgstr "" - -#: MainWindow.vala:2604 +#: MainWindow.vala:3172 msgid "System shutdown" msgstr "" -#: MainWindow.vala:2611 +#: MainWindow.vala:3179 #, c-format msgid "System shutdown was cancelled by user!" msgstr "" -#: Main.vala:222 +#: Main.vala:230 msgid "System will be shutdown after completion" msgstr "" -#: Main.vala:754 MainWindow.vala:2601 +#: Main.vala:778 MainWindow.vala:3169 msgid "System will shutdown in one minute!" msgstr "" -#: EncoderConfigWindow.vala:730 -msgid "Tempo (speed)" +#: EncoderConfigWindow.vala:931 +msgid "Tempo" msgstr "" -#: EncoderConfigWindow.vala:628 +#: EncoderConfigWindow.vala:789 msgid "The Sox utility was not found on your system" msgstr "" -#: EncoderConfigWindow.vala:1140 +#: EncoderConfigWindow.vala:1561 msgid "" "The resizing filter affects the sharpness and compressibility of the video.\n" "For example, the 'Lanzos' filter gives sharper video but the extra detail\n" @@ -1395,16 +1534,22 @@ "The 'Bilinear' filter gives smoother video (less detail) and smaller files." msgstr "" +#: AppConfigWindow.vala:427 +msgid "" +"The temporary folder contains files which may be useful for advanced users. " +"Keep this un-checked if you want to keep the temp files till the next reboot." +msgstr "" + #: AboutWindow.vala:338 #, c-format msgid "Third Party Tools & Software" msgstr "" -#: AppConfigWindow.vala:222 +#: AppConfigWindow.vala:240 msgid "Tiles" msgstr "" -#: MainWindow.vala:821 +#: MainWindow.vala:1266 MainWindow.vala:2768 msgid "Title" msgstr "" @@ -1412,68 +1557,72 @@ msgid "Tool" msgstr "" -#: AppConfigWindow.vala:236 +#: AppConfigWindow.vala:255 msgid "Tools" msgstr "" -#: BatchEditWindow.vala:193 +#: BatchEditWindow.vala:201 msgid "Top" msgstr "" -#: MediaPlayerWindow.vala:230 +#: MediaPlayerWindow.vala:234 msgid "Top:" msgstr "" -#: MainWindow.vala:833 +#: MainWindow.vala:1297 msgid "Track #" msgstr "" +#: MainWindow.vala:2769 +msgid "Track Number" +msgstr "" + #: AboutWindow.vala:330 #, c-format msgid "Translators" msgstr "" -#: EncoderConfigWindow.vala:678 -msgid "Treble (upper freq)" +#: EncoderConfigWindow.vala:855 +msgid "Treble" msgstr "" -#: MainWindow.vala:440 -msgid "Trim Duration" +#: MediaPlayerWindow.vala:125 +msgid "Trim" msgstr "" -#: MainWindow.vala:921 -msgid "Trim Duration..." +#: BatchEditWindow.vala:88 MainWindow.vala:427 MainWindow.vala:1447 +msgid "Trim Duration" msgstr "" -#: EncoderConfigWindow.vala:949 +#: EncoderConfigWindow.vala:1338 msgid "UltraFast" msgstr "" -#: Main.vala:659 +#: Main.vala:683 msgid "Unknown format:" msgstr "" -#: Main.vala:379 +#: Main.vala:396 msgid "Using temp folder:" msgstr "" -#: MainWindow.vala:710 +#: MainWindow.vala:1013 msgid "V-Bitrate" msgstr "" -#: MainWindow.vala:610 +#: MainWindow.vala:793 msgid "V-Fmt" msgstr "" -#: MainWindow.vala:766 +#: MainWindow.vala:1133 msgid "V-Fps" msgstr "" -#: MainWindow.vala:747 +#: MainWindow.vala:1093 msgid "V-Height" msgstr "" -#: MainWindow.vala:728 +#: MainWindow.vala:1053 msgid "V-Width" msgstr "" @@ -1481,34 +1630,62 @@ msgid "Value" msgstr "" -#: EncoderConfigWindow.vala:1659 EncoderConfigWindow.vala:1684 -#: EncoderConfigWindow.vala:1702 EncoderConfigWindow.vala:1728 -#: EncoderConfigWindow.vala:1759 EncoderConfigWindow.vala:1776 -#: EncoderConfigWindow.vala:2192 EncoderConfigWindow.vala:2216 +#: EncoderConfigWindow.vala:2180 EncoderConfigWindow.vala:2205 +#: EncoderConfigWindow.vala:2223 EncoderConfigWindow.vala:2249 +#: EncoderConfigWindow.vala:2280 EncoderConfigWindow.vala:2297 +#: EncoderConfigWindow.vala:2731 EncoderConfigWindow.vala:2756 msgid "Variable Bitrate" msgstr "" -#: EncoderConfigWindow.vala:2218 +#: EncoderConfigWindow.vala:2758 msgid "Variable Bitrate (2pass)" msgstr "" -#: EncoderConfigWindow.vala:2146 EncoderConfigWindow.vala:2169 +#: EncoderConfigWindow.vala:2681 EncoderConfigWindow.vala:2706 msgid "Variable Bitrate / CRF" msgstr "" -#: EncoderConfigWindow.vala:364 +#: EncoderConfigWindow.vala:495 msgid "Version" msgstr "" -#: EncoderConfigWindow.vala:961 +#: EncoderConfigWindow.vala:1350 msgid "VerySlow" msgstr "" -#: EncoderConfigWindow.vala:869 +#: EncoderConfigWindow.vala:1198 MainWindow.vala:1659 msgid "Video" msgstr "" -#: EncoderConfigWindow.vala:1166 +#: MainWindow.vala:2764 +msgid "Video Bitrate" +msgstr "" + +#: EncoderConfigWindow.vala:365 +msgid "Video Encoder" +msgstr "" + +#: EncoderConfigWindow.vala:370 +msgid "Video Filters" +msgstr "" + +#: MainWindow.vala:2756 +msgid "Video Format" +msgstr "" + +#: MainWindow.vala:2761 +msgid "Video Framerate" +msgstr "" + +#: MainWindow.vala:2760 +msgid "Video Height" +msgstr "" + +#: MainWindow.vala:2759 +msgid "Video Width" +msgstr "" + +#: EncoderConfigWindow.vala:1595 msgid "" "Video will not be resized if it's smaller than the given width and height" msgstr "" @@ -1517,7 +1694,7 @@ msgid "Visit Website" msgstr "" -#: EncoderConfigWindow.vala:323 +#: EncoderConfigWindow.vala:450 msgid "WAV Audio (*.wav)" msgstr "" @@ -1525,52 +1702,48 @@ msgid "Warning" msgstr "" -#: Main.vala:225 +#: Main.vala:233 msgid "" "Warning: User does not have Admin priviledges. '--shutdown' will be ignored." msgstr "" -#: EncoderConfigWindow.vala:309 +#: EncoderConfigWindow.vala:436 msgid "WebM Video (*.webm)" msgstr "" -#: EncoderConfigWindow.vala:1128 +#: EncoderConfigWindow.vala:1529 EncoderConfigWindow.vala:1538 msgid "Width" msgstr "" -#: EncoderConfigWindow.vala:1111 -msgid "Width x Height" -msgstr "" - -#: MainWindow.vala:1719 +#: MainWindow.vala:2267 msgid "" "[Batch completed] Right-click for options or click 'Finish' to continue." msgstr "" -#: MainWindow.vala:1723 +#: MainWindow.vala:2271 msgid "[Paused] Click 'Resume' to continue or 'Stop' to abort." msgstr "" -#: AppConfigWindow.vala:263 +#: AppConfigWindow.vala:296 msgid "avconv / Libav" msgstr "" -#: AppConfigWindow.vala:261 +#: AppConfigWindow.vala:294 msgid "ffmpeg" msgstr "" -#: AppConfigWindow.vala:308 +#: AppConfigWindow.vala:340 msgid "mplayer" msgstr "" -#: AppConfigWindow.vala:306 +#: AppConfigWindow.vala:338 msgid "mpv" msgstr "" -#: MainWindow.vala:1322 +#: MainWindow.vala:1906 msgid "presets" msgstr "" -#: MainWindow.vala:1318 +#: MainWindow.vala:1902 msgid "scripts" msgstr ""
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/AppConfigWindow.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/AppConfigWindow.vala
Changed
@@ -33,20 +33,19 @@ using TeeJee.Misc; public class AppConfigWindow : Gtk.Dialog { - private Box vboxMain; + private Box vbox_main; private Gtk.Notebook notebook; - private Label lblView; - private Label lblOutput; - private CheckButton chkOutput; - private Entry txtBackup; - private CheckButton chkBackup; - private Label lblBackup; - private Entry txtOutput; - private Button btnSave; - private Button btnCancel; - private ComboBox cmbFileView; - private ComboBox cmbSelectEncoder; - private ComboBox cmbSelectPlayer; + private CheckButton chk_output_dir; + private Entry txt_backup_dir; + private CheckButton chk_backup_dir; + private Entry txt_output_dir; + private Button btn_save; + private Button btn_cancel; + private ComboBox cmb_file_view; + private ComboBox cmb_select_encoder; + private ComboBox cmb_select_player; + private ComboBox cmb_def_lang; + private CheckButton chk_delete_temp; public AppConfigWindow(Gtk.Window parent) { title = "Settings"; @@ -63,8 +62,8 @@ icon = get_app_icon(16); // get content area - vboxMain = get_content_area(); - vboxMain.set_size_request(400,500); + vbox_main = get_content_area(); + vbox_main.set_size_request(400,500); //notebook notebook = new Notebook(); @@ -72,59 +71,67 @@ notebook.show_border = true; notebook.scrollable = true; notebook.margin = 6; - vboxMain.pack_start (notebook, true, true, 0); + vbox_main.pack_start (notebook, true, true, 0); init_ui_tab_general(); init_ui_tab_tools(); - // btnSave - btnSave = (Button) add_button ("gtk-save", Gtk.ResponseType.ACCEPT); - btnSave.clicked.connect (btnSave_clicked); + // btn_save + btn_save = (Button) add_button ("gtk-save", Gtk.ResponseType.ACCEPT); + btn_save.clicked.connect (btn_save_clicked); - // btnCancel - btnCancel = (Button) add_button ("gtk-cancel", Gtk.ResponseType.CANCEL); - btnCancel.clicked.connect (btnCancel_clicked); + // btn_cancel + btn_cancel = (Button) add_button ("gtk-cancel", Gtk.ResponseType.CANCEL); + btn_cancel.clicked.connect (btn_cancel_clicked); - chkOutput_clicked(); - chkBackup_clicked(); + chk_output_dir_clicked(); + chk_backup_dir_clicked(); show_all(); } private void init_ui_tab_general(){ - //lblTabGeneral - var lblTabGeneral = new Label (_("General")); - - //vboxTabGeneral - var vboxTabGeneral = new Box(Orientation.VERTICAL,6); - vboxTabGeneral.margin = 12; - notebook.append_page (vboxTabGeneral, lblTabGeneral); - - // lblOutput - lblOutput = new Label (_("<b>Output Directory</b>")); - lblOutput.set_use_markup(true); - lblOutput.halign = Align.START; - vboxTabGeneral.pack_start (lblOutput, false, true, 0); - - // chkOutput - chkOutput = new CheckButton.with_label (_("Save files in following location")); - chkOutput.active = (App.OutputDirectory.length > 0); - chkOutput.clicked.connect (chkOutput_clicked); - vboxTabGeneral.pack_start (chkOutput, false, true, 0); - - // txtOutput - txtOutput = new Gtk.Entry(); - txtOutput.hexpand = true; - txtOutput.secondary_icon_stock = "gtk-open"; - txtOutput.placeholder_text = _("Enter path or browse for directory"); - vboxTabGeneral.add (txtOutput); + + // add tab ------------------------------ + + var label = new Label (_("General")); + + var vbox = new Box(Orientation.VERTICAL,6); + vbox.margin = 12; + notebook.append_page (vbox, label); + // output dir -------------------------------------------- + + label = new Label (_("<b>Output Directory</b>")); + label.set_use_markup(true); + label.halign = Align.START; + //label.margin_top = 12; + label.margin_bottom = 6; + vbox.pack_start (label, false, true, 0); + + // chk_output_dir + var chk = new CheckButton.with_label (_("Save files in following location")); + chk.margin_left = 6; + chk.active = (App.OutputDirectory.length > 0); + chk.clicked.connect (chk_output_dir_clicked); + vbox.pack_start (chk, false, true, 0); + chk_output_dir = chk; + + // txt_output_dir + var txt = new Gtk.Entry(); + txt.hexpand = true; + txt.margin_left = 6; + txt.secondary_icon_stock = "gtk-open"; + txt.placeholder_text = _("Enter path or browse for directory"); + vbox.add (txt); + txt_output_dir = txt; + if ((App.OutputDirectory != null) && dir_exists (App.OutputDirectory)){ - txtOutput.text = App.OutputDirectory; + txt_output_dir.text = App.OutputDirectory; } - txtOutput.icon_release.connect((p0, p1) => { + txt_output_dir.icon_release.connect((p0, p1) => { //chooser var chooser = new Gtk.FileChooserDialog( _("Select Path"), @@ -140,37 +147,43 @@ chooser.set_filename(App.OutputDirectory); if (chooser.run() == Gtk.ResponseType.ACCEPT) { - txtOutput.text = chooser.get_filename(); + txt_output_dir.text = chooser.get_filename(); } chooser.destroy(); }); - // lblBackup - lblBackup = new Label (_("<b>Backup Directory</b>")); - lblBackup.set_use_markup(true); - lblBackup.halign = Align.START; - lblBackup.margin_top = 12; - vboxTabGeneral.pack_start (lblBackup, false, true, 0); - - // chkBackup - chkBackup = new CheckButton.with_label (_("Move source files after encoding is complete")); - chkBackup.active = (App.BackupDirectory.length > 0); - chkBackup.clicked.connect (chkBackup_clicked); - vboxTabGeneral.pack_start (chkBackup, false, true, 0); - - // txtBackup - txtBackup = new Gtk.Entry(); - txtBackup.hexpand = true; - txtBackup.secondary_icon_stock = "gtk-open"; - txtBackup.placeholder_text = _("Enter path or browse for directory"); - vboxTabGeneral.add (txtBackup); - + // backup dir ----------------------------------------------- + + label = new Label (_("<b>Backup Directory</b>")); + label.set_use_markup(true); + label.halign = Align.START; + label.margin_top = 12; + label.margin_bottom = 6; + vbox.pack_start (label, false, true, 0); + + // chk_backup_dir + chk = new CheckButton.with_label (_("Move source files after encoding is complete")); + chk.margin_left = 6; + chk.active = (App.BackupDirectory.length > 0); + chk.clicked.connect (chk_backup_dir_clicked); + vbox.pack_start (chk, false, true, 0); + chk_backup_dir = chk; + + // txt_backup_dir + txt = new Gtk.Entry(); + txt.hexpand = true; + txt.margin_left = 6; + txt.secondary_icon_stock = "gtk-open"; + txt.placeholder_text = _("Enter path or browse for directory"); + vbox.add (txt); + txt_backup_dir = txt; + if ((App.BackupDirectory != null) && dir_exists (App.BackupDirectory)){ - txtBackup.text = App.BackupDirectory; + txt.text = App.BackupDirectory; } - txtBackup.icon_release.connect((p0, p1) => { + txt.icon_release.connect((p0, p1) => { //chooser var chooser = new Gtk.FileChooserDialog( _("Select Path"), @@ -186,75 +199,95 @@ chooser.set_filename(App.BackupDirectory); if (chooser.run() == Gtk.ResponseType.ACCEPT) { - txtBackup.text = chooser.get_filename(); + txt_backup_dir.text = chooser.get_filename(); } chooser.destroy(); }); - // lblView - lblView = new Label (_("<b>Main Window</b>")); - lblView.set_use_markup(true); - lblView.halign = Align.START; - //lblView.margin_bottom = 12; - lblView.margin_top = 12; - vboxTabGeneral.pack_start (lblView, false, true, 0); + // header --------------------------------------------- + + label = new Label (_("<b>Main Window</b>")); + label.set_use_markup(true); + label.halign = Align.START; + label.margin_top = 12; + label.margin_bottom = 6; + vbox.pack_start (label, false, true, 0); + + // file view ------------------------------------- - //hboxFileView - Box hboxFileView = new Box(Orientation.HORIZONTAL,6); - vboxTabGeneral.add(hboxFileView); + var hbox = new Box(Orientation.HORIZONTAL,12); + vbox.add(hbox); - Label lblFileView = new Gtk.Label(_("File View")); - lblFileView.xalign = (float) 0.0; - hboxFileView.pack_start(lblFileView,false,false,0); + label = new Gtk.Label(_("File View")); + label.xalign = (float) 0.0; + label.margin_left = 6; + hbox.pack_start(label,false,false,0); - cmbFileView = new ComboBox(); + // cmb_file_view + var combo = new ComboBox(); var textCell = new CellRendererText(); - cmbFileView.pack_start(textCell, false); - cmbFileView.set_attributes(textCell, "text", 0); - hboxFileView.pack_start(cmbFileView,false,false,0); - + combo.pack_start(textCell, false); + combo.set_attributes(textCell, "text", 0); + hbox.pack_start(combo,false,false,0); + cmb_file_view = combo; + Gtk.TreeIter iter; var model = new Gtk.ListStore (2, typeof (string), typeof (string)); model.append (out iter); model.set (iter, 0, _("List"), 1, "list"); model.append (out iter); model.set (iter, 0, _("Tiles"), 1, "tiles"); - cmbFileView.set_model(model); + combo.set_model(model); if (App.TileView){ - cmbFileView.set_active(1); + combo.set_active(1); } else{ - cmbFileView.set_active(0); + combo.set_active(0); } - } private void init_ui_tab_tools(){ - //lblTabTools - var lblTabTools = new Label (_("Tools")); + + // add tab --------------------------------------- + + var label = new Label (_("Tools")); - //vboxTabTools - var vboxTabTools = new Box(Orientation.VERTICAL,6); - vboxTabTools.margin = 12; - notebook.append_page (vboxTabTools, lblTabTools); + var vbox = new Box(Orientation.VERTICAL,6); + vbox.margin = 12; + notebook.append_page (vbox, label); + + var sizegroup_lbl = new Gtk.SizeGroup (Gtk.SizeGroupMode.BOTH); + var sizegroup_cmb = new Gtk.SizeGroup (Gtk.SizeGroupMode.BOTH); - Gtk.SizeGroup sizegroup = new Gtk.SizeGroup (Gtk.SizeGroupMode.BOTH); + // header + label = new Label (_("<b>Preferred Tools</b>")); + label.set_use_markup(true); + label.halign = Align.START; + //label.margin_top = 6; + label.margin_bottom = 6; + vbox.pack_start (label, false, true, 0); - //hboxEncoder ----------------------------------------------- + // select encoder ----------------------------------------------- - var hboxEncoder = new Gtk.Box(Orientation.HORIZONTAL,6); - vboxTabTools.pack_start (hboxEncoder, false, true, 0); + var hbox = new Gtk.Box(Orientation.HORIZONTAL,12); + vbox.pack_start (hbox, false, true, 0); - //lblSelectEncoder - var lblSelectEncoder = new Label ("Use FFmpeg or Libav encoder"); - lblSelectEncoder.set_use_markup(true); - lblSelectEncoder.halign = Align.START; - lblSelectEncoder.hexpand = true; - hboxEncoder.add(lblSelectEncoder); + string tt = _("<b>avconv</b>\nUse the 'avconv' encoding tool from the Libav project\n\n"); + tt += _("<b>Encoder</b>\nUse the 'ffmpeg' encoding tool from the FFmpeg project (Recommended)\n\n"); + + label = new Label (_("Encoder")); + label.xalign = (float) 1.0; + label.set_use_markup(true); + label.set_tooltip_markup(tt); + label.halign = Align.START; + label.margin_left = 6; + hbox.add(label); + + sizegroup_lbl.add_widget(label); - //cmbSelectEncoder + //cmb_select_encoder TreeIter iter; var model = new Gtk.ListStore (2, typeof (string), typeof (string)); model.append (out iter); @@ -262,89 +295,158 @@ model.append (out iter); model.set (iter, 0, _("avconv / Libav"), 1, "avconv"); - cmbSelectEncoder = new ComboBox.with_model(model); - hboxEncoder.add(cmbSelectEncoder); - sizegroup.add_widget(cmbSelectEncoder); + var combo = new ComboBox.with_model(model); + combo.set_tooltip_markup(tt); + hbox.add(combo); + cmb_select_encoder = combo; - var textCell = new CellRendererText(); - cmbSelectEncoder.pack_start( textCell, false ); - cmbSelectEncoder.set_attributes( textCell, "text", 0 ); - - string tt = _("<b>avconv</b>\nUse the 'avconv' encoding tool from the Libav project\n\n"); - tt += _("<b>Encoder</b>\nUse the 'ffmpeg' encoding tool from the FFmpeg project (Recommended)\n\n"); - cmbSelectEncoder.set_tooltip_markup(tt); - lblSelectEncoder.set_tooltip_markup(tt); + sizegroup_cmb.add_widget(combo); + var textCell = new CellRendererText(); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + switch(App.PrimaryEncoder){ case "ffmpeg": - cmbSelectEncoder.active = 0; + combo.active = 0; break; case "avconv": - cmbSelectEncoder.active = 1; + combo.active = 1; break; default: - cmbSelectEncoder.active = 0; + combo.active = 0; break; } - //hboxPlayer ----------------------------------------------- + // selected player ------------------------------------ - var hboxPlayer = new Gtk.Box(Orientation.HORIZONTAL,6); - vboxTabTools.pack_start (hboxPlayer, false, true, 0); + hbox = new Gtk.Box(Orientation.HORIZONTAL,12); + vbox.pack_start (hbox, false, true, 0); - //lblSelectPlayer - var lblSelectPlayer = new Label ("Use Mpv or MPlayer"); - lblSelectPlayer.set_use_markup(true); - lblSelectPlayer.halign = Align.START; - lblSelectPlayer.hexpand = true; - hboxPlayer.add(lblSelectPlayer); + label = new Label(_("Player")); + label.xalign = (float) 1.0; + label.set_use_markup(true); + label.halign = Align.START; + label.margin_left = 6; + hbox.add(label); + + sizegroup_lbl.add_widget(label); - //cmbSelectPlayer - //TreeIter iter; + //cmb_select_player model = new Gtk.ListStore (2, typeof (string), typeof (string)); model.append (out iter); model.set (iter, 0, _("mpv"), 1, "mpv"); model.append (out iter); model.set (iter, 0, _("mplayer"), 1, "mplayer"); - cmbSelectPlayer = new ComboBox.with_model(model); - hboxPlayer.add(cmbSelectPlayer); - sizegroup.add_widget(cmbSelectPlayer); + combo = new ComboBox.with_model(model); + hbox.add(combo); + cmb_select_player = combo; + + sizegroup_cmb.add_widget(combo); textCell = new CellRendererText(); - cmbSelectPlayer.pack_start( textCell, false ); - cmbSelectPlayer.set_attributes( textCell, "text", 0 ); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); - //string tt = _("<b>avconv</b>\nUse the 'avconv' encoding tool from the Libav project\n\n"); - //tt += _("<b>Player</b>\nUse the 'ffmpeg' encoding tool from the FFmpeg project (Recommended)\n\n"); - //cmbSelectPlayer.set_tooltip_markup(tt); - //lblSelectPlayer.set_tooltip_markup(tt); - switch(App.PrimaryPlayer){ case "mpv": - cmbSelectPlayer.active = 0; + combo.active = 0; break; case "mplayer": - cmbSelectPlayer.active = 1; + combo.active = 1; break; default: - cmbSelectPlayer.active = 0; + combo.active = 0; break; } + + // header --------------- + + label = new Label (_("<b>Default Language</b>")); + label.set_use_markup(true); + label.halign = Align.START; + label.margin_top = 12; + label.margin_bottom = 6; + vbox.pack_start (label, false, true, 0); + + // default language -------------------------------------- + + hbox = new Gtk.Box(Orientation.HORIZONTAL,12); + vbox.pack_start (hbox, false, true, 0); + + tt = _("Selected language will be used for setting the default flag on the audio/subtitle track"); + + label = new Label (_("Language")); + label.xalign = (float) 1.0; + label.set_use_markup(true); + label.halign = Align.START; + label.margin_left = 6; + label.set_tooltip_text(tt); + hbox.add(label); + + sizegroup_lbl.add_widget(label); + + // cmb_def_lang + int index = -1; + int selectedIndex = 0; + model = new Gtk.ListStore (2, typeof (string), typeof (string)); + foreach(var lang in LanguageCodes.lang_list){ + model.append (out iter); + model.set (iter, 0, "%s (%s)".printf(lang.Name, (lang.Code2 == "") ? lang.Code3 : lang.Code2), 1, lang.Code2); + index++; + + if (lang.Code2 == App.DefaultLanguage){ + selectedIndex = index; + } + } + + combo = new ComboBox.with_model(model); + combo.active = selectedIndex; + combo.set_tooltip_text(tt); + hbox.add(combo); + cmb_def_lang = combo; + + //sizegroup_cmb.add_widget(combo); + + textCell = new CellRendererText(); + textCell.ellipsize = Pango.EllipsizeMode.END; + textCell.max_width_chars = 30; + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + + // header ------------------------------------------ + + label = new Label (_("<b>File Handling</b>")); + label.set_use_markup(true); + label.halign = Align.START; + label.margin_top = 12; + label.margin_bottom = 6; + vbox.pack_start (label, false, true, 0); + + tt = _("The temporary folder contains files which may be useful for advanced users. Keep this un-checked if you want to keep the temp files till the next reboot."); + + //chk_delete_temp + var chk = new CheckButton.with_label(_("Delete temporary files after successful encode")); + chk.active = App.DeleteTempFiles; + chk.set_tooltip_text(tt); + chk.margin_left = 6; + vbox.pack_start (chk, false, true, 0); + chk_delete_temp = chk; } - private void chkOutput_clicked(){ - txtOutput.set_sensitive(chkOutput.active); + private void chk_output_dir_clicked(){ + txt_output_dir.set_sensitive(chk_output_dir.active); } - private void chkBackup_clicked(){ - txtBackup.set_sensitive(chkBackup.active); + private void chk_backup_dir_clicked(){ + txt_backup_dir.set_sensitive(chk_backup_dir.active); } - private void btnSave_clicked(){ - if (chkOutput.active){ - if (dir_exists(txtOutput.text)){ - App.OutputDirectory = txtOutput.text; + private void btn_save_clicked(){ + if (chk_output_dir.active){ + if (dir_exists(txt_output_dir.text)){ + App.OutputDirectory = txt_output_dir.text; } else{ App.OutputDirectory = ""; @@ -354,9 +456,9 @@ App.OutputDirectory = ""; } - if (chkBackup.active){ - if (dir_exists(txtBackup.text)){ - App.BackupDirectory = txtBackup.text; + if (chk_backup_dir.active){ + if (dir_exists(txt_backup_dir.text)){ + App.BackupDirectory = txt_backup_dir.text; } else{ App.BackupDirectory = ""; @@ -366,10 +468,13 @@ App.BackupDirectory = ""; } - App.TileView = (cmbFileView.active == 1); + App.TileView = (cmb_file_view.active == 1); - App.PrimaryEncoder = gtk_combobox_get_value(cmbSelectEncoder,1,"ffmpeg"); - App.PrimaryPlayer = gtk_combobox_get_value(cmbSelectPlayer,1,"mpv"); + App.DeleteTempFiles = chk_delete_temp.active; + + App.PrimaryEncoder = gtk_combobox_get_value(cmb_select_encoder,1,"ffmpeg"); + App.PrimaryPlayer = gtk_combobox_get_value(cmb_select_player,1,"mpv"); + App.DefaultLanguage = gtk_combobox_get_value(cmb_def_lang,1,"en"); // Save settings App.save_config(); @@ -377,7 +482,7 @@ destroy(); } - private void btnCancel_clicked(){ + private void btn_cancel_clicked(){ destroy(); } }
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/BatchEditWindow.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/BatchEditWindow.vala
Changed
@@ -34,23 +34,23 @@ using TeeJee.Misc; public class BatchEditWindow : Gtk.Dialog { - private Gtk.Box vboxMain; - private Gtk.TreeView tvFiles; - private Gtk.ScrolledWindow swFiles; + private Gtk.Box vbox_main; + private Gtk.TreeView tv_files; + private Gtk.ScrolledWindow sw_files; - private Gtk.TreeViewColumn colCropL; - private Gtk.TreeViewColumn colCropR; - private Gtk.TreeViewColumn colCropT; - private Gtk.TreeViewColumn colCropB; - private Gtk.TreeViewColumn colStartPos; - private Gtk.TreeViewColumn colEndPos; - private Gtk.TreeViewColumn colEdit; + private Gtk.TreeViewColumn col_crop_l; + private Gtk.TreeViewColumn col_crop_r; + private Gtk.TreeViewColumn col_crop_t; + private Gtk.TreeViewColumn col_crop_b; + private Gtk.TreeViewColumn col_start_pos; + private Gtk.TreeViewColumn col_end_pos; + private Gtk.TreeViewColumn col_edit; private MediaFile SelectedFile = null; - private Gtk.Button btnCropAuto; - private Gtk.Button btnCropReset; - private Gtk.Button btnOk; + private Gtk.Button btn_crop_auto; + private Gtk.Button btn_crop_reset; + private Gtk.Button btn_ok; private string action = ""; private bool crop_detect_is_running = false; @@ -82,31 +82,31 @@ action = _action; if (action == "crop"){ - title = "Crop Videos (Batch)"; + title = _("Crop Video") + " " + _("(Batch)"); } else if (action == "trim"){ - title = "Trim Duration (Batch)"; + title = _("Trim Duration") + " " + _("(Batch)"); } // get content area - vboxMain = get_content_area(); - vboxMain.set_size_request(600,500); + vbox_main = get_content_area(); + vbox_main.set_size_request(600,500); init_ui_file_list(); if (action == "crop"){ - // btnCropAuto - btnCropAuto = (Button) add_button ("Auto Crop", Gtk.ResponseType.NONE); - btnCropAuto.clicked.connect(btnCropAuto_clicked); + // btn_crop_auto + btn_crop_auto = (Button) add_button (_("Auto Crop"), Gtk.ResponseType.NONE); + btn_crop_auto.clicked.connect(btn_crop_auto_clicked); - // btnCropReset - btnCropReset = (Button) add_button ("Reset", Gtk.ResponseType.NONE); - btnCropReset.clicked.connect (btnCropReset_clicked); + // btn_crop_reset + btn_crop_reset = (Button) add_button (_("Reset"), Gtk.ResponseType.NONE); + btn_crop_reset.clicked.connect (btn_crop_reset_clicked); } - - // btnOk - btnOk = (Button) add_button ("gtk-ok", Gtk.ResponseType.ACCEPT); - btnOk.clicked.connect (btnOk_clicked); + + // btn_ok + btn_ok = (Button) add_button ("gtk-ok", Gtk.ResponseType.ACCEPT); + btn_ok.clicked.connect (btn_ok_clicked); refresh_list_view(); @@ -116,49 +116,52 @@ } private void init_ui_file_list(){ - //tvFiles - tvFiles = new TreeView(); - tvFiles.get_selection().mode = SelectionMode.MULTIPLE; - //tvFiles.set_tooltip_text (_("Right-click for more options")); - tvFiles.headers_clickable = true; - tvFiles.activate_on_single_click = true; - tvFiles.rules_hint = true; + //tv_files + tv_files = new TreeView(); + tv_files.get_selection().mode = SelectionMode.MULTIPLE; + //tv_files.set_tooltip_text (_("Right-click for more options")); + tv_files.headers_clickable = true; + tv_files.activate_on_single_click = true; + tv_files.rules_hint = true; - swFiles = new ScrolledWindow(tvFiles.get_hadjustment(), tvFiles.get_vadjustment()); - swFiles.set_shadow_type (ShadowType.ETCHED_IN); - swFiles.add (tvFiles); - swFiles.margin = 3; - swFiles.set_size_request (-1, 150); - vboxMain.pack_start (swFiles, true, true, 0); + sw_files = new ScrolledWindow(tv_files.get_hadjustment(), tv_files.get_vadjustment()); + sw_files.set_shadow_type (ShadowType.ETCHED_IN); + sw_files.add (tv_files); + sw_files.margin = 3; + sw_files.set_size_request (-1, 150); + vbox_main.pack_start (sw_files, true, true, 0); CellRendererText cellText; CellRendererSpin cellSpin; - //colName - var colName = new TreeViewColumn(); - colName.title = _("File"); - colName.expand = true; - colName.resizable = true; - colName.clickable = true; - colName.min_width = 100; - tvFiles.append_column(colName); + // file name ----------------------------- + + var col = new TreeViewColumn(); + col.title = _("File"); + col.expand = true; + col.resizable = true; + col.clickable = true; + col.min_width = 100; + tv_files.append_column(col); cellText = new CellRendererText(); cellText.xalign = (float) 0.0; cellText.ellipsize = Pango.EllipsizeMode.END; - colName.pack_start (cellText, false); - colName.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ MediaFile mf; model.get (iter, 0, out mf, -1); (cell as Gtk.CellRendererText).text = mf.Name; }); - //colCropL - colCropL = new TreeViewColumn(); - colCropL.title = _("Crop Left"); - colCropL.fixed_width = 80; - tvFiles.append_column(colCropL); + // crop left ------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("Crop Left"); + col.fixed_width = 80; + tv_files.append_column(col); + col_crop_l = col; cellSpin = new CellRendererSpin(); //cellSpin.xalign = (float) 0.5; @@ -168,14 +171,17 @@ colCrop_cell_edited(path, new_text, TreeColumn.CROP_LEFT); }); - colCropL.pack_start (cellSpin, false); - colCropL.set_attributes(cellSpin, "text", TreeColumn.CROP_LEFT); - - //colCropR - colCropR = new TreeViewColumn(); - colCropR.title = _("Right"); - colCropR.fixed_width = 80; - tvFiles.append_column(colCropR); + col.pack_start (cellSpin, false); + col.set_attributes(cellSpin, "text", TreeColumn.CROP_LEFT); + + // crop right ------------------------------------------- + + //col_crop_r + col = new TreeViewColumn(); + col.title = _("Right"); + col.fixed_width = 80; + tv_files.append_column(col); + col_crop_r = col; cellSpin = new CellRendererSpin(); //cellSpin.xalign = (float) 0.5; @@ -185,14 +191,17 @@ colCrop_cell_edited(path, new_text, TreeColumn.CROP_RIGHT); }); - colCropR.pack_start (cellSpin, false); - colCropR.set_attributes(cellSpin, "text", TreeColumn.CROP_RIGHT); - - //colCropT - colCropT = new TreeViewColumn(); - colCropT.title = _("Top"); - colCropT.fixed_width = 80; - tvFiles.append_column(colCropT); + col.pack_start (cellSpin, false); + col.set_attributes(cellSpin, "text", TreeColumn.CROP_RIGHT); + + // crop top ------------------------------------------- + + //col_crop_t + col = new TreeViewColumn(); + col.title = _("Top"); + col.fixed_width = 80; + tv_files.append_column(col); + col_crop_t = col; cellSpin = new CellRendererSpin(); //cellSpin.xalign = (float) 0.5; @@ -202,14 +211,17 @@ colCrop_cell_edited(path, new_text, TreeColumn.CROP_TOP); }); - colCropT.pack_start (cellSpin, false); - colCropT.set_attributes(cellSpin, "text", TreeColumn.CROP_TOP); - - //colCropB - colCropB = new TreeViewColumn(); - colCropB.title = _("Bottom"); - colCropB.fixed_width = 80; - tvFiles.append_column(colCropB); + col.pack_start (cellSpin, false); + col.set_attributes(cellSpin, "text", TreeColumn.CROP_TOP); + + // crop bottom ------------------------------------------- + + //col_crop_b + col = new TreeViewColumn(); + col.title = _("Bottom"); + col.fixed_width = 80; + tv_files.append_column(col); + col_crop_b = col; cellSpin = new CellRendererSpin(); //cellSpin.xalign = (float) 0.5; @@ -219,15 +231,17 @@ colCrop_cell_edited(path, new_text, TreeColumn.CROP_BOTTOM); }); - colCropB.pack_start (cellSpin, false); - colCropB.set_attributes(cellSpin, "text", TreeColumn.CROP_BOTTOM); + col.pack_start (cellSpin, false); + col.set_attributes(cellSpin, "text", TreeColumn.CROP_BOTTOM); - //colStartPos -------------------------------------------- - - colStartPos = new TreeViewColumn(); - colStartPos.title = _("StartPos"); - colStartPos.fixed_width = 80; - tvFiles.append_column(colStartPos); + // start pos -------------------------------------------- + + //col_start_pos + col = new TreeViewColumn(); + col.title = _("StartPos"); + col.fixed_width = 80; + tv_files.append_column(col); + col_start_pos = col; cellSpin = new CellRendererSpin(); //cellSpin.xalign = (float) 0.5; @@ -238,15 +252,17 @@ colCrop_cell_edited(path, new_text, TreeColumn.START_POS); }); - colStartPos.pack_start (cellSpin, false); - colStartPos.set_attributes(cellSpin, "text", TreeColumn.START_POS); + col.pack_start (cellSpin, false); + col.set_attributes(cellSpin, "text", TreeColumn.START_POS); - //colEndPos ---------------------------------------------- - - colEndPos = new TreeViewColumn(); - colEndPos.title = _("EndPos"); - colEndPos.fixed_width = 80; - tvFiles.append_column(colEndPos); + // end pos -------------------------------------------- + + //col_end_pos + col = new TreeViewColumn(); + col.title = _("EndPos"); + col.fixed_width = 80; + tv_files.append_column(col); + col_end_pos = col; cellSpin = new CellRendererSpin(); //cellSpin.xalign = (float) 0.5; @@ -257,25 +273,32 @@ colCrop_cell_edited(path, new_text, TreeColumn.END_POS); }); - colEndPos.pack_start (cellSpin, false); - colEndPos.set_attributes(cellSpin, "text", TreeColumn.END_POS); + col.pack_start (cellSpin, false); + col.set_attributes(cellSpin, "text", TreeColumn.END_POS); + + // edit ----------------------------------------- + + //col_edit + col = new Gtk.TreeViewColumn(); + col.title = _("Edit"); + tv_files.append_column(col); + col_edit = col; - //colEdit var pixbuf = new Gtk.CellRendererPixbuf(); pixbuf.icon_name = "gtk-edit"; - colEdit = new Gtk.TreeViewColumn(); - colEdit.title = _("Edit"); - colEdit.pack_start (pixbuf, false); - tvFiles.append_column(colEdit); - - //colSpacer - var colSpacer = new TreeViewColumn(); - colSpacer.expand = false; - colSpacer.fixed_width = 10; - tvFiles.append_column(colSpacer); + col.pack_start (pixbuf, false); + + // spacer ------------------------------- + + col = new TreeViewColumn(); + col.expand = false; + col.fixed_width = 10; + tv_files.append_column(col); + + // handlers ------------------------------ - tvFiles.row_activated.connect((path, column)=>{ - var store = (Gtk.ListStore) tvFiles.model; + tv_files.row_activated.connect((path, column)=>{ + var store = (Gtk.ListStore) tv_files.model; MediaFile mf; TreeIter iter; store.get_iter_from_string (out iter, path.to_string()); @@ -283,7 +306,7 @@ SelectedFile = mf; - if (column == colEdit){ + if (column == col_edit){ if (action == "crop"){ var win = MediaPlayerWindow.CropVideo(mf, this); win.destroy.connect(()=>{ @@ -306,7 +329,7 @@ private void colCrop_cell_edited(string path, string new_text, TreeColumn field){ TreeIter iter; - var model = (Gtk.ListStore) tvFiles.model; + var model = (Gtk.ListStore) tv_files.model; MediaFile mf = null; if (model.get_iter_from_string (out iter, path)){ model.get (iter, 0, out mf, -1); @@ -369,30 +392,30 @@ store.set(iter, TreeColumn.END_POS, "%.1f".printf(mf.EndPos)); } - tvFiles.set_model (store); + tv_files.set_model (store); - tvFiles.columns_autosize(); + tv_files.columns_autosize(); if (action == "crop"){ - colCropL.visible = true; - colCropR.visible = true; - colCropT.visible = true; - colCropB.visible = true; - colStartPos.visible = false; - colEndPos.visible = false; + col_crop_l.visible = true; + col_crop_r.visible = true; + col_crop_t.visible = true; + col_crop_b.visible = true; + col_start_pos.visible = false; + col_end_pos.visible = false; } else if (action == "trim"){ - colCropL.visible = false; - colCropR.visible = false; - colCropT.visible = false; - colCropB.visible = false; - colStartPos.visible = true; - colEndPos.visible = true; + col_crop_l.visible = false; + col_crop_r.visible = false; + col_crop_t.visible = false; + col_crop_b.visible = false; + col_start_pos.visible = true; + col_end_pos.visible = true; } } - private void btnCropAuto_clicked(){ - TreeSelection selection = tvFiles.get_selection(); + private void btn_crop_auto_clicked(){ + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() == 0){ string title = _("No Files Selected"); string msg = _("Select some files from the list"); @@ -455,8 +478,8 @@ crop_detect_is_running = false; } - private void btnCropReset_clicked(){ - TreeSelection selection = tvFiles.get_selection(); + private void btn_crop_reset_clicked(){ + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() == 0){ string title = _("No Files Selected"); string msg = _("Select some files from the list"); @@ -483,7 +506,7 @@ } } - private void btnOk_clicked(){ + private void btn_ok_clicked(){ destroy(); }
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/ColumnSelectionDialog.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/ColumnSelectionDialog.vala
Changed
@@ -36,7 +36,7 @@ public class ColumnSelectionDialog : Gtk.Dialog { - private Gtk.TreeView tvCols; + private Gtk.TreeView tv_cols; public ColumnSelectionDialog.with_parent(Window parent, Gee.HashMap<TreeViewColumn,TreeViewListColumn> col_list) { title = _("Select Columns"); @@ -53,71 +53,68 @@ set_modal(true); // get content area - var vboxMain = get_content_area(); - vboxMain.set_size_request(300,300); + var vbox_main = get_content_area(); + vbox_main.set_size_request(300,300); //add treeview for columns - tvCols = new TreeView(); - tvCols.get_selection().mode = SelectionMode.MULTIPLE; - tvCols.set_tooltip_text (_("Drag and drop to re-order")); - tvCols.headers_visible = false; - tvCols.reorderable = true; - - var swCols = new ScrolledWindow(tvCols.get_hadjustment(), tvCols.get_vadjustment()); - swCols.set_shadow_type (ShadowType.ETCHED_IN); - swCols.add (tvCols); - swCols.margin = 3; - vboxMain.pack_start (swCols, true, true, 0); + tv_cols = new TreeView(); + tv_cols.get_selection().mode = SelectionMode.MULTIPLE; + tv_cols.set_tooltip_text (_("Drag and drop to re-order")); + tv_cols.headers_visible = false; + tv_cols.reorderable = true; + + var sw_cols = new ScrolledWindow(tv_cols.get_hadjustment(), tv_cols.get_vadjustment()); + sw_cols.set_shadow_type (ShadowType.ETCHED_IN); + sw_cols.add (tv_cols); + sw_cols.margin = 3; + vbox_main.pack_start (sw_cols, true, true, 0); - CellRendererText cellText; - //colName - var colName = new TreeViewColumn(); - colName.title = _("File"); - colName.expand = true; - tvCols.append_column(colName); + var col = new TreeViewColumn(); + col.title = _("File"); + col.expand = true; + tv_cols.append_column(col); //cell toggle - CellRendererToggle cell_select = new CellRendererToggle (); + var cell_select = new CellRendererToggle (); cell_select.activatable = true; - colName.pack_start (cell_select, false); - colName.set_cell_data_func (cell_select, (cell_layout, cell, model, iter) => { + col.pack_start (cell_select, false); + col.set_cell_data_func (cell_select, (cell_layout, cell, model, iter) => { bool selected; - TreeViewListColumn col; - model.get (iter, 0, out selected, 1, out col, -1); + model.get (iter, 0, out selected, -1); (cell as Gtk.CellRendererToggle).active = selected; }); cell_select.toggled.connect((path) => { - var store = (Gtk.ListStore) tvCols.model; + var store = (Gtk.ListStore) tv_cols.model; bool selected; - TreeViewListColumn col; + TreeViewListColumn column; TreeIter iter; store.get_iter_from_string (out iter, path); - store.get (iter, 0, out selected, 1, out col, -1); + store.get (iter, 0, out selected, 1, out column, -1); - col.Selected = !selected; + column.Selected = !selected; - store.set(iter, 0, col.Selected, -1); + store.set(iter, 0, column.Selected, -1); }); //cell text - cellText = new CellRendererText(); + var cellText = new CellRendererText(); cellText.ellipsize = Pango.EllipsizeMode.END; - colName.pack_start (cellText, false); - colName.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ - TreeViewListColumn col; - model.get (iter, 1, out col, -1); - (cell as Gtk.CellRendererText).text = col.FullDisplayName; + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + TreeViewListColumn column; + model.get (iter, 1, out column, -1); + (cell as Gtk.CellRendererText).text = column.FullDisplayName; }); //create sorted list --------------------- TreeIter iter; var lst_all = new Gee.ArrayList<TreeViewListColumn>(); - foreach(TreeViewListColumn col in col_list.values){ - lst_all.add(col); + foreach(TreeViewListColumn column in col_list.values){ + lst_all.add(column); } CompareDataFunc<TreeViewListColumn> func = (a, b) => { return strcmp(a.FullDisplayName,b.FullDisplayName); @@ -129,40 +126,40 @@ var lst = new Gee.ArrayList<TreeViewListColumn>(); //add selected columns in order foreach(string col_name in App.ListViewColumns.split(",")){ - foreach(TreeViewListColumn col in col_list.values){ - if (col.Name == col_name){ - lst.add(col); + foreach(TreeViewListColumn column in col_list.values){ + if (column.Name == col_name){ + lst.add(column); break; } } } //add unselected - foreach(TreeViewListColumn col in lst_all){ - if (!col.Selected){ - lst.add(col); + foreach(TreeViewListColumn column in lst_all){ + if (!column.Selected){ + lst.add(column); } } //add rows ---------------------- var store = new Gtk.ListStore (2, typeof(bool), typeof(TreeViewListColumn)); - foreach(TreeViewListColumn col in lst){ + foreach(TreeViewListColumn column in lst){ store.append (out iter); - store.set (iter, 0, col.Selected); - store.set (iter, 1, col); + store.set (iter, 0, column.Selected); + store.set (iter, 1, column); } - tvCols.model = store; + tv_cols.model = store; - // btnSave - var btnSave = (Button) add_button ("gtk-save", Gtk.ResponseType.ACCEPT); - btnSave.clicked.connect (()=>{ + // btn_save + var btn_save = (Button) add_button ("gtk-save", Gtk.ResponseType.ACCEPT); + btn_save.clicked.connect (()=>{ save_columns(col_list); this.close(); }); - // btnCancel - var btnCancel = (Button) add_button ("gtk-cancel", Gtk.ResponseType.CANCEL); - btnCancel.clicked.connect (()=>{ + // btn_cancel + var btn_cancel = (Button) add_button ("gtk-cancel", Gtk.ResponseType.CANCEL); + btn_cancel.clicked.connect (()=>{ this.close(); }); @@ -181,12 +178,12 @@ var list = new Gee.ArrayList<TreeViewListColumn>(); TreeIter iter; - bool iterExists = tvCols.model.get_iter_first (out iter); + bool iterExists = tv_cols.model.get_iter_first (out iter); while (iterExists) { TreeViewListColumn item; - tvCols.model.get (iter, 1, out item, -1); + tv_cols.model.get (iter, 1, out item, -1); list.add(item); - iterExists = tvCols.model.iter_next (ref iter); + iterExists = tv_cols.model.iter_next (ref iter); } // create string of column names -------------
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/EncoderConfigWindow.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/EncoderConfigWindow.vala
Changed
@@ -35,156 +35,133 @@ public class EncoderConfigWindow : Gtk.Dialog { - public string Folder; - public string Name; - public bool CreateNew = false; - - private Notebook tabMain; - private Box vboxMain; - - private Label lblGeneral; - private Grid gridGeneral; - - private Label lblVideo; - private Grid gridVideo; - - private Label lblAudio; - private Grid gridAudio; - - private Label lblSubtitle; - private Grid gridSubtitle; - - private Label lblVideoFilters; - private Grid gridVideoFilters; - - private Label lblAudioFilters; - private Grid gridAudioFilters; - - private Label lblPresetName; - private Entry txtPresetName; - - private Label lblFileFormat; - private ComboBox cmbFileFormat; - - private Label lblFileExtension; - private ComboBox cmbFileExtension; - - private Label lblVCodec; - private ComboBox cmbVCodec; - - private Label lblVideoMode; - private ComboBox cmbVideoMode; - - private Label lblVideoBitrate; - private SpinButton spinVideoBitrate; - - private ComboBox cmbX264Preset; - private Label lblX264Preset; - - private Label lblX264Profile; - private ComboBox cmbX264Profile; - - private Label lblVideoQuality; - private SpinButton spinVideoQuality; - - private ComboBox cmbVpxSpeed; - private Label lblVpxSpeed; - private Scale scaleVpxSpeed; - - private Label lblHeaderFileFormat; - private Label lblHeaderPreset; - private Label lblHeaderFrameSize; - private Label lblHeaderFrameRate; - - private Gtk.Image imgAudioCodec; - private Gtk.Image imgVideoCodec; - private Gtk.Image imgFileFormat; - - private Label lblFrameSize; - private ComboBox cmbFrameSize; - private Label lblFrameSizeCustom; - private SpinButton spinFrameWidth; - private SpinButton spinFrameHeight; - private Box hboxFrameSize; - private CheckButton chkNoUpScale; - private CheckButton chkFitToBox; - - private Label lblFPS; - private ComboBox cmbFPS; - private Label lblFPSCustom; - private SpinButton spinFPSNum; - private SpinButton spinFPSDenom; - private Box hboxFPS; - private Label lblResizingMethod; - private ComboBox cmbResizingMethod; - - private Label lblVCodecOptions; - private Gtk.TextView txtVCodecOptions; - - private Label lblACodec; - private ComboBox cmbACodec; - - private Label lblAudioMode; - private ComboBox cmbAudioMode; - - private Label lblAudioBitrate; - private SpinButton spinAudioBitrate; - - private Label lblAudioQuality; - private SpinButton spinAudioQuality; - - private Label lblOpusOptimize; - private ComboBox cmbOpusOptimize; - - private Label lblAacProfile; - private ComboBox cmbAacProfile; + private string Folder = ""; + private string Name = ""; + private bool IsNew = true; + + private Gtk.Paned pane; + private Gtk.TreeView tv_pages; + private Gtk.Notebook notebook; + private Box vbox_main; + + // grids + private Gtk.Grid grid_video; + private Gtk.Grid grid_audio; + private Gtk.Grid grid_subs; + private Gtk.Grid grid_vf; + private Gtk.Grid grid_af; + + //preset + private Gtk.Entry txt_preset_name; + private Gtk.Entry txt_author_name; + private Gtk.Entry txt_author_email; + private Gtk.Entry txt_preset_version; + + //file format + private Gtk.ComboBox cmb_format; + private Gtk.ComboBox cmb_ext; + private Gtk.Image img_file_format; - private Label lblAuthorName; - private Entry txtAuthorName; - - private Label lblAuthorEmail; - private Entry txtAuthorEmail; - - private Label lblPresetVersion; - private Entry txtPresetVersion; - - private Label lblAudioSampleRate; - private ComboBox cmbAudioSampleRate; - - private Label lblAudioChannels; - private ComboBox cmbAudioChannels; - - private Switch switchSox; - private Label lblHeaderSox; - private Label lblAudioBass; - private Scale scaleBass; - private Label lblAudioTreble; - private Scale scaleTreble; - private Label lblAudioPitch; - private Scale scalePitch; - private Label lblAudioTempo; - private Scale scaleTempo; - private Label lblNormalize; - private Switch switchNormalize; - private Label lblEarWax; - private Switch switchEarWax; - private Label lblFadeIn; - private SpinButton spinFadeIn; - private Label lblFadeOut; - private SpinButton spinFadeOut; - private ComboBox cmbFadeType; - - private Label lblSubtitleMode; - private ComboBox cmbSubtitleMode; - - private Label lblSubFormatMessage; - - private Button btnSave; - private Button btnCancel; - - public EncoderConfigWindow() { - title = "Preset"; - set_default_size (450, 550); + //video encoder + private Gtk.ComboBox cmb_vcodec; + private Gtk.Label lbl_vmessage; + private Gtk.Label lbl_vmode; + private Gtk.ComboBox cmb_vmode; + private Gtk.Label lbl_vbitrate; + private Gtk.SpinButton spin_vbitrate; + private Gtk.ComboBox cmb_x264_preset; + private Gtk.Label lbl_x264_preset; + private Gtk.Label lbl_x264_profile; + private Gtk.ComboBox cmb_x264_profile; + private Gtk.Label lbl_vquality; + private Gtk.SpinButton spin_vquality; + private Gtk.ComboBox cmb_vpx_speed; + private Gtk.Label lbl_vpx_speed; + private Gtk.Scale scale_vpx_speed; + private Gtk.Label lvl_voptions; + private Gtk.TextView txt_voptions; + private Gtk.Image img_video_format; + + // video encoder + private Gtk.Label lbl_frame_size; + private Gtk.ComboBox cmb_frame_size; + private Gtk.SpinButton spin_width; + private Gtk.SpinButton spin_height; + private Gtk.CheckButton cmb_no_upscale; + private Gtk.CheckButton chk_box_fit; + private Gtk.ComboBox cmb_fps; + private Gtk.SpinButton spin_fps_num; + private Gtk.SpinButton spin_fps_denom; + private Gtk.ComboBox cmb_resize_method; + + // audio encoder + private Gtk.Label lbl_acodec; + private Gtk.ComboBox cmb_acodec; + private Gtk.Label lbl_acodec_msg; + private Gtk.Label lbl_amode; + private Gtk.ComboBox cmb_amode; + private Gtk.Label lbl_abitrate; + private Gtk.SpinButton spin_abitrate; + private Gtk.Label lbl_aquality; + private Gtk.SpinButton spin_aquality; + private Gtk.Label lbl_opus_optimize; + private Gtk.ComboBox cmb_opus_optimize; + private Gtk.Label lbl_aac_profile; + private Gtk.ComboBox cmb_aac_profile; + private Gtk.Image img_audio_format; + + // audio filters + private Gtk.Label lbl_sampling; + private Gtk.ComboBox cmb_sampling; + private Gtk.Label lblAudioChannels; + private Gtk.ComboBox cmb_channels; + + // sox + private Gtk.Switch switch_sox; + private Gtk.Box vboxSoxOuter; + private Gtk.Label lbl_sox_header; + private Gtk.Label lbl_bass; + private Gtk.Scale scale_bass; + private Gtk.Label lbl_treble; + private Gtk.Scale scale_treble; + private Gtk.Label lbl_pitch; + private Gtk.Scale scale_pitch; + private Gtk.Label lbl_tempo; + private Gtk.Scale scale_tempo; + private Gtk.Label lbl_fade_in; + private Gtk.SpinButton spin_fade_in; + private Gtk.Label lbl_fade_out; + private Gtk.SpinButton spin_fade_out; + private Gtk.ComboBox cmb_fade_type; + private Gtk.CheckButton chk_normalize; + private Gtk.CheckButton chk_earwax; + private string sox_options = ""; + + // subs + private Gtk.Label lbl_sub_mode; + private Gtk.ComboBox cmb_sub_mode; + private Gtk.Label lbl_scodec_msg; + + private uint tmr_init = 0; + + // actions + private Gtk.Button btn_save; + private Gtk.Button btn_cancel; + + public EncoderConfigWindow.from_preset(Gtk.Window parent, string _folder, string _name, bool _is_new){ + set_transient_for(parent); + set_modal(true); + + Folder = _folder; + Name = _name; + IsNew = _is_new; + + init_ui(); + } + + private void init_ui() { + title = _("Preset"); + //set_default_size (450, 550); window_position = WindowPosition.CENTER_ON_PARENT; destroy_with_parent = true; @@ -195,36 +172,14 @@ this.delete_event.connect(on_delete_event); //get content area - vboxMain = get_content_area(); - - //tabMain - tabMain = new Notebook(); - tabMain.tab_pos = PositionType.TOP; - tabMain.show_border = true; - tabMain.scrollable = true; - tabMain.margin = 6; - vboxMain.pack_start (tabMain, true, true, 0); - - //styles --------------------------------------------------- - - /*string css_style = """ - GtkNotebook tab { - padding: 1px; - } - """;//color: #703910; - - CssProvider css_provider = new CssProvider(); - try { - css_provider.load_from_data(css_style,-1); - Gtk.StyleContext.add_provider_for_screen(this.get_screen(),css_provider,Gtk.STYLE_PROVIDER_PRIORITY_USER); - } catch (GLib.Error e) { - warning(e.message); - }*/ - - /* Note: Setting tab button padding to 0 causes problems with some GTK themes like Mint-X */ + vbox_main = get_content_area(); // add widgets --------------------------------------------- + /* Note: Setting tab button padding to 0 causes problems with some GTK themes like Mint-X */ + + init_ui_navpane (); + init_ui_general(); init_ui_video(); @@ -239,66 +194,238 @@ init_ui_subtitles(); - //Defaults -------------------------------- + // Actions ---------------------------------------------- - cmbFileFormat.set_active(0); - //cmbAudioMode.set_active(0); - //cmbVideoMode.set_active(0); - //cmbSubtitleMode.set_active(0); - cmbOpusOptimize.set_active(0); - cmbX264Preset.set_active(3); - //cmbX264Profile.set_active(2); - cmbVpxSpeed.set_active (1); - cmbFPS.set_active (0); - cmbFrameSize.set_active (0); - cmbFadeType.set_active (0); - //cmbResizingMethod.set_active (2); - //cmbFileExtension.set_active (0); + var vbox = get_action_area(); + vbox.margin = 3; + + //btn_save + btn_save = (Button) add_button ("gtk-save", Gtk.ResponseType.ACCEPT); + btn_save.clicked.connect (btn_save_clicked); + + //btn_cancel + btn_cancel = (Button) add_button ("gtk-cancel", Gtk.ResponseType.CANCEL); + btn_cancel.clicked.connect (() => { destroy(); }); + + show_all(); + + tmr_init = Timeout.add(100, init_delayed); + } + + private void init_ui_navpane(){ + pane = new Gtk.Paned (Gtk.Orientation.HORIZONTAL); + pane.margin = 6; + vbox_main.add(pane); + + //tv_pages + tv_pages = new TreeView(); + tv_pages.get_selection().mode = SelectionMode.SINGLE; + tv_pages.headers_visible = false; + tv_pages.activate_on_single_click = true; + + var sw_pages = new ScrolledWindow(tv_pages.get_hadjustment(), tv_pages.get_vadjustment()); + sw_pages.set_shadow_type (ShadowType.ETCHED_IN); + sw_pages.add (tv_pages); + //sw_pages.margin_right = 3; + sw_pages.set_size_request (150, -1); + pane.pack1(sw_pages, false, false); //resize, shrink + + TreeViewColumn col; + CellRendererPixbuf cellPix; + CellRendererText cellText; + + //col_dir + col = new TreeViewColumn(); + col.expand = true; + tv_pages.append_column(col); + + cellPix = new CellRendererPixbuf (); + cellPix.xpad = 1; + col.pack_start (cellPix, false); + + cellText = new CellRendererText (); + cellText.ellipsize = Pango.EllipsizeMode.END; + col.pack_start (cellText, false); + + //render icon + col.set_attributes(cellPix, "pixbuf", 2); + + //render text + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter) => { + string name; + model.get (iter, 0, out name, -1); + (cell as Gtk.CellRendererText).text = name; + }); - // Actions ---------------------------------------------- + //row activated event + tv_pages.row_activated.connect(tv_pages_row_activated); - //btnSave - btnSave = (Button) add_button ("gtk-save", Gtk.ResponseType.ACCEPT); - btnSave.clicked.connect (btnSave_clicked); - - //btnCancel - btnCancel = (Button) add_button ("gtk-cancel", Gtk.ResponseType.CANCEL); - btnCancel.clicked.connect (() => { destroy(); }); + + tv_pages.get_selection().changed.connect(tv_pages_selection_changed); + + //notebook + notebook = new Notebook(); + notebook.tab_pos = PositionType.TOP; + notebook.show_border = true; + notebook.scrollable = true; + notebook.show_tabs = false; + notebook.margin_left = 3; + pane.pack2(notebook, true, true); //resize, shrink + + refresh_navpane(); + } + + private void tv_pages_row_activated(TreePath path, TreeViewColumn column){ + TreeIter iter; + tv_pages.model.get_iter_from_string(out iter, path.to_string()); + string page_name; + tv_pages.model.get (iter, 1, out page_name, -1); + + select_page(page_name); } + private void tv_pages_selection_changed(){ + var sel = tv_pages.get_selection(); + + if (sel.count_selected_rows() != 1){ + return; + } + + TreeModel model; + TreeIter iter; + sel.get_selected (out model, out iter); + + string page_name; + model.get (iter, 1, out page_name, -1); + + select_page(page_name); + } + + private void select_page(string page_name){ + switch (page_name){ + case "general": + notebook.set_current_page(0); + break; + case "video": + notebook.set_current_page(1); + break; + case "vf": + notebook.set_current_page(2); + break; + case "audio": + notebook.set_current_page(3); + break; + case "af": + notebook.set_current_page(4); + break; + case "sox": + notebook.set_current_page(5); + break; + case "subs": + notebook.set_current_page(6); + break; + } + } + + + private void refresh_navpane(){ + var model = new Gtk.ListStore(3, typeof(string), typeof(string), typeof(Gdk.Pixbuf)); + + //status icons + Gdk.Pixbuf pix_audio = null; + Gdk.Pixbuf pix_video = null; + Gdk.Pixbuf pix_subs = null; + Gdk.Pixbuf pix_general = null; + + var img = get_shared_icon("","audio.svg",16); + if (img != null){ + pix_audio = img.pixbuf; + } + img = get_shared_icon("","video.svg",16); + if (img != null){ + pix_video = img.pixbuf; + } + img = get_shared_icon("","subs.svg",16); + if (img != null){ + pix_subs = img.pixbuf; + } + img = get_shared_icon("","general.svg",16); + if (img != null){ + pix_general = img.pixbuf; + } + + TreeIter iter; + + model.append(out iter); + model.set (iter, 0, _("General")); + model.set (iter, 1, "general"); + model.set (iter, 2, pix_general); + + model.append(out iter); + model.set (iter, 0, _("Video Encoder")); + model.set (iter, 1, "video"); + model.set (iter, 2, pix_video); + + model.append(out iter); + model.set (iter, 0, _("Video Filters")); + model.set (iter, 1, "vf"); + model.set (iter, 2, pix_video); + + model.append(out iter); + model.set (iter, 0, _("Audio Encoder")); + model.set (iter, 1, "audio"); + model.set (iter, 2, pix_audio); + + model.append(out iter); + model.set (iter, 0, _("Audio Filters")); + model.set (iter, 1, "af"); + model.set (iter, 2, pix_audio); + + model.append(out iter); + model.set (iter, 0, _("SOX")); + model.set (iter, 1, "sox"); + model.set (iter, 2, pix_audio); + + model.append(out iter); + model.set (iter, 0, _("Subtitles")); + model.set (iter, 1, "subs"); + model.set (iter, 2, pix_subs); + + tv_pages.set_model(model); + } + private void init_ui_general(){ - //lblGeneral - lblGeneral = new Label (_("General")); - //gridGeneral - gridGeneral = new Grid(); - gridGeneral.set_column_spacing (6); - gridGeneral.set_row_spacing (6); - gridGeneral.margin = 12; - gridGeneral.visible = false; - tabMain.append_page (gridGeneral, lblGeneral); + // add tab page ------------------------- + + var lbl_general = new Label (_("General")); + + var grid = new Grid(); + grid.set_column_spacing (12); + grid.set_row_spacing (6); + grid.margin = 12; + grid.margin_right = 24; + notebook.append_page (grid, lbl_general); int row = -1; - //string tt = ""; Gtk.ListStore model; TreeIter iter; //lblHeaderFileFormat - lblHeaderFileFormat = new Gtk.Label(_("<b>File Format:</b>")); - lblHeaderFileFormat.set_use_markup(true); - lblHeaderFileFormat.xalign = (float) 0.0; - //lblHeaderFileFormat.margin_top = 6; - lblHeaderFileFormat.margin_bottom = 6; - gridGeneral.attach(lblHeaderFileFormat,0,++row,2,1); - - //lblFileFormat - lblFileFormat = new Gtk.Label(_("Format")); - lblFileFormat.xalign = (float) 0.0; - gridGeneral.attach(lblFileFormat,0,++row,1,1); + var label = new Gtk.Label(_("<b>File Format</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.margin_bottom = 6; + grid.attach(label,0,++row,3,1); + + // format --------------------------------------- + + label = new Gtk.Label(_("Format")); + label.xalign = (float) 1.0; + grid.attach(label,0,++row,1,1); //cmbFileFormat model = new Gtk.ListStore (2, typeof (string), typeof (string)); - model.append (out iter); model.set (iter,0,_("Matroska Video (*.mkv)"),1,"mkv"); model.append (out iter); @@ -322,165 +449,190 @@ model.append (out iter); model.set (iter,0,_("WAV Audio (*.wav)"),1,"wav"); - cmbFileFormat = new ComboBox.with_model(model); + var combo = new ComboBox.with_model(model); var textCell = new CellRendererText(); - cmbFileFormat.pack_start( textCell, false ); - cmbFileFormat.set_attributes( textCell, "text", 0 ); - cmbFileFormat.changed.connect(cmbFileFormat_changed); - gridGeneral.attach(cmbFileFormat,1,row,1,1); - - //lblFileExtension - lblFileExtension = new Gtk.Label(_("Extension")); - lblFileExtension.xalign = (float) 0.0; - gridGeneral.attach(lblFileExtension,0,++row,1,1); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + combo.changed.connect(cmbFileFormat_changed); + grid.attach(combo,1,row,1,1); + cmb_format = combo; + + // extension ---------------------------- + + label = new Gtk.Label(_("Extension")); + label.xalign = (float) 1.0; + grid.attach(label,0,++row,1,1); - cmbFileExtension = new ComboBox.with_model(model); + combo = new ComboBox.with_model(model); textCell = new CellRendererText(); - cmbFileExtension.pack_start( textCell, false ); - cmbFileExtension.set_attributes( textCell, "text", 0 ); - gridGeneral.attach(cmbFileExtension,1,row,1,1); - - //lblHeaderPreset - lblHeaderPreset = new Gtk.Label(_("<b>Preset:</b>")); - lblHeaderPreset.set_use_markup(true); - lblHeaderPreset.xalign = (float) 0.0; - lblHeaderPreset.margin_top = 6; - lblHeaderPreset.margin_bottom = 6; - gridGeneral.attach(lblHeaderPreset,0,++row,2,1); - - //lblPresetName - lblPresetName = new Gtk.Label(_("Name")); - lblPresetName.xalign = (float) 0.0; - gridGeneral.attach(lblPresetName,0,++row,1,1); - - //txtPresetName - txtPresetName = new Gtk.Entry(); - txtPresetName.xalign = (float) 0.0; - txtPresetName.text = _("New Preset"); - txtPresetName.hexpand = true; - gridGeneral.attach(txtPresetName,1,row,1,1); - - //lblPresetVersion - lblPresetVersion = new Gtk.Label(_("Version")); - lblPresetVersion.xalign = (float) 0.0; - gridGeneral.attach(lblPresetVersion,0,++row,1,1); - - //txtPresetVersion - txtPresetVersion = new Gtk.Entry(); - txtPresetVersion.xalign = (float) 0.0; - txtPresetVersion.text = "1.0"; - gridGeneral.attach(txtPresetVersion,1,row,1,1); - - //lblAuthorName - lblAuthorName = new Gtk.Label(_("Author")); - lblAuthorName.xalign = (float) 0.0; - gridGeneral.attach(lblAuthorName,0,++row,1,1); - - //txtAuthorName - txtAuthorName = new Gtk.Entry(); - txtAuthorName.xalign = (float) 0.0; - txtAuthorName.text = ""; - gridGeneral.attach(txtAuthorName,1,row,1,1); - - //lblAuthorEmail - lblAuthorEmail = new Gtk.Label(_("Email")); - lblAuthorEmail.xalign = (float) 0.0; - gridGeneral.attach(lblAuthorEmail,0,++row,1,1); - - //txtAuthorEmail - txtAuthorEmail = new Gtk.Entry(); - txtAuthorEmail.xalign = (float) 0.0; - txtAuthorEmail.text = ""; - gridGeneral.attach(txtAuthorEmail,1,row,1,1); - - //imgFileFormat - imgFileFormat = new Gtk.Image(); - imgFileFormat.margin_top = 6; - imgFileFormat.margin_bottom = 6; - imgFileFormat.expand = true; - gridGeneral.attach(imgFileFormat,0,++row,2,1); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + grid.attach(combo,1,row,1,1); + cmb_ext = combo; + + // presets --------------------------------- + + label = new Gtk.Label(_("<b>Preset</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.margin_top = 6; + label.margin_bottom = 6; + grid.attach(label,0,++row,3,1); + + // name ------------------------------------ + + label = new Gtk.Label(_("Name")); + label.xalign = (float) 1.0; + grid.attach(label,0,++row,1,1); + + txt_preset_name = new Gtk.Entry(); + txt_preset_name.xalign = (float) 0.0; + txt_preset_name.text = _("New Preset"); + grid.attach(txt_preset_name,1,row,2,1); + + // version ------------------------------------ + + label = new Gtk.Label(_("Version")); + label.xalign = (float) 1.0; + grid.attach(label,0,++row,1,1); + + txt_preset_version = new Gtk.Entry(); + txt_preset_version.xalign = (float) 0.0; + txt_preset_version.text = "1.0"; + grid.attach(txt_preset_version,1,row,2,1); + + // author -------------------------------------- + + label = new Gtk.Label(_("Author")); + label.xalign = (float) 1.0; + grid.attach(label,0,++row,1,1); + + txt_author_name = new Gtk.Entry(); + txt_author_name.xalign = (float) 0.0; + txt_author_name.text = ""; + grid.attach(txt_author_name,1,row,2,1); + + // email ---------------------------------------- + + label = new Gtk.Label(_("Email")); + label.xalign = (float) 1.0; + grid.attach(label,0,++row,1,1); + + txt_author_email = new Gtk.Entry(); + txt_author_email.xalign = (float) 0.0; + txt_author_email.text = ""; + grid.attach(txt_author_email,1,row,2,1); + + //img_file_format -------------------------------- + + img_file_format = new Gtk.Image(); + img_file_format.margin_top = 6; + img_file_format.margin_bottom = 6; + img_file_format.expand = true; + grid.attach(img_file_format,0,++row,3,1); } private void init_ui_audio(){ - //lblAudio - lblAudio = new Label (_("Audio")); - - //gridAudio - gridAudio = new Grid(); - gridAudio.set_column_spacing (6); - gridAudio.set_row_spacing (6); - gridAudio.margin = 12; - gridAudio.visible = false; - tabMain.append_page (gridAudio, lblAudio); - + + // add tab page ------------------------- + + var label = new Label (_("Audio")); + + var grid = new Grid(); + grid.set_column_spacing (12); + grid.set_row_spacing (6); + grid.margin = 12; + grid.visible = false; + notebook.append_page (grid, label); + grid_audio = grid; + int row = -1; - //string tt = ""; Gtk.ListStore model; TreeIter iter; - //lblACodec - lblACodec = new Gtk.Label(_("Format / Codec")); - lblACodec.xalign = (float) 0.0; - gridAudio.attach(lblACodec,0,++row,1,1); + //lblHeaderFileFormat + label = new Gtk.Label(_("<b>Audio Encoder</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.margin_bottom = 6; + grid.attach(label,0,++row,3,1); + + // format ---------------------------- + + lbl_acodec = new Gtk.Label(_("Format / Codec")); + lbl_acodec.xalign = (float) 1.0; + grid_audio.attach(lbl_acodec,0,++row,1,1); - //cmbACodec - cmbACodec = new ComboBox(); + //cmb_acodec + cmb_acodec = new ComboBox(); var textCell = new CellRendererText(); - cmbACodec.pack_start(textCell, false); - cmbACodec.set_attributes(textCell, "text", 0); - cmbACodec.changed.connect(cmbACodec_changed); - cmbACodec.hexpand = true; - gridAudio.attach(cmbACodec,1,row,1,1); - - //lblAudioMode - lblAudioMode = new Gtk.Label(_("Encoding Mode")); - lblAudioMode.xalign = (float) 0.0; - gridAudio.attach(lblAudioMode,0,++row,1,1); + cmb_acodec.pack_start(textCell, false); + cmb_acodec.set_attributes(textCell, "text", 0); + cmb_acodec.changed.connect(cmb_acodec_changed); + grid_audio.attach(cmb_acodec,1,row,1,1); - //cmbAudioMode - cmbAudioMode = new ComboBox(); + // message --------------------------------- + + lbl_acodec_msg = new Gtk.Label(""); + lbl_acodec_msg.xalign = (float) 0.0; + lbl_acodec_msg.wrap = true; + lbl_acodec_msg.wrap_mode = Pango.WrapMode.WORD; + lbl_acodec_msg.use_markup = true; + grid_audio.attach(lbl_acodec_msg,0,++row,3,1); + + // mode ------------------------------------ + + lbl_amode = new Gtk.Label(_("Encoding Mode")); + lbl_amode.xalign = (float) 1.0; + grid_audio.attach(lbl_amode,0,++row,1,1); + + cmb_amode = new ComboBox(); textCell = new CellRendererText(); - cmbAudioMode.pack_start(textCell, false); - cmbAudioMode.set_attributes(textCell, "text", 0); - cmbAudioMode.changed.connect(cmbAudioMode_changed); - gridAudio.attach(cmbAudioMode,1,row,1,1); - - //lblAudioBitrate - lblAudioBitrate = new Gtk.Label(_("Bitrate (kbps)")); - lblAudioBitrate.xalign = (float) 0.0; - gridAudio.attach(lblAudioBitrate,0,++row,1,1); + cmb_amode.pack_start(textCell, false); + cmb_amode.set_attributes(textCell, "text", 0); + cmb_amode.changed.connect(cmb_amode_changed); + grid_audio.attach(cmb_amode,1,row,1,1); + + // bitrate ---------------------------------------- + + lbl_abitrate = new Gtk.Label(_("Bitrate (kbps)")); + lbl_abitrate.xalign = (float) 1.0; + grid_audio.attach(lbl_abitrate,0,++row,1,1); - //spinAudioBitrate + //spin_abitrate Gtk.Adjustment adjAudioBitrate = new Gtk.Adjustment(128, 32, 320, 1, 1, 0); - spinAudioBitrate = new Gtk.SpinButton (adjAudioBitrate, 1, 0); - spinAudioBitrate.xalign = (float) 0.5; - gridAudio.attach(spinAudioBitrate,1,row,1,1); - - //lblAudioQuality - lblAudioQuality = new Gtk.Label(_("Quality")); - lblAudioQuality.xalign = (float) 0.0; - gridAudio.attach(lblAudioQuality,0,++row,1,1); + spin_abitrate = new Gtk.SpinButton (adjAudioBitrate, 1, 0); + spin_abitrate.xalign = (float) 0.5; + grid_audio.attach(spin_abitrate,1,row,1,1); - //spinAudioQuality + spin_abitrate.notify["sensitive"].connect(()=>{ lbl_abitrate.sensitive = spin_abitrate.sensitive; }); + + // quality ------------------------------------------- + + lbl_aquality = new Gtk.Label(_("Quality")); + lbl_aquality.xalign = (float) 1.0; + grid_audio.attach(lbl_aquality,0,++row,1,1); + + //spin_aquality Gtk.Adjustment adjAudioQuality = new Gtk.Adjustment(4, 0, 9, 1, 1, 0); - spinAudioQuality = new Gtk.SpinButton (adjAudioQuality, 1, 0); - spinAudioQuality.xalign = (float) 0.5; - gridAudio.attach(spinAudioQuality,1,row,1,1); - - //lblOpusOptimize - lblOpusOptimize = new Gtk.Label(_("Optimization")); - lblOpusOptimize.xalign = (float) 0.0; - lblOpusOptimize.no_show_all = true; - gridAudio.attach(lblOpusOptimize,0,++row,1,1); + spin_aquality = new Gtk.SpinButton (adjAudioQuality, 1, 0); + spin_aquality.xalign = (float) 0.5; + grid_audio.attach(spin_aquality,1,row,1,1); + + spin_aquality.notify["sensitive"].connect(()=>{ lbl_aquality.sensitive = spin_aquality.sensitive; }); + + // opus optimize ------------------------------------------- + + lbl_opus_optimize = new Gtk.Label(_("Optimization")); + lbl_opus_optimize.xalign = (float) 1.0; + grid_audio.attach(lbl_opus_optimize,0,++row,1,1); - //cmbOpusOptimize - cmbOpusOptimize = new ComboBox(); + //cmb_opus_optimize + cmb_opus_optimize = new ComboBox(); textCell = new CellRendererText(); - cmbOpusOptimize.pack_start(textCell, false); - cmbOpusOptimize.set_attributes(textCell, "text", 0); - cmbOpusOptimize.no_show_all = true; - cmbOpusOptimize.set_size_request(150,-1); - gridAudio.attach(cmbOpusOptimize,1,row,1,1); + cmb_opus_optimize.pack_start(textCell, false); + cmb_opus_optimize.set_attributes(textCell, "text", 0); + grid_audio.attach(cmb_opus_optimize,1,row,1,1); //populate model = new Gtk.ListStore (2, typeof (string), typeof (string)); @@ -490,23 +642,25 @@ model.set (iter,0,_("Speech"),1,"speech"); model.append (out iter); model.set (iter,0,_("Music"),1,"music"); - cmbOpusOptimize.set_model(model); + cmb_opus_optimize.set_model(model); - //lblAacProfile - lblAacProfile = new Gtk.Label(_("Profile")); - lblAacProfile.xalign = (float) 0.0; - lblAacProfile.no_show_all = true; - gridAudio.attach(lblAacProfile,0,++row,1,1); + // AAC profile ------------------------------------ + + lbl_aac_profile = new Gtk.Label(_("Profile")); + lbl_aac_profile.xalign = (float) 1.0; + //lbl_aac_profile.no_show_all = true; + grid_audio.attach(lbl_aac_profile,0,++row,1,1); - //cmbAacProfile - cmbAacProfile = new ComboBox(); + //cmb_aac_profile + cmb_aac_profile = new ComboBox(); textCell = new CellRendererText(); - cmbAacProfile.pack_start(textCell, false); - cmbAacProfile.set_attributes(textCell, "text", 0); - cmbAacProfile.no_show_all = true; - cmbAacProfile.set_size_request(150,-1); - gridAudio.attach(cmbAacProfile,1,row,1,1); - + cmb_aac_profile.pack_start(textCell, false); + cmb_aac_profile.set_attributes(textCell, "text", 0); + //cmb_aac_profile.no_show_all = true; + //cmb_aac_profile.set_size_request(150,-1); + grid_audio.attach(cmb_aac_profile,1,row,1,1); + //sizegroup.add_widget(cmb_aac_profile); + //tooltip string tt = _("<b>AAC-LC (Recommended)</b>\nMPEG-2 Low-complexity (LC) combined with MPEG-4 Perceptual Noise Substitution (PNS)\n\n"); tt += _("<b>HE-AAC</b>\nAAC-LC + SBR (Spectral Band Replication)\n\n"); @@ -515,291 +669,370 @@ tt += _("<b>AAC-ELD</b>\nEnhanced Low Delay Profile for real-time communication\n\n"); tt += _("<b>AAC-ELD</b>\nEnhanced Low Delay Profile for real-time communication\n\n"); tt += _("<b>Note:</b>\nHE-AAC and HE-AACv2 are used for low-bitrate encoding while HE-LD and HE-ELD are used for real-time communication. HE-AAC is suitable for bit rates between 48 to 64 kbps (stereo) while HE-AACv2 is suitable for bit rates as low as 32 kbps."); - cmbAacProfile.set_tooltip_markup(tt); - lblAacProfile.set_tooltip_markup(tt); + cmb_aac_profile.set_tooltip_markup(tt); + lbl_aac_profile.set_tooltip_markup(tt); //populate - cmbAacProfile_refresh(); + cmb_aac_profile_refresh(); - //imgAudioCodec - imgAudioCodec = new Gtk.Image(); - imgAudioCodec.margin_top = 6; - imgAudioCodec.margin_bottom = 6; - imgAudioCodec.expand = true; - gridAudio.attach(imgAudioCodec,0,++row,3,1); + //img_audio_format + img_audio_format = new Gtk.Image(); + img_audio_format.margin_top = 6; + img_audio_format.margin_bottom = 6; + img_audio_format.expand = true; + grid_audio.attach(img_audio_format,0,++row,3,1); } private void init_ui_audio_filters(){ - //lblAudioFilters - lblAudioFilters = new Label (_("Filters")); - - //gridAudioFilters - gridAudioFilters = new Grid(); - gridAudioFilters.set_column_spacing (6); - gridAudioFilters.set_row_spacing (6); - gridAudioFilters.margin = 12; - gridAudioFilters.visible = false; - tabMain.append_page (gridAudioFilters, lblAudioFilters); + + // add tab page ------------------------- + + var label = new Label (_("Filters")); + var grid = new Grid(); + grid.set_column_spacing (12); + grid.set_row_spacing (6); + grid.margin = 12; + grid.visible = false; + notebook.append_page (grid, label); + grid_af = grid; + int row = -1; - //string tt = ""; - //Gtk.ListStore model; - //TreeIter iter; int col; - //lblHeaderSampling - Label lblHeaderSampling = new Gtk.Label(_("<b>Channels & Sampling:</b>")); - lblHeaderSampling.set_use_markup(true); - lblHeaderSampling.xalign = (float) 0.0; - gridAudioFilters.attach(lblHeaderSampling,col=0,++row,2,1); - - //lblAudioSampleRate - lblAudioSampleRate = new Gtk.Label(_("Sampling Rate (Hz)")); - lblAudioSampleRate.xalign = (float) 0.0; - gridAudioFilters.attach(lblAudioSampleRate,col=0,++row,1,1); + // resample ----------------------------------------- + + label = new Gtk.Label(_("<b>Resample</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.margin_top = 6; + label.margin_bottom = 6; + grid.attach(label,col=0,++row,2,1); + + //lbl_sampling + lbl_sampling = new Gtk.Label(_("Sampling Rate (Hz)")); + lbl_sampling.xalign = (float) 1.0; + lbl_sampling.margin_left = 12; + grid.attach(lbl_sampling,col=0,++row,1,1); - //cmbAudioSampleRate - cmbAudioSampleRate = new ComboBox(); + //cmb_sampling + cmb_sampling = new ComboBox(); var textCell = new CellRendererText(); - cmbAudioSampleRate.pack_start(textCell, false); - cmbAudioSampleRate.set_attributes(textCell, "text", 0); - cmbAudioSampleRate.hexpand = true; - gridAudioFilters.attach(cmbAudioSampleRate,col+1,row,1,1); + cmb_sampling.pack_start(textCell, false); + cmb_sampling.set_attributes(textCell, "text", 0); + grid.attach(cmb_sampling,col+1,row,1,1); + // channels ----------------------------------------- + + label = new Gtk.Label(_("<b>Channels</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.margin_top = 6; + label.margin_bottom = 6; + grid.attach(label,col=0,++row,2,1); + //lblAudioChannels lblAudioChannels = new Gtk.Label(_("Channels")); - lblAudioChannels.xalign = (float) 0.0; - gridAudioFilters.attach(lblAudioChannels,col=0,++row,1,1); + lblAudioChannels.xalign = (float) 1.0; + grid.attach(lblAudioChannels,col=0,++row,1,1); - //cmbAudioChannels - cmbAudioChannels = new ComboBox(); + //cmb_channels + cmb_channels = new ComboBox(); textCell = new CellRendererText(); - cmbAudioChannels.pack_start(textCell, false); - cmbAudioChannels.set_attributes(textCell, "text", 0); - gridAudioFilters.attach(cmbAudioChannels,col+1,row,1,1); + cmb_channels.pack_start(textCell, false); + cmb_channels.set_attributes(textCell, "text", 0); + grid.attach(cmb_channels,col+1,row,1,1); } private void init_ui_sox(){ - //int row = -1; - string tt = ""; - Gtk.ListStore model; - TreeIter iter; - //int col; - int scaleWidth = 200; - int sliderMarginBottom = 0; - int spacing = 5; + int sliderMarginBottom = 3; + int spacing = 6; - //lblAudioFilters - Label lblAudioSox = new Label ("" + _("SOX") + ""); + // add tab page ------------------------- + + var label = new Label ("" + _("SOX") + ""); - //vboxSox - Box vboxSoxOuter = new Box(Orientation.VERTICAL,spacing); + vboxSoxOuter = new Box(Orientation.VERTICAL,spacing); vboxSoxOuter.margin = 12; - tabMain.append_page (vboxSoxOuter, lblAudioSox); + notebook.append_page (vboxSoxOuter, label); - //hboxSoxSwitch - Box hboxSoxSwitch = new Box(Orientation.HORIZONTAL,0); - hboxSoxSwitch.margin_bottom = 6; - vboxSoxOuter.add(hboxSoxSwitch); - - //lblHeaderSox - lblHeaderSox = new Gtk.Label(_("<b>SOX Audio Processing:</b>")); - lblHeaderSox.set_use_markup(true); - lblHeaderSox.xalign = (float) 0.0; - lblHeaderSox.hexpand = true; - hboxSoxSwitch.add(lblHeaderSox); - - //switchSox - switchSox = new Gtk.Switch(); - switchSox.set_size_request(100,-1); - hboxSoxSwitch.add(switchSox); + // SOX switch ------------------------------------ + + var hbox = new Box(Orientation.HORIZONTAL,0); + hbox.margin_bottom = 6; + vboxSoxOuter.add(hbox); + + //lbl_sox_header + label = new Gtk.Label(_("<b>SOX Audio Processing</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.hexpand = true; + hbox.add(label); + lbl_sox_header = label; + + //switch_sox + switch_sox = new Gtk.Switch(); + switch_sox.set_size_request(100,-1); + hbox.add(switch_sox); //vboxSox Box vboxSox = new Box(Orientation.VERTICAL,spacing); vboxSoxOuter.add(vboxSox); - switchSox.notify["active"].connect(()=>{ - vboxSox.sensitive = switchSox.active; + switch_sox.notify["active"].connect(()=>{ + vboxSox.sensitive = switch_sox.active; App.Encoders["sox"].CheckAvailability(); if (!App.Encoders["sox"].IsAvailable){ - if (switchSox.active){ + if (switch_sox.active){ gtk_messagebox(_("Sox Not Installed"), _("The Sox utility was not found on your system") + "\n" + _("Please install the 'sox' package on your system to use this feature"), this, true); - switchSox.active = false; + switch_sox.active = false; } } }); - switchSox.active = false; - vboxSox.sensitive = switchSox.active; + switch_sox.active = false; + vboxSox.sensitive = switch_sox.active; + + var sizegroup = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL); + + // adjustments header -------------------------------------- + + label = new Gtk.Label(_("<b>Adjustments:</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.hexpand = true; + label.margin_top = 6; + label.margin_bottom = 6; + vboxSox.add(label); + + // bass --------------------------------------------------- + + hbox = new Box(Orientation.HORIZONTAL,spacing); + vboxSox.add(hbox); + + var tt = _("Boost or cut the bass (lower) frequencies of the audio."); + + label = new Gtk.Label(_("Bass") + ": "); + label.xalign = (float) 1.0; + label.margin_left = 6; + label.set_tooltip_text(tt); + hbox.pack_start(label,false,false,0); + lbl_bass = label; + + // scale_bass + var scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, -20, 20, 1); + scale.adjustment.value = 0; + scale.has_origin = false; + scale.value_pos = PositionType.RIGHT; + scale.set_size_request(scaleWidth,-1); + scale.margin_bottom = sliderMarginBottom; + hbox.pack_start(scale,true,true,0); + scale_bass = scale; + + sizegroup.add_widget(lbl_bass); + + scale_bass.format_value.connect((val)=>{ + return "%.0f ".printf(val); + }); - //lblHeaderAdjustments - Label lblHeaderAdjustments = new Gtk.Label(_("<b>Adjustments:</b>")); - lblHeaderAdjustments.set_use_markup(true); - lblHeaderAdjustments.xalign = (float) 0.0; - lblHeaderAdjustments.hexpand = true; - //lblHeaderAdjustments.margin_top = 5; - lblHeaderAdjustments.margin_bottom = 5; - vboxSox.add(lblHeaderAdjustments); - - //hboxBass - Box hboxBass = new Box(Orientation.HORIZONTAL,spacing); - vboxSox.add(hboxBass); - - tt = _("Boost or cut the bass (lower) frequencies of the audio."); - - lblAudioBass = new Gtk.Label(_("Bass (lower freq)") + ": "); - lblAudioBass.xalign = (float) 0.0; - lblAudioBass.set_tooltip_text(tt); - hboxBass.pack_start(lblAudioBass,false,false,0); - - scaleBass = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, -20, 20, 1); - scaleBass.adjustment.value = 0; - scaleBass.has_origin = false; - scaleBass.value_pos = PositionType.LEFT; - scaleBass.set_size_request(scaleWidth,-1); - scaleBass.margin_bottom = sliderMarginBottom; - hboxBass.pack_start(scaleBass,true,true,0); - - scaleBass.format_value.connect((val)=>{ return "%.0f ".printf(val); }); - - Button btnReset = new Button.with_label("X"); - btnReset.clicked.connect(()=>{ scaleBass.adjustment.value = 0; }); - btnReset.set_tooltip_text(_("Reset")); - hboxBass.pack_start(btnReset,false,true,0); - - //hboxTreble - Box hboxTreble = new Box(Orientation.HORIZONTAL,spacing); - vboxSox.add(hboxTreble); + // add sox preview image --------------- + + /*var s = ""; + if (sox_bass != "0"){ + s += " bass " + sox_bass; + } + add_sox_preview_image(hbox, s);*/ + + // Treble --------------------------------------------------- + + hbox = new Box(Orientation.HORIZONTAL,spacing); + vboxSox.add(hbox); tt = _("Boost or cut the treble (upper) frequencies of the audio."); - lblAudioTreble = new Gtk.Label(_("Treble (upper freq)") + ": "); - lblAudioTreble.xalign = (float) 0.0; - lblAudioTreble.set_tooltip_text(tt); - hboxTreble.pack_start(lblAudioTreble,false,false,0); - - scaleTreble = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, -20, 20, 1); - scaleTreble.adjustment.value = 0; - scaleTreble.has_origin = false; - scaleTreble.value_pos = PositionType.LEFT; - scaleTreble.set_size_request(scaleWidth,-1); - scaleTreble.margin_bottom = sliderMarginBottom; - hboxTreble.pack_start(scaleTreble,true,true,0); - - scaleTreble.format_value.connect((val)=>{ return "%.0f ".printf(val); }); - - btnReset = new Button.with_label("X"); - btnReset.clicked.connect(()=>{ scaleTreble.adjustment.value = 0; }); - btnReset.set_tooltip_text(_("Reset")); - hboxTreble.pack_start(btnReset,false,true,0); - - //hboxPitch - Box hboxPitch = new Box(Orientation.HORIZONTAL,spacing); - vboxSox.add(hboxPitch); + label = new Gtk.Label(_("Treble") + ": "); + label.xalign = (float) 1.0; + label.margin_left = 6; + label.set_tooltip_text(tt); + hbox.pack_start(label,false,false,0); + lbl_treble = label; + + // scale_treble + scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, -20, 20, 1); + scale.adjustment.value = 0; + scale.has_origin = false; + scale.value_pos = PositionType.RIGHT; + scale.set_size_request(scaleWidth,-1); + scale.margin_bottom = sliderMarginBottom; + hbox.pack_start(scale,true,true,0); + scale_treble = scale; + + sizegroup.add_widget(lbl_treble); + + scale_treble.format_value.connect((val)=>{ + return "%.0f ".printf(val); + }); + + // add sox preview image --------------------- + + /*s = ""; + if (sox_treble != "0"){ + s += " treble " + sox_treble; + } + add_sox_preview_image(hbox, s);*/ + + // Pitch -------------------------------------------------- + + hbox = new Box(Orientation.HORIZONTAL,spacing); + vboxSox.add(hbox); tt = _("Change audio pitch (shrillness) without changing audio tempo (speed)."); - lblAudioPitch = new Gtk.Label(_("Pitch (shrillness)") + ": "); - lblAudioPitch.xalign = (float) 0.0; - lblAudioPitch.set_tooltip_text(tt); - hboxPitch.pack_start(lblAudioPitch,false,false,0); - - scalePitch = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0, 500, 1); - scalePitch.adjustment.value = 100; - //scalePitch.has_origin = false; - scalePitch.value_pos = PositionType.LEFT; - scalePitch.set_size_request(scaleWidth,-1); - scalePitch.margin_bottom = sliderMarginBottom; - hboxPitch.pack_start(scalePitch,true,true,0); - - scalePitch.format_value.connect((val)=>{ return "%.0f%% ".printf(val); }); - - btnReset = new Button.with_label("X"); - btnReset.clicked.connect(()=>{ scalePitch.adjustment.value = 100; }); - btnReset.set_tooltip_text(_("Reset")); - hboxPitch.pack_start(btnReset,false,true,0); - - //hboxTempo - Box hboxTempo = new Box(Orientation.HORIZONTAL,spacing); - vboxSox.add(hboxTempo); + label = new Gtk.Label(_("Pitch") + ": "); + label.xalign = (float) 1.0; + label.margin_left = 6; + label.set_tooltip_text(tt); + hbox.pack_start(label,false,false,0); + lbl_pitch = label; + + // scale_pitch + scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0, 500, 1); + scale.adjustment.value = 100; + //scale.has_origin = false; + scale.value_pos = PositionType.RIGHT; + scale.set_size_request(scaleWidth,-1); + scale.margin_bottom = sliderMarginBottom; + hbox.pack_start(scale,true,true,0); + scale_pitch = scale; + + sizegroup.add_widget(lbl_pitch); + + scale_pitch.format_value.connect((val)=>{ + return "%.0f%% ".printf(val); + }); + + // add sox preview image --------------------- + + /*s = ""; + if (sox_pitch != "1.0"){ + s += " pitch " + sox_pitch; + } + add_sox_preview_image(hbox, s);*/ + + // Tempo -------------------------------------------------- + + hbox = new Box(Orientation.HORIZONTAL,spacing); + vboxSox.add(hbox); tt = _("Change audio tempo (speed) without changing audio pitch (shrillness).\n\nWARNING: This will change the duration of the audio track"); - lblAudioTempo = new Gtk.Label(_("Tempo (speed)") + ": "); - lblAudioTempo.xalign = (float) 0.0; - lblAudioTempo.set_tooltip_text(tt); - hboxTempo.pack_start(lblAudioTempo,false,false,0); - - scaleTempo = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 30, 200, 1); - scaleTempo.adjustment.value = 100; - //scaleTempo.has_origin = false; - scaleTempo.value_pos = PositionType.LEFT; - scaleTempo.set_size_request(scaleWidth,-1); - scaleTempo.margin_bottom = sliderMarginBottom; - hboxTempo.pack_start(scaleTempo,true,true,0); - - scaleTempo.format_value.connect((val)=>{ return "%.0f%% ".printf(val); }); - - btnReset = new Button.with_label("X"); - btnReset.clicked.connect(()=>{ scaleTempo.adjustment.value = 100; }); - btnReset.set_tooltip_text(_("Reset")); - hboxTempo.pack_start(btnReset,false,true,0); - - //lblHeaderFade - Label lblHeaderFade = new Gtk.Label(_("<b>Fade:</b>")); - lblHeaderFade.set_use_markup(true); - lblHeaderFade.xalign = (float) 0.0; - lblHeaderFade.hexpand = true; - lblHeaderFade.margin_top = 5; - lblHeaderFade.margin_bottom = 5; - vboxSox.add(lblHeaderFade); - - //hboxFadeIn - Box hboxFadeIn = new Box(Orientation.HORIZONTAL,spacing); - vboxSox.add(hboxFadeIn); - - lblFadeIn = new Gtk.Label(_("Fade In (seconds)")); - lblFadeIn.xalign = (float) 0.0; - lblFadeIn.set_size_request(150,-1); - hboxFadeIn.pack_start(lblFadeIn,false,false,0); + label = new Gtk.Label(_("Tempo") + ": "); + label.xalign = (float) 1.0; + label.margin_left = 6; + label.set_tooltip_text(tt); + hbox.pack_start(label,false,false,0); + lbl_tempo = label; + + // scale_tempo + scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 30, 200, 1); + scale.adjustment.value = 100; + //scale.has_origin = false; + scale.value_pos = PositionType.RIGHT; + scale.set_size_request(scaleWidth,-1); + scale.margin_bottom = sliderMarginBottom; + hbox.pack_start(scale,true,true,0); + scale_tempo = scale; + + sizegroup.add_widget(lbl_tempo); + + scale_tempo.format_value.connect((val)=>{ + return "%.0f%% ".printf(val); + }); + + // add sox preview image --------------------- + + /*s = ""; + if (sox_tempo != "1.0"){ + s += " tempo " + sox_tempo; + } + add_sox_preview_image(hbox, s);*/ + + // fade header --------------------------------------------- + + label = new Gtk.Label(_("<b>Fade:</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.hexpand = true; + label.margin_top = 6; + label.margin_bottom = 6; + vboxSox.add(label); + sizegroup = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL); + + // fade in ------------------------------------------------ + + hbox = new Box(Orientation.HORIZONTAL,spacing); + vboxSox.add(hbox); + + label = new Gtk.Label(_("Fade In (sec)")); + label.xalign = (float) 1.0; + label.margin_left = 6; + hbox.pack_start(label,false,false,0); + lbl_fade_in = label; + + sizegroup.add_widget(label); + + // spin_fade_in Gtk.Adjustment adjFadeIn = new Gtk.Adjustment(0, 0, 99999, 1, 1, 0); - spinFadeIn = new Gtk.SpinButton (adjFadeIn, 1, 0); - spinFadeIn.xalign = (float) 0.5; - hboxFadeIn.pack_start(spinFadeIn,false,false,0); - - //hboxFadeOut - Box hboxFadeOut = new Box(Orientation.HORIZONTAL,spacing); - vboxSox.add(hboxFadeOut); - - lblFadeOut = new Gtk.Label(_("Fade Out (seconds)")); - lblFadeOut.xalign = (float) 0.0; - lblFadeOut.set_size_request(150,-1); - hboxFadeOut.pack_start(lblFadeOut,false,false,0); + var spin = new Gtk.SpinButton (adjFadeIn, 1, 0); + spin.xalign = (float) 0.5; + hbox.pack_start(spin,false,false,0); + spin_fade_in = spin; + + // fade out ----------------------------------------------- + + hbox = new Box(Orientation.HORIZONTAL,spacing); + vboxSox.add(hbox); + label = new Gtk.Label(_("Fade Out (sec)")); + label.xalign = (float) 1.0; + label.margin_left = 6; + hbox.pack_start(label,false,false,0); + lbl_fade_out = label; + + sizegroup.add_widget(label); + + // spin_fade_out Gtk.Adjustment adjFadeOut = new Gtk.Adjustment(0, 0, 99999, 1, 1, 0); - spinFadeOut = new Gtk.SpinButton (adjFadeOut, 1, 0); - spinFadeOut.xalign = (float) 0.5; - hboxFadeOut.pack_start(spinFadeOut,false,false,0); - - //hboxFadeType - Box hboxFadeType = new Box(Orientation.HORIZONTAL,spacing); - vboxSox.add(hboxFadeType); - - Label lblFadeType = new Gtk.Label(_("Fade Type")); - lblFadeType.xalign = (float) 0.0; - lblFadeType.set_size_request(150,-1); - hboxFadeType.pack_start(lblFadeType,false,false,0); + spin = new Gtk.SpinButton (adjFadeOut, 1, 0); + spin.xalign = (float) 0.5; + hbox.pack_start(spin,false,false,0); + spin_fade_out = spin; + + // fade type ------------------------------------------------ + + hbox = new Box(Orientation.HORIZONTAL,spacing); + vboxSox.add(hbox); + + label = new Gtk.Label(_("Fade Type")); + label.xalign = (float) 1.0; + label.margin_left = 6; + hbox.pack_start(label,false,false,0); - cmbFadeType = new ComboBox(); + sizegroup.add_widget(label); + + // cmb_fade_type + var combo = new ComboBox(); var textCell = new CellRendererText(); - cmbFadeType.pack_start(textCell, false); - cmbFadeType.set_attributes(textCell, "text", 0); - hboxFadeType.pack_start(cmbFadeType,false,false,0); + combo.pack_start(textCell, false); + combo.set_attributes(textCell, "text", 0); + hbox.pack_start(combo,false,false,0); + cmb_fade_type = combo; - model = new Gtk.ListStore (2, typeof (string), typeof (string)); + TreeIter iter; + var model = new Gtk.ListStore (2, typeof (string), typeof (string)); model.append (out iter); model.set (iter,0,_("Quarter Sine"),1,"q"); model.append (out iter); @@ -810,141 +1043,297 @@ model.set (iter,0,_("Logarithmic"),1,"l"); model.append (out iter); model.set (iter,0,_("Inverted Parabola"),1,"p"); - cmbFadeType.set_model(model); + combo.set_model(model); + + // add sox preview image --------------------- + + /*s = ""; + if ((sox_fade_in != "0") || (sox_fade_out != "0")){ + s += " fade " + sox_fade_type + " " + sox_fade_in; + } + add_sox_preview_image(hbox, s);*/ + + // header other ---------------------------------------- + + label = new Gtk.Label(_("<b>Other Effects:</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.hexpand = true; + label.margin_top = 6; + label.margin_bottom = 6; + vboxSox.add(label); - //lblHeaderOther - Label lblHeaderOther = new Gtk.Label(_("<b>Other Effects:</b>")); - lblHeaderOther.set_use_markup(true); - lblHeaderOther.xalign = (float) 0.0; - lblHeaderOther.hexpand = true; - lblHeaderOther.margin_top = 5; - lblHeaderOther.margin_bottom = 5; - vboxSox.add(lblHeaderOther); - - //hboxNormalize - Box hboxNormalize = new Box(Orientation.HORIZONTAL,0); - vboxSox.add(hboxNormalize); + // Normalize ------------------------------------------------- + hbox = new Box(Orientation.HORIZONTAL,spacing); + vboxSox.add(hbox); + tt = _("Maximize the volume level (loudness)"); - lblNormalize = new Gtk.Label(_("Maximize Volume Level (Normalize)")); - lblNormalize.xalign = (float) 0.0; - lblNormalize.hexpand = true; - lblNormalize.set_tooltip_text(tt); - hboxNormalize.pack_start(lblNormalize,true,true,0); - - switchNormalize = new Gtk.Switch(); - switchNormalize.set_size_request(100,-1); - switchNormalize.active = false; - hboxNormalize.pack_end(switchNormalize,false,false,0); - - //hboxEarWax - Box hboxEarWax = new Box(Orientation.HORIZONTAL,0); - vboxSox.add(hboxEarWax); + //chk_normalize + var chk = new CheckButton.with_label(_("Maximize Volume Level (Normalize)")); + chk.active = false; + chk.margin_left = 6; + chk.set_tooltip_text(tt); + hbox.add(chk); + chk_normalize = chk; + + // add sox preview image -------- + + /*s = ""; + s += " norm"; + add_sox_preview_image(hbox, s);*/ + + // ear wax -------------------------------------------------- + hbox = new Box(Orientation.HORIZONTAL,spacing); + vboxSox.add(hbox); + tt = _("Makes audio easier to listen to on headphones. Adds 'cues' to the audio so that when listened to on headphones the stereo image is moved from inside your head (standard for headphones) to outside and in front of the listener (standard for speakers)."); - lblEarWax = new Gtk.Label(_("Adjust Stereo for Headphones")); - lblEarWax.xalign = (float) 0.0; - lblEarWax.hexpand = true; - lblEarWax.set_tooltip_text(tt); - hboxEarWax.pack_start(lblEarWax,true,true,0); - - switchEarWax = new Gtk.Switch(); - switchEarWax.set_size_request(100,-1); - switchEarWax.active = false; - hboxEarWax.pack_end(switchEarWax,false,false,0); - - //lnkSoxHome - LinkButton lnkSoxHome = new LinkButton.with_label ("http://sox.sourceforge.net/", "SOund eXchange - http://sox.sourceforge.net/"); - lnkSoxHome.xalign = (float) 0.0; - lnkSoxHome.valign = Align.END; - lnkSoxHome.activate_link.connect(()=>{ return exo_open_url(lnkSoxHome.uri); }); - vboxSoxOuter.pack_end(lnkSoxHome,true,true,0); + //chk_earwax + chk = new CheckButton.with_label(_("Adjust Stereo for Headphones")); + chk.active = false; + chk.margin_left = 6; + chk.set_tooltip_text(tt); + hbox.add(chk); + chk_earwax = chk; + // add sox preview image -------- + + /*s = ""; + s += " earwax"; + add_sox_preview_image(hbox, s);*/ + + // link --------------------------------------- + + var link = new LinkButton.with_label ("http://sox.sourceforge.net/", "SOund eXchange - http://sox.sourceforge.net/"); + link.xalign = (float) 0.0; + link.valign = Align.END; + link.activate_link.connect(()=>{ return exo_open_url(link.uri); }); + vboxSoxOuter.pack_end(link,true,true,0); } + + /*private void show_popover_audio(Gtk.Image img, string sox_options){ + var pop = new Gtk.Popover(img); + pop.modal = true; - private void init_ui_video(){ - //lblVideo - lblVideo = new Label(_("Video")); + var vbox = new Box(Orientation.VERTICAL,6); + vbox.margin = 6; + pop.add(vbox); + + var label = new Gtk.Label(_("File to preview:")); + label.xalign = (float) 0.0; + vbox.add(label); - //gridVideo - gridVideo = new Grid(); - gridVideo.set_column_spacing (6); - gridVideo.set_row_spacing (6); - gridVideo.visible = false; - gridVideo.margin = 12; - tabMain.append_page (gridVideo, lblVideo); + var combo = new ComboBox(); + var textCell = new CellRendererText(); + textCell.ellipsize = Pango.EllipsizeMode.END; + textCell.max_width_chars = 40; + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + vbox.add(combo); - int row = -1; - string tt = ""; - Gtk.ListStore model; TreeIter iter; + var model = new Gtk.ListStore (2, typeof (string), typeof (MediaFile)); + foreach(MediaFile mf in App.InputFiles){ + model.append (out iter); + model.set (iter, 0, mf.Name, 1, mf); + } + + combo.model = model; + combo.active = 0; + + var hbox = new Box(Orientation.HORIZONTAL,6); + hbox.homogeneous = true; + hbox.hexpand = true; + vbox.add(hbox); + + var btn = new Gtk.Button.with_label("Preview Audio"); + btn.sensitive = (App.InputFiles.size > 0); + hbox.add(btn); + + btn.clicked.connect(()=>{ + var mf = App.InputFiles[combo.active]; + App.play_audio(mf, sox_options); + }); + + btn = new Gtk.Button.with_label("Play Original"); + btn.sensitive = (App.InputFiles.size > 0); + hbox.add(btn); + + btn.clicked.connect(()=>{ + var mf = App.InputFiles[combo.active]; + mf.play_file(true, false); + }); + + pop.show_all(); + } + + private void add_sox_preview_image(Gtk.Box hbox, string sox_options){ + var img = new Gtk.Image(); + img.set_from_file(App.SharedImagesFolder + "/media-playback-start.png"); + img.icon_size = 16; + + var eventbox = new Gtk.EventBox(); + eventbox.add(img); + hbox.pack_start(eventbox,false,false,0); + + eventbox.button_press_event.connect((w, event) => { + if (event.type == Gdk.EventType.BUTTON_PRESS){ + this.sox_options = sox_options; + //log_msg("sox:" + this.sox_options); + show_popover_audio(img, sox_options); + } + return true; + }); - //lblVCodec - lblVCodec = new Gtk.Label(_("Format / Codec")); - lblVCodec.xalign = (float) 0.0; - gridVideo.attach(lblVCodec,0,++row,1,1); + } + */ + + private void init_ui_video(){ + + // add tab ---------------------------- + + var label = new Label(_("Video")); - //cmbVCodec - cmbVCodec = new ComboBox(); + //grid_video + var grid = new Grid(); + grid.set_column_spacing (12); + grid.set_row_spacing (6); + grid.margin = 12; + notebook.append_page (grid, label); + grid_video = grid; + + int row = -1; + string tt = ""; + + // header ------------------------ + + label = new Gtk.Label(_("<b>Video Encoder</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.margin_bottom = 6; + grid.attach(label,0,++row,3,1); + + // format ----------------------- + + label = new Gtk.Label(_("Format / Codec")); + label.xalign = (float) 1.0; + grid.attach(label,0,++row,1,1); + var lbl_vcodec = label; + + //cmb_vcodec + var combo = new ComboBox(); var textCell = new CellRendererText(); - cmbVCodec.pack_start( textCell, false ); - cmbVCodec.set_attributes( textCell, "text", 0 ); - cmbVCodec.changed.connect(cmbVCodec_changed); - cmbVCodec.hexpand = true; - gridVideo.attach(cmbVCodec,1,row,1,1); - - //lblVideoMode - lblVideoMode = new Gtk.Label(_("Encoding Mode")); - lblVideoMode.xalign = (float) 0.0; - gridVideo.attach(lblVideoMode,0,++row,1,1); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + combo.changed.connect(cmb_vcodec_changed); + grid.attach(combo,1,row,1,1); + cmb_vcodec = combo; + + cmb_vcodec.notify["visible"].connect(()=>{ + lbl_vcodec.visible = cmb_vcodec.visible; + }); + + // message ------------------------------------- + + //lbl_vmessage + label = new Gtk.Label(""); + label.xalign = (float) 0.0; + label.wrap = true; + label.wrap_mode = Pango.WrapMode.WORD; + label.use_markup = true; + grid.attach(label,0,++row,4,1); + lbl_vmessage = label; + + // mode -------------------------------- + + //lbl_vmode + lbl_vmode = new Gtk.Label(_("Encoding Mode")); + lbl_vmode.xalign = (float) 1.0; + grid.attach(lbl_vmode,0,++row,1,1); - //cmbVideoMode - cmbVideoMode = new ComboBox(); + //cmb_vmode + cmb_vmode = new ComboBox(); textCell = new CellRendererText(); - cmbVideoMode.pack_start( textCell, false ); - cmbVideoMode.set_attributes( textCell, "text", 0 ); - cmbVideoMode.changed.connect(cmbVideoMode_changed); - gridVideo.attach(cmbVideoMode,1,row,1,1); - - //lblVideoBitrate - lblVideoBitrate = new Gtk.Label(_("Bitrate (kbps)")); - lblVideoBitrate.xalign = (float) 0.0; - lblVideoBitrate.set_tooltip_text (""); - gridVideo.attach(lblVideoBitrate,0,++row,1,1); - - //spinVideoBitrate - Gtk.Adjustment adjVideoBitrate = new Gtk.Adjustment(22.0, 0.0, 51.0, 0.1, 1.0, 0.0); - spinVideoBitrate = new Gtk.SpinButton (adjVideoBitrate, 0.1, 2); - spinVideoBitrate.xalign = (float) 0.5; - gridVideo.attach(spinVideoBitrate,1,row,1,1); + cmb_vmode.pack_start( textCell, false ); + cmb_vmode.set_attributes( textCell, "text", 0 ); + cmb_vmode.changed.connect(cmb_vmode_changed); + grid.attach(cmb_vmode,1,row,1,1); - tt = _("<b>Compression Vs Quality</b>\nSmaller values give better quality video and larger files"); + cmb_vmode.notify["visible"].connect(()=>{ + lbl_vmode.visible = cmb_vmode.visible; + }); - //lblVideoQuality - lblVideoQuality = new Gtk.Label(_("Quality")); - lblVideoQuality.xalign = (float) 0.0; - lblVideoQuality.set_tooltip_markup(tt); - gridVideo.attach(lblVideoQuality,0,++row,1,1); - - //spinVideoQuality - Gtk.Adjustment adjVideoQuality = new Gtk.Adjustment(22.0, 0.0, 51.0, 0.1, 1.0, 0.0); - spinVideoQuality = new Gtk.SpinButton (adjVideoQuality, 0.1, 2); - spinVideoQuality.set_tooltip_markup(tt); - spinVideoQuality.xalign = (float) 0.5; - gridVideo.attach(spinVideoQuality,1,row,1,1); + // bitrate ---------------------------- + + //lbl_vbitrate + label = new Gtk.Label(_("Bitrate (kbps)")); + label.xalign = (float) 1.0; + label.set_tooltip_text (""); + grid.attach(label,0,++row,1,1); + lbl_vbitrate = label; + + //spin_vbitrate + var adjustment = new Gtk.Adjustment(22.0, 0.0, 51.0, 0.1, 1.0, 0.0); + var spin = new Gtk.SpinButton (adjustment, 0.1, 2); + spin.xalign = (float) 0.5; + grid.attach(spin,1,row,1,1); + spin_vbitrate = spin; + + spin_vbitrate.notify["visible"].connect(()=>{ + lbl_vbitrate.visible = spin_vbitrate.visible; + }); + + spin_vbitrate.notify["sensitive"].connect(()=>{ + lbl_vbitrate.sensitive = spin_vbitrate.sensitive; + }); + + tt = _("<b>Compression Vs Quality</b>\nSmaller values give better quality video and larger files"); + // quality ------------------------------------ + + //lbl_vquality + label = new Gtk.Label(_("Quality")); + label.xalign = (float) 1.0; + label.set_tooltip_markup(tt); + grid.attach(label,0,++row,1,1); + lbl_vquality = label; + + //spin_vquality + adjustment = new Gtk.Adjustment(22.0, 0.0, 51.0, 0.1, 1.0, 0.0); + spin = new Gtk.SpinButton (adjustment, 0.1, 2); + spin.set_tooltip_markup(tt); + spin.xalign = (float) 0.5; + grid.attach(spin,1,row,1,1); + spin_vquality = spin; + + spin_vquality.notify["visible"].connect(()=>{ lbl_vquality.visible = spin_vquality.visible; }); + spin_vquality.notify["sensitive"].connect(()=>{ lbl_vquality.sensitive = spin_vquality.sensitive; }); + tt = _("<b>Compression Vs Encoding Speed</b>\nSlower presets give better compression and smaller files\nbut take more time to encode."); + // preset ------------------------------- + //lblPreset - lblX264Preset = new Gtk.Label(_("Preset")); - lblX264Preset.xalign = (float) 0.0; - lblX264Preset.set_tooltip_markup(tt); - gridVideo.attach(lblX264Preset,0,++row,1,1); + label = new Gtk.Label(_("Preset")); + label.xalign = (float) 1.0; + label.set_tooltip_markup(tt); + grid.attach(label,0,++row,1,1); + lbl_x264_preset = label; + + //cmb_x264_preset + combo = new ComboBox(); + textCell = new CellRendererText(); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + combo.set_tooltip_markup(tt); + grid.attach(combo,1,row,1,1); + cmb_x264_preset = combo; - //cmbx264Preset - model = new Gtk.ListStore (2, typeof (string), typeof (string)); + TreeIter iter; + var model = new Gtk.ListStore (2, typeof (string), typeof (string)); model.append (out iter); model.set (iter, 0, _("UltraFast"), 1, "ultrafast"); model.append (out iter); @@ -959,41 +1348,47 @@ model.set (iter, 0, _("Slower"), 1, "slower"); model.append (out iter); model.set (iter, 0, _("VerySlow"), 1, "veryslow"); - - cmbX264Preset = new ComboBox.with_model(model); - textCell = new CellRendererText(); - cmbX264Preset.pack_start( textCell, false ); - cmbX264Preset.set_attributes( textCell, "text", 0 ); - cmbX264Preset.set_tooltip_markup(tt); - gridVideo.attach(cmbX264Preset,1,row,1,1); - + combo.model = model; + + cmb_x264_preset.notify["visible"].connect(()=>{ + lbl_x264_preset.visible = cmb_x264_preset.visible; + }); + tt = _("<b>Compression Vs Device Compatibility</b>\n'High' profile gives the best compression.\nChange this to 'Baseline' or 'Main' only if you are encoding\nfor a particular device (mobiles,PMPs,etc) which does not\nsupport the 'High' profile"); + // profile --------------------------------------- + //lblProfile - lblX264Profile = new Gtk.Label(_("Profile")); - lblX264Profile.xalign = (float) 0.0; - lblX264Profile.set_tooltip_markup(tt); - gridVideo.attach(lblX264Profile,0,++row,1,1); - - //cmbX264Profile - cmbX264Profile = new ComboBox(); + label = new Gtk.Label(_("Profile")); + label.xalign = (float) 1.0; + label.set_tooltip_markup(tt); + grid.attach(label,0,++row,1,1); + lbl_x264_profile = label; + + //cmb_x264_profile + combo = new ComboBox(); textCell = new CellRendererText(); - cmbX264Profile.pack_start( textCell, false ); - cmbX264Profile.set_attributes( textCell, "text", 0 ); - cmbX264Profile.set_tooltip_markup(tt); - gridVideo.attach(cmbX264Profile,1,row,1,1); - - //lblVpxSpeed - lblVpxSpeed = new Gtk.Label(_("Speed")); - lblVpxSpeed.xalign = (float) 0.0; - lblVpxSpeed.no_show_all = true; - gridVideo.attach(lblVpxSpeed,0,++row,1,1); - - Box hboxVpxSpeed = new Box (Orientation.HORIZONTAL, 0); - hboxVpxSpeed.homogeneous = false; - gridVideo.attach(hboxVpxSpeed,1,row,1,1); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + combo.set_tooltip_markup(tt); + grid.attach(combo,1,row,1,1); + cmb_x264_profile = combo; + + cmb_x264_profile.notify["visible"].connect(()=>{ + lbl_x264_profile.visible = cmb_x264_profile.visible; + }); - //cmbVpxSpeed + //lbl_vpx_speed + label = new Gtk.Label(_("Speed")); + label.xalign = (float) 1.0; + grid.attach(label,0,++row,1,1); + lbl_vpx_speed = label; + + var hbox = new Box (Orientation.HORIZONTAL, 0); + hbox.homogeneous = false; + grid.attach(hbox,1,row,2,1); + + //cmb_vpx_speed model = new Gtk.ListStore (2, typeof (string), typeof (string)); model.append (out iter); model.set (iter, 0, _("Best"), 1, "best"); @@ -1001,88 +1396,108 @@ model.set (iter, 0, _("Good"), 1, "good"); model.append (out iter); model.set (iter, 0, _("Realtime"), 1, "realtime"); - cmbVpxSpeed = new ComboBox.with_model(model); + + combo = new ComboBox.with_model(model); textCell = new CellRendererText(); - cmbVpxSpeed.pack_start( textCell, false ); - cmbVpxSpeed.set_attributes( textCell, "text", 0 ); - hboxVpxSpeed.add(cmbVpxSpeed); - - cmbVpxSpeed.changed.connect(cmbVpxSpeed_changed); - - Label lblSpacer = new Gtk.Label(" "); - hboxVpxSpeed.add(lblSpacer); - - //scaleVpxSpeed - scaleVpxSpeed = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0, 5, 1); - scaleVpxSpeed.adjustment.value = 1; - scaleVpxSpeed.has_origin = false; - scaleVpxSpeed.value_pos = PositionType.LEFT; - scaleVpxSpeed.hexpand = true; - hboxVpxSpeed.add(scaleVpxSpeed); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + hbox.add(combo); + cmb_vpx_speed = combo; + + cmb_vpx_speed.changed.connect(cmb_vpx_speed_changed); - tt = _("<b>Additional Options</b>\nThese options will be passed to the encoder\non the command line. Please do not specify\nany options that are already provided by the GUI."); + cmb_vpx_speed.notify["visible"].connect(()=>{ + lbl_vpx_speed.visible = cmb_vpx_speed.visible; + }); + + label = new Gtk.Label(" "); + hbox.add(label); - //lblVCodecOptions - lblVCodecOptions = new Gtk.Label(_("Extra Options")); - lblVCodecOptions.xalign = (float) 0.0; - lblVCodecOptions.margin_top = 6; - lblVCodecOptions.set_tooltip_markup(tt); - gridVideo.attach(lblVCodecOptions,0,++row,1,1); + //scale_vpx_speed + var scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0, 5, 1); + scale.adjustment.value = 1; + scale.has_origin = false; + scale.hexpand = true; + scale.value_pos = PositionType.LEFT; + hbox.add(scale); + scale_vpx_speed = scale; + + tt = _("<b>Additional Options</b>\nThese options will be passed to the encoder\non the command line. Please do not specify\nany options that are already provided by the GUI."); - //txtVCodecOptions - txtVCodecOptions = new Gtk.TextView(); + //lvl_voptions + label = new Gtk.Label(_("Extra Options")); + label.xalign = (float) 0.0; + label.margin_top = 6; + label.set_tooltip_markup(tt); + grid.attach(label,0,++row,3,1); + lvl_voptions = label; + + //txt_voptions + var textview = new Gtk.TextView(); TextBuffer buff = new TextBuffer(null); - txtVCodecOptions.buffer = buff; - txtVCodecOptions.editable = true; - txtVCodecOptions.buffer.text = ""; - txtVCodecOptions.expand = true; - //txtVCodecOptions.set_size_request(-1,100); - txtVCodecOptions.set_tooltip_markup(tt); - txtVCodecOptions.set_wrap_mode (Gtk.WrapMode.WORD); - - Gtk.ScrolledWindow scrollWin = new Gtk.ScrolledWindow (null, null); - scrollWin.set_shadow_type (ShadowType.ETCHED_IN); - scrollWin.add (txtVCodecOptions); - //scrollWin.set_size_request(-1,100); - gridVideo.attach(scrollWin,0,++row,2,1); - - //imgVideoCodec - imgVideoCodec = new Gtk.Image(); - imgVideoCodec.margin_top = 6; - imgVideoCodec.margin_bottom = 6; - gridVideo.attach(imgVideoCodec,0,++row,2,1); + textview.buffer = buff; + textview.editable = true; + textview.buffer.text = ""; + textview.expand = true; + textview.set_tooltip_markup(tt); + textview.set_wrap_mode (Gtk.WrapMode.WORD); + txt_voptions = textview; + + txt_voptions.notify["visible"].connect(()=>{ + lvl_voptions.visible = txt_voptions.visible; + }); + + var scroll = new Gtk.ScrolledWindow (null, null); + scroll.set_shadow_type (ShadowType.ETCHED_IN); + scroll.add (txt_voptions); + grid.attach(scroll,0,++row,3,1); + + txt_voptions.notify["visible"].connect(()=>{ + scroll.visible = txt_voptions.visible; + }); + + //img_video_format + img_video_format = new Gtk.Image(); + img_video_format.margin_top = 6; + img_video_format.margin_bottom = 6; + grid.attach(img_video_format,0,++row,3,1); + } private void init_ui_video_filters(){ - //lblVideoFilters - lblVideoFilters = new Label (_("Filters")); + + // add tab page ------------------------- + + var label = new Label (_("Filters")); - //gridVideoFilters - gridVideoFilters = new Grid(); - gridVideoFilters.set_column_spacing (6); - gridVideoFilters.set_row_spacing (6); - gridVideoFilters.margin = 12; - gridVideoFilters.visible = false; - tabMain.append_page (gridVideoFilters, lblVideoFilters); + // grid_vf + var grid = new Grid(); + grid.set_column_spacing (12); + grid.set_row_spacing (6); + grid.margin = 12; + notebook.append_page (grid, label); + grid_vf = grid; int row = -1; string tt = ""; Gtk.ListStore model; TreeIter iter; - //lblHeaderFrameSize - lblHeaderFrameSize = new Gtk.Label(_("<b>Resize:</b>")); - lblHeaderFrameSize.set_use_markup(true); - lblHeaderFrameSize.xalign = (float) 0.0; - lblHeaderFrameSize.margin_bottom = 6; - gridVideoFilters.attach(lblHeaderFrameSize,0,++row,1,1); - - //lblFrameSize - lblFrameSize = new Gtk.Label(_("Resolution")); - lblFrameSize.xalign = (float) 0.0; - gridVideoFilters.attach(lblFrameSize,0,++row,1,1); - - //cmbFrameSize + // resize header ------------------------------ + + label = new Gtk.Label(_("<b>Resize</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.margin_bottom = 6; + grid.attach(label,0,++row,3,1); + + // resolution -------------------------------------- + + label = new Gtk.Label(_("Resolution")); + label.xalign = (float) 1.0; + grid.attach(label,0,++row,1,1); + lbl_frame_size = label; + model = new Gtk.ListStore (2, typeof (string), typeof (string)); model.append (out iter); model.set (iter,0,_("No Change"),1,"disable"); @@ -1097,95 +1512,112 @@ model.append (out iter); model.set (iter,0,"1080p",1,"1080p"); - cmbFrameSize = new ComboBox.with_model(model); + var combo = new ComboBox.with_model(model); + grid.attach(combo,1,row,1,1); + cmb_frame_size = combo; + var textCell = new CellRendererText(); - cmbFrameSize.pack_start( textCell, false ); - cmbFrameSize.set_attributes( textCell, "text", 0 ); - cmbFrameSize.changed.connect(cmbFrameSize_changed); - cmbFrameSize.hexpand = true; - gridVideoFilters.attach(cmbFrameSize,1,row,1,1); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + combo.changed.connect(cmb_frame_size_changed); + tt = _("Set either Width or Height and leave the other as 0.\nIt will be calculated automatically.\n\nSetting both width and height is not recommended\nsince the video may get stretched or squeezed.\n\nEnable the 'Fit-To-Box' option to avoid changes to aspect ratio."); - //lblFrameSizeCustom - lblFrameSizeCustom = new Gtk.Label(_("Width x Height")); - lblFrameSizeCustom.xalign = (float) 0.0; - lblFrameSizeCustom.no_show_all = true; - lblFrameSizeCustom.set_tooltip_markup (tt); - gridVideoFilters.attach(lblFrameSizeCustom,0,++row,1,1); - - //hboxFrameSize - hboxFrameSize = new Box (Orientation.HORIZONTAL, 0); - hboxFrameSize.homogeneous = false; - gridVideoFilters.attach(hboxFrameSize,1,row,1,1); - - //spinWidth - Gtk.Adjustment adjWidth = new Gtk.Adjustment(0, 0, 999999, 1, 16, 0); - spinFrameWidth = new Gtk.SpinButton (adjWidth, 1, 0); - spinFrameWidth.xalign = (float) 0.5; - spinFrameWidth.no_show_all = true; - spinFrameWidth.width_chars = 5; - spinFrameWidth.set_tooltip_text (_("Width")); - hboxFrameSize.pack_start (spinFrameWidth, false, false, 0); - - //spinHeight - Gtk.Adjustment adjHeight = new Gtk.Adjustment(480, 0, 999999, 1, 16, 0); - spinFrameHeight = new Gtk.SpinButton (adjHeight, 1, 0); - spinFrameHeight.xalign = (float) 0.5; - spinFrameHeight.no_show_all = true; - spinFrameHeight.width_chars = 5; - spinFrameHeight.set_tooltip_text (_("Height")); - hboxFrameSize.pack_start (spinFrameHeight, false, false, 5); + // width -------------------------------------- + + label = new Gtk.Label(_("Width")); + label.xalign = (float) 1.0; + label.set_tooltip_markup (tt); + grid.attach(label,0,++row,1,1); + var lblWidth = label; + + var adj = new Gtk.Adjustment(0, 0, 999999, 1, 16, 0); + var spin = new Gtk.SpinButton (adj, 1, 0); + spin.xalign = (float) 0.5; + spin.set_tooltip_text (_("Width")); + grid.attach(spin,1,row,1,1); + spin_width = spin; + + spin_width.notify["sensitive"].connect(()=>{ lblWidth.sensitive = spin_width.sensitive; }); + + // height ------------------------------------- + + label = new Gtk.Label(_("Height")); + label.xalign = (float) 1.0; + label.set_tooltip_markup (tt); + grid.attach(label,0,++row,1,1); + var lblHeight = label; + + adj = new Gtk.Adjustment(480, 0, 999999, 1, 16, 0); + spin = new Gtk.SpinButton (adj, 1, 0); + spin.xalign = (float) 0.5; + spin.set_tooltip_text (_("Height")); + grid.attach(spin,1,row,1,1); + spin_height = spin; + spin_height.notify["sensitive"].connect(()=>{ lblHeight.sensitive = spin_height.sensitive; }); + tt = _("The resizing filter affects the sharpness and compressibility of the video.\nFor example, the 'Lanzos' filter gives sharper video but the extra detail\nmakes the video more difficult to compress resulting in slightly bigger files.\nThe 'Bilinear' filter gives smoother video (less detail) and smaller files."); - //lblResizingMethod - lblResizingMethod = new Gtk.Label(_("Resizing Method")); - lblResizingMethod.xalign = (float) 0.0; - lblResizingMethod.set_tooltip_markup(tt); - gridVideoFilters.attach(lblResizingMethod,0,++row,1,1); + // resize method ------------------------------ + + label = new Gtk.Label(_("Method")); + label.xalign = (float) 1.0; + label.margin_left = 12; + label.set_tooltip_markup(tt); + grid.attach(label,0,++row,1,1); + var lbl_resize_method = label; - //cmbResizingMethod - cmbResizingMethod = new ComboBox(); + combo = new ComboBox(); textCell = new CellRendererText(); - cmbResizingMethod.pack_start(textCell, false); - cmbResizingMethod.set_attributes(textCell, "text", 0); - cmbResizingMethod.changed.connect(cmbAudioMode_changed); - cmbResizingMethod.no_show_all = true; - cmbResizingMethod.set_tooltip_markup(tt); - gridVideoFilters.attach(cmbResizingMethod,1,row,1,1); + combo.pack_start(textCell, false); + combo.set_attributes(textCell, "text", 0); + combo.changed.connect(cmb_amode_changed); + combo.set_tooltip_markup(tt); + grid.attach(combo,1,row,1,1); + cmb_resize_method = combo; + cmb_resize_method.notify["sensitive"].connect(()=>{ lbl_resize_method.sensitive = cmb_resize_method.sensitive; }); + cmb_resize_method.notify["visible"].connect(()=>{ lbl_resize_method.visible = cmb_resize_method.visible; }); + tt = _("Fits the video in a box of given width and height."); - //chkFitToBox - chkFitToBox = new CheckButton.with_label(_("Do not stretch or squeeze the video (Fit-To-Box)")); - chkFitToBox.active = true; - chkFitToBox.set_tooltip_markup(tt); - gridVideoFilters.attach(chkFitToBox,0,++row,2,1); + // chk_box_fit --------------------------- + + chk_box_fit = new CheckButton.with_label(_("Do not stretch or squeeze the video (Fit-To-Box)")); + chk_box_fit.active = true; + chk_box_fit.margin_left = 12; + chk_box_fit.margin_top = 6; + chk_box_fit.set_tooltip_markup(tt); + grid.attach(chk_box_fit,0,++row,3,1); tt = _("Video will not be resized if it's smaller than the given width and height"); - //chkNoUpScale - chkNoUpScale = new CheckButton.with_label(_("No Up-Scaling")); - chkNoUpScale.active = true; - chkNoUpScale.set_tooltip_markup(tt); - gridVideoFilters.attach(chkNoUpScale,0,++row,2,1); - - //lblHeaderFrameRate - lblHeaderFrameRate = new Gtk.Label(_("<b>Resample:</b>")); - lblHeaderFrameRate.set_use_markup(true); - lblHeaderFrameRate.xalign = (float) 0.0; - lblHeaderFrameRate.margin_top = 6; - lblHeaderFrameRate.margin_bottom = 6; - gridVideoFilters.attach(lblHeaderFrameRate,0,++row,1,1); - - //lblFPS - lblFPS = new Gtk.Label(_("Frame Rate")); - lblFPS.xalign = (float) 0.0; - lblFPS.set_tooltip_text (_("Frames/sec")); - gridVideoFilters.attach(lblFPS,0,++row,1,1); + // cmb_no_upscale ---------------------------- + + cmb_no_upscale = new CheckButton.with_label(_("No Up-Scaling")); + cmb_no_upscale.active = true; + cmb_no_upscale.margin_left = 12; + cmb_no_upscale.set_tooltip_markup(tt); + grid.attach(cmb_no_upscale,0,++row,3,1); + + // header label ------------------------------- + + label = new Gtk.Label(_("<b>Resample</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.margin_top = 6; + label.margin_bottom = 6; + grid.attach(label,0,++row,3,1); + + // fps ---------------------------- + + label = new Gtk.Label(_("Frame Rate")); + label.xalign = (float) 1.0; + label.set_tooltip_text (_("Frames/sec")); + grid.attach(label,0,++row,1,1); - //cmbFPS model = new Gtk.ListStore (2, typeof (string), typeof (string)); model.append (out iter); model.set (iter,0,_("No Change"),1,"disable"); @@ -1200,102 +1632,148 @@ model.append (out iter); model.set (iter,0,"60",1,"60"); - cmbFPS = new ComboBox.with_model(model); + combo = new ComboBox.with_model(model); textCell = new CellRendererText(); - cmbFPS.pack_start( textCell, false ); - cmbFPS.set_attributes( textCell, "text", 0 ); - cmbFPS.changed.connect(cmbFPS_changed); - gridVideoFilters.attach(cmbFPS,1,row,1,1); - - //lblFPSCustom - lblFPSCustom = new Gtk.Label(_("FPS Ratio")); - lblFPSCustom.xalign = (float) 0.0; - lblFPSCustom.no_show_all = true; - tt = "<b>" + _("Examples:") + "</b>\n0 / 0 => " + _("No Change") + "\n25 / 1 => 25 fps\n30 / 1 => 30 fps\n30000 / 1001 => 29.97 fps"; - lblFPSCustom.set_tooltip_markup (tt); - gridVideoFilters.attach(lblFPSCustom,0,++row,1,1); - - //hboxFrameRate - hboxFPS = new Box (Orientation.HORIZONTAL, 0); - hboxFPS.homogeneous = false; - gridVideoFilters.attach(hboxFPS,1,row,1,1); - - //spinFPSNum - Gtk.Adjustment adjFPSNum = new Gtk.Adjustment(0, 0, 999999, 1, 1, 0); - spinFPSNum = new Gtk.SpinButton (adjFPSNum, 1, 0); - spinFPSNum.xalign = (float) 0.5; - spinFPSNum.no_show_all = true; - spinFPSNum.width_chars = 5; - spinFPSNum.set_tooltip_text (_("Numerator")); - hboxFPS.pack_start(spinFPSNum, false, false, 0); - - //spinFPSDenom - Gtk.Adjustment adjFPSDenom = new Gtk.Adjustment(0, 0, 999999, 1, 1, 0); - spinFPSDenom = new Gtk.SpinButton (adjFPSDenom, 1, 0); - spinFPSDenom.xalign = (float) 0.5; - spinFPSDenom.no_show_all = true; - spinFPSDenom.width_chars = 5; - spinFPSDenom.set_tooltip_text (_("Denominator")); - hboxFPS.pack_start(spinFPSDenom, false, false, 5); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + combo.changed.connect(cmbFPS_changed); + grid.attach(combo,1,row,1,1); + cmb_fps = combo; + + // fps num ---------------------------- + + label = new Gtk.Label(_("Fps: Frames")); + label.xalign = (float) 1.0; + label.set_tooltip_markup (tt); + grid.attach(label,0,++row,1,1); + var lblFpsNum = label; + + adj = new Gtk.Adjustment(0, 0, 999999, 1, 1, 0); + spin = new Gtk.SpinButton (adj, 1, 0); + spin.xalign = (float) 0.5; + spin.set_tooltip_text (_("Numerator")); + grid.attach(spin,1,row,1,1); + spin_fps_num = spin; + + spin_fps_num.notify["sensitive"].connect(()=>{ lblFpsNum.sensitive = spin_fps_num.sensitive; }); + + //fps denom --------------------------------- + + label = new Gtk.Label(_("Fps: Seconds")); + label.xalign = (float) 1.0; + label.set_tooltip_markup (tt); + grid.attach(label,0,++row,1,1); + var lblFpsDenom = label; + + adj = new Gtk.Adjustment(0, 0, 999999, 1, 1, 0); + spin = new Gtk.SpinButton (adj, 1, 0); + spin.xalign = (float) 0.5; + spin.set_tooltip_text (_("Denominator")); + grid.attach(spin,1,row,1,1); + spin_fps_denom = spin; + + spin_fps_denom.notify["sensitive"].connect(()=>{ lblFpsDenom.sensitive = spin_fps_denom.sensitive; }); } private void init_ui_subtitles(){ - int row = 0; - //Gtk.ListStore model; - Gtk.CellRendererText textCell; - //Gtk.TreeIter iter; - string tt; - - //lblSubtitle - lblSubtitle = new Label ("" + _("Subs") + ""); - - //gridSubtitle - gridSubtitle = new Grid(); - gridSubtitle.set_column_spacing (6); - gridSubtitle.set_row_spacing (6); - gridSubtitle.margin = 12; - gridSubtitle.visible = false; - tabMain.append_page (gridSubtitle, lblSubtitle); + + // add tab --------------------------------------------- + + var label = new Label ("" + _("Subs") + ""); - row = -1; + // grid_subs + var grid = new Grid(); + grid.set_column_spacing (6); + grid.set_row_spacing (6); + grid.margin = 12; + notebook.append_page (grid, label); + grid_subs = grid; - tt = _("<b>Embed</b> - Subtitle files will be combined with the output file.\nThese subtitles can be switched off since they are added as a separate track"); + int row = -1; + + // header ---------------------------------------------- + + label = new Gtk.Label(_("<b>Subtitles</b>")); + label.set_use_markup(true); + label.xalign = (float) 0.0; + label.margin_bottom = 6; + grid.attach(label,0,++row,1,1); + + var tt = _("<b>Embed</b> - Subtitle files will be combined with the output file.\nThese subtitles can be switched off since they are added as a separate track"); tt += "\n\n"; tt += _("<b>Render</b> - Subtitles are rendered/burned on the video.\nThese subtitles cannot be switched off since they become a part of the video"); - //lblSubtitleMode - lblSubtitleMode = new Gtk.Label(_("Subtitle Mode")); - lblSubtitleMode.xalign = (float) 0.0; - lblSubtitleMode.set_tooltip_markup (tt); - gridSubtitle.attach(lblSubtitleMode,0,++row,1,1); - - //cmbSubtitleMode - cmbSubtitleMode = new ComboBox(); - textCell = new CellRendererText(); - cmbSubtitleMode.pack_start( textCell, false ); - cmbSubtitleMode.set_attributes( textCell, "text", 0 ); - cmbSubtitleMode.changed.connect(cmbSubtitleMode_changed); - cmbSubtitleMode.hexpand = true; - cmbSubtitleMode.set_tooltip_markup (tt); - gridSubtitle.attach(cmbSubtitleMode,1,row,1,1); - - //lblSubFormatMessage - lblSubFormatMessage = new Gtk.Label(_("Subtitles")); - lblSubFormatMessage.xalign = (float) 0.0; - lblSubFormatMessage.hexpand = true; - lblSubFormatMessage.margin_top = 6; - lblSubFormatMessage.margin_bottom = 6; - lblSubFormatMessage.set_use_markup(true); - gridSubtitle.attach(lblSubFormatMessage,0,++row,2,1); + // sub mode ----------------------------------------------- + + var hbox = new Box(Orientation.HORIZONTAL,6); + grid.attach(hbox,0,++row,2,1); + + //lbl_sub_mode + label = new Gtk.Label(_("Mode")); + label.xalign = (float) 1.0; + label.margin_left = 12; + label.set_tooltip_markup (tt); + hbox.add(label); + lbl_sub_mode = label; + + //cmb_sub_mode + var combo = new ComboBox(); + var textCell = new CellRendererText(); + combo.pack_start( textCell, false ); + combo.set_attributes( textCell, "text", 0 ); + combo.changed.connect(cmb_sub_mode_changed); + combo.set_tooltip_markup (tt); + hbox.add(combo); + cmb_sub_mode = combo; + + //lbl_scodec_msg + label = new Gtk.Label(_("Subtitles")); + label.xalign = (float) 0.0; + label.margin_top = 6; + label.margin_bottom = 6; + label.wrap = true; + label.wrap_mode = Pango.WrapMode.WORD; + label.use_markup = true; + grid.attach(label,0,++row,3,1); + lbl_scodec_msg = label; } private bool on_delete_event(Gdk.EventAny event){ this.delete_event.disconnect(on_delete_event); //disconnect this handler - btnSave_clicked(); + btn_save_clicked(); return false; } + private bool init_delayed() { + /* any actions that need to run after window has been displayed */ + if (tmr_init > 0) { + Source.remove(tmr_init); + tmr_init = 0; + } + + //Defaults -------------------------------- + + cmb_format.set_active(0); + //cmb_amode.set_active(0); + //cmb_vmode.set_active(0); + //cmb_sub_mode.set_active(0); + cmb_opus_optimize.set_active(0); + cmb_x264_preset.set_active(3); + //cmb_x264_profile.set_active(2); + cmb_vpx_speed.set_active (1); + cmb_fps.set_active (0); + cmb_frame_size.set_active (0); + cmb_fade_type.set_active (0); + //cmb_resize_method.set_active (2); + //cmbFileExtension.set_active (0); + if (!IsNew){ + load_script(); + } + + return false; + } + private void cmbFileFormat_changed(){ Gtk.ListStore model; TreeIter iter; @@ -1303,7 +1781,7 @@ //populate file extensions --------------------------- model = new Gtk.ListStore(2, typeof(string), typeof(string)); - cmbFileExtension.set_model(model); + cmb_ext.set_model(model); switch (format) { case "mp4v": @@ -1311,72 +1789,82 @@ model.set(iter, 0, "MP4", 1, ".mp4"); model.append(out iter); model.set(iter, 0, "M4V", 1, ".m4v"); - cmbFileExtension.set_active(0); + cmb_ext.set_active(0); break; case "mp4a": model.append(out iter); model.set(iter, 0, "MP4", 1, ".mp4"); model.append(out iter); model.set(iter, 0, "M4A", 1, ".m4a"); - cmbFileExtension.set_active(0); + cmb_ext.set_active(0); break; case "ogv": model.append(out iter); model.set(iter, 0, "OGV", 1, ".ogv"); model.append(out iter); model.set(iter, 0, "OGG", 1, ".ogg"); - cmbFileExtension.set_active(0); + cmb_ext.set_active(0); break; case "ogg": model.append(out iter); model.set(iter, 0, "OGG", 1, ".ogg"); model.append(out iter); model.set(iter, 0, "OGA", 1, ".oga"); - cmbFileExtension.set_active(0); + cmb_ext.set_active(0); break; default: model.append(out iter); model.set(iter, 0, format.up(), 1, "." + format); - cmbFileExtension.set_active(0); + cmb_ext.set_active(0); break; } //populate video codecs --------------------------- model = new Gtk.ListStore (2, typeof (string), typeof (string)); - cmbVCodec.set_model(model); - + cmb_vcodec.set_model(model); + switch (format) { case "mkv": model.append (out iter); + model.set (iter,0,_("Copy Video"),1,"copy"); + model.append (out iter); model.set (iter,0,"H.264 / MPEG-4 AVC (x264)",1,"x264"); - //model.append (out iter); - //model.set (iter,0,"H.265 / MPEG-H HEVC (x265)",1,"x265"); //not yet supported - cmbVCodec.set_active(0); + model.append (out iter); + model.set (iter,0,"H.265 / MPEG-H HEVC (x265)",1,"x265"); //not yet supported + cmb_vcodec.set_active(1); break; case "mp4v": model.append (out iter); + model.set (iter,0,_("Copy Video"),1,"copy"); + model.append (out iter); model.set (iter,0,"H.264 / MPEG-4 AVC (x264)",1,"x264"); model.append (out iter); model.set (iter,0,"H.265 / MPEG-H HEVC (x265)",1,"x265"); - cmbVCodec.set_active(0); + cmb_vcodec.set_active(1); break; case "ogv": model.append (out iter); + model.set (iter,0,_("Copy Video"),1,"copy"); + model.append (out iter); model.set (iter,0,"Theora",1,"theora"); - cmbVCodec.set_active(0); + cmb_vcodec.set_active(1); break; case "webm": model.append (out iter); + model.set (iter,0,_("Copy Video"),1,"copy"); + model.append (out iter); model.set (iter,0,"VP8",1,"vp8"); model.append (out iter); model.set (iter,0,"VP9",1,"vp9"); - cmbVCodec.set_active(0); + cmb_vcodec.set_active(1); break; default: model.append (out iter); model.set (iter,0,_("Disable Video"),1,"disable"); - cmbVCodec.set_active(0); + model.append (out iter); + model.set (iter,0,_("Copy Video"),1,"copy"); + cmb_vcodec.set_active(0); break; } @@ -1385,25 +1873,27 @@ case "mp4v": case "ogv": case "webm": - gridVideo.sensitive = true; - gridVideoFilters.sensitive = true; + grid_video.sensitive = true; + grid_vf.sensitive = true; break; default: - gridVideo.sensitive = false; - gridVideoFilters.sensitive = false; + grid_video.sensitive = false; + grid_vf.sensitive = false; break; } //populate audio codecs --------------------------- model = new Gtk.ListStore (2, typeof (string), typeof (string)); - cmbACodec.set_model(model); + cmb_acodec.set_model(model); switch (format) { case "mkv": model.append (out iter); model.set (iter,0,_("Disable Audio"),1,"disable"); model.append (out iter); + model.set (iter,0,_("Copy Audio"),1,"copy"); + model.append (out iter); model.set (iter,0,"MP3 / LAME",1,"mp3lame"); model.append (out iter); model.set (iter,0,"AAC / Libav",1,"aac"); @@ -1411,19 +1901,21 @@ model.set (iter,0,"AAC / Nero",1,"neroaac"); model.append (out iter); model.set (iter,0,"AAC / Fraunhofer FDK",1,"libfdk_aac"); - cmbACodec.set_active(1); + cmb_acodec.set_active(3); break; case "mp4v": model.append (out iter); model.set (iter,0,_("Disable Audio"),1,"disable"); model.append (out iter); + model.set (iter,0,_("Copy Audio"),1,"copy"); + model.append (out iter); model.set (iter,0,"AAC / Libav",1,"aac"); model.append (out iter); model.set (iter,0,"AAC / Nero",1,"neroaac"); model.append (out iter); model.set (iter,0,"AAC / Fraunhofer FDK",1,"libfdk_aac"); - cmbACodec.set_active(1); + cmb_acodec.set_active(2); break; case "ogv": @@ -1431,20 +1923,22 @@ model.append (out iter); model.set (iter,0,_("Disable Audio"),1,"disable"); model.append (out iter); + model.set (iter,0,_("Copy Audio"),1,"copy"); + model.append (out iter); model.set (iter,0,"Vorbis",1,"vorbis"); - cmbACodec.set_active(1); + cmb_acodec.set_active(2); break; case "ogg": model.append (out iter); model.set (iter,0,"Vorbis",1,"vorbis"); - cmbACodec.set_active(0); + cmb_acodec.set_active(0); break; case "mp3": model.append (out iter); model.set (iter,0,"MP3 / LAME",1,"mp3lame"); - cmbACodec.set_active(0); + cmb_acodec.set_active(0); break; case "mp4a": @@ -1454,25 +1948,25 @@ model.set (iter,0,"AAC / Nero",1,"neroaac"); model.append (out iter); model.set (iter,0,"AAC / Fraunhofer FDK",1,"libfdk_aac"); - cmbACodec.set_active(0); + cmb_acodec.set_active(0); break; case "opus": model.append (out iter); model.set (iter,0,"Opus",1,"opus"); - cmbACodec.set_active(0); + cmb_acodec.set_active(0); break; case "ac3": model.append (out iter); model.set (iter,0,"AC3 / Libav",1,"ac3"); - cmbACodec.set_active(0); + cmb_acodec.set_active(0); break; case "flac": model.append (out iter); model.set (iter,0,"FLAC / Libav",1,"flac"); - cmbACodec.set_active(0); + cmb_acodec.set_active(0); break; case "wav": @@ -1504,31 +1998,31 @@ model.set (iter,0,"PCM 32-bit Unsigned LE / Libav",1,"pcm_u32le"); //model.append (out iter); //model.set (iter,0,"PCM 32-bit Unsigned BE / Libav",1,"pcm_u32be"); - cmbACodec.set_active(1); + cmb_acodec.set_active(1); break; } //populate subtitle options model = new Gtk.ListStore (2, typeof (string), typeof (string)); - cmbSubtitleMode.set_model(model); + cmb_sub_mode.set_model(model); switch (format){ case "mkv": case "mp4v": case "ogg": case "ogv": - gridSubtitle.sensitive = true; + grid_subs.sensitive = true; model.append (out iter); model.set (iter,0,_("No Subtitles"),1,"disable"); model.append (out iter); model.set (iter,0,_("Embed / Soft Subs"),1,"embed"); - cmbSubtitleMode.set_active(1); + cmb_sub_mode.set_active(1); break; default: - gridSubtitle.sensitive = false; + grid_subs.sensitive = false; break; } @@ -1536,68 +2030,86 @@ switch (format){ case "mkv": - imgFileFormat.set_from_file(App.SharedImagesFolder + "/matroska.png"); - imgFileFormat.xalign = (float) 0.5; - imgFileFormat.yalign = (float) 1.0; + img_file_format.set_from_file(App.SharedImagesFolder + "/matroska.png"); + img_file_format.xalign = (float) 0.5; + img_file_format.yalign = (float) 1.0; break; case "opus": - imgFileFormat.set_from_file(App.SharedImagesFolder + "/opus.png"); - imgFileFormat.xalign = (float) 0.5; - imgFileFormat.yalign = (float) 1.0; + img_file_format.set_from_file(App.SharedImagesFolder + "/opus.png"); + img_file_format.xalign = (float) 0.5; + img_file_format.yalign = (float) 1.0; break; case "webm": - imgFileFormat.set_from_file(App.SharedImagesFolder + "/webm.png"); - imgFileFormat.xalign = (float) 0.5; - imgFileFormat.yalign = (float) 1.0; + img_file_format.set_from_file(App.SharedImagesFolder + "/webm.png"); + img_file_format.xalign = (float) 0.5; + img_file_format.yalign = (float) 1.0; break; case "ogg": - imgFileFormat.set_from_file(App.SharedImagesFolder + "/vorbis.png"); - imgFileFormat.xalign = (float) 0.5; - imgFileFormat.yalign = (float) 1.0; + img_file_format.set_from_file(App.SharedImagesFolder + "/vorbis.png"); + img_file_format.xalign = (float) 0.5; + img_file_format.yalign = (float) 1.0; break; case "ogv": - imgFileFormat.set_from_file(App.SharedImagesFolder + "/theora.png"); - imgFileFormat.xalign = (float) 0.5; - imgFileFormat.yalign = (float) 1.0; + img_file_format.set_from_file(App.SharedImagesFolder + "/theora.png"); + img_file_format.xalign = (float) 0.5; + img_file_format.yalign = (float) 1.0; break; case "ac3": case "flac": case "wav": - imgFileFormat.set_from_file(App.SharedImagesFolder + "/libav.png"); - imgFileFormat.xalign = (float) 0.5; - imgFileFormat.yalign = (float) 1.0; + img_file_format.set_from_file(App.SharedImagesFolder + "/libav.png"); + img_file_format.xalign = (float) 0.5; + img_file_format.yalign = (float) 1.0; break; /*case "mp3": - imgFileFormat.set_from_file(App.SharedImagesFolder + "/lame.png"); - imgFileFormat.xalign = (float) 0.5; - imgFileFormat.yalign = (float) 1.0; + img_file_format.set_from_file(App.SharedImagesFolder + "/lame.png"); + img_file_format.xalign = (float) 0.5; + img_file_format.yalign = (float) 1.0; break;*/ default: - imgFileFormat.clear(); + img_file_format.clear(); break; } } - private void cmbACodec_changed(){ + private void cmb_acodec_changed(){ Gtk.ListStore model; TreeIter iter; - lblAudioBitrate.visible = false; - spinAudioBitrate.visible = false; - lblAudioQuality.visible = false; - spinAudioQuality.visible = false; - lblOpusOptimize.visible = false; - cmbOpusOptimize.visible = false; - lblAacProfile.visible = false; - cmbAacProfile.visible = false; + lbl_amode.visible = false; + cmb_amode.visible = false; + lbl_abitrate.visible = false; + spin_abitrate.visible = false; + lbl_aquality.visible = false; + spin_aquality.visible = false; + lbl_opus_optimize.visible = false; + cmb_opus_optimize.visible = false; + lbl_aac_profile.visible = false; + cmb_aac_profile.visible = false; + + //show message + switch (acodec){ + case "copy": + lbl_acodec_msg.visible = true; + lbl_acodec_msg.label = _("\n<b>Note:</b>\n\n1. Audio track will be copied directly to the output file without changes.\n\n2. Format of the audio track must be compatible with the selected file format. For example, if the input file contains AAC audio and the selected file format is WEBM, then encoding will fail - since WEBM does not support AAC audio.\n\n3. Input file can be trimmed only in basic mode (single segment). Selecting multiple segments using advanced mode will not work."); + break; + default: + lbl_acodec_msg.visible = false; + break; + } //show & hide options switch (acodec){ case "opus": - lblAudioBitrate.visible = true; - spinAudioBitrate.visible = true; - lblOpusOptimize.visible = true; - cmbOpusOptimize.visible = true; + //All modes require bitrate as input + lbl_amode.visible = true; + cmb_amode.visible = true; + lbl_abitrate.visible = true; + spin_abitrate.visible = true; + //lbl_aquality.visible = true; + //spin_aquality.visible = true; + lbl_opus_optimize.visible = true; + cmb_opus_optimize.visible = true; break; case "pcm_s8": case "pcm_u8": @@ -1617,41 +2129,50 @@ //show nothing break; case "ac3": - lblAudioBitrate.visible = true; - spinAudioBitrate.visible = true; + lbl_amode.visible = true; + cmb_amode.visible = true; + lbl_abitrate.visible = true; + spin_abitrate.visible = true; break; case "aac": case "neroaac": case "libfdk_aac": - lblAudioBitrate.visible = true; - spinAudioBitrate.visible = true; - lblAudioQuality.visible = true; - spinAudioQuality.visible = true; - lblAacProfile.visible = true; - cmbAacProfile.visible = true; + lbl_amode.visible = true; + cmb_amode.visible = true; + lbl_abitrate.visible = true; + spin_abitrate.visible = true; + lbl_aquality.visible = true; + spin_aquality.visible = true; + lbl_aac_profile.visible = true; + cmb_aac_profile.visible = true; break; case "mp3lame": case "vorbis": - lblAudioBitrate.visible = true; - spinAudioBitrate.visible = true; - lblAudioQuality.visible = true; - spinAudioQuality.visible = true; + lbl_amode.visible = true; + cmb_amode.visible = true; + lbl_abitrate.visible = true; + spin_abitrate.visible = true; + lbl_aquality.visible = true; + spin_aquality.visible = true; break; } //disable options when audio is disabled switch (acodec){ case "disable": - gridAudioFilters.sensitive = false; + case "copy": + grid_af.sensitive = false; + vboxSoxOuter.sensitive = false; break; default: - gridAudioFilters.sensitive = true; + grid_af.sensitive = true; + vboxSoxOuter.sensitive = true; break; } //populate encoding modes model = new Gtk.ListStore (2, typeof (string), typeof (string)); - cmbAudioMode.set_model(model); + cmb_amode.set_model(model); switch (acodec){ case "mp3lame": @@ -1663,20 +2184,20 @@ model.set (iter,0,_("Constant Bitrate"),1,"cbr"); model.append (out iter); model.set (iter,0,_("Constant Bitrate (Strict)"),1,"cbr-strict"); - cmbAudioMode.set_active(0); + cmb_amode.set_active(0); - spinAudioBitrate.adjustment.configure(128, 32, 320, 1, 1, 0); - spinAudioBitrate.set_tooltip_text (""); - spinAudioBitrate.digits = 0; - - spinAudioQuality.adjustment.configure(4, 0, 9, 1, 1, 0); - spinAudioQuality.set_tooltip_text (""); - spinAudioQuality.digits = 0; - - cmbAudioMode.sensitive = true; - spinAudioBitrate.sensitive = true; - spinAudioQuality.sensitive = true; - cmbAudioMode_changed(); + spin_abitrate.adjustment.configure(128, 32, 320, 1, 1, 0); + spin_abitrate.set_tooltip_text (""); + spin_abitrate.digits = 0; + + spin_aquality.adjustment.configure(4, 0, 9, 1, 1, 0); + spin_aquality.set_tooltip_text (""); + spin_aquality.digits = 0; + + cmb_amode.sensitive = true; + spin_abitrate.sensitive = true; + spin_aquality.sensitive = true; + cmb_amode_changed(); break; case "aac": @@ -1684,17 +2205,17 @@ model.set (iter,0,_("Variable Bitrate"),1,"vbr"); model.append (out iter); model.set (iter,0,_("Average Bitrate"),1,"abr"); - cmbAudioMode.set_active(0); + cmb_amode.set_active(0); - spinAudioBitrate.adjustment.configure(96, 8, 400, 1, 1, 0); - spinAudioBitrate.set_tooltip_text (""); - spinAudioBitrate.digits = 0; + spin_abitrate.adjustment.configure(96, 8, 400, 1, 1, 0); + spin_abitrate.set_tooltip_text (""); + spin_abitrate.digits = 0; - spinAudioQuality.adjustment.configure(1.0, 0.0, 2.0, 0.1, 0.1, 0); - spinAudioQuality.digits = 1; + spin_aquality.adjustment.configure(1.0, 0.0, 2.0, 0.1, 0.1, 0); + spin_aquality.digits = 1; - cmbAudioMode.sensitive = true; - cmbAudioMode_changed(); + cmb_amode.sensitive = true; + cmb_amode_changed(); break; case "libfdk_aac": @@ -1702,15 +2223,15 @@ model.set (iter,0,_("Variable Bitrate"),1,"vbr"); model.append (out iter); model.set (iter,0,_("Average Bitrate"),1,"abr"); - cmbAudioMode.set_active(0); + cmb_amode.set_active(0); - spinAudioBitrate.adjustment.configure(96, 8, 400, 1, 1, 0); - spinAudioBitrate.set_tooltip_text (""); - spinAudioBitrate.digits = 0; - - spinAudioQuality.adjustment.configure(3, 1, 5, 1, 1, 0); - spinAudioQuality.digits = 1; - spinAudioQuality.set_tooltip_text ( + spin_abitrate.adjustment.configure(96, 8, 400, 1, 1, 0); + spin_abitrate.set_tooltip_text (""); + spin_abitrate.digits = 0; + + spin_aquality.adjustment.configure(3, 1, 5, 1, 1, 0); + spin_aquality.digits = 1; + spin_aquality.set_tooltip_text ( """ 1 = ~20-32 kbps/channel 2 = ~32-40 kbps/channel @@ -1719,8 +2240,8 @@ 5 = ~96-112 kbps/channel """); - cmbAudioMode.sensitive = true; - cmbAudioMode_changed(); + cmb_amode.sensitive = true; + cmb_amode_changed(); break; case "neroaac": @@ -1730,14 +2251,14 @@ model.set (iter,0,_("Average Bitrate"),1,"abr"); model.append (out iter); model.set (iter,0,_("Constant Bitrate"),1,"cbr"); - cmbAudioMode.set_active(0); + cmb_amode.set_active(0); - spinAudioBitrate.adjustment.configure(96, 8, 400, 1, 1, 0); - spinAudioBitrate.set_tooltip_text (""); - spinAudioBitrate.digits = 0; + spin_abitrate.adjustment.configure(96, 8, 400, 1, 1, 0); + spin_abitrate.set_tooltip_text (""); + spin_abitrate.digits = 0; - spinAudioQuality.adjustment.configure(0.5, 0.0, 1.0, 0.1, 0.1, 0); - spinAudioQuality.set_tooltip_text ( + spin_aquality.adjustment.configure(0.5, 0.0, 1.0, 0.1, 0.1, 0); + spin_aquality.set_tooltip_text ( """0.05 = ~ 16 kbps 0.15 = ~ 33 kbps 0.25 = ~ 66 kbps @@ -1748,10 +2269,10 @@ 0.75 = ~285 kbps 0.85 = ~332 kbps 0.95 = ~381 kbps"""); - spinAudioQuality.digits = 1; + spin_aquality.digits = 1; - cmbAudioMode.sensitive = true; - cmbAudioMode_changed(); + cmb_amode.sensitive = true; + cmb_amode_changed(); break; case "opus": @@ -1761,14 +2282,14 @@ model.set (iter,0,_("Average Bitrate"),1,"abr"); model.append (out iter); model.set (iter,0,_("Constant Bitrate"),1,"cbr"); - cmbAudioMode.set_active(0); + cmb_amode.set_active(0); - spinAudioBitrate.adjustment.configure(128, 6, 512, 1, 1, 0); - spinAudioBitrate.set_tooltip_text (""); - spinAudioBitrate.digits = 0; + spin_abitrate.adjustment.configure(128, 6, 512, 1, 1, 0); + spin_abitrate.set_tooltip_text (""); + spin_abitrate.digits = 0; - cmbAudioMode.sensitive = true; - cmbAudioMode_changed(); + cmb_amode.sensitive = true; + cmb_amode_changed(); break; case "vorbis": @@ -1776,31 +2297,31 @@ model.set (iter,0,_("Variable Bitrate"),1,"vbr"); model.append (out iter); model.set (iter,0,_("Average Bitrate"),1,"abr"); - cmbAudioMode.set_active(0); + cmb_amode.set_active(0); - spinAudioBitrate.adjustment.configure(128, 32, 500, 1, 1, 0); - spinAudioBitrate.set_tooltip_text (""); - spinAudioBitrate.digits = 0; - - spinAudioQuality.adjustment.configure(3, -2, 10, 1, 1, 0); - spinAudioQuality.set_tooltip_text (""); - spinAudioQuality.digits = 1; + spin_abitrate.adjustment.configure(128, 32, 500, 1, 1, 0); + spin_abitrate.set_tooltip_text (""); + spin_abitrate.digits = 0; + + spin_aquality.adjustment.configure(3, -2, 10, 1, 1, 0); + spin_aquality.set_tooltip_text (""); + spin_aquality.digits = 1; - cmbAudioMode.sensitive = true; - cmbAudioMode_changed(); + cmb_amode.sensitive = true; + cmb_amode_changed(); break; case "ac3": model.append (out iter); model.set (iter,0,_("Fixed Bitrate"),1,"cbr"); - cmbAudioMode.set_active(0); + cmb_amode.set_active(0); - spinAudioBitrate.adjustment.configure(128, 1, 512, 1, 1, 0); - spinAudioBitrate.set_tooltip_text (""); - spinAudioBitrate.digits = 0; + spin_abitrate.adjustment.configure(128, 1, 512, 1, 1, 0); + spin_abitrate.set_tooltip_text (""); + spin_abitrate.digits = 0; - cmbAudioMode.sensitive = true; - cmbAudioMode_changed(); + cmb_amode.sensitive = true; + cmb_amode_changed(); break; case "pcm_s8": @@ -1820,24 +2341,24 @@ case "flac": model.append (out iter); model.set (iter,0,_("Lossless"),1,"lossless"); - cmbAudioMode.set_active(0); + cmb_amode.set_active(0); - cmbAudioMode.sensitive = true; + cmb_amode.sensitive = true; break; default: //disable - cmbAudioMode.sensitive = false; - spinAudioBitrate.sensitive = false; - spinAudioQuality.sensitive = false; + cmb_amode.visible = false; + spin_abitrate.visible = false; + spin_aquality.visible = false; break; } //populate special settings - cmbAacProfile_refresh(); + cmb_aac_profile_refresh(); //populate sampling rates model = new Gtk.ListStore (2, typeof (string), typeof (string)); - cmbAudioSampleRate.set_model(model); + cmb_sampling.set_model(model); switch (acodec){ case "mp3lame": case "opus": @@ -1861,7 +2382,7 @@ model.set (iter,0,"44100",1,"44100"); model.append (out iter); model.set (iter,0,"48000",1,"48000"); - cmbAudioSampleRate.set_active(0); + cmb_sampling.set_active(0); break; case "pcm_s8": @@ -1907,7 +2428,7 @@ model.set (iter,0,"88200",1,"88200"); model.append (out iter); model.set (iter,0,"96000",1,"96000"); - cmbAudioSampleRate.set_active(0); + cmb_sampling.set_active(0); break; case "ac3": @@ -1921,19 +2442,19 @@ model.set (iter,0,"44100",1,"44100"); model.append (out iter); model.set (iter,0,"48000",1,"48000"); - cmbAudioSampleRate.set_active(0); + cmb_sampling.set_active(0); break; default: model.append (out iter); model.set (iter,0,_("No Change"),1,"disable"); - cmbAudioSampleRate.set_active(0); + cmb_sampling.set_active(0); break; } //populate channels model = new Gtk.ListStore (2, typeof (string), typeof (string)); - cmbAudioChannels.set_model(model); + cmb_channels.set_model(model); switch (acodec){ case "ac3": case "flac": @@ -1972,7 +2493,7 @@ model.set (iter,0,"6",1,"6"); model.append (out iter); model.set (iter,0,"7",1,"7"); - cmbAudioChannels.set_active(0); + cmb_channels.set_active(0); break; default: //mp3lame @@ -1982,26 +2503,26 @@ model.set (iter,0,"1",1,"1"); model.append (out iter); model.set (iter,0,"2",1,"2"); - cmbAudioChannels.set_active(0); + cmb_channels.set_active(0); break; } //set logo switch (acodec){ case "opus": - imgAudioCodec.set_from_file(App.SharedImagesFolder + "/opus.png"); - imgAudioCodec.xalign = (float) 0.5; - imgAudioCodec.yalign = (float) 1.0; + img_audio_format.set_from_file(App.SharedImagesFolder + "/opus.png"); + img_audio_format.xalign = (float) 0.5; + img_audio_format.yalign = (float) 1.0; break; case "mp3lame": - imgAudioCodec.set_from_file(App.SharedImagesFolder + "/lame.png"); - imgAudioCodec.xalign = (float) 0.5; - imgAudioCodec.yalign = (float) 1.0; + img_audio_format.set_from_file(App.SharedImagesFolder + "/lame.png"); + img_audio_format.xalign = (float) 0.5; + img_audio_format.yalign = (float) 1.0; break; case "vorbis": - imgAudioCodec.set_from_file(App.SharedImagesFolder + "/vorbis.png"); - imgAudioCodec.xalign = (float) 0.5; - imgAudioCodec.yalign = (float) 1.0; + img_audio_format.set_from_file(App.SharedImagesFolder + "/vorbis.png"); + img_audio_format.xalign = (float) 0.5; + img_audio_format.yalign = (float) 1.0; break; case "ac3": case "flac": @@ -2019,60 +2540,78 @@ case "pcm_s32be": case "pcm_u32le": case "pcm_u32be": - imgAudioCodec.set_from_file(App.SharedImagesFolder + "/libav.png"); - imgAudioCodec.xalign = (float) 0.5; - imgAudioCodec.yalign = (float) 1.0; + img_audio_format.set_from_file(App.SharedImagesFolder + "/libav.png"); + img_audio_format.xalign = (float) 0.5; + img_audio_format.yalign = (float) 1.0; break; /*case "neroaac": - imgAudioCodec.set_from_file(App.SharedImagesFolder + "/aac.png"); - imgAudioCodec.xalign = (float) 1.0; - imgAudioCodec.yalign = (float) 1.0; + img_audio_format.set_from_file(App.SharedImagesFolder + "/aac.png"); + img_audio_format.xalign = (float) 1.0; + img_audio_format.yalign = (float) 1.0; break;*/ default: - imgAudioCodec.clear(); + img_audio_format.clear(); break; } } - private void cmbAudioMode_changed(){ + private void cmb_amode_changed(){ switch (audio_mode) { case "vbr": if (acodec == "opus") { - spinAudioBitrate.sensitive = true; - spinAudioQuality.sensitive = false; + spin_abitrate.sensitive = true; + spin_aquality.sensitive = false; } else { - spinAudioBitrate.sensitive = false; - spinAudioQuality.sensitive = true; + spin_abitrate.sensitive = false; + spin_aquality.sensitive = true; } break; case "abr": case "cbr": case "cbr-strict": - spinAudioBitrate.sensitive = true; - spinAudioQuality.sensitive = false; + spin_abitrate.sensitive = true; + spin_aquality.sensitive = false; break; } } - private void cmbVCodec_changed(){ + private void cmb_vcodec_changed(){ Gtk.ListStore model; TreeIter iter; + //show message + switch (vcodec){ + case "copy": + lbl_vmessage.visible = true; + lbl_vmessage.label = _("\n<b>Note:</b>\n\n1. Video track will be copied to the output file without re-encoding.\n\n2. Format of the video track must be compatible with the selected container. For example, if the input file contains H264 video and the selected file format is WEBM, then encoding will fail (since WEBM does not support H264).\n\n3. If you are trimming the input file then select the basic mode (single segment). Selecting multiple segments in advanced mode will not work."); + break; + default: + lbl_vmessage.visible = false; + break; + } + + //disable options when video is disabled + switch (vcodec){ + case "disable": + case "copy": + grid_vf.sensitive = false; + break; + default: + grid_vf.sensitive = true; + break; + } + //show x264 options switch (vcodec){ case "x264": case "x265": - lblX264Preset.visible = true; - cmbX264Preset.visible = true; - lblX264Profile.visible = true; - cmbX264Profile.visible = true; + cmb_x264_preset.visible = true; + cmb_x264_profile.visible = true; break; default: - lblX264Preset.visible = false; - cmbX264Preset.visible = false; - lblX264Profile.visible = false; - cmbX264Profile.visible = false; + cmb_x264_preset.visible = false; + cmb_x264_profile.visible = false; break; } @@ -2091,8 +2630,8 @@ model.set (iter, 0, "High422", 1, "high422"); model.append (out iter); model.set (iter, 0, "High444", 1, "high444"); - cmbX264Profile.set_model(model); - cmbX264Profile.set_active(2); + cmb_x264_profile.set_model(model); + cmb_x264_profile.set_active(2); break; case "x265": @@ -2103,8 +2642,8 @@ model.set (iter, 0, "Main", 1, "main"); model.append (out iter); model.set (iter, 0, "Main10", 1, "main10"); - cmbX264Profile.set_model(model); - cmbX264Profile.set_active(0); + cmb_x264_profile.set_model(model); + cmb_x264_profile.set_active(0); break; } @@ -2112,33 +2651,29 @@ switch (vcodec){ case "vp8": case "vp9": - lblVpxSpeed.visible = true; - cmbVpxSpeed.visible = true; - scaleVpxSpeed.visible = true; - scaleVpxSpeed.adjustment.value = 1; + cmb_vpx_speed.visible = true; + scale_vpx_speed.visible = true; + scale_vpx_speed.adjustment.value = 1; - lblVpxSpeed.set_tooltip_markup(""); + lbl_vpx_speed.set_tooltip_markup(""); string tt = _("<b>Quality Vs Encoding Speed</b>\n\n<b>Best:</b> Best quality, slower\n<b>Good:</b> Good quality, faster\n<b>Realtime:</b> Fastest"); - cmbVpxSpeed.set_tooltip_markup(tt); + cmb_vpx_speed.set_tooltip_markup(tt); tt = _("<b>Quality Vs Encoding Speed</b>\n\nSmaller values = Better quality, slower\nLarger value = Lower quality, faster\n"); - scaleVpxSpeed.set_tooltip_markup(tt); + scale_vpx_speed.set_tooltip_markup(tt); break; default: - lblVpxSpeed.visible = false; - cmbVpxSpeed.visible = false; - scaleVpxSpeed.visible = false; + cmb_vpx_speed.visible = false; + scale_vpx_speed.visible = false; string tt = _("<b>Quality Vs Encoding Speed</b>\nHigher values speed-up encoding at the expense of quality.\nLower values improve quality at the expense of encoding speed."); - lblVpxSpeed.set_tooltip_markup(tt); + lbl_vpx_speed.set_tooltip_markup(tt); break; } //populate encoding modes model = new Gtk.ListStore (2, typeof (string), typeof (string)); - cmbVideoMode.set_model(model); - lblVideoQuality.visible = true; - spinVideoQuality.visible = true; + cmb_vmode.set_model(model); switch (vcodec){ case "x264": @@ -2148,20 +2683,22 @@ model.set (iter,0,_("Average Bitrate"),1,"abr"); model.append (out iter); model.set (iter,0,_("Average Bitrate (2-pass)"),1,"2pass"); - cmbVideoMode.set_active(0); + cmb_vmode.set_active(0); - spinVideoBitrate.adjustment.configure(800, 1, 10000000, 1, 1, 0); - spinVideoBitrate.set_tooltip_text (""); - spinVideoBitrate.digits = 0; - - spinVideoQuality.adjustment.configure(23.0, 0, 51, 1, 1, 0); - spinVideoQuality.set_tooltip_text (""); - spinVideoQuality.digits = 1; - - cmbVideoMode.sensitive = true; - spinVideoBitrate.sensitive = true; - spinVideoQuality.sensitive = true; - cmbVideoMode_changed(); + spin_vbitrate.adjustment.configure(800, 1, 10000000, 1, 1, 0); + spin_vbitrate.set_tooltip_text (""); + spin_vbitrate.digits = 0; + + spin_vquality.adjustment.configure(23.0, 0, 51, 1, 1, 0); + spin_vquality.set_tooltip_text (""); + spin_vquality.digits = 1; + + cmb_vmode.visible = true; + spin_vbitrate.visible = true; + spin_vquality.visible = true; + txt_voptions.visible = true; + + cmb_vmode_changed(); break; case "x265": @@ -2171,20 +2708,22 @@ model.set (iter,0,_("Average Bitrate"),1,"abr"); model.append (out iter); model.set (iter,0,_("Average Bitrate (2-pass)"),1,"2pass"); - cmbVideoMode.set_active(0); + cmb_vmode.set_active(0); - spinVideoBitrate.adjustment.configure(800, 1, 10000000, 1, 1, 0); - spinVideoBitrate.set_tooltip_text (""); - spinVideoBitrate.digits = 0; - - spinVideoQuality.adjustment.configure(28.0, 0, 51, 1, 1, 0); - spinVideoQuality.set_tooltip_text (""); - spinVideoQuality.digits = 1; - - cmbVideoMode.sensitive = true; - spinVideoBitrate.sensitive = true; - spinVideoQuality.sensitive = true; - cmbVideoMode_changed(); + spin_vbitrate.adjustment.configure(800, 1, 10000000, 1, 1, 0); + spin_vbitrate.set_tooltip_text (""); + spin_vbitrate.digits = 0; + + spin_vquality.adjustment.configure(28.0, 0, 51, 1, 1, 0); + spin_vquality.set_tooltip_text (""); + spin_vquality.digits = 1; + + cmb_vmode.visible = true; + spin_vbitrate.visible = true; + spin_vquality.visible = true; + txt_voptions.visible = true; + + cmb_vmode_changed(); break; case "theora": @@ -2194,20 +2733,21 @@ model.set (iter,0,_("Average Bitrate"),1,"abr"); model.append (out iter); model.set (iter,0,_("Average Bitrate (2-pass)"),1,"2pass"); - cmbVideoMode.set_active(0); + cmb_vmode.set_active(0); - spinVideoBitrate.adjustment.configure(800, 1, 10000000, 1, 1, 0); - spinVideoBitrate.set_tooltip_text (""); - spinVideoBitrate.digits = 0; - - spinVideoQuality.adjustment.configure(6, 0, 10, 1, 1, 0); - spinVideoQuality.set_tooltip_text (""); - spinVideoQuality.digits = 1; - - cmbVideoMode.sensitive = true; - spinVideoBitrate.sensitive = true; - spinVideoQuality.sensitive = true; - cmbVideoMode_changed(); + spin_vbitrate.adjustment.configure(800, 1, 10000000, 1, 1, 0); + spin_vbitrate.set_tooltip_text (""); + spin_vbitrate.digits = 0; + + spin_vquality.adjustment.configure(6, 0, 10, 1, 1, 0); + spin_vquality.set_tooltip_text (""); + spin_vquality.digits = 1; + + cmb_vmode.visible = true; + spin_vbitrate.visible = true; + spin_vquality.visible = true; + txt_voptions.visible = true; + cmb_vmode_changed(); break; case "vp8": @@ -2220,40 +2760,39 @@ model.set (iter,0,_("Constant Bitrate"),1,"cbr"); //model.append (out iter); //model.set (iter,0,_("Constant Quality"),1,"cq"); - cmbVideoMode.set_active(0); + cmb_vmode.set_active(0); - spinVideoBitrate.adjustment.configure(800, 1, 1000000000, 1, 1, 0); - spinVideoBitrate.set_tooltip_text (""); - spinVideoBitrate.digits = 0; - - /*spinVideoQuality.adjustment.configure(-1, -1, 63, 1, 1, 0); - spinVideoQuality.set_tooltip_text (""); - spinVideoQuality.digits = 0;*/ - - cmbVideoMode.sensitive = true; - spinVideoBitrate.sensitive = true; - //spinVideoQuality.sensitive = true; - lblVideoQuality.visible = false; - spinVideoQuality.visible = false; - cmbVideoMode_changed(); + spin_vbitrate.adjustment.configure(800, 1, 1000000000, 1, 1, 0); + spin_vbitrate.set_tooltip_text (""); + spin_vbitrate.digits = 0; + + /*spin_vquality.adjustment.configure(-1, -1, 63, 1, 1, 0); + spin_vquality.set_tooltip_text (""); + spin_vquality.digits = 0;*/ + + cmb_vmode.visible = true; + spin_vbitrate.visible = true; + spin_vquality.visible = false; + txt_voptions.visible = true; + cmb_vmode_changed(); break; default: //disable - cmbVideoMode.sensitive = false; - spinVideoBitrate.sensitive = false; - spinVideoQuality.sensitive = false; + cmb_vmode.visible = false; + spin_vbitrate.visible = false; + spin_vquality.visible = false; + txt_voptions.visible = false; break; } //populate resize methods model = new Gtk.ListStore (2, typeof (string), typeof (string)); - cmbResizingMethod.set_model(model); + cmb_resize_method.set_model(model); switch (vcodec){ case "x264": case "x265": - lblResizingMethod.visible = true; - cmbResizingMethod.visible = true; + cmb_resize_method.visible = true; model.append (out iter); model.set (iter,0,"Fast Bilinear",1,"fastbilinear"); model.append (out iter); @@ -2274,12 +2813,11 @@ model.set (iter,0,"Sinc",1,"sinc"); model.append (out iter); model.set (iter,0,"Lanczos",1,"lanczos"); - cmbResizingMethod.set_active(2); + cmb_resize_method.set_active(2); break; default: - lblResizingMethod.visible = false; - cmbResizingMethod.visible = false; + cmb_resize_method.visible = false; break; } @@ -2287,189 +2825,158 @@ //set logo switch (vcodec){ case "x264": - imgVideoCodec.set_from_file(App.SharedImagesFolder + "/x264.png"); - imgVideoCodec.xalign = (float) 0.5; - imgVideoCodec.yalign = (float) 1.0; + img_video_format.set_from_file(App.SharedImagesFolder + "/x264.png"); + img_video_format.xalign = (float) 0.5; + img_video_format.yalign = (float) 1.0; break; case "x265": - imgVideoCodec.set_from_file(App.SharedImagesFolder + "/x265.png"); - imgVideoCodec.xalign = (float) 0.5; - imgVideoCodec.yalign = (float) 1.0; + img_video_format.set_from_file(App.SharedImagesFolder + "/x265.png"); + img_video_format.xalign = (float) 0.5; + img_video_format.yalign = (float) 1.0; break; case "vp8": - imgVideoCodec.set_from_file(App.SharedImagesFolder + "/vp8.png"); - imgVideoCodec.xalign = (float) 0.5; - imgVideoCodec.yalign = (float) 1.0; + img_video_format.set_from_file(App.SharedImagesFolder + "/vp8.png"); + img_video_format.xalign = (float) 0.5; + img_video_format.yalign = (float) 1.0; break; case "vp9": - imgVideoCodec.set_from_file(App.SharedImagesFolder + "/vp9.png"); - imgVideoCodec.xalign = (float) 0.5; - imgVideoCodec.yalign = (float) 1.0; + img_video_format.set_from_file(App.SharedImagesFolder + "/vp9.png"); + img_video_format.xalign = (float) 0.5; + img_video_format.yalign = (float) 1.0; break; case "theora": - imgVideoCodec.set_from_file(App.SharedImagesFolder + "/theora.png"); - imgVideoCodec.xalign = (float) 0.5; - imgVideoCodec.yalign = (float) 1.0; + img_video_format.set_from_file(App.SharedImagesFolder + "/theora.png"); + img_video_format.xalign = (float) 0.5; + img_video_format.yalign = (float) 1.0; break; default: - imgVideoCodec.clear(); + img_video_format.clear(); break; } } - private void cmbFrameSize_changed(){ - if (gtk_combobox_get_value(cmbFrameSize,1,"disable") == "custom") { - spinFrameWidth.sensitive = true; - spinFrameHeight.sensitive = true; + private void cmb_frame_size_changed(){ + if (gtk_combobox_get_value(cmb_frame_size,1,"disable") == "custom") { + spin_width.sensitive = true; + spin_height.sensitive = true; } else{ - spinFrameWidth.sensitive = false; - spinFrameHeight.sensitive = false; + spin_width.sensitive = false; + spin_height.sensitive = false; } - if (gtk_combobox_get_value(cmbFrameSize,1,"disable") == "disable") { - cmbResizingMethod.sensitive = false; - chkFitToBox.sensitive = false; - chkNoUpScale.sensitive = false; + if (gtk_combobox_get_value(cmb_frame_size,1,"disable") == "disable") { + cmb_resize_method.sensitive = false; + chk_box_fit.sensitive = false; + cmb_no_upscale.sensitive = false; } else { - cmbResizingMethod.sensitive = true; - chkFitToBox.sensitive = true; - chkNoUpScale.sensitive = true; + cmb_resize_method.sensitive = true; + chk_box_fit.sensitive = true; + cmb_no_upscale.sensitive = true; } - switch (gtk_combobox_get_value(cmbFrameSize,1,"disable")) { + switch (gtk_combobox_get_value(cmb_frame_size,1,"disable")) { case "disable": - spinFrameWidth.value = 0; - spinFrameHeight.value = 0; + spin_width.value = 0; + spin_height.value = 0; break; case "custom": - spinFrameWidth.value = 0; - spinFrameHeight.value = 480; + spin_width.value = 0; + spin_height.value = 480; break; case "320p": - spinFrameWidth.value = 0; - spinFrameHeight.value = 320; + spin_width.value = 0; + spin_height.value = 320; break; case "480p": - spinFrameWidth.value = 0; - spinFrameHeight.value = 480; + spin_width.value = 0; + spin_height.value = 480; break; case "720p": - spinFrameWidth.value = 0; - spinFrameHeight.value = 720; + spin_width.value = 0; + spin_height.value = 720; break; case "1080p": - spinFrameWidth.value = 0; - spinFrameHeight.value = 1080; + spin_width.value = 0; + spin_height.value = 1080; break; } - - lblFrameSizeCustom.visible = true; - spinFrameWidth.visible = true; - spinFrameHeight.visible = true; - - /* - if (gtk_combobox_get_value(cmbFrameSize,1,"disable") == "disable"){ - lblFrameSizeCustom.visible = false; - spinFrameWidth.visible = false; - spinFrameHeight.visible = false; - } - else { - lblFrameSizeCustom.visible = true; - spinFrameWidth.visible = true; - spinFrameHeight.visible = true; - }*/ } private void cmbFPS_changed(){ - if (gtk_combobox_get_value(cmbFPS,1,"disable") == "custom") { - spinFPSNum.sensitive = true; - spinFPSDenom.sensitive = true; + if (gtk_combobox_get_value(cmb_fps,1,"disable") == "custom") { + spin_fps_num.sensitive = true; + spin_fps_denom.sensitive = true; } else{ - spinFPSNum.sensitive = false; - spinFPSDenom.sensitive = false; + spin_fps_num.sensitive = false; + spin_fps_denom.sensitive = false; } - switch (gtk_combobox_get_value(cmbFPS,1,"disable")) { + switch (gtk_combobox_get_value(cmb_fps,1,"disable")) { case "disable": - spinFPSNum.value = 0; - spinFPSDenom.value = 0; + spin_fps_num.value = 0; + spin_fps_denom.value = 0; break; case "custom": - spinFPSNum.value = 25; - spinFPSDenom.value = 1; + spin_fps_num.value = 25; + spin_fps_denom.value = 1; break; case "25": - spinFPSNum.value = 25; - spinFPSDenom.value = 1; + spin_fps_num.value = 25; + spin_fps_denom.value = 1; break; case "29.97": - spinFPSNum.value = 30000; - spinFPSDenom.value = 1001; + spin_fps_num.value = 30000; + spin_fps_denom.value = 1001; break; case "30": - spinFPSNum.value = 30; - spinFPSDenom.value = 1; + spin_fps_num.value = 30; + spin_fps_denom.value = 1; break; case "60": - spinFPSNum.value = 60; - spinFPSDenom.value = 1; + spin_fps_num.value = 60; + spin_fps_denom.value = 1; break; } - - lblFPSCustom.visible = true; - spinFPSNum.visible = true; - spinFPSDenom.visible = true; - /* - if (gtk_combobox_get_value(cmbFPS,1,"disable") == "disable"){ - lblFPSCustom.visible = false; - spinFPSNum.visible = false; - spinFPSDenom.visible = false; - } - else { - lblFPSCustom.visible = true; - spinFPSNum.visible = true; - spinFPSDenom.visible = true; - }*/ } - private void cmbVideoMode_changed(){ + private void cmb_vmode_changed(){ switch(vcodec){ case "vp8": case "vp9": switch (video_mode) { case "cq": - spinVideoBitrate.sensitive = false; - spinVideoQuality.sensitive = true; + spin_vbitrate.sensitive = false; + spin_vquality.sensitive = true; break; case "vbr": case "cbr": case "2pass": - spinVideoBitrate.sensitive = true; - spinVideoQuality.sensitive = false; + spin_vbitrate.sensitive = true; + spin_vquality.sensitive = false; break; default: - spinVideoBitrate.sensitive = false; - spinVideoQuality.sensitive = false; + spin_vbitrate.sensitive = false; + spin_vquality.sensitive = false; break; } break; default: switch (video_mode) { case "vbr": - spinVideoBitrate.sensitive = false; - spinVideoQuality.sensitive = true; + spin_vbitrate.sensitive = false; + spin_vquality.sensitive = true; break; case "abr": case "2pass": - spinVideoBitrate.sensitive = true; - spinVideoQuality.sensitive = false; + spin_vbitrate.sensitive = true; + spin_vquality.sensitive = false; break; default: - spinVideoBitrate.sensitive = false; - spinVideoQuality.sensitive = false; + spin_vbitrate.sensitive = false; + spin_vquality.sensitive = false; break; } break; @@ -2477,57 +2984,64 @@ } - private void cmbVpxSpeed_changed(){ + private void cmb_vpx_speed_changed(){ switch (vpx_deadline) { case "best": - scaleVpxSpeed.adjustment.configure(0, 0, 0, 1, 1, 0); - scaleVpxSpeed.sensitive = false; + scale_vpx_speed.adjustment.configure(0, 0, 0, 1, 1, 0); + scale_vpx_speed.sensitive = false; break; case "realtime": - scaleVpxSpeed.sensitive = true; - scaleVpxSpeed.adjustment.configure(0, 0, 15, 1, 1, 0); + scale_vpx_speed.sensitive = true; + scale_vpx_speed.adjustment.configure(0, 0, 15, 1, 1, 0); break; case "good": default: - scaleVpxSpeed.sensitive = true; - scaleVpxSpeed.adjustment.configure(1, 0, 5, 1, 1, 0); + scale_vpx_speed.sensitive = true; + scale_vpx_speed.adjustment.configure(1, 0, 5, 1, 1, 0); break; } } - private void cmbSubtitleMode_changed(){ - string msg = _("\n\nSubtitle files should be present in the same folder\nand should start with same name."); - + private void cmb_sub_mode_changed(){ + string txt = ""; + switch(subtitle_mode){ case "embed": + txt += _("\n<b>Note:</b>\n\n1. Supported subtitle file formats:"); switch(format){ case "mkv": - lblSubFormatMessage.label = _("Supported Formats:") + " <i>SRT, SUB, SSA</i>" + msg; + txt += " - <i>SRT, SUB, SSA</i>"; break; case "mp4v": - lblSubFormatMessage.label = _("Supported Formats:") + " <i>SRT, SUB, TTXT, XML</i>" + msg; + txt += " - <i>SRT, SUB, TTXT, XML</i>"; break; case "ogv": - lblSubFormatMessage.label = _("Supported Formats:") + " <i>SRT</i>" + msg; + txt += " - <i>SRT</i>"; break; case "ogg": - lblSubFormatMessage.label = _("Supported Formats:") + " <i>SRT, LRC</i>" + msg; + txt += " - <i>SRT, LRC</i>"; break; default: - lblSubFormatMessage.label = ""; + txt += " - None"; break; } + txt += "\n\n"; + + txt += _("2. External subtitle files must be present in the same location and start with the same file name.") + "\n\n"; + break; default: - lblSubFormatMessage.label = ""; + txt = ""; break; } + + lbl_scodec_msg.label = txt; } - private void cmbAacProfile_refresh(){ + private void cmb_aac_profile_refresh(){ TreeIter iter; var model = new Gtk.ListStore (2, typeof (string), typeof (string)); model.append (out iter); @@ -2582,14 +3096,14 @@ break; } - cmbAacProfile.set_model(model); - cmbAacProfile.active = 0; + cmb_aac_profile.set_model(model); + cmb_aac_profile.active = 0; } - private void btnSave_clicked(){ + private void btn_save_clicked(){ - if (txtPresetName.text.length < 1) { - tabMain.page = 0; + if (txt_preset_name.text.length < 1) { + notebook.page = 0; string msg = _("Please enter a name for this preset"); var dlg = new Gtk.MessageDialog(null,Gtk.DialogFlags.MODAL, Gtk.MessageType.ERROR, Gtk.ButtonsType.OK, msg); @@ -2607,6 +3121,8 @@ } private void save_script(){ + Main.set_numeric_locale("C"); + var config = new Json.Object(); var general = new Json.Object(); var video = new Json.Object(); @@ -2681,7 +3197,7 @@ config.set_object_member("subtitle",subs); subs.set_string_member("mode",subtitle_mode); - var filePath = Folder + "/" + txtPresetName.text + ".json"; + var filePath = Folder + "/" + txt_preset_name.text + ".json"; var json = new Json.Generator(); json.pretty = true; json.indent = 2; @@ -2697,13 +3213,17 @@ //Set the newly saved file as the active script App.SelectedScript = new ScriptFile(filePath); + + Main.set_numeric_locale(""); } public void load_script(){ + Main.set_numeric_locale("C"); + var filePath = Folder + "/" + Name + ".json"; if(file_exists(filePath) == false){ return; } - txtPresetName.text = Name; + txt_preset_name.text = Name; var parser = new Json.Parser(); try{ @@ -2815,393 +3335,395 @@ //subtitles -------------- subtitle_mode = subs.get_string_member("mode"); + + Main.set_numeric_locale(""); } public string format{ owned get { - return gtk_combobox_get_value(cmbFileFormat,1,"mkv"); + return gtk_combobox_get_value(cmb_format,1,"mkv"); } set { - gtk_combobox_set_value(cmbFileFormat,1,value); + gtk_combobox_set_value(cmb_format,1,value); } } public string extension{ owned get { - return gtk_combobox_get_value(cmbFileExtension,1,".mkv"); + return gtk_combobox_get_value(cmb_ext,1,".mkv"); } set { - gtk_combobox_set_value(cmbFileExtension,1,value); + gtk_combobox_set_value(cmb_ext,1,value); } } public string author_name{ owned get { - return txtAuthorName.text; + return txt_author_name.text; } set { - txtAuthorName.text = value; + txt_author_name.text = value; } } public string author_email{ owned get { - return txtAuthorEmail.text; + return txt_author_email.text; } set { - txtAuthorEmail.text = value; + txt_author_email.text = value; } } public string preset_name{ owned get { - return txtPresetName.text; + return txt_preset_name.text; } set { - txtPresetName.text = value; + txt_preset_name.text = value; } } public string preset_version{ owned get { - return txtPresetVersion.text; + return txt_preset_version.text; } set { - txtPresetVersion.text = value; + txt_preset_version.text = value; } } public string vcodec{ owned get { - return gtk_combobox_get_value(cmbVCodec,1,"x264"); + return gtk_combobox_get_value(cmb_vcodec,1,"x264"); } set { - gtk_combobox_set_value(cmbVCodec,1,value); + gtk_combobox_set_value(cmb_vcodec,1,value); } } public string video_mode{ owned get { - return gtk_combobox_get_value(cmbVideoMode,1,"vbr"); + return gtk_combobox_get_value(cmb_vmode,1,"vbr"); } set { - gtk_combobox_set_value(cmbVideoMode,1,value); + gtk_combobox_set_value(cmb_vmode,1,value); } } public string video_bitrate{ owned get { - return spinVideoBitrate.get_value().to_string(); + return spin_vbitrate.get_value().to_string(); } set { - spinVideoBitrate.set_value(double.parse(value)); + spin_vbitrate.set_value(double.parse(value)); } } public string video_quality{ owned get { - return "%.1f".printf(spinVideoQuality.get_value()); + return "%.1f".printf(spin_vquality.get_value()); } set { - spinVideoQuality.get_adjustment().set_value(double.parse(value)); + spin_vquality.get_adjustment().set_value(double.parse(value)); } } public string x264_preset { owned get { - return gtk_combobox_get_value(cmbX264Preset,1,"medium"); + return gtk_combobox_get_value(cmb_x264_preset,1,"medium"); } set { - gtk_combobox_set_value(cmbX264Preset,1,value); + gtk_combobox_set_value(cmb_x264_preset,1,value); } } public string x264_profile{ owned get { - return gtk_combobox_get_value(cmbX264Profile,1,"high"); + return gtk_combobox_get_value(cmb_x264_profile,1,"high"); } set { - gtk_combobox_set_value(cmbX264Profile, 1, value); + gtk_combobox_set_value(cmb_x264_profile, 1, value); } } public string x264_options{ owned get { - return txtVCodecOptions.buffer.text; + return txt_voptions.buffer.text; } set { - txtVCodecOptions.buffer.text = value; + txt_voptions.buffer.text = value; } } public string vpx_deadline{ owned get { - return gtk_combobox_get_value(cmbVpxSpeed,1,"good"); + return gtk_combobox_get_value(cmb_vpx_speed,1,"good"); } set { - gtk_combobox_set_value(cmbVpxSpeed,1,value); + gtk_combobox_set_value(cmb_vpx_speed,1,value); } } public string vpx_speed{ owned get { - return scaleVpxSpeed.adjustment.value.to_string(); + return scale_vpx_speed.adjustment.value.to_string(); } set { - scaleVpxSpeed.adjustment.value = int.parse(value); + scale_vpx_speed.adjustment.value = int.parse(value); } } public string frame_size{ owned get { - return gtk_combobox_get_value(cmbFrameSize,1,"disable"); + return gtk_combobox_get_value(cmb_frame_size,1,"disable"); } set { - gtk_combobox_set_value(cmbFrameSize, 1, value); + gtk_combobox_set_value(cmb_frame_size, 1, value); } } public string resizing_method{ owned get { - return gtk_combobox_get_value(cmbResizingMethod,1,"cubic"); + return gtk_combobox_get_value(cmb_resize_method,1,"cubic"); } set { - gtk_combobox_set_value(cmbResizingMethod, 1, value); + gtk_combobox_set_value(cmb_resize_method, 1, value); } } public string frame_width{ owned get { - return spinFrameWidth.get_value().to_string(); + return spin_width.get_value().to_string(); } set { - spinFrameWidth.set_value(double.parse(value)); + spin_width.set_value(double.parse(value)); } } public string frame_height{ owned get { - return spinFrameHeight.get_value().to_string(); + return spin_height.get_value().to_string(); } set { - spinFrameHeight.set_value(double.parse(value)); + spin_height.set_value(double.parse(value)); } } public bool fit_to_box{ get { - return chkFitToBox.active; + return chk_box_fit.active; } set { - chkFitToBox.set_active((bool)value); + chk_box_fit.set_active((bool)value); } } public bool no_upscaling{ get { - return chkNoUpScale.active; + return cmb_no_upscale.active; } set { - chkNoUpScale.set_active((bool)value); + cmb_no_upscale.set_active((bool)value); } } public string frame_rate{ owned get { - return gtk_combobox_get_value(cmbFPS,1,"disable"); + return gtk_combobox_get_value(cmb_fps,1,"disable"); } set { - gtk_combobox_set_value(cmbFPS, 1, value); + gtk_combobox_set_value(cmb_fps, 1, value); } } public string frame_rate_num{ owned get { - return spinFPSNum.get_value().to_string(); + return spin_fps_num.get_value().to_string(); } set { - spinFPSNum.set_value(double.parse(value)); + spin_fps_num.set_value(double.parse(value)); } } public string frame_rate_denom{ owned get { - return spinFPSDenom.get_value().to_string(); + return spin_fps_denom.get_value().to_string(); } set { - spinFPSDenom.set_value(double.parse(value)); + spin_fps_denom.set_value(double.parse(value)); } } public string acodec{ owned get { - return gtk_combobox_get_value(cmbACodec,1,"mp3lame"); + return gtk_combobox_get_value(cmb_acodec,1,"mp3lame"); } set { - gtk_combobox_set_value(cmbACodec,1,value); + gtk_combobox_set_value(cmb_acodec,1,value); } } public string audio_mode{ owned get { - return gtk_combobox_get_value(cmbAudioMode,1,"vbr"); + return gtk_combobox_get_value(cmb_amode,1,"vbr"); } set { - gtk_combobox_set_value(cmbAudioMode, 1, value); + gtk_combobox_set_value(cmb_amode, 1, value); } } public string audio_opus_optimize{ owned get { - return gtk_combobox_get_value(cmbOpusOptimize,1,"none"); + return gtk_combobox_get_value(cmb_opus_optimize,1,"none"); } set { - gtk_combobox_set_value(cmbOpusOptimize, 1, value); + gtk_combobox_set_value(cmb_opus_optimize, 1, value); } } public string audio_profile{ owned get { - return gtk_combobox_get_value(cmbAacProfile,1,"auto"); + return gtk_combobox_get_value(cmb_aac_profile,1,"auto"); } set { - gtk_combobox_set_value(cmbAacProfile, 1, value); + gtk_combobox_set_value(cmb_aac_profile, 1, value); } } public string audio_bitrate{ owned get { - return spinAudioBitrate.get_value().to_string(); + return spin_abitrate.get_value().to_string(); } set { - spinAudioBitrate.set_value(double.parse(value)); + spin_abitrate.set_value(double.parse(value)); } } public string audio_quality{ owned get { - return "%.1f".printf(spinAudioQuality.get_value()); + return "%.1f".printf(spin_aquality.get_value()); } set { - spinAudioQuality.set_value(double.parse(value)); + spin_aquality.set_value(double.parse(value)); } } public string audio_channels{ owned get { - return gtk_combobox_get_value(cmbAudioChannels,1,"disable"); + return gtk_combobox_get_value(cmb_channels,1,"disable"); } set { - gtk_combobox_set_value(cmbAudioChannels, 1, value); + gtk_combobox_set_value(cmb_channels, 1, value); } } public string audio_sampling{ owned get { - return gtk_combobox_get_value(cmbAudioSampleRate,1,"disable"); + return gtk_combobox_get_value(cmb_sampling,1,"disable"); } set { - gtk_combobox_set_value(cmbAudioSampleRate, 1, value); + gtk_combobox_set_value(cmb_sampling, 1, value); } } public bool sox_enabled{ get { - return switchSox.active; + return switch_sox.active; } set { - switchSox.set_active((bool)value); + switch_sox.set_active((bool)value); } } public string sox_bass{ owned get { - return scaleBass.get_value().to_string(); + return scale_bass.get_value().to_string(); } set { - scaleBass.set_value(double.parse(value)); + scale_bass.set_value(double.parse(value)); } } public string sox_treble{ owned get { - return scaleTreble.get_value().to_string(); + return scale_treble.get_value().to_string(); } set { - scaleTreble.set_value(double.parse(value)); + scale_treble.set_value(double.parse(value)); } } public string sox_pitch{ owned get { - return "%.1f".printf(scalePitch.get_value()/100); + return "%.1f".printf(scale_pitch.get_value()/100); } set { - scalePitch.set_value(double.parse(value) * 100); + scale_pitch.set_value(double.parse(value) * 100); } } public string sox_tempo{ owned get { - return "%.1f".printf(scaleTempo.get_value()/100); + return "%.1f".printf(scale_tempo.get_value()/100); } set { - scaleTempo.set_value(double.parse(value) * 100); + scale_tempo.set_value(double.parse(value) * 100); } } public string sox_fade_in{ owned get { - return spinFadeIn.get_value().to_string(); + return spin_fade_in.get_value().to_string(); } set { - spinFadeIn.set_value(double.parse(value)); + spin_fade_in.set_value(double.parse(value)); } } public string sox_fade_out{ owned get { - return spinFadeOut.get_value().to_string(); + return spin_fade_out.get_value().to_string(); } set { - spinFadeOut.set_value(double.parse(value)); + spin_fade_out.set_value(double.parse(value)); } } public string sox_fade_type{ owned get { - return gtk_combobox_get_value(cmbFadeType,1,"l"); + return gtk_combobox_get_value(cmb_fade_type,1,"l"); } set { - gtk_combobox_set_value(cmbFadeType, 1, value); + gtk_combobox_set_value(cmb_fade_type, 1, value); } } public bool sox_normalize{ get { - return switchNormalize.active; + return chk_normalize.active; } set { - switchNormalize.set_active((bool)value); + chk_normalize.set_active((bool)value); } } public bool sox_earwax{ get { - return switchEarWax.active; + return chk_earwax.active; } set { - switchEarWax.set_active((bool)value); + chk_earwax.set_active((bool)value); } } public string subtitle_mode{ owned get { - return gtk_combobox_get_value(cmbSubtitleMode,1,"disable"); + return gtk_combobox_get_value(cmb_sub_mode,1,"disable"); } set { - gtk_combobox_set_value(cmbSubtitleMode, 1, value); + gtk_combobox_set_value(cmb_sub_mode, 1, value); } } }
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/EncoderStatusWindow.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/EncoderStatusWindow.vala
Changed
@@ -34,10 +34,10 @@ public class EncoderStatusWindow : Gtk.Dialog { - private Gtk.Box vboxMain; + private Gtk.Box vbox_main; private Gtk.Box vbox_actions; - private Gtk.Button btnOk; - private Gtk.Button btnRefesh; + private Gtk.Button btn_ok; + private Gtk.Button btn_refresh; private Gtk.TreeView tv; private Gtk.ScrolledWindow sw; @@ -55,8 +55,8 @@ icon = get_app_icon(16); // get content area - vboxMain = get_content_area(); - vboxMain.set_size_request (500, 450); + vbox_main = get_content_area(); + vbox_main.set_size_request (500, 450); // get action area vbox_actions = (Box) get_action_area(); @@ -70,7 +70,7 @@ sw.set_shadow_type (ShadowType.ETCHED_IN); sw.add (tv); sw.expand = true; - vboxMain.add(sw); + vbox_main.add(sw); TreeViewColumn col_name = new TreeViewColumn(); col_name.title = " " + _("Tool") + " "; @@ -104,19 +104,19 @@ tv_refresh(); - //btnRefesh - btnRefesh = new Button.with_label(" " + _("Refresh") + " "); - vbox_actions.add(btnRefesh); - btnRefesh.clicked.connect(()=>{ + //btn_refresh + btn_refresh = new Button.with_label(" " + _("Refresh") + " "); + vbox_actions.add(btn_refresh); + btn_refresh.clicked.connect(()=>{ gtk_set_busy(true,this); App.check_all_encoders(); tv_refresh(); gtk_set_busy(false,this); }); - //btnOk - btnOk = (Button) add_button ("gtk-ok", Gtk.ResponseType.ACCEPT); - btnOk.clicked.connect (() => { destroy(); }); + //btn_ok + btn_ok = (Button) add_button ("gtk-ok", Gtk.ResponseType.ACCEPT); + btn_ok.clicked.connect (() => { destroy(); }); show_all(); }
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/FileInfoWindow.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/FileInfoWindow.vala
Changed
@@ -34,11 +34,11 @@ public class FileInfoWindow : Gtk.Dialog { - private Box vboxMain; - private Button btnOk; + private Box vbox_main; + private Button btn_ok; public MediaFile file; - private TreeView tvInfo; - private ScrolledWindow swInfo; + private TreeView tv_info; + private ScrolledWindow sw_info; public FileInfoWindow (MediaFile _file) { title = _("Properties"); @@ -59,28 +59,29 @@ } // get content area - vboxMain = get_content_area(); - vboxMain.margin = 3; + vbox_main = get_content_area(); + vbox_main.margin = 3; - //tvInfo - tvInfo = new TreeView(); - tvInfo.get_selection().mode = SelectionMode.MULTIPLE; - tvInfo.headers_visible = false; - tvInfo.insert_column_with_attributes (-1, _("Key"), new CellRendererText(), "text", 0); - tvInfo.insert_column_with_attributes (-1, _("Value"), new CellRendererText(), "text", 1); - swInfo = new ScrolledWindow(tvInfo.get_hadjustment(), tvInfo.get_vadjustment()); - swInfo.set_shadow_type (ShadowType.ETCHED_IN); - swInfo.add (tvInfo); - swInfo.set_size_request (-1, 200); - vboxMain.pack_start (swInfo, true, true, 0); + //tv_info + tv_info = new TreeView(); + tv_info.get_selection().mode = SelectionMode.MULTIPLE; + tv_info.headers_visible = false; + tv_info.insert_column_with_attributes (-1, _("Key"), new CellRendererText(), "text", 0); + tv_info.insert_column_with_attributes (-1, _("Value"), new CellRendererText(), "text", 1); + + sw_info = new ScrolledWindow(tv_info.get_hadjustment(), tv_info.get_vadjustment()); + sw_info.set_shadow_type (ShadowType.ETCHED_IN); + sw_info.add (tv_info); + sw_info.set_size_request (-1, 200); + vbox_main.pack_start (sw_info, true, true, 0); - TreeStore infoStore = new TreeStore (2, typeof (string), typeof (string)); + var store = new TreeStore (2, typeof (string), typeof (string)); TreeIter iter0; TreeIter iter1; int index = -1; - infoStore.append (out iter0, null); - //infoStore.remove (ref iter0); + store.append (out iter0, null); + //store.remove (ref iter0); foreach (string line in file.InfoTextFormatted.split ("\n")){ if (line.strip() == "") { continue; } @@ -88,20 +89,20 @@ index = line.index_of (":"); if (index == -1){ - infoStore.append (out iter0, null); - infoStore.set (iter0, 0, line.strip()); + store.append (out iter0, null); + store.set (iter0, 0, line.strip()); } else{ - infoStore.append (out iter1, iter0); - infoStore.set (iter1, 0, line[0:index-1].strip()); - infoStore.set (iter1, 1, line[index+1:line.length].strip()); + store.append (out iter1, iter0); + store.set (iter1, 0, line[0:index-1].strip()); + store.set (iter1, 1, line[index+1:line.length].strip()); } } - tvInfo.set_model (infoStore); - tvInfo.expand_all(); + tv_info.set_model (store); + tv_info.expand_all(); - // btnOk - btnOk = (Button) add_button ("gtk-ok", Gtk.ResponseType.ACCEPT); - btnOk.clicked.connect (() => { destroy(); }); + // btn_ok + btn_ok = (Button) add_button ("gtk-ok", Gtk.ResponseType.ACCEPT); + btn_ok.clicked.connect (() => { destroy(); }); } }
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/Main.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/Main.vala
Changed
@@ -38,7 +38,7 @@ public Main App; public const string AppName = "Selene Media Converter"; public const string AppShortName = "selene"; -public const string AppVersion = "16.2.7"; +public const string AppVersion = "16.3.3"; public const string AppAuthor = "Tony George"; public const string AppAuthorEmail = "teejeetech@gmail.com"; @@ -88,7 +88,9 @@ public string PrimaryEncoder = "ffmpeg"; public string PrimaryPlayer = "mpv"; - + public string DefaultLanguage = "en"; + public bool DeleteTempFiles = true; + public string ListViewColumns = ""; public ScriptFile SelectedScript; @@ -140,11 +142,17 @@ private DataInputStream disErr; private DataOutputStream dsLog; + Pid child_pid; + int input_fd; + int output_fd; + int error_fd; + private string blankLine = ""; public static int main (string[] args) { //set locale - Intl.setlocale(GLib.LocaleCategory.MESSAGES, ""); + //set_locale(""); + Intl.setlocale(GLib.LocaleCategory.ALL, ""); Intl.textdomain(GETTEXT_PACKAGE); Intl.bind_textdomain_codeset(GETTEXT_PACKAGE, "utf-8"); Intl.bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); @@ -241,6 +249,8 @@ if ((App.SelectedScript == null)||(App.InputFiles.size == 0)) App.ConsoleMode = false; + LanguageCodes.build_maps(); + //show window if (App.ConsoleMode){ if (App.InputFiles.size == 0){ @@ -255,7 +265,7 @@ window.destroy.connect (App.exit_app); window.show_all(); } - + Gtk.main(); return 0; @@ -306,6 +316,13 @@ return msg; } + public static void set_numeric_locale(string type){ + Intl.setlocale(GLib.LocaleCategory.NUMERIC, type); + Intl.setlocale(GLib.LocaleCategory.COLLATE, type); + Intl.setlocale(GLib.LocaleCategory.TIME, type); + } + + public Main(string arg0){ InputFiles = new Gee.ArrayList<MediaFile>(); @@ -428,7 +445,7 @@ public void init_encoder_list(){ Encoders["avconv"] = new Encoder("avconv","Libav Encoder","Audio-Video Decoding"); Encoders["ffmpeg"] = new Encoder("ffmpeg","FFmpeg Encoder","Audio-Video Decoding"); - Encoders["ffmpeg2theora"] = new Encoder("ffmpeg2theora","Theora Video Encoder","Theora Output"); + //Encoders["ffmpeg2theora"] = new Encoder("ffmpeg2theora","Theora Video Encoder","Theora Output"); Encoders["lame"] = new Encoder("lame","LAME MP3 Encoder", "MP3 Output"); Encoders["mediainfo"] = new Encoder("mediainfo","Media Information Utility","Reading Audio Video Properties"); Encoders["mkvmerge"] = new Encoder("mkvmerge","Matroska Muxer","MKV Output"); @@ -441,6 +458,8 @@ Encoders["vpxenc"] = new Encoder("vpxenc","VP8 Video Encoder","VP8/WebM Output"); Encoders["x264"] = new Encoder("x264","H.264 / MPEG-4 AVC Video Encoder","H264 Output"); Encoders["x265"] = new Encoder("x265","H.265 / MPEG-H HEVC Video Encoder","H265 Output"); + Encoders["kateenc"] = new Encoder("kateenc","Kate Subtitle Encoder for OGG Files","Subtitles in OGG"); + Encoders["oggz"] = new Encoder("oggz","OGG Merge Tool","Merging OGG Files"); //Encoders["ffplay"] = new Encoder("ffplay","FFmpeg's Audio Video Player","Audio-Video Playback"); //Encoders["avplay"] = new Encoder("avplay","Libav's Audio Video Player","Audio-Video Playback"); @@ -521,6 +540,8 @@ config.set_string_member("tile-view", TileView.to_string()); config.set_string_member("av-encoder", PrimaryEncoder); config.set_string_member("av-player", PrimaryPlayer); + config.set_string_member("default-lang", DefaultLanguage); + config.set_string_member("delete-temp-files", DeleteTempFiles.to_string()); config.set_string_member("list-view-columns", ListViewColumns); if (SelectedScript != null) { @@ -576,6 +597,9 @@ PrimaryEncoder = json_get_string(config,"av-encoder", "ffmpeg"); PrimaryPlayer = json_get_string(config,"av-player", "mpv"); + DefaultLanguage = json_get_string(config,"default-lang", "en"); + + DeleteTempFiles = json_get_bool(config,"delete-temp-files",true); check_and_default_av_encoder(); check_and_default_av_player(); @@ -627,7 +651,7 @@ Gtk.main_quit(); } - public bool add_file (string filePath){ + public MediaFile? add_file (string filePath){ MediaFile mFile = new MediaFile (filePath, App.PrimaryEncoder); if (mFile.IsValid @@ -647,19 +671,19 @@ if (duplicate) { - return true; //not an error since file is already added + return mFile; //not an error since file is already added } else{ InputFiles.add(mFile); log_msg (_("File added:") + " '%s'".printf (mFile.Path)); - return true; + return mFile; } } else{ log_error (_("Unknown format:") + " '%s'".printf (mFile.Path)); } - return false; + return null; } public void remove_files (Gee.ArrayList<MediaFile> file_list){ @@ -800,12 +824,6 @@ CurrentFile.ProgressPercent = 0; log_msg (_("Source:") + " '%s'".printf(CurrentFile.Path), true); - if ((CurrentFile.SubFile != null) && (CurrentFile.SubFile.length > 0)){ - log_msg ((mf.HasVideo) ? _("Subtitles:") : _("Lyrics:") + " '%s'".printf(CurrentFile.SubName)); - } - else{ - log_msg ((mf.HasVideo) ? _("Subtitles:") : _("Lyrics:") + " None"); - } Progress = 0; StatusLine = ""; @@ -820,8 +838,11 @@ //move files to backup location on success if ((is_success == true) && (BackupDirectory.length > 0) && (dir_exists (BackupDirectory))){ move_file (CurrentFile.Path, BackupDirectory + "/" + CurrentFile.Name); - if (CurrentFile.SubFile != null){ - move_file (CurrentFile.SubFile, BackupDirectory + "/" + CurrentFile.SubName); + + foreach(TextStream stream in mf.text_list){ + if (stream.IsExternal){ + move_file (stream.SubFile, BackupDirectory + "/" + stream.SubName); + } } } @@ -864,16 +885,6 @@ script.append ("\n"); } - if (mf.SubFile != null){ - script.append ("subFile='" + escape (mf.SubFile) + "'\n"); - script.append ("subName='" + escape (mf.SubName) + "'\n"); - script.append ("subExt='" + escape (mf.SubExt.down()) + "'\n"); - } - else { - script.append ("subFile=''\n"); - script.append ("subName=''\n"); - script.append ("subExt=''\n"); - } script.append ("\n"); script.append ("""scriptDir="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )""""); script.append ("\n"); @@ -887,43 +898,10 @@ var fileScript = File.parse_name (SelectedScript.Path); var dis = new DataInputStream (fileScript.read()); - /*MatchInfo match; - Regex rxCrop_libav = new Regex ("""(avconv|ffmpeg).*-vf.*(crop=[^, ]+)"""); - Regex rxCrop_x264 = new Regex ("""x264.*(--vf|--video-filter).*(crop:[^/ ]+)"""); - Regex rxCrop_f2t = new Regex ("""ffmpeg2theora.*"""); - Regex rxCrop_f2t_left = new Regex ("""ffmpeg2theora.*(--cropleft [0-9]+) """); - Regex rxCrop_f2t_right = new Regex ("""ffmpeg2theora.*(--cropright [0-9]+) """); - Regex rxCrop_f2t_top = new Regex ("""ffmpeg2theora.*(--croptop [0-9]+) """); - Regex rxCrop_f2t_bottom = new Regex ("""ffmpeg2theora.*(--cropbottom [0-9]+) """);*/ - string line = dis.read_line (null); while (line != null) { line = line.replace ("${audiodec}", "%s -i \"${inFile}\" -f wav -acodec pcm_s16le -vn -y -".printf(PrimaryEncoder)); - /*if (mf.crop_enabled()){ - if (rxCrop_libav.match (line, 0, out match)){ - line = line.replace (match.fetch(2), "crop=" + mf.crop_values_libav()); - } - else if (rxCrop_x264.match (line, 0, out match)){ - line = line.replace (match.fetch(2), "crop:" + mf.crop_values_x264()); - } - else if (rxCrop_f2t.match (line, 0, out match)){ - if (rxCrop_f2t_left.match (line, 0, out match)){ - line = line.replace (match.fetch(1), "--cropleft " + mf.CropL.to_string()); - } - if (rxCrop_f2t_right.match (line, 0, out match)){ - line = line.replace (match.fetch(1), "--cropright " + mf.CropR.to_string()); - } - if (rxCrop_f2t_top.match (line, 0, out match)){ - line = line.replace (match.fetch(1), "--croptop " + mf.CropT.to_string()); - } - if (rxCrop_f2t_bottom.match (line, 0, out match)){ - line = line.replace (match.fetch(1), "--cropbottom " + mf.CropB.to_string()); - } - } - } - * */ - script.append (line + "\n"); line = dis.read_line (null); } @@ -949,6 +927,15 @@ script.append ("exitCode=$?\n"); script.append ("echo ${exitCode} > ${exitCode}\n"); + + if (App.DeleteTempFiles){ + script.append ("\nif [ ${exitCode} -eq 0 ]; then\n"); + script.append ("\trm -rf video*\n"); + script.append ("\trm -rf audio*\n"); + script.append ("\trm -rf subs*\n"); + script.append ("fi\n\n"); + } + return script.str; } @@ -982,24 +969,21 @@ if (ConsoleMode) log_msg (_("Converting: Enter (q) to quit or (p) to pause...")); else - log_msg (_("Converting...")); - - string[] argv = new string[1]; - argv[0] = scriptFile; - - Pid child_pid; - int input_fd; - int output_fd; - int error_fd; + log_msg (_("Converting")); + string[] spawn_args = new string[1]; + spawn_args[0] = scriptFile; + + string[] spawn_env = Environ.get (); + try { //execute script file --------------------- Process.spawn_async_with_pipes( - null, //working dir - argv, //argv - null, //environment + TempDirectory, //working dir + spawn_args, //argv + spawn_env, //environment SpawnFlags.SEARCH_PATH, null, // child_setup out child_pid, @@ -1040,11 +1024,20 @@ } Thread.usleep ((ulong) 0.1 * 1000000); + dsLog.close(); + dsLog = null; + + GLib.FileUtils.close(output_fd); + GLib.FileUtils.close(input_fd); + + disOut.close(); + disOut = null; + Process.close_pid(child_pid); //required on Windows, doesn't do anything on Unix } catch (Error e) { - log_error (e.message); + log_error(e.message); retVal = false; } @@ -1100,6 +1093,10 @@ update_progress (errLine.strip()); errLine = disErr.read_line (null); } + + disErr.close(); + disErr = null; + GLib.FileUtils.close(error_fd); } catch (Error e) { log_error (e.message); @@ -1275,7 +1272,7 @@ if (ConsoleMode) log_msg (_("Converting: Enter (q) to quit or (p) to pause...")); else - log_msg (_("Converting...")); + log_msg (_("Converting") + "..."); } public void set_priority(){ @@ -1317,7 +1314,7 @@ Json.Object general = (Json.Object) settings.get_object_member("general"); Json.Object video = (Json.Object) settings.get_object_member("video"); Json.Object audio = (Json.Object) settings.get_object_member("audio"); - //Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); + Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); //set output file path ---------------- @@ -1341,28 +1338,120 @@ //insert temporary file names ------------ s += "\n"; + + //output file -------- + s += "outputFile=\"${outDir}/${title}" + suffix + general.get_string_member("extension") + "\"\n"; + + //temp video ------------- + + string tempVideoExt = ".mkv"; if (mf.HasVideo && video.get_string_member("codec") != "disable"){ - s += "tempVideo=\"${tempDir}/video" + general.get_string_member("extension") + "\"\n"; + switch (video.get_string_member("codec")) { + case "copy": + switch(mf.VideoFormat.down()){ + case "avc": + tempVideoExt = ".mkv"; + break; + case "hevc": + tempVideoExt = ".m4v"; + break; + case "vp8": + case "vp9": + tempVideoExt = ".webm"; + break; + case "theora": + tempVideoExt = ".ogv"; + break; + default: + tempVideoExt = ".mkv"; + break; + } + break; + default: + tempVideoExt = general.get_string_member("extension"); + break; + } + + foreach(VideoStream stream in mf.video_list){ + if (!stream.IsSelected){ + continue; + } + s += "temp_video_%d=\"video-%d%s\"\n".printf(stream.TypeIndex,stream.TypeIndex,tempVideoExt); + } } + + // temp audio ---------------- + + string tempAudioExt = ".mka"; if (mf.HasAudio && audio.get_string_member("codec") != "disable"){ switch (audio.get_string_member("codec")) { - case "mp3lame": - s += "tempAudio=\"${tempDir}/audio.mp3\"\n"; + case "mp3lame": + tempAudioExt = ".mp3"; + break; + case "aac": + case "neroaac": + case "libfdk_aac": + tempAudioExt = ".m4a"; + break; + case "vorbis": + tempAudioExt = ".ogg"; + break; + case "opus": + tempAudioExt = ".opus"; + break; + case "copy": + //set temp file extension based on input audio format + switch(mf.AudioFormat.down()){ + case "ac-3": + tempAudioExt = ".ac3"; + break; + case "flac": + tempAudioExt = ".flac"; + break; + case "pcm": + tempAudioExt = ".wav"; break; case "aac": - case "neroaac": - case "libfdk_aac": - s += "tempAudio=\"${tempDir}/audio.mp4\"\n"; + tempAudioExt = ".m4a"; break; case "vorbis": - s += "tempAudio=\"${tempDir}/audio.ogg\"\n"; + tempAudioExt = ".ogg"; break; case "opus": - s += "tempAudio=\"${tempDir}/audio.opus\"\n"; + tempAudioExt = ".opus"; + break; + default: + tempAudioExt = ".mka"; break; + } + //NOTE: Use same contruct in copy_audio_avconv() + break; + default: + tempAudioExt = ".mka"; + break; + } + + foreach(AudioStream stream in mf.audio_list){ + if (!stream.IsSelected){ + continue; + } + s += "temp_audio_%d=\"audio-%d%s\"\n".printf(stream.TypeIndex,stream.TypeIndex,tempAudioExt); + } + } + + // temp subs --------------- + + if (mf.HasSubs && subs.get_string_member("mode") == "embed"){ + foreach(TextStream stream in mf.text_list){ + if (!stream.IsSelected){ + //log_msg("%d:not-selected".printf(stream.TypeIndex)); + continue; + } + s += "temp_subs_%d=\"subs-%d%s\"\n".printf(stream.TypeIndex,stream.TypeIndex,".srt"); } } + s += "\n"; //create command line -------------- @@ -1370,116 +1459,160 @@ string format = general.get_string_member("format"); string acodec = audio.get_string_member("codec"); string vcodec = video.get_string_member("codec"); + string submode = subs.get_string_member("mode"); switch (format){ - case "mkv": - case "mp4v": - case "webm": + case "mkv": + case "mp4v": + case "webm": + case "ogv": + foreach(VideoStream stream in mf.video_list){ + if (!stream.IsSelected){ + continue; + } + //encode video switch (vcodec){ - case "x264": - case "x265": - s += encode_video_x264(mf,settings); - encoderList.add(vcodec); - break; - case "vp8": - case "vp9": - s += encode_video_avconv(mf,settings); - encoderList.add(PrimaryEncoder); - break; + case "x264": + case "x265": + s += encode_video_x264(mf,stream,settings); + encoderList.add(vcodec); + break; + case "vp8": + case "vp9": + case "theora": + s += encode_video_avconv(mf,stream,settings); + encoderList.add(PrimaryEncoder); + break; + case "copy": + s += copy_video_avconv(mf,stream,settings); + encoderList.add(PrimaryEncoder); + break; } + } + foreach(AudioStream stream in mf.audio_list){ + if (!stream.IsSelected){ + continue; + } + //encode audio if (mf.HasAudio && acodec != "disable") { switch (acodec) { - case "mp3lame": - s += encode_audio_mp3lame(mf,settings); - encoderList.add("lame"); - if (audio.get_boolean_member("soxEnabled")){ - encoderList.add("sox"); - }; - break; - case "neroaac": - s += encode_audio_neroaac(mf,settings); - encoderList.add("neroaacenc"); - if (audio.get_boolean_member("soxEnabled")){ - encoderList.add("sox"); - }; - break; - case "aac": - s += encode_audio_avconv(mf,settings); - encoderList.add(PrimaryEncoder); - if (audio.get_boolean_member("soxEnabled")){ - encoderList.add("sox"); - }; - break; - case "libfdk_aac": - s += encode_audio_fdkaac(mf,settings); - encoderList.add("aacenc"); - if (audio.get_boolean_member("soxEnabled")){ - encoderList.add("sox"); - }; - break; - case "vorbis": - s += encode_audio_oggenc(mf,settings); - encoderList.add("oggenc"); - if (audio.get_boolean_member("soxEnabled")){ - encoderList.add("sox"); - }; - break; - } - } - - //mux audio, video and subs - switch (format){ - case "mkv": - switch (vcodec){ - case "x265": - s += mux_avconv(mf,settings); - encoderList.add(PrimaryEncoder); - break; - default: - s += mux_mkvmerge(mf,settings); - encoderList.add("mkvmerge"); - break; - } + case "mp3lame": + s += encode_audio_mp3lame(mf,stream,settings); + encoderList.add("lame"); + if (audio.get_boolean_member("soxEnabled")){ + encoderList.add("sox"); + }; break; - case "webm": - s += mux_mkvmerge(mf,settings); - encoderList.add("mkvmerge"); + case "neroaac": + s += encode_audio_neroaac(mf,stream,settings); + encoderList.add("neroaacenc"); + if (audio.get_boolean_member("soxEnabled")){ + encoderList.add("sox"); + }; break; - case "mp4v": - switch (vcodec){ - case "x265": - s += mux_avconv(mf,settings); - encoderList.add(PrimaryEncoder); - break; - default: - s += mux_mp4box(mf,settings); - encoderList.add("mp4box"); - break; - } + case "aac": + s += encode_audio_avconv(mf,stream,settings); + encoderList.add(PrimaryEncoder); + if (audio.get_boolean_member("soxEnabled")){ + encoderList.add("sox"); + }; + break; + case "libfdk_aac": + s += encode_audio_fdkaac(mf,stream,settings); + encoderList.add("aacenc"); + if (audio.get_boolean_member("soxEnabled")){ + encoderList.add("sox"); + }; break; + case "vorbis": + s += encode_audio_oggenc(mf,stream,settings); + encoderList.add("oggenc"); + if (audio.get_boolean_member("soxEnabled")){ + encoderList.add("sox"); + }; + break; + case "copy": + s += copy_audio_avconv(mf,stream,settings); + encoderList.add(PrimaryEncoder); + break; + } } - break; + } + + foreach(TextStream stream in mf.text_list){ + if (!stream.IsSelected){ + continue; + } + + //encode subs + if (mf.HasSubs && (submode == "embed")) { + s += encode_sub_avconv(mf,stream,settings); + encoderList.add(PrimaryEncoder); + } + } + //merge the subs encoded in previous step + if (format == "ogv"){ + s += encode_sub_kateenc(mf,settings); + encoderList.add("kateenc"); + } + + //mux audio, video and subs + switch (format){ + case "mkv": + case "webm": + s += mux_mkvmerge(mf,settings); + encoderList.add("mkvmerge"); + break; + case "mp4v": + switch (vcodec){ + case "x265": + s += mux_avconv(mf,settings); + encoderList.add(PrimaryEncoder); + break; + default: + s += mux_mp4box(mf,settings); + encoderList.add("mp4box"); + break; + } + break; case "ogv": - s += encode_video_ffmpeg2theora(mf,settings); - encoderList.add("ffmpeg2theora"); + s += mux_oggz(mf,settings); + encoderList.add("oggz"); break; + } + break; + + //case "ogv": + // s += encode_video_ffmpeg2theora(mf,settings); + // encoderList.add("ffmpeg2theora"); + // break; - case "mp3": - s += encode_audio_mp3lame(mf,settings); + case "mp3": + foreach(AudioStream stream in mf.audio_list){ + if (!stream.IsSelected){ + continue; + } + s += encode_audio_mp3lame(mf,stream,settings); encoderList.add("lame"); if (audio.get_boolean_member("soxEnabled")){ encoderList.add("sox"); }; - break; + } + break; - case "mp4a": + case "mp4a": + foreach(AudioStream stream in mf.audio_list){ + if (!stream.IsSelected){ + continue; + } + switch (acodec) { case "neroaac": - s += encode_audio_neroaac(mf,settings); + s += encode_audio_neroaac(mf,stream,settings); encoderList.add("neroaacenc"); if (audio.get_boolean_member("soxEnabled")){ encoderList.add("sox"); @@ -1487,7 +1620,7 @@ break; case "aac": - s += encode_audio_avconv(mf,settings); + s += encode_audio_avconv(mf,stream,settings); encoderList.add(PrimaryEncoder); if (audio.get_boolean_member("soxEnabled")){ encoderList.add("sox"); @@ -1495,40 +1628,56 @@ break; case "libfdk_aac": - s += encode_audio_fdkaac(mf,settings); + s += encode_audio_fdkaac(mf,stream,settings); encoderList.add("aacenc"); if (audio.get_boolean_member("soxEnabled")){ encoderList.add("sox"); }; break; } - break; - - case "opus": - s += encode_audio_opus(mf,settings); + } + break; + + case "opus": + foreach(AudioStream stream in mf.audio_list){ + if (!stream.IsSelected){ + continue; + } + s += encode_audio_opus(mf,stream,settings); encoderList.add("opusenc"); if (audio.get_boolean_member("soxEnabled")){ encoderList.add("sox"); }; - break; + } + break; - case "ogg": - s += encode_audio_oggenc(mf,settings); + case "ogg": + foreach(AudioStream stream in mf.audio_list){ + if (!stream.IsSelected){ + continue; + } + s += encode_audio_oggenc(mf,stream,settings); encoderList.add("oggenc"); if (audio.get_boolean_member("soxEnabled")){ encoderList.add("sox"); }; - break; + } + break; - case "ac3": - case "flac": - case "wav": - s += encode_audio_avconv(mf,settings); + case "ac3": + case "flac": + case "wav": + foreach(AudioStream stream in mf.audio_list){ + if (!stream.IsSelected){ + continue; + } + s += encode_audio_avconv(mf,stream,settings); encoderList.add(PrimaryEncoder); if (audio.get_boolean_member("soxEnabled")){ encoderList.add("sox"); }; - break; + } + break; } s += "\n"; @@ -1557,7 +1706,7 @@ //decode ----------------- - private string decode_video_avconv (MediaFile mf, Json.Object settings, bool silent, bool resample = true, bool crop = true, bool scale = true){ + private string decode_video_avconv (MediaFile mf, VideoStream stream, Json.Object settings, bool silent, bool resample = true, bool crop = true, bool scale = true){ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); @@ -1573,15 +1722,18 @@ } //seek input - if ((mf.StartPos > 0) && (mf.clip_list.size == 0)){ + if ((mf.StartPos > 0) && (mf.clip_list.size < 2)){ s += " -ss %.1f".printf(mf.StartPos); } //input s += " -i \"${inFile}\""; + //map stream + s += " -map 0:v:%d".printf(stream.TypeIndex); + //stop output - if ((mf.EndPos > 0) && (mf.clip_list.size == 0)){ + if ((mf.EndPos > 0) && (mf.clip_list.size < 2)){ s += " -to %.1f".printf(mf.EndPos - mf.StartPos); } @@ -1597,7 +1749,7 @@ return s; } - private string decode_audio_avconv(MediaFile mf, Json.Object settings, bool silent, string temp_file_name = ""){ + private string decode_audio_avconv(MediaFile mf, AudioStream stream, Json.Object settings, bool silent, string temp_file_name = ""){ string s = ""; Json.Object audio = (Json.Object) settings.get_object_member("audio"); @@ -1615,15 +1767,18 @@ } //seek input - if ((mf.StartPos > 0) && (mf.clip_list.size == 0)){ + if ((mf.StartPos > 0) && (mf.clip_list.size < 2)){ s += " -ss %.1f".printf(mf.StartPos); } //input s += " -i \"${inFile}\""; + //map stream + s += " -map 0:a:%d".printf(stream.TypeIndex); + //stop output - if ((mf.EndPos > 0) && (mf.clip_list.size == 0)){ + if ((mf.EndPos > 0) && (mf.clip_list.size < 2)){ s += " -to %.1f".printf(mf.EndPos - mf.StartPos); } @@ -1672,113 +1827,397 @@ return s; } - //encode video ------------------- + //copy ----------------- - private string encode_video_avconv (MediaFile mf, Json.Object settings){ + private string copy_video_avconv (MediaFile mf, VideoStream stream, Json.Object settings){ string s = ""; - Json.Object general = (Json.Object) settings.get_object_member("general"); - Json.Object video = (Json.Object) settings.get_object_member("video"); - //Json.Object audio = (Json.Object) settings.get_object_member("audio"); - string vcodec = video.get_string_member("codec"); - string format = general.get_string_member("format"); + //Json.Object general = (Json.Object) settings.get_object_member("general"); + //Json.Object video = (Json.Object) settings.get_object_member("video"); + Json.Object audio = (Json.Object) settings.get_object_member("audio"); + //Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); s += PrimaryEncoder; + //progress info + //if (silent){ + // s += " -nostats"; + //} + //seek input - if (mf.StartPos > 0){ + if ((mf.StartPos > 0) && (mf.clip_list.size < 2)){ s += " -ss %.1f".printf(mf.StartPos); } - + + //input s += " -i \"${inFile}\""; + //map stream + s += " -map 0:v:%d".printf(stream.TypeIndex); + //stop output - if ((mf.EndPos > 0) && (mf.clip_list.size == 0)){ + if ((mf.EndPos > 0) && (mf.clip_list.size < 2)){ s += " -to %.1f".printf(mf.EndPos - mf.StartPos); } - s += " -f " + format; - - switch(vcodec){ - case "vp8": - s += " -c:v libvpx"; - break; - case "vp9": - s += " -c:v libvpx-" + vcodec; - break; - } - - if (video.get_string_member("mode") == "2pass"){ - s += " -pass {passNumber}"; - } + //format + s += " -copyinkf"; - string vquality = "%.0f".printf(double.parse(video.get_string_member("quality"))); - switch(video.get_string_member("mode")){ - case "vbr": - case "2pass": - s += " -b:v " + video.get_string_member("bitrate") + "k"; - break; - case "cbr": - s += " -b:v " + video.get_string_member("bitrate") + "k"; - s += " -minrate " + video.get_string_member("bitrate") + "k"; - s += " -maxrate " + video.get_string_member("bitrate") + "k"; + //format + switch(mf.VideoFormat.down()){ + case "avc": + s += " -f matroska"; break; - case "cq": - s += " -crf " + vquality; - s += " -qmin " + vquality; - s += " -qmax " + vquality; + case "hevc": + s += " -f mp4"; break; - } - - switch(vcodec){ case "vp8": case "vp9": - if (video.has_member("vpx_deadline")){ - s += " -deadline " + video.get_string_member("vpx_deadline"); - } - else{ - s += " -deadline good"; - } - if (video.has_member("vpx_speed")){ - s += " -cpu-used " + video.get_string_member("vpx_speed"); - } - else{ - s += " -cpu-used 1"; - } + s += " -f webm"; + break; + case "theora": + s += " -f ogv"; + break; + default: + s += " -f matroska"; break; } - - //--------------- - - //user options - if (video.get_string_member("options").strip() != "") { - s += " " + video.get_string_member("options").strip(); - } - - //avconv_filters (resample, crop, resize, trim) - s += avconv_filters(mf,settings,true,false); - - //disable audio and subs + //NOTE: Use same contruct in get_preset_commandline() + + //copy video + s += " -vcodec copy"; + + //output s += " -an -sn"; //output - s += " -y {outputFile}"; //no quotes - - s += "\n"; - - if (video.get_string_member("mode") == "2pass"){ - string temp = s.replace("{passNumber}","1").replace("{outputFile}","/dev/null"); - temp += s.replace("{passNumber}","2").replace("{outputFile}","\"${tempVideo}\""); - s = temp; + if (mf.HasAudio && audio.get_string_member("codec") != "disable") { + //encode to tempVideo + s += " -y \"${temp_video_%d}\"".printf(stream.TypeIndex); } - else{ - s = s.replace("{outputFile}","\"${tempVideo}\""); + else { + //encode to outputFile + s += " -y \"${outputFile}\""; } + s += "\n"; + return s; } - private string encode_video_x264 (MediaFile mf, Json.Object settings){ + private string copy_audio_avconv(MediaFile mf, AudioStream stream, Json.Object settings){ + string s = ""; + + //Json.Object general = (Json.Object) settings.get_object_member("general"); + Json.Object video = (Json.Object) settings.get_object_member("video"); + //Json.Object audio = (Json.Object) settings.get_object_member("audio"); + //Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); + + s += PrimaryEncoder; + + //progress info + //if (silent){ + // s += " -nostats"; + //} + + //seek input + if ((mf.StartPos > 0) && (mf.clip_list.size < 2)){ + s += " -ss %.1f".printf(mf.StartPos); + } + + //input + s += " -i \"${inFile}\""; + + //map stream + s += " -map 0:a:%d".printf(stream.TypeIndex); + + //stop output + if ((mf.EndPos > 0) && (mf.clip_list.size < 2)){ + s += " -to %.1f".printf(mf.EndPos - mf.StartPos); + } + + //format + switch(mf.AudioFormat.down()){ + case "ac-3": + s += " -f ac3"; + break; + case "flac": + s += " -f flac"; + break; + case "pcm": + s += " -f wav"; + break; + case "aac": + s += " -f mp4"; + break; + case "vorbis": + s += " -f ogg"; + break; + case "opus": + s += " -f opus"; + break; + default: + s += " -f matroska"; + break; + } + //NOTE: Use same contruct in get_preset_commandline() + + //copy audio + s += " -acodec copy"; + + s += " -vn -sn"; + + //output + if (mf.HasVideo && video.get_string_member("codec") != "disable") { + //encode to tempAudio + s += " -y \"${temp_audio_%d}\"".printf(stream.TypeIndex); + } + else { + //encode to outputFile + s += " -y \"${outputFile}\""; + } + + s += "\n"; + + return s; + } + + private string encode_sub_avconv(MediaFile mf, TextStream stream, Json.Object settings){ + string s = ""; + + //Json.Object general = (Json.Object) settings.get_object_member("general"); + //Json.Object video = (Json.Object) settings.get_object_member("video"); + //Json.Object audio = (Json.Object) settings.get_object_member("audio"); + //Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); + + s += PrimaryEncoder; + + //progress info + //if (silent){ + // s += " -nostats"; + //} + + //seek input + if ((mf.StartPos > 0) && (mf.clip_list.size < 2)){ + s += " -ss %.1f".printf(mf.StartPos); + } + + if (stream.IsExternal){ + //character encoding - required for SRT files + s += " -sub_charenc \"%s\"".printf(stream.CharacterEncoding.up()); + + //input + s += " -i \"%s\"".printf(stream.SubFile); + } + else{ + //input + s += " -i \"${inFile}\""; + + //map stream + s += " -map 0:s:%d".printf(stream.TypeIndex); + } + + //stop output + if ((mf.EndPos > 0) && (mf.clip_list.size < 2)){ + s += " -to %.1f".printf(mf.EndPos - mf.StartPos); + } + + //format + s += " -f srt"; + + //copy audio + s += " -scodec subrip"; + + s += " -vn -an"; + + s += " -y \"${temp_subs_%d}\"".printf(stream.TypeIndex); + + //output + //if (mf.HasVideo && video.get_string_member("codec") != "disable") { + //encode to tempAudio + + //} + //else { + // //encode to outputFile + // //s += " -y \"${outputFile}\""; + //} + + s += "\n"; + + return s; + } + + private string encode_sub_kateenc(MediaFile mf, Json.Object settings){ + string s = ""; + + //Json.Object general = (Json.Object) settings.get_object_member("general"); + Json.Object video = (Json.Object) settings.get_object_member("video"); + Json.Object audio = (Json.Object) settings.get_object_member("audio"); + Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); + + if (mf.HasSubs && subs.get_string_member("mode") == "embed"){ + foreach(TextStream stream in mf.text_list){ + if (stream.IsSelected){ + s += "kateenc -t srt "; + + if (mf.HasVideo && video.get_string_member("codec") != "disable"){ + s += " -c SUB"; + } + else if (mf.HasAudio && audio.get_string_member("codec") != "disable"){ + s += " -c LRC"; + } + + s += " -o \"subs_kate_%d.ogg\"".printf(stream.TypeIndex); + if (stream.LangCode.length > 0){ + s += " -l %s".printf(stream.LangCode); + } + s += " \"${temp_subs_%d}\"".printf(stream.TypeIndex); + s += "\n"; + } + } + } + + return s; + } + + //encode video ------------------- + + private string encode_video_avconv (MediaFile mf, VideoStream stream, Json.Object settings){ + string s = ""; + + Json.Object general = (Json.Object) settings.get_object_member("general"); + Json.Object video = (Json.Object) settings.get_object_member("video"); + //Json.Object audio = (Json.Object) settings.get_object_member("audio"); + string vcodec = video.get_string_member("codec"); + string format = general.get_string_member("format"); + + s += PrimaryEncoder; + + //seek input + if ((mf.StartPos > 0) && (mf.clip_list.size < 2)){ + s += " -ss %.1f".printf(mf.StartPos); + } + + s += " -i \"${inFile}\""; + + //map stream + s += " -map 0:v:%d".printf(stream.TypeIndex); + + //stop output + if ((mf.EndPos > 0) && (mf.clip_list.size < 2)){ + s += " -to %.1f".printf(mf.EndPos - mf.StartPos); + } + + if (format == "ogv"){ + s += " -f ogg"; + } + else{ + s += " -f " + format; + } + + switch(vcodec){ + case "vp8": + s += " -c:v libvpx"; + break; + case "vp9": + s += " -c:v libvpx-" + vcodec; + break; + case "theora": + s += " -c:v lib" + vcodec; + break; + } + + if (video.get_string_member("mode") == "2pass"){ + s += " -pass {passNumber}"; + } + + switch(vcodec){ + case "vp8": + case "vp9": + switch(video.get_string_member("mode")){ + case "vbr": + case "2pass": + string bitrate = video.get_string_member("bitrate"); + s += " -b:v " + bitrate + "k"; + break; + case "cbr": + string bitrate = video.get_string_member("bitrate"); + s += " -b:v " + bitrate + "k"; + s += " -minrate " + bitrate + "k"; + s += " -maxrate " + bitrate + "k"; + break; + case "cq": + string vquality = "%.0f".printf(double.parse(video.get_string_member("quality"))); + s += " -crf " + vquality; + s += " -qmin " + vquality; + s += " -qmax " + vquality; + break; + } + break; + case "theora": + switch(video.get_string_member("mode")){ + case "abr": + case "2pass": + string bitrate = video.get_string_member("bitrate"); + s += " -b:v " + bitrate + "k"; + break; + case "vbr": + string vquality = "%.0f".printf(double.parse(video.get_string_member("quality"))); + s += " -q:v " + vquality; + break; + } + break; + } + + switch(vcodec){ + case "vp8": + case "vp9": + if (video.has_member("vpx_deadline")){ + s += " -deadline " + video.get_string_member("vpx_deadline"); + } + else{ + s += " -deadline good"; + } + if (video.has_member("vpx_speed")){ + s += " -cpu-used " + video.get_string_member("vpx_speed"); + } + else{ + s += " -cpu-used 1"; + } + break; + } + + //--------------- + + //user options + if (video.get_string_member("options").strip() != "") { + s += " " + video.get_string_member("options").strip(); + } + + //avconv_filters (resample, crop, resize, trim) + s += avconv_filters(mf,settings,true,false); + + //disable audio and subs + s += " -an -sn"; + + //output + s += " -y {outputFile}"; //no quotes + + s += "\n"; + + if (video.get_string_member("mode") == "2pass"){ + string temp = s.replace("{passNumber}","1").replace("{outputFile}","/dev/null"); + temp += s.replace("{passNumber}","2").replace("{outputFile}","\"${temp_video_%d}\"".printf(stream.TypeIndex)); + s = temp; + } + else{ + s = s.replace("{outputFile}","\"${temp_video_%d}\"".printf(stream.TypeIndex)); + } + + return s; + } + + private string encode_video_x264 (MediaFile mf, VideoStream stream, Json.Object settings){ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); @@ -1794,7 +2233,7 @@ * */ if (usePiping) { - s += decode_video_avconv(mf,settings,true,true,false,false); + s += decode_video_avconv(mf,stream,settings,true,true,false,false); /* Note: * Resampling with be done by ffmpeg since x264 does not provide this option. @@ -1890,17 +2329,17 @@ if (video.get_string_member("mode") == "2pass"){ string temp = s.replace("{passNumber}","1").replace("{outputFile}","/dev/null"); - temp += s.replace("{passNumber}","2").replace("{outputFile}","\"${tempVideo}\""); + temp += s.replace("{passNumber}","2").replace("{outputFile}","\"${temp_video_%d}\"".printf(stream.TypeIndex)); s = temp; } else{ - s = s.replace("{outputFile}","\"${tempVideo}\""); + s = s.replace("{outputFile}","\"${temp_video_%d}\"".printf(stream.TypeIndex)); } return s; } - private string encode_video_ffmpeg2theora (MediaFile mf, Json.Object settings){ + /*private string encode_video_ffmpeg2theora (MediaFile mf, Json.Object settings){ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); @@ -1991,18 +2430,128 @@ s += " --nosubtitles"; } - //other options - if (video.get_string_member("options").strip() != "") { - s += " " + video.get_string_member("options").strip(); + //other options + if (video.get_string_member("options").strip() != "") { + s += " " + video.get_string_member("options").strip(); + } + + s += " --output \"${outputFile}\""; + + s += "\n"; + + return s; + }*/ + + //playback ------------------------------ + + public void play_video(MediaFile mf, VideoStream stream, Json.Object settings){ + if (file_exists(mf.Path)){ + + string output = ""; + string error = ""; + + string cmd = play_video_command(mf, stream, settings); + cmd = "nohup %s".printf(cmd); + + try { + Process.spawn_command_line_sync(cmd, out output, out error); + } + catch(Error e){ + log_error (e.message); + } + } + } + + private string play_video_command (MediaFile mf, VideoStream stream, Json.Object settings){ + string s = ""; + + Json.Object general = (Json.Object) settings.get_object_member("general"); + Json.Object video = (Json.Object) settings.get_object_member("video"); + Json.Object audio = (Json.Object) settings.get_object_member("audio"); + + s += PrimaryPlayer; + + //seek input + if ((mf.StartPos > 0) && (mf.clip_list.size < 2)){ + s += " -ss %.1f".printf(mf.StartPos); + } + + s += " -i \"%s\"".printf(mf.Path); + + //stop output + if ((mf.EndPos > 0) && (mf.clip_list.size < 2)){ + s += " -to %.1f".printf(mf.EndPos - mf.StartPos); + } + + //avconv_filters (resample, crop, resize, trim) + s += avconv_filters(mf,settings,true,false); + + //disable audio and subs + s += " -an -sn"; + + s += "\n"; + + return s; + } + + public void play_audio(MediaFile mf, string sox_options){ + if (file_exists(mf.Path)){ + + string output = ""; + string error = ""; + + string cmd = play_audio_command(mf, sox_options); + cmd = "%s".printf(cmd); + + log_debug(cmd); + + execute_command_script_sync(cmd, out output, out error); } + } + + private string play_audio_command (MediaFile mf, string sox_options){ + string s = ""; - s += " --output \"${outputFile}\""; + // decode audio ------------------------- - s += "\n"; + s += PrimaryEncoder; + s += " -nostats"; + s += " -i \"%s\"".printf(mf.Path); + s += " -f aiff"; + s += " -acodec pcm_s16le"; + s += " -vn -sn"; + s += " -y - | "; + + // process with SOX ----------------------- + + s += "sox"; + s += " -t aiff -"; + s += " -t wav -"; + s += " -q"; + s += " %s".printf(sox_options.strip()); + s += " | "; + // pass to ffplay ------------------------- + + s += ff_player; + s += " -i -"; + s += " -x 500 -y 100"; + s += "\n"; + return s; } + public string ff_player{ + owned get{ + if (PrimaryEncoder == "ffmpeg"){ + return "ffplay"; + } + else{ + return "avplay"; + } + } + } + //video functions ----------------------- private bool calculate_video_resolution (MediaFile mf, Json.Object settings, out int OutputWidth, out int OutputHeight){ @@ -2192,7 +2741,7 @@ vf_trim = ""; map = ""; - if (mf.clip_list.size == 0){ + if (mf.clip_list.size < 2){ return; } @@ -2248,7 +2797,7 @@ //encode audio ------------------------ - private string encode_audio_avconv (MediaFile mf, Json.Object settings){ + private string encode_audio_avconv (MediaFile mf, AudioStream stream, Json.Object settings){ string s = ""; Json.Object general = (Json.Object) settings.get_object_member("general"); @@ -2259,7 +2808,7 @@ bool sox_enabled = audio.get_boolean_member("soxEnabled"); if (sox_enabled){ - s += decode_audio_avconv(mf, settings, true); + s += decode_audio_avconv(mf, stream, settings, true); s += PrimaryEncoder; s += " -i -"; } @@ -2267,14 +2816,17 @@ s += PrimaryEncoder; //seek input - if ((mf.StartPos > 0) && (mf.clip_list.size == 0)){ + if ((mf.StartPos > 0) && (mf.clip_list.size < 2)){ s += " -ss %.1f".printf(mf.StartPos); } s += " -i \"${inFile}\""; + //map stream + s += " -map 0:a:%d".printf(stream.TypeIndex); + //stop output - if ((mf.EndPos > 0) && (mf.clip_list.size == 0)){ + if ((mf.EndPos > 0) && (mf.clip_list.size < 2)){ s += " -to %.1f".printf(mf.EndPos - mf.StartPos); } @@ -2372,7 +2924,7 @@ //output if (mf.HasVideo && video.get_string_member("codec") != "disable") { //encode to tempAudio - s += " -y \"${tempAudio}\""; + s += " -y \"${temp_audio_%d}\"".printf(stream.TypeIndex); } else { //encode to outputFile @@ -2384,14 +2936,14 @@ return s; } - private string encode_audio_mp3lame (MediaFile mf, Json.Object settings){ + private string encode_audio_mp3lame (MediaFile mf, AudioStream stream, Json.Object settings){ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); Json.Object video = (Json.Object) settings.get_object_member("video"); Json.Object audio = (Json.Object) settings.get_object_member("audio"); - s += decode_audio_avconv(mf, settings, false); + s += decode_audio_avconv(mf, stream, settings, false); s += "lame --nohist --brief -q 5 --replaygain-fast"; switch (audio.get_string_member("mode")){ case "vbr": @@ -2418,7 +2970,7 @@ s += " -"; if (mf.HasVideo && video.get_string_member("codec") != "disable") { //encode to tempAudio - s += " \"${tempAudio}\""; + s += " \"${temp_audio_%d}\"".printf(stream.TypeIndex); } else { //encode to outputFile @@ -2429,15 +2981,17 @@ return s; } - private string encode_audio_neroaac (MediaFile mf, Json.Object settings){ + private string encode_audio_neroaac (MediaFile mf, AudioStream stream, Json.Object settings){ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); Json.Object video = (Json.Object) settings.get_object_member("video"); Json.Object audio = (Json.Object) settings.get_object_member("audio"); - s += decode_audio_avconv(mf, settings, false); + s += decode_audio_avconv(mf, stream, settings, false); + s += "neroAacEnc -ignorelength"; + switch (audio.get_string_member("mode")){ case "vbr": s += " -q " + audio.get_string_member("quality"); @@ -2449,6 +3003,7 @@ s += " -cbr " + audio.get_string_member("bitrate"); break; } + if (audio.has_member("aacProfile")){ switch(audio.get_string_member("aacProfile")){ case "auto": @@ -2465,40 +3020,43 @@ break; } } + s += " -if -"; + if (mf.HasVideo && video.get_string_member("codec") != "disable") { //encode to tempAudio - s += " -of \"${tempAudio}\""; + s += " -of \"${temp_audio_%d}\"".printf(stream.TypeIndex); + s += "\n"; } else { //encode to outputFile s += " -of \"${outputFile}\""; - } - s += "\n"; - - //add tags - string tags = ""; - string path = get_cmd_path ("neroAacTag"); - if ((path != null) && (path.length > 0)){ - tags += (mf.TrackName.length > 0) ? " -meta:title=\"${tagTitle}\"" : ""; - tags += (mf.TrackNumber.length > 0) ? " -meta:track=\"${tagTrackNum}\"" : ""; - tags += (mf.Artist.length > 0) ? " -meta:artist=\"${tagArtist}\"" : ""; - tags += (mf.Album.length > 0) ? " -meta:album=\"${tagAlbum}\"" : ""; - tags += (mf.Genre.length > 0) ? " -meta:genre=\"${tagGenre}\"" : ""; - tags += (mf.RecordedDate.length > 0) ? " -meta:year=\"${tagYear}\"" : ""; - tags += (mf.Comment.length > 0) ? " -meta:comment=\"${tagComment}\"" : ""; - if (tags.length > 0){ - s += "neroAacTag"; - s += " \"${outputFile}\""; - s += tags; - s += "\n"; - } + s += "\n"; + + //add tags + string tags = ""; + string path = get_cmd_path ("neroAacTag"); + if ((path != null) && (path.length > 0)){ + tags += (mf.TrackName.length > 0) ? " -meta:title=\"${tagTitle}\"" : ""; + tags += (mf.TrackNumber.length > 0) ? " -meta:track=\"${tagTrackNum}\"" : ""; + tags += (mf.Artist.length > 0) ? " -meta:artist=\"${tagArtist}\"" : ""; + tags += (mf.Album.length > 0) ? " -meta:album=\"${tagAlbum}\"" : ""; + tags += (mf.Genre.length > 0) ? " -meta:genre=\"${tagGenre}\"" : ""; + tags += (mf.RecordedDate.length > 0) ? " -meta:year=\"${tagYear}\"" : ""; + tags += (mf.Comment.length > 0) ? " -meta:comment=\"${tagComment}\"" : ""; + if (tags.length > 0){ + s += "neroAacTag"; + s += " \"${outputFile}\""; + s += tags; + s += "\n"; + } + } } return s; } - private string encode_audio_fdkaac (MediaFile mf, Json.Object settings){ + private string encode_audio_fdkaac (MediaFile mf, AudioStream stream, Json.Object settings){ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); @@ -2506,7 +3064,7 @@ Json.Object audio = (Json.Object) settings.get_object_member("audio"); //decode to WAV file with avconv - s += decode_audio_avconv(mf, settings, false, "audio.wav"); + s += decode_audio_avconv(mf, stream, settings, false, "audio.wav"); //encode with aac-enc s += "aac-enc"; @@ -2555,7 +3113,7 @@ if (mf.HasVideo && video.get_string_member("codec") != "disable") { //encode to tempAudio - s += mux_mp4box_aac_to_mp4("audio.aac","\"${tempAudio}\""); + s += mux_mp4box_aac_to_mp4("audio.aac","\"${temp_audio_%d}\"".printf(stream.TypeIndex)); } else { //encode to outputFile @@ -2567,14 +3125,14 @@ return s; } - private string encode_audio_opus (MediaFile mf, Json.Object settings){ + private string encode_audio_opus (MediaFile mf, AudioStream stream, Json.Object settings){ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); Json.Object video = (Json.Object) settings.get_object_member("video"); Json.Object audio = (Json.Object) settings.get_object_member("audio"); - s += decode_audio_avconv(mf, settings, true); + s += decode_audio_avconv(mf, stream, settings, true); s += "opusenc"; //tags @@ -2618,7 +3176,7 @@ //output if (mf.HasVideo && video.get_string_member("codec") != "disable") { //encode to tempAudio - s += " \"${tempAudio}\""; + s += " \"${temp_audio_%d}\"".printf(stream.TypeIndex); } else { //encode to outputFile @@ -2629,7 +3187,7 @@ return s; } - private string encode_audio_oggenc (MediaFile mf, Json.Object settings){ + private string encode_audio_oggenc (MediaFile mf, AudioStream stream, Json.Object settings){ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); @@ -2637,16 +3195,16 @@ Json.Object audio = (Json.Object) settings.get_object_member("audio"); Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); - s += decode_audio_avconv(mf, settings, false); + s += decode_audio_avconv(mf, stream, settings, false); s += "oggenc --quiet"; //mode switch (audio.get_string_member("mode")){ case "vbr": - s += " --bitrate " + audio.get_string_member("bitrate"); + s += " --quality " + audio.get_string_member("quality"); break; case "abr": - s += " --quality " + audio.get_string_member("quality"); + s += " --bitrate " + audio.get_string_member("bitrate"); break; } @@ -2659,19 +3217,26 @@ s += (mf.RecordedDate.length > 0) ? " --date \"${tagYear}\"" : ""; s += (mf.Comment.length > 0) ? " --comment='comment=${tagComment}'" : ""; - //subs - if (subs.get_string_member("mode") == "embed") { - if (mf.SubExt == ".srt" || mf.SubExt == ".lrc") { - s += " --lyrics \"${subFile}\""; - } - } - //output if (mf.HasVideo && video.get_string_member("codec") != "disable") { //encode to tempAudio - s += " --output \"${tempAudio}\""; + s += " --output \"${temp_audio_%d}\"".printf(stream.TypeIndex); } else { + + //encode to output file -- add subs + + foreach(TextStream stm in mf.text_list){ + if (!stm.IsSelected){ + continue; + } + + //encode subs + if (mf.HasSubs && (subs.get_string_member("mode") == "embed")) { + s += " --lyrics \"${temp_subs_%d}\"".printf(stm.TypeIndex); + } + } + //encode to outputFile s += " --output \"${outputFile}\""; } @@ -2754,7 +3319,7 @@ string s = ""; Json.Object general = (Json.Object) settings.get_object_member("general"); - //Json.Object video = (Json.Object) settings.get_object_member("video"); + Json.Object video = (Json.Object) settings.get_object_member("video"); Json.Object audio = (Json.Object) settings.get_object_member("audio"); Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); @@ -2770,19 +3335,59 @@ //output s += " --output \"${outputFile}\""; - //add video - s += " --compression -1:none \"${tempVideo}\""; + //add video tracks + if (mf.HasVideo && video.get_string_member("codec") != "disable") { + foreach(VideoStream stream in mf.video_list){ + if (stream.IsSelected){ + s += " --compression -1:none \"${temp_video_%d}\"".printf(stream.TypeIndex); + } + } + } - //add audio + //add audio tracks if (mf.HasAudio && audio.get_string_member("codec") != "disable") { - s += " --compression -1:none \"${tempAudio}\""; + foreach(AudioStream stream in mf.audio_list){ + if (stream.IsSelected){ + s += " --compression -1:none"; + if (stream.LangCode.length > 0){ + s += " --language -1:%s".printf(stream.LangCode); + if (stream.LangCode == DefaultLanguage){ + s += " --default-track -1:yes"; + } + } + s += " \"${temp_audio_%d}\"".printf(stream.TypeIndex); + } + } } - //add subs + //TODO: Add option to specify default subtitle track + + //add subtitle tracks if (format != "webm") { - if (subs.get_string_member("mode") == "embed") { - if (mf.SubExt == ".srt" || mf.SubExt == ".sub" || mf.SubExt == ".ssa") { - s += " --compression -1:none \"${subFile}\""; + if (mf.HasSubs && (subs.get_string_member("mode") == "embed")) { + foreach(TextStream stm in mf.text_list){ + if (stm.IsSelected){ + if (!stm.IsExternal){ + s += " --compression -1:none"; + if (stm.LangCode.length > 0){ + s += " --language -1:%s".printf(stm.LangCode); + if (stm.LangCode == DefaultLanguage){ + s += " --default-track -1:yes"; + } + } + s += " \"${temp_subs_%d}\"".printf(stm.TypeIndex); + } + else if (stm.IsExternal && (stm.SubExt == ".srt" || stm.SubExt == ".sub" || stm.SubExt == ".ssa")){ + s += " --compression -1:none"; + if (stm.LangCode.length > 0){ + s += " --language -1:%s".printf(stm.LangCode); + if (stm.LangCode == DefaultLanguage){ + s += " --default-track -1:yes"; + } + } + s += " \"${temp_subs_%d}\"".printf(stm.TypeIndex); + } + } } } } @@ -2799,21 +3404,41 @@ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); - //Json.Object video = (Json.Object) settings.get_object_member("video"); + Json.Object video = (Json.Object) settings.get_object_member("video"); Json.Object audio = (Json.Object) settings.get_object_member("audio"); Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); s += "MP4Box -new"; - if (mf.HasAudio && audio.get_string_member("codec") != "disable") { - s += " -add \"${tempAudio}\""; + //add video tracks + if (mf.HasVideo && video.get_string_member("codec") != "disable") { + foreach(VideoStream stream in mf.video_list){ + if (stream.IsSelected){ + s += " -add \"${temp_video_%d}\"".printf(stream.TypeIndex); + } + } } - s += " -add \"${tempVideo}\""; + //add audio tracks + if (mf.HasAudio && audio.get_string_member("codec") != "disable") { + foreach(AudioStream stream in mf.audio_list){ + if (stream.IsSelected){ + s += " -add \"${temp_audio_%d}\"".printf(stream.TypeIndex); + } + } + } - if (subs.get_string_member("mode") == "embed") { - if (mf.SubExt == ".srt" || mf.SubExt == ".sub" || mf.SubExt == ".ttxt" || mf.SubExt == ".xml"){ - s += " -add \"${subFile}\""; + //add subtitle tracks + if (mf.HasSubs && (subs.get_string_member("mode") == "embed")) { + foreach(TextStream stm in mf.text_list){ + if (stm.IsSelected){ + if (!stm.IsExternal){ + s += " -add \"${temp_subs_%d}\"".printf(stm.TypeIndex); + } + else if (stm.IsExternal && (stm.SubExt == ".srt" || stm.SubExt == ".sub" || stm.SubExt == ".ttxt" || stm.SubExt == ".xml")){ + s += " -add \"${temp_subs_%d}\"".printf(stm.TypeIndex); + } + } } } @@ -2836,221 +3461,159 @@ private string mux_avconv (MediaFile mf, Json.Object settings){ string s = ""; - + string map = ""; + string metadata = ""; + int inputIndex = -1; + int outTypeIndex = -1; + Json.Object general = (Json.Object) settings.get_object_member("general"); - //Json.Object video = (Json.Object) settings.get_object_member("video"); + Json.Object video = (Json.Object) settings.get_object_member("video"); Json.Object audio = (Json.Object) settings.get_object_member("audio"); + Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); string format = general.get_string_member("format"); s += PrimaryEncoder; - if (mf.HasAudio && audio.get_string_member("codec") != "disable") { - s += " -i \"${tempAudio}\""; - } - s += " -i \"${tempVideo}\""; - switch(format){ - case "mp4v": - s += " -f mp4"; - break; - case "mkv": - s += " -f matroska"; - break; + //add video tracks + if (mf.HasVideo && video.get_string_member("codec") != "disable") { + foreach(VideoStream stream in mf.video_list){ + if (stream.IsSelected){ + s += " -i \"${temp_video_%d}\"".printf(stream.TypeIndex); + map += " -map %d:0".printf(++inputIndex); + } + } } - s += " -c:a copy -c:v copy -sn"; - s += " -y \"${outputFile}\""; - s += "\n"; - return s; - } + //add audio tracks --------------- - /* - private string mux_avconv_aac_to_mp4 (string input_file, string output_file){ - //Warning: Produces MP4 audio that cannot be read by MKVMerge + outTypeIndex = -1; - string s = ""; + if (mf.HasAudio && audio.get_string_member("codec") != "disable") { + foreach(AudioStream stream in mf.audio_list){ + if (stream.IsSelected){ + outTypeIndex++; + + s += " -i \"${temp_audio_%d}\"".printf(stream.TypeIndex); + map += " -map %d:0".printf(++inputIndex); - s += PrimaryEncoder; - s += " -i %s".printf(input_file); - s += " -f mp4"; - s += " -c:a copy -vn -sn"; - s += " -y %s".printf(output_file); - s += "\n"; - - return s; - } + if ((stream.LangCode.length > 0) && (LanguageCodes.map_2_to_3.has_key(stream.LangCode))){ + metadata += " -metadata:s:a:%d language=%s".printf(outTypeIndex, LanguageCodes.map_2_to_3[stream.LangCode]); + } + } + } + } + //add subtitle tracks ------------------ + + outTypeIndex = -1; + + if (mf.HasSubs && (subs.get_string_member("mode") == "embed")) { + foreach(TextStream stm in mf.text_list){ + if (stm.IsSelected){ + outTypeIndex++; + + if (!stm.IsExternal){ + s += " -i \"${temp_subs_%d}\"".printf(stm.TypeIndex); + map += " -map %d:0".printf(++inputIndex); + + if ((stm.LangCode.length > 0) && (LanguageCodes.map_2_to_3.has_key(stm.LangCode))){ + metadata += " -metadata:s:s:%d language=%s".printf(outTypeIndex, LanguageCodes.map_2_to_3[stm.LangCode]); + } + } + else if (stm.IsExternal && (stm.SubExt == ".srt" || stm.SubExt == ".sub" || stm.SubExt == ".ttxt" || stm.SubExt == ".xml")){ + s += " -i \"${temp_subs_%d}\"".printf(stm.TypeIndex); + map += " -map %d:0".printf(++inputIndex); - private string encode_video_avconv (MediaFile mf, Json.Object settings) - { - string s = ""; + if ((stm.LangCode.length > 0) && (LanguageCodes.map_2_to_3.has_key(stm.LangCode))){ + metadata += " -metadata:s:s:%d language=%s".printf(outTypeIndex, LanguageCodes.map_2_to_3[stm.LangCode]); + } + } + } + } + } - Json.Object general = (Json.Object) settings.get_object_member("general"); - Json.Object video = (Json.Object) settings.get_object_member("video"); - //Json.Object audio = (Json.Object) settings.get_object_member("audio"); + //set output mappings - s += AVEncoder; - s += " -i \"${inFile}\""; - s += " -f " + general.get_string_member("format"); - s += " -an -sn -c:v libvpx"; + s += map; - if (video.get_string_member("mode") == "2pass"){ - s += " -pass {passNumber}"; - } + //set language metadata + + s += metadata; - string kbps = video.get_string_member("bitrate"); - switch(video.get_string_member("mode")){ - case "vbr": - case "2pass": - s += " -b:v %sk".printf(kbps); - break; - case "cbr": - s += " -minrate %sk -maxrate %sk -b:v %sk".printf(kbps,kbps,kbps); + switch(format){ + case "mp4v": + s += " -f mp4"; break; - case "cq": - s += " -crf %s".printf(video.get_string_member("quality")); + case "mkv": + s += " -f matroska"; break; } + + s += " -c:a copy -c:v copy"; - s += " -deadline " + video.get_string_member("speed"); - - // filters ---------- - - //fps - if (video.get_string_member("fpsNum") != "0" && video.get_string_member("fpsDenom") != "0") { - s += " -r " + video.get_string_member("fpsNum") + "/" + video.get_string_member("fpsDenom"); - } - - string vf = ""; - - //cropping - if (mf.crop_enabled()) { - vf += ",crop=%s".printf(mf.crop_values_libav()); - } - - //resizing - int w,h; - bool rescale = calculate_video_resolution(mf, settings, out w, out h); - if (rescale) { - vf += ",scale=%d:%d".printf(w,h); - } - - if (vf.length > 0){ - s += " -vf " + vf[1:vf.length]; + if (subs.get_string_member("mode") == "embed") { + switch(format){ + case "mp4v": + s += " -c:s mov_text"; + break; + case "mkv": + s += " -c:s ass"; + break; + } } - - //--------------- - - //other options - if (video.get_string_member("options").strip() != "") { - s += " " + video.get_string_member("options").strip(); + else{ + s += " -sn"; } - //add output file path placeholder - s += " -y {outputFile}"; - + s += " -y \"${outputFile}\""; s += "\n"; - if (video.get_string_member("mode") == "2pass"){ - string temp = s.replace("{passNumber}","1").replace("{outputFile}","/dev/null"); - temp += s.replace("{passNumber}","2").replace("{outputFile}","\"${tempVideo}\""); - s = temp; - } - else - { - s = s.replace("{outputFile}","\"${tempVideo}\""); - } - return s; } - private string encode_video_vpxenc (MediaFile mf, Json.Object settings){ + private string mux_oggz(MediaFile mf, Json.Object settings){ string s = ""; //Json.Object general = (Json.Object) settings.get_object_member("general"); Json.Object video = (Json.Object) settings.get_object_member("video"); - //Json.Object audio = (Json.Object) settings.get_object_member("audio"); - string vcodec = video.get_string_member("codec"); + Json.Object audio = (Json.Object) settings.get_object_member("audio"); + Json.Object subs = (Json.Object) settings.get_object_member("subtitle"); - s += decode_video_avconv(mf,settings,true); - s += "vpxenc"; - s += " --codec=" + vcodec; + s += "oggz merge"; - if (video.get_string_member("mode") == "2pass"){ - s += " --passes=2 --pass={passNumber} --fpf=stats"; - } - else{ - s += " --passes=1"; - } + s += " -o \"${outputFile}\""; - string vquality = "%.0f".printf(double.parse(video.get_string_member("quality"))); - switch(video.get_string_member("mode")){ - case "vbr": - case "2pass": - s += " --end-usage=vbr --target-bitrate=" + video.get_string_member("bitrate"); - break; - case "cbr": - s += " --end-usage=cbr --target-bitrate=" + video.get_string_member("bitrate"); - break; - case "cq": - s += " --end-usage=cq --cq-level=" + vquality; - break; + //add video tracks + if (mf.HasVideo && video.get_string_member("codec") != "disable") { + foreach(VideoStream stream in mf.video_list){ + if (stream.IsSelected){ + s += " \"${temp_video_%d}\"".printf(stream.TypeIndex); + } + } } - s += " --good"; - switch(video.get_string_member("speed")){ - case "good_0": - s += " --cpu-used=0"; - break; - case "good_1": - s += " --cpu-used=1"; - break; - case "good_2": - s += " --cpu-used=2"; - break; - case "good_3": - s += " --cpu-used=3"; - break; - case "good_4": - s += " --cpu-used=4"; - break; - case "good_5": - s += " --cpu-used=5"; - break; + //add audio tracks + if (mf.HasAudio && audio.get_string_member("codec") != "disable") { + foreach(AudioStream stream in mf.audio_list){ + if (stream.IsSelected){ + s += " \"${temp_audio_%d}\"".printf(stream.TypeIndex); + } + } } - //--------------- - - //other options - if (video.get_string_member("options").strip() != "") { - s += " " + video.get_string_member("options").strip(); + //add subtitle tracks + if (mf.HasSubs && subs.get_string_member("mode") == "embed") { + foreach(TextStream stream in mf.text_list){ + if (stream.IsSelected){ + s += " \"subs_kate_%d.ogg\"".printf(stream.TypeIndex); + } + } } - - //specify input dimensions (required) - int w,h; - calculate_video_resolution(mf, settings, out w, out h); - s += " --width=%d --height=%d".printf(w,h); - - //output - s += " -o {outputFile}"; - - //input - s += " -"; - + s += "\n"; - - if (video.get_string_member("mode") == "2pass"){ - string temp = s.replace("{passNumber}","1").replace("{outputFile}","/dev/null"); - temp += s.replace("{passNumber}","2").replace("{outputFile}","\"${tempVideo}\""); - s = temp; - } - else - { - s = s.replace("{outputFile}","\"${tempVideo}\""); - } - + return s; - }*/ - + } } public class Encoder : GLib.Object{
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/MainWindow.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/MainWindow.vala
Changed
@@ -34,105 +34,114 @@ using TeeJee.Misc; public class MainWindow : Gtk.Window{ - //main toolbar + // main toolbar + private Gtk.Toolbar toolbar; - private MenuToolButton btnAddFiles; - private MenuToolButton btnRemoveFiles; - private Gtk.Menu menuAddFiles; - private Gtk.Menu menuRemoveFiles; - private ToolButton btnEncoders; - private ToolButton btnAppSettings; - private ToolButton btnAbout; - private ToolButton btnDonate; - private ToolButton btnOpenOutputFolder; - - private MenuToolButton btnEditFiles; - private Gtk.Menu menuEditFiles; - - private ToolButton btnStart; - private ToolButton btnStop; - private ToolButton btnFinish; - private ToolButton btnPause; - private ToggleToolButton btnShutdown; - private ToolButton btnBackground; - private SeparatorToolItem separator1; - private SeparatorToolItem separator2; - - //preset toolbar + + private Gtk.Menu menu_add_files; + private Gtk.MenuToolButton btn_add_files; + private Gtk.Menu menu_remove_files; + private Gtk.MenuToolButton btn_remove_files; + private Gtk.Menu menu_edit_files; + private Gtk.MenuToolButton btn_edit_files; + + private Gtk.ToolButton btn_start; + private Gtk.ToolButton btn_stop; + private Gtk.ToolButton btn_finish; + private Gtk.ToolButton btn_pause; + private Gtk.ToggleToolButton btn_shutdown; + private Gtk.ToolButton btn_background; + private Gtk.SeparatorToolItem separator1; + private Gtk.SeparatorToolItem separator2; + private Gtk.ToolButton btn_encoders; + private Gtk.ToolButton btn_app_settings; + private Gtk.ToolButton btn_about; + private Gtk.ToolButton btn_donate; + private Gtk.ToolButton btn_open_output_dir; + + // presets + private Gtk.Toolbar toolbar2; - private ToolButton btnAddPreset; - private ToolButton btnRemovePreset; - private ToolButton btnBrowsePresetFolder; - private ToolButton btnPresetInfo; - - private Box vboxMain; - private Box vboxMain2; - private ComboBox cmbScriptFile; - private ComboBox cmbScriptFolder; - private Label lblScriptFile; - private Label lblScriptFolder; - private Button btnEditPreset; - private TreeView tvFiles; - private ScrolledWindow swFiles; - private Label lblStatus; - private Gtk.Menu menuFile; - private ImageMenuItem miFileInfo; - private ImageMenuItem miFileInfoOutput; - private ImageMenuItem miFileSkip; - private Gtk.MenuItem miFileCropAuto; - private Gtk.MenuItem miFileTrim; - private Gtk.MenuItem miFileRemove; - private Gtk.MenuItem miFilePlaySource; - private Gtk.MenuItem miFilePlayOutput; + private Gtk.ToolButton btn_add_preset; + private Gtk.ToolButton btn_remove_preset; + private Gtk.ToolButton btn_open_preset_dir; + private Gtk.ToolButton btn_preset_info; + + private Gtk.Box vbox_main; + private Gtk.Box vbox_main_2; + private Gtk.ComboBox cmb_script_file; + private Gtk.ComboBox cmb_script_dir; + private Gtk.Button btn_edit_preset; + private Gtk.Label lbl_status; + + // right-click menu + + private Gtk.Menu menu_file; + private Gtk.ImageMenuItem mi_file_info; + private Gtk.ImageMenuItem mi_file_info_output; + private Gtk.ImageMenuItem mi_file_skip; + private Gtk.MenuItem mi_file_crop; + private Gtk.MenuItem mi_file_trim; + private Gtk.MenuItem mi_file_remove; + private Gtk.MenuItem mi_file_play_src; + private Gtk.MenuItem mi_file_play_output; private Gtk.MenuItem miFileSeparator1; private Gtk.MenuItem miFileSeparator2; - private Gtk.MenuItem miFileOpenTemp; - private Gtk.MenuItem miFileOpenOutput; - private Gtk.MenuItem miFileOpenLogFile; - private Gtk.MenuItem miListViewColumns; + private Gtk.MenuItem mi_file_open_temp_dir; + private Gtk.MenuItem mi_file_open_output_dir; + private Gtk.MenuItem mi_file_open_logfile; + private Gtk.MenuItem mi_listview_columns; + + // list view columns + + private Gtk.TreeView tv_files; + private Gtk.ScrolledWindow sw_files; - private TreeViewColumn colName; - private TreeViewColumn colSize; - private TreeViewColumn colDuration; - //private TreeViewColumn colCrop; - private TreeViewColumn colProgress; - private TreeViewColumn colSpacer; - private TreeViewColumn colFileFormat; - private TreeViewColumn colAFormat; - private TreeViewColumn colAChannels; - private TreeViewColumn colARate; - private TreeViewColumn colBitrate; - private TreeViewColumn colABitrate; - private TreeViewColumn colVBitrate; - private TreeViewColumn colVFormat; - private TreeViewColumn colVWidth; - private TreeViewColumn colVHeight; - private TreeViewColumn colVFps; - private TreeViewColumn colArtist; - private TreeViewColumn colAlbum; - private TreeViewColumn colGenre; - private TreeViewColumn colTrackName; - private TreeViewColumn colTrackNum; - private TreeViewColumn colComments; - private TreeViewColumn colRecordedDate; - private Grid gridConfig; + private Gtk.TreeViewColumn col_name; + private Gtk.TreeViewColumn col_size; + private Gtk.TreeViewColumn col_duration; + private Gtk.TreeViewColumn col_progress; + private Gtk.TreeViewColumn col_spacer; + private Gtk.TreeViewColumn col_file_format; + private Gtk.TreeViewColumn col_aformat; + private Gtk.TreeViewColumn col_channels; + private Gtk.TreeViewColumn col_sampling; + private Gtk.TreeViewColumn col_bitrate; + private Gtk.TreeViewColumn col_abitrate; + private Gtk.TreeViewColumn col_vbitrate; + private Gtk.TreeViewColumn col_vformat; + private Gtk.TreeViewColumn col_width; + private Gtk.TreeViewColumn col_height; + private Gtk.TreeViewColumn col_fps; + private Gtk.TreeViewColumn col_artist; + private Gtk.TreeViewColumn col_album; + private Gtk.TreeViewColumn col_genre; + private Gtk.TreeViewColumn col_track_name; + private Gtk.TreeViewColumn col_track_num; + private Gtk.TreeViewColumn col_comments; + private Gtk.TreeViewColumn col_recorded_date; + private Gtk.Grid grid_config; private Gee.HashMap<TreeViewColumn,TreeViewListColumn> col_list; - private Regex regexGeneric; - private Regex regexMkvMerge; - private Regex regexFFmpeg; - private Regex regexLibAV; - private Regex regexLibAV_video; - private Regex regexLibAV_audio; - private Regex regexX264; - + // regular expressions + + private Regex rex_generic; + private Regex rex_mkvmerge; + private Regex rex_ffmpeg; + private Regex rex_libav; + private Regex rex_libav_video; + private Regex rex_libav_audio; + private Regex rex_x264; + + // timers and status + private string statusLine; private uint timerID = 0; private uint startupTimer = 0; private uint statusTimer = 0; private uint cpuUsageTimer = 0; - + private bool paused = false; private MediaFile lastFile; private string msg_add; @@ -146,16 +155,15 @@ public MainWindow() { set_window_title(); window_position = WindowPosition.CENTER; - destroy.connect (Gtk.main_quit); set_default_size (650, 20); icon = get_app_icon(16); Gtk.drag_dest_set (this,Gtk.DestDefaults.ALL, targets, Gdk.DragAction.COPY); drag_data_received.connect(on_drag_data_received); - //vboxMain - vboxMain = new Box (Orientation.VERTICAL, 0); - add (vboxMain); + //vbox_main + vbox_main = new Box (Orientation.VERTICAL, 0); + add (vbox_main); //main toolbar init_ui_main_toolbar(); @@ -177,6 +185,19 @@ //regex init_regular_expressions(); + + //destroy handler + this.delete_event.connect (()=>{ + if (App.Status == AppStatus.IDLE){ + convert_finish(); + return true; + } + else{ + return false; + } + }); + + this.destroy.connect(Gtk.main_quit); } // toolbar ------------------------------------- @@ -186,95 +207,63 @@ toolbar = new Gtk.Toolbar(); toolbar.toolbar_style = ToolbarStyle.BOTH_HORIZ; toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR); - vboxMain.pack_start (toolbar, false, false, 0); + vbox_main.pack_start (toolbar, false, false, 0); init_ui_main_toolbar_add(); init_ui_main_toolbar_remove(); - /* - //btnAddFiles - btnAddFiles = new Gtk.ToolButton.from_stock ("gtk-add"); - btnAddFiles.label = _("Add Files"); - btnAddFiles.is_important = true; - btnAddFiles.clicked.connect (btnAddFiles_clicked); - btnAddFiles.set_tooltip_text (_("Add file(s)")); - toolbar.add (btnAddFiles); - - //btnRemoveFiles - btnRemoveFiles = new Gtk.ToolButton.from_stock ("gtk-remove"); - btnRemoveFiles.is_important = true; - btnRemoveFiles.clicked.connect (btnRemoveFiles_clicked); - btnRemoveFiles.set_tooltip_text (_("Remove selected file(s)")); - toolbar.add (btnRemoveFiles); - - //btnClearFiles - btnClearFiles = new Gtk.ToolButton.from_stock ("gtk-clear"); - btnClearFiles.is_important = true; - btnClearFiles.clicked.connect (btnClearFiles_clicked); - btnClearFiles.set_tooltip_text (_("Remove all file(s)")); - toolbar.add (btnClearFiles); - */ - //separator separator1 = new Gtk.SeparatorToolItem(); toolbar.add(separator1); init_ui_main_toolbar_edit(); - /*//btnCrop - btnCrop = new Gtk.ToolButton.from_stock ("gtk-edit"); - btnCrop.is_important = true; - btnCrop.label = _("Crop"); - btnCrop.clicked.connect (crop_videos); - btnCrop.set_tooltip_text (_("Crop Videos")); - toolbar.add (btnCrop);*/ - - //btnStart - btnStart = new Gtk.ToolButton.from_stock ("gtk-media-play"); - btnStart.is_important = true; - btnStart.label = _("Start"); - btnStart.clicked.connect (start); - btnStart.set_tooltip_text (_("Start")); - toolbar.add (btnStart); - - //btnPause - btnPause = new Gtk.ToolButton.from_stock ("gtk-media-pause"); - btnPause.is_important = true; - btnPause.clicked.connect (btnPause_clicked); - btnPause.set_tooltip_text (_("Pause")); - btnPause.visible = false; - btnPause.no_show_all = true; - toolbar.add (btnPause); - - //btnStop - btnStop = new Gtk.ToolButton.from_stock ("gtk-media-stop"); - btnStop.is_important = true; - btnStop.clicked.connect (btnStop_clicked); - btnStop.set_tooltip_text (_("Abort")); - btnStop.visible = false; - btnStop.no_show_all = true; - toolbar.add (btnStop); - - //btnBackground - btnBackground = new Gtk.ToolButton.from_stock ("gtk-execute"); - btnBackground.label = _("Background"); - btnBackground.visible = false; - btnBackground.no_show_all = true; - btnBackground.is_important = true; - btnBackground.clicked.connect (btnBackground_clicked); - btnBackground.set_tooltip_text (_("Run in background with lower priority")); - toolbar.add (btnBackground); - - //btnFinish - btnFinish = new Gtk.ToolButton.from_stock ("gtk-ok"); - btnFinish.is_important = true; - btnFinish.label = _("Finish"); - btnFinish.clicked.connect (() => { convert_finish(); }); - btnFinish.set_tooltip_text (_("Finish")); - btnFinish.visible = false; - btnFinish.no_show_all = true; - toolbar.add (btnFinish); + //btn_start + btn_start = new Gtk.ToolButton.from_stock ("gtk-media-play"); + btn_start.is_important = true; + btn_start.label = _("Start"); + btn_start.clicked.connect (start); + btn_start.set_tooltip_text (_("Start")); + toolbar.add (btn_start); + + //btn_pause + btn_pause = new Gtk.ToolButton.from_stock ("gtk-media-pause"); + btn_pause.is_important = true; + btn_pause.clicked.connect (btn_pause_clicked); + btn_pause.set_tooltip_text (_("Pause")); + btn_pause.visible = false; + btn_pause.no_show_all = true; + toolbar.add (btn_pause); + + //btn_stop + btn_stop = new Gtk.ToolButton.from_stock ("gtk-media-stop"); + btn_stop.is_important = true; + btn_stop.clicked.connect (btn_stop_clicked); + btn_stop.set_tooltip_text (_("Abort")); + btn_stop.visible = false; + btn_stop.no_show_all = true; + toolbar.add (btn_stop); + + //btn_background + btn_background = new Gtk.ToolButton.from_stock ("gtk-execute"); + btn_background.label = _("Background"); + btn_background.visible = false; + btn_background.no_show_all = true; + btn_background.is_important = true; + btn_background.clicked.connect (btn_background_clicked); + btn_background.set_tooltip_text (_("Run in background with lower priority")); + toolbar.add (btn_background); + + //btn_finish + btn_finish = new Gtk.ToolButton.from_stock ("gtk-ok"); + btn_finish.is_important = true; + btn_finish.label = _("Finish"); + btn_finish.clicked.connect (() => { convert_finish(); }); + btn_finish.set_tooltip_text (_("Finish")); + btn_finish.visible = false; + btn_finish.no_show_all = true; + toolbar.add (btn_finish); //separator separator2 = new Gtk.SeparatorToolItem(); @@ -282,65 +271,65 @@ separator2.set_expand (true); toolbar.add (separator2); - //btnAppSettings - btnAppSettings = new Gtk.ToolButton.from_stock ("gtk-preferences"); - btnAppSettings.clicked.connect (btnAppSettings_clicked); - btnAppSettings.set_tooltip_text (_("Application Settings")); - toolbar.add (btnAppSettings); + //btn_app_settings + btn_app_settings = new Gtk.ToolButton.from_stock ("gtk-preferences"); + btn_app_settings.clicked.connect (btn_app_settings_clicked); + btn_app_settings.set_tooltip_text (_("Application Settings")); + toolbar.add (btn_app_settings); - //btnEncoders - btnEncoders = new Gtk.ToolButton.from_stock ("gtk-info"); - btnEncoders.clicked.connect (btnEncoders_clicked); - btnEncoders.set_tooltip_text (_("Encoders")); - toolbar.add (btnEncoders); + //btn_encoders + btn_encoders = new Gtk.ToolButton.from_stock ("gtk-info"); + btn_encoders.clicked.connect (btn_encoders_clicked); + btn_encoders.set_tooltip_text (_("Encoders")); + toolbar.add (btn_encoders); //btn_donate - btnDonate = new Gtk.ToolButton.from_stock ("gtk-dialog-info"); - btnDonate.is_important = false; - btnDonate.icon_widget = get_shared_icon("donate","donate.svg",24); - btnDonate.label = _("Donate"); - btnDonate.set_tooltip_text (_("Donate")); - toolbar.add(btnDonate); - - btnDonate.clicked.connect(btnDonation_clicked); - - //btnAbout - btnAbout = new Gtk.ToolButton.from_stock ("gtk-about"); - btnAbout.is_important = false; - btnAbout.icon_widget = get_shared_icon("gtk-about","help-info.svg",24); - btnAbout.clicked.connect (btnAbout_clicked); - btnAbout.set_tooltip_text (_("About")); - toolbar.add (btnAbout); - - //btnShutdown - btnShutdown = new Gtk.ToggleToolButton.from_stock ("gtk-quit"); - btnShutdown.label = _("Shutdown"); - btnShutdown.visible = false; - btnShutdown.no_show_all = true; - btnShutdown.is_important = true; - btnShutdown.clicked.connect (btnShutdown_clicked); - btnShutdown.set_tooltip_text (_("Shutdown system after completion")); - toolbar.add (btnShutdown); - - //btnOpenOutputFolder - btnOpenOutputFolder = new Gtk.ToolButton.from_stock ("gtk-directory"); - //btnOpenOutputFolder.is_important = true; - btnOpenOutputFolder.label = _("Output"); - btnOpenOutputFolder.clicked.connect (btnOpenOutputFolder_click); - btnOpenOutputFolder.set_tooltip_text (_("Open output folder")); - btnOpenOutputFolder.visible = false; - btnOpenOutputFolder.no_show_all = true; - toolbar.add (btnOpenOutputFolder); + btn_donate = new Gtk.ToolButton.from_stock ("gtk-dialog-info"); + btn_donate.is_important = false; + btn_donate.icon_widget = get_shared_icon("donate","donate.svg",24); + btn_donate.label = _("Donate"); + btn_donate.set_tooltip_text (_("Donate")); + toolbar.add(btn_donate); + + btn_donate.clicked.connect(btnDonation_clicked); + + //btn_about + btn_about = new Gtk.ToolButton.from_stock ("gtk-about"); + btn_about.is_important = false; + btn_about.icon_widget = get_shared_icon("gtk-about","help-info.svg",24); + btn_about.clicked.connect (btn_about_clicked); + btn_about.set_tooltip_text (_("About")); + toolbar.add (btn_about); + + //btn_shutdown + btn_shutdown = new Gtk.ToggleToolButton.from_stock ("gtk-quit"); + btn_shutdown.label = _("Shutdown"); + btn_shutdown.visible = false; + btn_shutdown.no_show_all = true; + btn_shutdown.is_important = true; + btn_shutdown.clicked.connect (btn_shutdown_clicked); + btn_shutdown.set_tooltip_text (_("Shutdown system after completion")); + toolbar.add (btn_shutdown); + + //btn_open_output_dir + btn_open_output_dir = new Gtk.ToolButton.from_stock ("gtk-directory"); + //btn_open_output_dir.is_important = true; + btn_open_output_dir.label = _("Output"); + btn_open_output_dir.clicked.connect (btn_open_output_dir_click); + btn_open_output_dir.set_tooltip_text (_("Open output folder")); + btn_open_output_dir.visible = false; + btn_open_output_dir.no_show_all = true; + toolbar.add (btn_open_output_dir); } private void init_ui_main_toolbar_add(){ // menuAdd - menuAddFiles = new Gtk.Menu(); + menu_add_files = new Gtk.Menu(); // miAddFile var miAddFile = new Gtk.MenuItem(); miAddFile.activate.connect (() => { select_items(true); }); - menuAddFiles.append(miAddFile); + menu_add_files.append(miAddFile); var box = new Gtk.Box(Orientation.HORIZONTAL,6); box.add(get_shared_icon("gtk-file","",24)); @@ -350,37 +339,36 @@ // miAddFolder var miAddFolder = new Gtk.MenuItem(); miAddFolder.activate.connect (() => { select_items(false); }); - menuAddFiles.append(miAddFolder); + menu_add_files.append(miAddFolder); box = new Gtk.Box(Orientation.HORIZONTAL,6); box.add(get_shared_icon("gtk-directory","",24)); box.add(new Gtk.Label(_("Add Folder(s)..."))); miAddFolder.add(box); - //btnAddFiles - btnAddFiles = new Gtk.MenuToolButton.from_stock ("gtk-add"); - btnAddFiles.set_menu(menuAddFiles); - btnAddFiles.is_important = true; - btnAddFiles.set_tooltip_text (_("Add File(s)")); - toolbar.add (btnAddFiles); + //btn_add_files + btn_add_files = new Gtk.MenuToolButton.from_stock ("gtk-add"); + btn_add_files.set_menu(menu_add_files); + btn_add_files.is_important = true; + btn_add_files.set_tooltip_text (_("Add File(s)")); + toolbar.add (btn_add_files); - btnAddFiles.clicked.connect(()=>{ - //menuAddFiles.popup (null, null, null, 0, Gtk.get_current_event_time()); + btn_add_files.clicked.connect(()=>{ + //menu_add_files.popup (null, null, null, 0, Gtk.get_current_event_time()); select_items(true); }); - menuAddFiles.show_all(); + menu_add_files.show_all(); } private void init_ui_main_toolbar_remove(){ // menuRemove - menuRemoveFiles = new Gtk.Menu(); + menu_remove_files = new Gtk.Menu(); // miRemoveFiles var miRemoveFiles = new Gtk.MenuItem(); - //miRemoveFiles.set_reserve_indicator(false); - miRemoveFiles.activate.connect (() => { btnRemoveFiles_clicked(); }); - menuRemoveFiles.append(miRemoveFiles); + miRemoveFiles.activate.connect (() => { btn_remove_files_clicked(); }); + menu_remove_files.append(miRemoveFiles); var box = new Gtk.Box(Orientation.HORIZONTAL,6); box.add(get_shared_icon("gtk-remove","",24)); @@ -392,37 +380,36 @@ var miClearList = new Gtk.MenuItem(); miClearList.set_reserve_indicator(false); miClearList.activate.connect (() => { btnClearFiles_clicked(); }); - menuRemoveFiles.append(miClearList); + menu_remove_files.append(miClearList); box = new Gtk.Box(Orientation.HORIZONTAL,6); box.add(get_shared_icon("gtk-clear","",24)); box.add(new Gtk.Label(_("Clear List"))); miClearList.add(box); - //btnRemoveFiles - btnRemoveFiles = new Gtk.MenuToolButton.from_stock ("gtk-remove"); - btnRemoveFiles.set_menu(menuRemoveFiles); - btnRemoveFiles.is_important = true; - btnRemoveFiles.set_tooltip_text (_("Remove File(s)")); - toolbar.add (btnRemoveFiles); + //btn_remove_files + btn_remove_files = new Gtk.MenuToolButton.from_stock ("gtk-remove"); + btn_remove_files.set_menu(menu_remove_files); + btn_remove_files.is_important = true; + btn_remove_files.set_tooltip_text (_("Remove File(s)")); + toolbar.add (btn_remove_files); - btnRemoveFiles.clicked.connect(()=>{ - //menuRemoveFiles.popup (null, null, null, 0, Gtk.get_current_event_time()); - btnRemoveFiles_clicked(); + btn_remove_files.clicked.connect(()=>{ + //menu_remove_files.popup (null, null, null, 0, Gtk.get_current_event_time()); + btn_remove_files_clicked(); }); - menuRemoveFiles.show_all(); + menu_remove_files.show_all(); } private void init_ui_main_toolbar_edit(){ - // menuEditFiles - menuEditFiles = new Gtk.Menu(); + // menu_edit_files + menu_edit_files = new Gtk.Menu(); // miCropVideos var miCropVideos = new Gtk.MenuItem(); - //miCropVideos.set_reserve_indicator(false); miCropVideos.activate.connect (() => { btnCropVideos_clicked(); }); - menuEditFiles.append(miCropVideos); + menu_edit_files.append(miCropVideos); var box = new Gtk.Box(Orientation.HORIZONTAL,6); //box.add(get_shared_icon("gtk-edit","",32)); @@ -433,106 +420,169 @@ var miTrimDuration = new Gtk.MenuItem(); miTrimDuration.set_reserve_indicator(false); miTrimDuration.activate.connect (() => { btnTrimDuration_clicked(); }); - menuEditFiles.append(miTrimDuration); + menu_edit_files.append(miTrimDuration); box = new Gtk.Box(Orientation.HORIZONTAL,6); //box.add(get_shared_icon("gtk-edit","",32)); box.add(new Gtk.Label(_("Trim Duration"))); miTrimDuration.add(box); - //btnEditFiles - btnEditFiles = new Gtk.MenuToolButton.from_stock ("gtk-edit"); - btnEditFiles.label = _("Crop"); - btnEditFiles.set_menu(menuEditFiles); - btnEditFiles.is_important = true; - btnEditFiles.set_tooltip_text (_("Crop Videos")); - toolbar.add (btnEditFiles); + //btn_edit_files + btn_edit_files = new Gtk.MenuToolButton.from_stock ("gtk-edit"); + btn_edit_files.label = _("Crop"); + btn_edit_files.set_menu(menu_edit_files); + btn_edit_files.is_important = true; + btn_edit_files.set_tooltip_text (_("Crop Videos")); + toolbar.add (btn_edit_files); - btnEditFiles.clicked.connect(()=>{ - //menuEditFiles.popup (null, null, null, 0, Gtk.get_current_event_time()); + btn_edit_files.clicked.connect(()=>{ + //menu_edit_files.popup (null, null, null, 0, Gtk.get_current_event_time()); btnCropVideos_clicked(); }); - menuEditFiles.show_all(); + menu_edit_files.show_all(); } // file list ------------------------------------- private void init_list_view(){ - //tvFiles - tvFiles = new TreeView(); - tvFiles.get_selection().mode = SelectionMode.MULTIPLE; - tvFiles.set_tooltip_text (_("Right-click for more options")); - tvFiles.headers_clickable = true; - tvFiles.rules_hint = true; - - swFiles = new ScrolledWindow(tvFiles.get_hadjustment(), tvFiles.get_vadjustment()); - swFiles.set_shadow_type (ShadowType.ETCHED_IN); - swFiles.add (tvFiles); - swFiles.margin = 3; - swFiles.set_size_request (-1, 300); - vboxMain.pack_start (swFiles, true, true, 0); + + // tv_files --------------------------------------------------- + + tv_files = new TreeView(); + tv_files.get_selection().mode = SelectionMode.MULTIPLE; + tv_files.set_tooltip_text (_("Right-click for more options")); + tv_files.headers_clickable = true; + tv_files.rules_hint = true; + + sw_files = new ScrolledWindow(tv_files.get_hadjustment(), tv_files.get_vadjustment()); + sw_files.set_shadow_type (ShadowType.ETCHED_IN); + sw_files.add (tv_files); + sw_files.margin = 3; + sw_files.set_size_request (-1, 300); + vbox_main.pack_start (sw_files, true, true, 0); CellRendererText cellText; + TreeViewColumn col; + + // col_name ------------------------------------------------- - //colName - colName = new TreeViewColumn(); - colName.title = _("File"); - colName.expand = true; - colName.resizable = true; - colName.clickable = true; - colName.reorderable = true; - colName.min_width = 200; - colName.sort_column_id = InputField.FILE_PATH; + col = new TreeViewColumn(); + col.title = _("File"); + col.expand = true; + col.resizable = true; + col.clickable = true; + col.reorderable = true; + col.min_width = 200; + col.sort_column_id = InputField.FILE_PATH; + tv_files.append_column(col); + col_name = col; + //icon CellRendererPixbuf cellThumb = new CellRendererPixbuf (); - colName.pack_start (cellThumb, false); - + col.pack_start (cellThumb, false); + col.set_attributes(cellThumb, "height", InputField.ROW_HEIGHT); + + //toggle + var cell_select = new CellRendererToggle (); + cell_select.activatable = true; + col.pack_start (cell_select, false); + col.set_attributes(cell_select, "height", InputField.ROW_HEIGHT); + + //spacer cellText = new CellRendererText(); - colName.pack_start (cellText, false); - + col.pack_start (cellText, false); + col.set_attributes(cellText, "height", InputField.ROW_HEIGHT); + + //name cellText = new CellRendererText(); cellText.ellipsize = Pango.EllipsizeMode.END; - colName.pack_start (cellText, false); + col.pack_start (cellText, false); + col.set_attributes(cellText, "height", InputField.ROW_HEIGHT); + + //set toggle + col.set_cell_data_func (cell_select, (cell_layout, cell, model, iter) => { + bool selected, isChild; + model.get (iter, InputField.IS_CHILD, out isChild, InputField.IS_SELECTED, out selected, -1); + if (isChild){ + (cell as Gtk.CellRendererToggle).visible = true; + (cell as Gtk.CellRendererToggle).active = selected; + } + else{ + (cell as Gtk.CellRendererToggle).visible = false; + } + }); - colName.set_cell_data_func (cellThumb, (cell_layout, cell, model, iter)=>{ + //toggle handler + cell_select.toggled.connect((path) => { + var store = (Gtk.TreeStore) tv_files.model; + bool selected, isChild; + MediaStream stream; + + TreeIter iter; + store.get_iter_from_string (out iter, path); + store.get (iter, InputField.STREAM_REF, out stream, -1); + store.get (iter, InputField.IS_CHILD, out isChild, -1); + store.get (iter, InputField.IS_SELECTED, out selected, -1); + + stream.IsSelected = !selected; + + store.set(iter, InputField.IS_SELECTED, stream.IsSelected, -1); + }); + + //set icon + col.set_cell_data_func (cellThumb, (cell_layout, cell, model, iter)=>{ string imagePath; - bool hasVideo; - model.get (iter, InputField.FILE_THUMB, out imagePath, InputField.FILE_HAS_VIDEO, out hasVideo, -1); + bool hasVideo, isChild; + model.get (iter, InputField.FILE_THUMB, out imagePath, InputField.FILE_HAS_VIDEO, out hasVideo, InputField.IS_CHILD, out isChild, -1); Gdk.Pixbuf pixThumb = null; try{ - if (App.TileView){ - pixThumb = new Gdk.Pixbuf.from_file_at_scale(imagePath,MediaFile.ThumbnailWidth,MediaFile.ThumbnailHeight,true); + if (isChild){ + cell.visible = false; } else{ - if (hasVideo){ - var img = get_shared_icon("video-x-generic","video.svg",16); - pixThumb = (img == null) ? null : img.pixbuf; + if (App.TileView){ + pixThumb = new Gdk.Pixbuf.from_file_at_scale(imagePath,MediaFile.ThumbnailWidth,MediaFile.ThumbnailHeight,true); } else{ - var img = get_shared_icon("audio-x-generic","audio.svg",16); - pixThumb = (img == null) ? null : img.pixbuf; + if (hasVideo){ + var img = get_shared_icon("video-x-generic","video.svg",16); + pixThumb = (img == null) ? null : img.pixbuf; + } + else{ + var img = get_shared_icon("audio-x-generic","audio.svg",16); + pixThumb = (img == null) ? null : img.pixbuf; + } } + + cell.visible = true; + (cell as Gtk.CellRendererPixbuf).pixbuf = pixThumb; } } catch(Error e){ log_error (e.message); } - (cell as Gtk.CellRendererPixbuf).pixbuf = pixThumb; + }); - colName.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + //set name + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ string fileName, duration, formatInfo, spanStart, spanEnd; int64 fileSize; - MediaFile mf; - model.get (iter, InputField.FILE_REF, out mf, -1); model.get (iter, InputField.FILE_NAME, out fileName, -1); model.get (iter, InputField.FILE_SIZE, out fileSize, -1); model.get (iter, InputField.FILE_DURATION, out duration, -1); + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + spanStart = "<span foreground='#606060'>"; spanEnd = "</span>"; fileName = fileName.replace("&","&"); @@ -541,498 +591,974 @@ + ((mf.VideoFormat.length > 0) ? (" - " + mf.VideoFormat) : "") + ((mf.AudioFormat.length > 0) ? (" - " + mf.AudioFormat) : ""); - if (App.TileView){ - (cell as Gtk.CellRendererText).markup = "%s\n%s%s | %s\n%s%s".printf(fileName, spanStart, duration, format_file_size(fileSize), formatInfo, spanEnd); + if (isChild){ + (cell as Gtk.CellRendererText).markup = fileName; } else{ - (cell as Gtk.CellRendererText).text = fileName; + if (App.TileView){ + (cell as Gtk.CellRendererText).markup = "%s\n%s%s | %s\n%s%s".printf(fileName, spanStart, duration, format_file_size(fileSize), formatInfo, spanEnd); + } + else{ + (cell as Gtk.CellRendererText).text = fileName; + } } }); - tvFiles.append_column(colName); + // col_size ----------------------------------------------- - //colSize - colSize = new TreeViewColumn(); - colSize.title = _("Size"); - colSize.clickable = true; - colSize.reorderable = true; - colSize.sort_column_id = InputField.FILE_SIZE; - tvFiles.append_column(colSize); + col = new TreeViewColumn(); + col.title = _("Size"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_SIZE; + tv_files.append_column(col); + col_size = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colSize.pack_start (cellText, false); - //colSize.set_attributes(cellText, "text", InputField.FILE_SIZE); - colSize.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ - int64 val; - model.get (iter, InputField.FILE_SIZE, out val, -1); - (cell as Gtk.CellRendererText).text = format_file_size(val); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is VideoStream){ + var video = stream as VideoStream; + if (video.StreamSize > 0){ + txt = format_file_size(video.StreamSize); + } + } + else if (stream is AudioStream){ + var audio = stream as AudioStream; + if (audio.StreamSize > 0){ + txt = format_file_size(audio.StreamSize); + } + } + else if (stream is TextStream){ + var text = stream as TextStream; + if (text.StreamSize > 0){ + txt = format_file_size(text.StreamSize); + } + } + } + else{ + txt = format_file_size(mf.Size); + } + + (cell as Gtk.CellRendererText).text = txt; }); - //colDuration - colDuration = new TreeViewColumn(); - colDuration.title = _("Duration"); - colDuration.clickable = true; - colDuration.reorderable = true; - colDuration.sort_column_id = InputField.FILE_DURATION; - tvFiles.append_column(colDuration); + // col_duration -------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("Duration"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_DURATION; + tv_files.append_column(col); + col_duration = col; cellText = new CellRendererText(); - colDuration.pack_start (cellText, false); - colDuration.set_attributes(cellText, "text", InputField.FILE_DURATION); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); - //colFileFormat - colFileFormat = new TreeViewColumn(); - colFileFormat.title = _("Format"); - colFileFormat.clickable = true; - colFileFormat.reorderable = true; - colFileFormat.sort_column_id = InputField.FILE_FFORMAT; - tvFiles.append_column(colFileFormat); + string txt = ""; + + if (isChild){ + if (stream is VideoStream){ + var video = stream as VideoStream; + if (video.Duration > 0){ + txt = format_duration(video.Duration); + } + } + else if (stream is AudioStream){ + var audio = stream as AudioStream; + if (audio.Duration > 0){ + txt = format_duration(audio.Duration); + } + } + } + else{ + txt = format_duration(mf.Duration); + } + + (cell as Gtk.CellRendererText).text = txt; + }); + + // col_file_format -------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("Format"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_FFORMAT; + tv_files.append_column(col); + col_file_format = col; cellText = new CellRendererText(); - colFileFormat.pack_start (cellText, false); - colFileFormat.set_attributes(cellText, "text", InputField.FILE_FFORMAT); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is VideoStream){ + var video = stream as VideoStream; + if (video.Format.length > 0){ + txt = "%s".printf(video.Format); + } + } + else if (stream is AudioStream){ + var audio = stream as AudioStream; + if (audio.Format.length > 0){ + txt = "%s".printf(audio.Format); + } + } + else if (stream is TextStream){ + var text = stream as TextStream; + if (text.Format.length > 0){ + txt = "%s".printf(text.Format); + } + } + } + else{ + if (mf.FileFormat.length > 0){ + txt = "%s".printf(mf.FileFormat); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); + + // col_aformat --------------------------------------------- - //colAFormat - colAFormat = new TreeViewColumn(); - colAFormat.title = _("A-Fmt"); - colAFormat.clickable = true; - colAFormat.reorderable = true; - colAFormat.sort_column_id = InputField.FILE_AFORMAT; - tvFiles.append_column(colAFormat); + col = new TreeViewColumn(); + col.title = _("A-Fmt"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_AFORMAT; + tv_files.append_column(col); + col_aformat = col; cellText = new CellRendererText(); - colAFormat.pack_start (cellText, false); - colAFormat.set_attributes(cellText, "text", InputField.FILE_AFORMAT); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is AudioStream){ + var audio = stream as AudioStream; + if (audio.Format.length > 0){ + txt = "%s".printf(audio.Format); + } + } + } + else{ + if (mf.AudioFormat.length > 0){ + txt = "%s".printf(mf.AudioFormat); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); + + // col_vformat ------------------------------------------- - //colVFormat - colVFormat = new TreeViewColumn(); - colVFormat.title = _("V-Fmt"); - colVFormat.clickable = true; - colVFormat.reorderable = true; - colVFormat.sort_column_id = InputField.FILE_VFORMAT; - tvFiles.append_column(colVFormat); + col = new TreeViewColumn(); + col.title = _("V-Fmt"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_VFORMAT; + tv_files.append_column(col); + col_vformat = col; cellText = new CellRendererText(); - colVFormat.pack_start (cellText, false); - colVFormat.set_attributes(cellText, "text", InputField.FILE_VFORMAT); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is VideoStream){ + var video = stream as VideoStream; + if (video.Format.length > 0){ + txt = "%s".printf(video.Format); + } + } + } + else{ + if (mf.VideoFormat.length > 0){ + txt = "%s".printf(mf.VideoFormat); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); - //colAChannels - colAChannels = new TreeViewColumn(); - colAChannels.title = _("A-Ch"); - colAChannels.clickable = true; - colAChannels.reorderable = true; - colAChannels.sort_column_id = InputField.FILE_ACHANNELS; - tvFiles.append_column(colAChannels); + // col_channels ------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("A-Ch"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_ACHANNELS; + tv_files.append_column(col); + col_channels = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colAChannels.pack_start (cellText, false); - //colAChannels.set_attributes(cellText, "text", InputField.FILE_ACHANNELS); - colAChannels.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ MediaFile mf; - int val; - model.get (iter, InputField.FILE_REF, out mf, InputField.FILE_ACHANNELS, out val, -1); - (cell as Gtk.CellRendererText).text = mf.HasAudio ? "%d".printf(val) : ""; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is AudioStream){ + var audio = stream as AudioStream; + if (audio.Channels > 0){ + txt = "%d".printf(audio.Channels); + } + } + } + else{ + if (mf.AudioChannels > 0){ + txt = "%d".printf(mf.AudioChannels); + } + } + + (cell as Gtk.CellRendererText).text = txt; }); - //colARate - colARate = new TreeViewColumn(); - colARate.title = _("A-Sampling"); - colARate.clickable = true; - colARate.reorderable = true; - colARate.sort_column_id = InputField.FILE_ARATE; - tvFiles.append_column(colARate); + // col_sampling -------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("A-Sampling"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_ARATE; + tv_files.append_column(col); + col_sampling = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colARate.pack_start (cellText, false); - colARate.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ MediaFile mf; - int val; - model.get (iter, InputField.FILE_REF, out mf, InputField.FILE_ARATE, out val, -1); - (cell as Gtk.CellRendererText).text = mf.HasAudio ? "%d Hz".printf(val) : ""; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is AudioStream){ + var audio = stream as AudioStream; + if (audio.SampleRate > 0){ + txt = "%d hz".printf(audio.SampleRate); + } + } + } + else{ + if (mf.AudioSampleRate > 0){ + txt = "%d hz".printf(mf.AudioSampleRate); + } + } + + (cell as Gtk.CellRendererText).text = txt; }); - //colBitrate - colBitrate = new TreeViewColumn(); - colBitrate.title = _("Bitrate"); - colBitrate.clickable = true; - colBitrate.reorderable = true; - colBitrate.sort_column_id = InputField.FILE_BITRATE; - tvFiles.append_column(colBitrate); + // col_bitrate ---------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("Bitrate"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_BITRATE; + tv_files.append_column(col); + col_bitrate = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colBitrate.pack_start (cellText, false); - colBitrate.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ MediaFile mf; - int val; - model.get (iter, InputField.FILE_REF, out mf, InputField.FILE_BITRATE, out val, -1); - (cell as Gtk.CellRendererText).text = mf.HasAudio ? "%d kb/s".printf(val) : ""; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is VideoStream){ + var video = stream as VideoStream; + if (video.BitRate > 0){ + txt = "%d k".printf(video.BitRate); + } + } + else if (stream is AudioStream){ + var audio = stream as AudioStream; + if (audio.BitRate > 0){ + txt = "%d k".printf(audio.BitRate); + } + } + } + else{ + if (mf.BitRate > 0){ + txt = "%d k".printf(mf.BitRate); + } + } + + (cell as Gtk.CellRendererText).text = txt; }); - //colABitrate - colABitrate = new TreeViewColumn(); - colABitrate.title = _("A-Bitrate"); - colABitrate.clickable = true; - colABitrate.reorderable = true; - colABitrate.sort_column_id = InputField.FILE_ABITRATE; - tvFiles.append_column(colABitrate); + // col_abitrate ------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("A-Bitrate"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_ABITRATE; + tv_files.append_column(col); + col_abitrate = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colABitrate.pack_start (cellText, false); - colABitrate.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ MediaFile mf; - int val; - model.get (iter, InputField.FILE_REF, out mf, InputField.FILE_ABITRATE, out val, -1); - (cell as Gtk.CellRendererText).text = mf.HasAudio ? "%d kb/s".printf(val) : ""; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is AudioStream){ + var audio = stream as AudioStream; + if (audio.BitRate > 0){ + txt = "%d k".printf(audio.BitRate); + } + } + } + else{ + if (mf.AudioBitRate > 0){ + txt = "%d k".printf(mf.AudioBitRate); + } + } + + (cell as Gtk.CellRendererText).text = txt; }); /* //colVFrameSize colVFrameSize = new TreeViewColumn(); colVFrameSize.title = _("Video Size"); - tvFiles.append_column(colVFrameSize); + tv_files.append_column(colVFrameSize); cellText = new CellRendererText(); colVFrameSize.pack_start (cellText, false); - colAFormat.set_cell_data_func (cellText, (cell_layout, cell, model, iter) => { + col_aformat.set_cell_data_func (cellText, (cell_layout, cell, model, iter) => { MediaFile mf; model.get (iter, InputField.FILE_REF, out mf, -1); (cell as Gtk.CellRendererText).text = ((mf.SourceWidth > 0) && (mf.SourceHeight > 0)) ? "%dx%d".printf(mf.SourceWidth,mf.SourceHeight) : ""; }); */ - //colVBitrate - colVBitrate = new TreeViewColumn(); - colVBitrate.title = _("V-Bitrate"); - colVBitrate.clickable = true; - colVBitrate.reorderable = true; - colVBitrate.sort_column_id = InputField.FILE_VBITRATE; - tvFiles.append_column(colVBitrate); + // col_vbitrate ----------------------------------------- + + col = new TreeViewColumn(); + col.title = _("V-Bitrate"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_VBITRATE; + tv_files.append_column(col); + col_vbitrate = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colVBitrate.pack_start (cellText, false); - colVBitrate.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ MediaFile mf; - int val; - model.get (iter, InputField.FILE_REF, out mf, InputField.FILE_VBITRATE, out val, -1); - (cell as Gtk.CellRendererText).text = mf.HasVideo ? "%d kb/s".printf(val) : ""; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is VideoStream){ + var video = stream as VideoStream; + if (video.BitRate > 0){ + txt = "%d k".printf(video.BitRate); + } + } + } + else{ + if (mf.VideoBitRate > 0){ + txt = "%d k".printf(mf.VideoBitRate); + } + } + + (cell as Gtk.CellRendererText).text = txt; }); - //colVWidth - colVWidth = new TreeViewColumn(); - colVWidth.title = _("V-Width"); - colVWidth.clickable = true; - colVWidth.reorderable = true; - colVWidth.sort_column_id = InputField.FILE_VWIDTH; - tvFiles.append_column(colVWidth); + // col_width --------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("V-Width"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_VWIDTH; + tv_files.append_column(col); + col_width = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colVWidth.pack_start (cellText, false); - //colVWidth.set_attributes(cellText, "text", InputField.FILE_VWIDTH); - colVWidth.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ MediaFile mf; - int val; - model.get (iter, InputField.FILE_REF, out mf, InputField.FILE_VWIDTH, out val, -1); - (cell as Gtk.CellRendererText).text = mf.HasVideo ? "%d px".printf(val) : ""; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is VideoStream){ + var video = stream as VideoStream; + if (video.Width > 0){ + txt = "%d".printf(video.Width); + } + } + } + else{ + if (mf.SourceWidth > 0){ + txt = "%d".printf(mf.SourceWidth); + } + } + + (cell as Gtk.CellRendererText).text = txt; }); - //colVHeight - colVHeight = new TreeViewColumn(); - colVHeight.title = _("V-Height"); - colVHeight.clickable = true; - colVHeight.reorderable = true; - colVHeight.sort_column_id = InputField.FILE_VHEIGHT; - tvFiles.append_column(colVHeight); + // col_height ------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("V-Height"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_VHEIGHT; + tv_files.append_column(col); + col_height = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colVHeight.pack_start (cellText, false); - //colVHeight.set_attributes(cellText, "text", InputField.FILE_VHEIGHT); - colVHeight.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ MediaFile mf; - int val; - model.get (iter, InputField.FILE_REF, out mf, InputField.FILE_VHEIGHT, out val, -1); - (cell as Gtk.CellRendererText).text = mf.HasVideo ? "%d px".printf(val) : ""; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is VideoStream){ + var video = stream as VideoStream; + if (video.Height > 0){ + txt = "%d".printf(video.Height); + } + } + } + else{ + if (mf.SourceHeight > 0){ + txt = "%d".printf(mf.SourceHeight); + } + } + + (cell as Gtk.CellRendererText).text = txt; }); - //colVFps - colVFps = new TreeViewColumn(); - colVFps.title = _("V-Fps"); - colVFps.clickable = true; - colVFps.reorderable = true; - colVFps.sort_column_id = InputField.FILE_VRATE; - tvFiles.append_column(colVFps); + // col_fps ------------------------------------------------ + + col = new TreeViewColumn(); + col.title = _("V-Fps"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_VRATE; + tv_files.append_column(col); + col_fps = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colVFps.pack_start (cellText, false); - //colVFps.set_attributes(cellText, "text", InputField.FILE_VRATE); - colVFps.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ MediaFile mf; - double val; - model.get (iter, InputField.FILE_REF, out mf, InputField.FILE_VRATE, out val, -1); - (cell as Gtk.CellRendererText).text = mf.HasVideo ? "%.3f".printf(val) : ""; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (isChild){ + if (stream is VideoStream){ + var video = stream as VideoStream; + if (video.FrameRate > 0){ + txt = "%.3f".printf(video.FrameRate); + } + } + } + else{ + if (mf.SourceFrameRate > 0){ + txt = "%.3f".printf(mf.SourceFrameRate); + } + } + + (cell as Gtk.CellRendererText).text = txt; }); - //colArtist - colArtist = new TreeViewColumn(); - colArtist.title = _("Artist"); - colArtist.clickable = true; - colArtist.reorderable = true; - colArtist.sort_column_id = InputField.FILE_ARTIST; - tvFiles.append_column(colArtist); + // col_artist -------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("Artist"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_ARTIST; + tv_files.append_column(col); + col_artist = col; cellText = new CellRendererText(); - colArtist.pack_start (cellText, false); - colArtist.set_attributes(cellText, "text", InputField.FILE_ARTIST); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (!isChild){ + if (mf.Artist.length > 0){ + txt = "%s".printf(mf.Artist); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); - //colAlbum - colAlbum = new TreeViewColumn(); - colAlbum.title = _("Album"); - colAlbum.clickable = true; - colAlbum.reorderable = true; - colAlbum.sort_column_id = InputField.FILE_ALBUM; - tvFiles.append_column(colAlbum); + // col_album ----------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("Album"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_ALBUM; + tv_files.append_column(col); + col_album = col; cellText = new CellRendererText(); - colAlbum.pack_start (cellText, false); - colAlbum.set_attributes(cellText, "text", InputField.FILE_ALBUM); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); - //colGenre - colGenre = new TreeViewColumn(); - colGenre.title = _("Genre"); - colGenre.clickable = true; - colGenre.reorderable = true; - colGenre.sort_column_id = InputField.FILE_GENRE; - tvFiles.append_column(colGenre); + string txt = ""; + + if (!isChild){ + if (mf.Album.length > 0){ + txt = "%s".printf(mf.Album); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); + + // col_genre --------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("Genre"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_GENRE; + tv_files.append_column(col); + col_genre = col; cellText = new CellRendererText(); - colGenre.pack_start (cellText, false); - colGenre.set_attributes(cellText, "text", InputField.FILE_GENRE); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); - //colTrackName - colTrackName = new TreeViewColumn(); - colTrackName.title = _("Title"); - colTrackName.clickable = true; - colTrackName.reorderable = true; - colTrackName.sort_column_id = InputField.FILE_TRACK_NAME; - tvFiles.append_column(colTrackName); + string txt = ""; + + if (!isChild){ + if (mf.Genre.length > 0){ + txt = "%s".printf(mf.Genre); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); + + // col_track_name ------------------------------------------ + + col = new TreeViewColumn(); + col.title = _("Title"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_TRACK_NAME; + tv_files.append_column(col); + col_track_name = col; cellText = new CellRendererText(); - colTrackName.pack_start (cellText, false); - colTrackName.set_attributes(cellText, "text", InputField.FILE_TRACK_NAME); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); - //colTrackNum - colTrackNum = new TreeViewColumn(); - colTrackNum.title = _("Track #"); - colTrackNum.clickable = true; - colTrackNum.reorderable = true; - colTrackNum.sort_column_id = InputField.FILE_TRACK_NUM; - tvFiles.append_column(colTrackNum); + string txt = ""; + + if (!isChild){ + if (mf.TrackName.length > 0){ + txt = "%s".printf(mf.TrackName); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); + + // col_track_num -------------------------------------------- + + col = new TreeViewColumn(); + col.title = _("Track #"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_TRACK_NUM; + tv_files.append_column(col); + col_track_num = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colTrackNum.pack_start (cellText, false); - colTrackNum.set_attributes(cellText, "text", InputField.FILE_TRACK_NUM); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); - //colComments - colComments = new TreeViewColumn(); - colComments.title = _("Comments"); - colComments.clickable = true; - colComments.reorderable = true; - colComments.sort_column_id = InputField.FILE_COMMENTS; - tvFiles.append_column(colComments); + string txt = ""; + + if (!isChild){ + if (mf.TrackNumber.length > 0){ + txt = "%s".printf(mf.TrackNumber); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); + + // col_comments ------------------------------------------ + + col = new TreeViewColumn(); + col.title = _("Comments"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_COMMENTS; + tv_files.append_column(col); + col_comments = col; cellText = new CellRendererText(); - colComments.pack_start (cellText, false); - colComments.set_attributes(cellText, "text", InputField.FILE_COMMENTS); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); - //colRecordedDate - colRecordedDate = new TreeViewColumn(); - colRecordedDate.title = _("Recorded Date"); - colRecordedDate.clickable = true; - colRecordedDate.reorderable = true; - colRecordedDate.sort_column_id = InputField.FILE_RECORDED_DATE; - tvFiles.append_column(colRecordedDate); + string txt = ""; + + if (!isChild){ + if (mf.Comment.length > 0){ + txt = "%s".printf(mf.Comment); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); + + // col_recorded_date ---------------------------------------- + + col = new TreeViewColumn(); + col.title = _("Recorded Date"); + col.clickable = true; + col.reorderable = true; + col.sort_column_id = InputField.FILE_RECORDED_DATE; + tv_files.append_column(col); + col_recorded_date = col; cellText = new CellRendererText(); cellText.xalign = (float) 1.0; - colRecordedDate.pack_start (cellText, false); - colRecordedDate.set_attributes(cellText, "text", InputField.FILE_RECORDED_DATE); + col.pack_start (cellText, false); + col.set_cell_data_func (cellText, (cell_layout, cell, model, iter)=>{ + MediaFile mf; + MediaStream stream; + bool isChild; + model.get (iter, InputField.FILE_REF, out mf, -1); + model.get (iter, InputField.STREAM_REF, out stream, -1); + model.get (iter, InputField.IS_CHILD, out isChild, -1); + + string txt = ""; + + if (!isChild){ + if (mf.RecordedDate.length > 0){ + txt = "%s".printf(mf.RecordedDate); + } + } + + (cell as Gtk.CellRendererText).text = txt; + }); + + // col_progress -------------------------------------------- - //colProgress - colProgress = new TreeViewColumn(); - colProgress.title = _("Status"); - colProgress.fixed_width = 150; - tvFiles.append_column(colProgress); + col = new TreeViewColumn(); + col.title = _("Status"); + col.fixed_width = 150; + tv_files.append_column(col); + col_progress = col; CellRendererProgress2 cellProgress = new CellRendererProgress2(); cellProgress.height = 15; cellProgress.width = 150; - colProgress.pack_start (cellProgress, false); - colProgress.set_attributes(cellProgress, "value", InputField.FILE_PROGRESS, "text", InputField.FILE_PROGRESS_TEXT); + col.pack_start (cellProgress, false); + col.set_attributes(cellProgress, "value", InputField.FILE_PROGRESS, "text", InputField.FILE_PROGRESS_TEXT); + + // col_spacer ---------------------------------------------- - //colSpacer - colSpacer = new TreeViewColumn(); - colSpacer.expand = false; - colSpacer.fixed_width = 10; - tvFiles.append_column(colSpacer); + col = new TreeViewColumn(); + col.expand = false; + col.fixed_width = 10; + tv_files.append_column(col); + col_spacer = col; cellText = new CellRendererText(); - colSpacer.pack_start (cellText, false); + col.pack_start (cellText, false); - tvFiles_init_columns(); + // init ---------------------------------------------------- + + tv_files_init_columns(); startupTimer = Timeout.add (100,() => { - colProgress.visible = false; + col_progress.visible = false; Source.remove (startupTimer); return true; }); - Gtk.drag_dest_set (tvFiles,Gtk.DestDefaults.ALL, targets, Gdk.DragAction.COPY); - tvFiles.drag_data_received.connect(on_drag_data_received); + Gtk.drag_dest_set (tv_files,Gtk.DestDefaults.ALL, targets, Gdk.DragAction.COPY); + tv_files.drag_data_received.connect(on_drag_data_received); } private void init_list_view_context_menu(){ Gdk.RGBA gray = Gdk.RGBA(); gray.parse ("rgba(200,200,200,1)"); - // menuFile - menuFile = new Gtk.Menu(); + // menu_file + menu_file = new Gtk.Menu(); - // miFileSkip - miFileSkip = new ImageMenuItem.from_stock ("gtk-stop", null); - miFileSkip.label = _("Skip File"); - miFileSkip.activate.connect (() => { App.stop_file(); }); - menuFile.append(miFileSkip); + // mi_file_skip + mi_file_skip = new ImageMenuItem.from_stock ("gtk-stop", null); + mi_file_skip.label = _("Skip File"); + mi_file_skip.activate.connect (() => { App.stop_file(); }); + menu_file.append(mi_file_skip); - // miFileCropAuto - miFileCropAuto = new Gtk.MenuItem.with_label (_("Crop Video...")); - miFileCropAuto.activate.connect(miFileCropAuto_clicked); - menuFile.append(miFileCropAuto); + // mi_file_crop + mi_file_crop = new Gtk.MenuItem.with_label (_("Crop Video") + "..."); + mi_file_crop.activate.connect(mi_file_crop_clicked); + menu_file.append(mi_file_crop); - // miFileTrim - miFileTrim = new Gtk.MenuItem.with_label (_("Trim Duration...")); - miFileTrim.activate.connect(miFileTrim_clicked); - menuFile.append(miFileTrim); + // mi_file_trim + mi_file_trim = new Gtk.MenuItem.with_label (_("Trim Duration") + "..."); + mi_file_trim.activate.connect(mi_file_trim_clicked); + menu_file.append(mi_file_trim); // miFileSeparator0 var miFileSeparator0 = new Gtk.MenuItem(); miFileSeparator0.override_color (StateFlags.NORMAL, gray); - menuFile.append(miFileSeparator0); + menu_file.append(miFileSeparator0); - miFileCropAuto.show.connect(()=>{ - miFileSeparator0.visible = (miFileCropAuto.visible || miFileTrim.visible); + mi_file_crop.show.connect(()=>{ + miFileSeparator0.visible = (mi_file_crop.visible || mi_file_trim.visible); }); - miFileCropAuto.hide.connect(()=>{ - miFileSeparator0.visible = (miFileCropAuto.visible || miFileTrim.visible); + mi_file_crop.hide.connect(()=>{ + miFileSeparator0.visible = (mi_file_crop.visible || mi_file_trim.visible); }); - miFileTrim.show.connect(()=>{ - miFileSeparator0.visible = (miFileCropAuto.visible || miFileTrim.visible); + mi_file_trim.show.connect(()=>{ + miFileSeparator0.visible = (mi_file_crop.visible || mi_file_trim.visible); }); - miFileTrim.hide.connect(()=>{ - miFileSeparator0.visible = (miFileCropAuto.visible || miFileTrim.visible); + mi_file_trim.hide.connect(()=>{ + miFileSeparator0.visible = (mi_file_crop.visible || mi_file_trim.visible); }); - // miFileRemove - miFileRemove = new ImageMenuItem.from_stock("gtk-remove", null); - miFileRemove.activate.connect(miFileRemove_clicked); - menuFile.append(miFileRemove); + // mi_file_remove + mi_file_remove = new ImageMenuItem.from_stock("gtk-remove", null); + mi_file_remove.activate.connect(mi_file_remove_clicked); + menu_file.append(mi_file_remove); // miFileSeparator1 miFileSeparator1 = new Gtk.MenuItem(); miFileSeparator1.override_color (StateFlags.NORMAL, gray); - menuFile.append(miFileSeparator1); - - // miFileOpenTemp - miFileOpenTemp = new ImageMenuItem.from_stock("gtk-directory", null); - miFileOpenTemp.label = _("Open Temp Folder"); - miFileOpenTemp.activate.connect(miFileOpenTemp_clicked); - menuFile.append(miFileOpenTemp); - - // miFileOpenOutput - miFileOpenOutput = new ImageMenuItem.from_stock("gtk-directory", null); - miFileOpenOutput.label = _("Open Output Folder"); - miFileOpenOutput.activate.connect(miFileOpenOutput_clicked); - menuFile.append(miFileOpenOutput); - - // miFileOpenLogFile - miFileOpenLogFile = new ImageMenuItem.from_stock("gtk-info", null); - miFileOpenLogFile.label = _("Open Log File"); - miFileOpenLogFile.activate.connect(miFileOpenLogFile_clicked); - menuFile.append(miFileOpenLogFile); + menu_file.append(miFileSeparator1); + + // mi_file_open_temp_dir + mi_file_open_temp_dir = new ImageMenuItem.from_stock("gtk-directory", null); + mi_file_open_temp_dir.label = _("Open Temp Folder"); + mi_file_open_temp_dir.activate.connect(mi_file_open_temp_dir_clicked); + menu_file.append(mi_file_open_temp_dir); + + // mi_file_open_output_dir + mi_file_open_output_dir = new ImageMenuItem.from_stock("gtk-directory", null); + mi_file_open_output_dir.label = _("Open Output Folder"); + mi_file_open_output_dir.activate.connect(mi_file_open_output_dir_clicked); + menu_file.append(mi_file_open_output_dir); + + // mi_file_open_logfile + mi_file_open_logfile = new ImageMenuItem.from_stock("gtk-info", null); + mi_file_open_logfile.label = _("Open Log File"); + mi_file_open_logfile.activate.connect(mi_file_open_logfile_clicked); + menu_file.append(mi_file_open_logfile); // miFileSeparator2 miFileSeparator2 = new Gtk.MenuItem(); miFileSeparator2.override_color (StateFlags.NORMAL, gray); - menuFile.append(miFileSeparator2); - - // miFilePlaySource - miFilePlaySource = new ImageMenuItem.from_stock("gtk-media-play", null); - miFilePlaySource.label = _("Play File (Source)"); - miFilePlaySource.activate.connect(miFilePlaySource_clicked); - menuFile.append(miFilePlaySource); - - // miFilePlayOutput - miFilePlayOutput = new ImageMenuItem.from_stock("gtk-media-play", null); - miFilePlayOutput.label = _("Play File (Output)"); - miFilePlayOutput.activate.connect(miFilePlayOutput_clicked); - menuFile.append(miFilePlayOutput); - - // miFileInfo - miFileInfo = new ImageMenuItem.from_stock("gtk-properties", null); - miFileInfo.label = _("File Info (Source)"); - miFileInfo.activate.connect(miFileInfo_clicked); - menuFile.append(miFileInfo); - - // miFileInfoOutput - miFileInfoOutput = new ImageMenuItem.from_stock("gtk-properties", null); - miFileInfoOutput.label = _("File Info (Output)"); - miFileInfoOutput.activate.connect(miFileInfoOutput_clicked); - menuFile.append(miFileInfoOutput); + menu_file.append(miFileSeparator2); + + // mi_file_play_src + mi_file_play_src = new ImageMenuItem.from_stock("gtk-media-play", null); + mi_file_play_src.label = _("Play File (Source)"); + mi_file_play_src.activate.connect(mi_file_play_src_clicked); + menu_file.append(mi_file_play_src); + + // mi_file_play_output + mi_file_play_output = new ImageMenuItem.from_stock("gtk-media-play", null); + mi_file_play_output.label = _("Play File (Output)"); + mi_file_play_output.activate.connect(mi_file_play_output_clicked); + menu_file.append(mi_file_play_output); + + // mi_file_info + mi_file_info = new ImageMenuItem.from_stock("gtk-properties", null); + mi_file_info.label = _("File Info (Source)"); + mi_file_info.activate.connect(mi_file_info_clicked); + menu_file.append(mi_file_info); + + // mi_file_info_output + mi_file_info_output = new ImageMenuItem.from_stock("gtk-properties", null); + mi_file_info_output.label = _("File Info (Output)"); + mi_file_info_output.activate.connect(mi_file_info_output_clicked); + menu_file.append(mi_file_info_output); // miFileSeparator3 var miFileSeparator3 = new Gtk.MenuItem(); miFileSeparator3.override_color (StateFlags.NORMAL, gray); - menuFile.append(miFileSeparator3); + menu_file.append(miFileSeparator3); - // miListViewColumns - miListViewColumns = new ImageMenuItem.from_stock("gtk-select", null); - miListViewColumns.label = _("Columns..."); - menuFile.append(miListViewColumns); - miListViewColumns.activate.connect(()=>{ + // mi_listview_columns + mi_listview_columns = new ImageMenuItem.from_stock("gtk-select", null); + mi_listview_columns.label = _("Columns..."); + menu_file.append(mi_listview_columns); + mi_listview_columns.activate.connect(()=>{ var dlg = new ColumnSelectionDialog.with_parent(this, col_list); dlg.run(); //dlg.close(); //dlg.destroy(); - tvFiles_load_columns(); + tv_files_load_columns(); }); - miListViewColumns.show.connect(()=>{ - miFileSeparator3.visible = miListViewColumns.visible; + mi_listview_columns.show.connect(()=>{ + miFileSeparator3.visible = mi_listview_columns.visible; }); - miListViewColumns.hide.connect(()=>{ - miFileSeparator3.visible = miListViewColumns.visible; + mi_listview_columns.hide.connect(()=>{ + miFileSeparator3.visible = mi_listview_columns.visible; }); - menuFile.show_all(); + menu_file.show_all(); //connect signal for shift+F10 - tvFiles.popup_menu.connect(() => { return menuFile_popup (menuFile, null); }); + tv_files.popup_menu.connect(() => { return menu_file_popup (menu_file, null); }); //connect signal for right-click - tvFiles.button_press_event.connect ((w, event) => { + tv_files.button_press_event.connect ((w, event) => { if (event.button == 3) { - return menuFile_popup (menuFile, event); + return menu_file_popup (menu_file, event); } return false; @@ -1041,14 +1567,16 @@ private void refresh_list_view (bool refresh_model = true){ if (refresh_model){ - Gtk.ListStore inputStore = new Gtk.ListStore (29, + var inputStore = new Gtk.TreeStore (32, typeof(MediaFile), //FILE_REF + typeof(MediaStream),//STREAM_REF + typeof(bool), //IS_CHILD + typeof(bool), //IS_SELECTED typeof(string), //FILE_PATH typeof(string), //FILE_NAME typeof(int64), //FILE_SIZE typeof(string), //FILE_DURATION typeof(string), //FILE_STATUS - typeof(string), //FILE_CROPVAL typeof(int), //FILE_PROGRESS typeof(string), //FILE_PROGRESS_TEXT typeof(string), //FILE_THUMB @@ -1070,19 +1598,22 @@ typeof(string), //FILE_TRACK_NAME typeof(string), //FILE_TRACK_NUM typeof(string), //FILE_COMMENTS - typeof(string) //FILE_RECORDED_DATE + typeof(string), //FILE_RECORDED_DATE + typeof(int) //ROW_HEIGHT ); - TreeIter iter; + TreeIter iter, iter2; foreach(MediaFile mFile in App.InputFiles) { - inputStore.append (out iter); + inputStore.append (out iter, null); inputStore.set (iter, InputField.FILE_REF, mFile); + inputStore.set (iter, InputField.STREAM_REF, null); + inputStore.set (iter, InputField.IS_CHILD, false); + inputStore.set (iter, InputField.IS_SELECTED, false); inputStore.set (iter, InputField.FILE_PATH, mFile.Path); inputStore.set (iter, InputField.FILE_NAME, mFile.Name); inputStore.set (iter, InputField.FILE_SIZE, mFile.Size); inputStore.set (iter, InputField.FILE_DURATION, format_duration(mFile.Duration)); inputStore.set (iter, InputField.FILE_STATUS, "gtk-media-pause"); - inputStore.set (iter, InputField.FILE_CROPVAL, mFile.crop_values_info()); inputStore.set (iter, InputField.FILE_PROGRESS, mFile.ProgressPercent); inputStore.set (iter, InputField.FILE_PROGRESS_TEXT, mFile.ProgressText); inputStore.set (iter, InputField.FILE_THUMB, mFile.ThumbnailImagePath); @@ -1105,9 +1636,73 @@ inputStore.set (iter, InputField.FILE_TRACK_NUM, mFile.TrackNumber); inputStore.set (iter, InputField.FILE_COMMENTS, mFile.Comment); inputStore.set (iter, InputField.FILE_RECORDED_DATE, mFile.RecordedDate); + + if (App.TileView){ + inputStore.set (iter, InputField.ROW_HEIGHT, MediaFile.ThumbnailHeight + 2); + } + else{ + inputStore.set (iter, InputField.ROW_HEIGHT, 2); + } + + //if ((mFile.video_list.size < 2) && (mFile.audio_list.size < 2) && (mFile.text_list.size < 2)){ + //continue; + //} + + if (App.Status == AppStatus.NOTSTARTED){ + foreach(MediaStream stream in mFile.stream_list) { + if (!((stream is AudioStream)||(stream is VideoStream)||(stream is TextStream))){ + continue; + } + + string desc = ""; + if (stream is VideoStream){ + desc = _("Video") + " #%d : %s".printf(stream.TypeIndex, stream.description); + } + else if (stream is AudioStream){ + desc = _("Audio") + " #%d : %s".printf(stream.TypeIndex, stream.description); + } + else if (stream is TextStream){ + desc = _("Subtitle") + " #%d : %s".printf(stream.TypeIndex, stream.description); + } + + inputStore.append (out iter2, iter); + inputStore.set (iter2, InputField.FILE_REF, mFile); + inputStore.set (iter2, InputField.STREAM_REF, stream); + inputStore.set (iter2, InputField.IS_CHILD, true); + inputStore.set (iter2, InputField.IS_SELECTED, stream.IsSelected); + inputStore.set (iter2, InputField.FILE_PATH, mFile.Path); + inputStore.set (iter2, InputField.FILE_NAME, desc); + inputStore.set (iter2, InputField.FILE_SIZE, mFile.Size); + inputStore.set (iter2, InputField.FILE_DURATION, format_duration(mFile.Duration)); + inputStore.set (iter2, InputField.FILE_STATUS, "gtk-media-pause"); + inputStore.set (iter2, InputField.FILE_PROGRESS, mFile.ProgressPercent); + inputStore.set (iter2, InputField.FILE_PROGRESS_TEXT, mFile.ProgressText); + inputStore.set (iter2, InputField.FILE_THUMB, mFile.ThumbnailImagePath); + inputStore.set (iter2, InputField.FILE_HAS_VIDEO, mFile.HasVideo); + inputStore.set (iter2, InputField.FILE_FFORMAT, mFile.FileFormat); + inputStore.set (iter2, InputField.FILE_AFORMAT, mFile.AudioFormat); + inputStore.set (iter2, InputField.FILE_VFORMAT, mFile.VideoFormat); + inputStore.set (iter2, InputField.FILE_ACHANNELS, mFile.AudioChannels); + inputStore.set (iter2, InputField.FILE_ARATE, mFile.AudioSampleRate); + inputStore.set (iter2, InputField.FILE_ABITRATE, mFile.AudioBitRate); + inputStore.set (iter2, InputField.FILE_VWIDTH, mFile.SourceWidth); + inputStore.set (iter2, InputField.FILE_VHEIGHT, mFile.SourceHeight); + inputStore.set (iter2, InputField.FILE_VRATE, mFile.SourceFrameRate); + inputStore.set (iter2, InputField.FILE_VBITRATE, mFile.VideoBitRate); + inputStore.set (iter2, InputField.FILE_BITRATE, mFile.BitRate); + inputStore.set (iter2, InputField.FILE_ARTIST, mFile.Artist); + inputStore.set (iter2, InputField.FILE_ALBUM, mFile.Album); + inputStore.set (iter2, InputField.FILE_GENRE, mFile.Genre); + inputStore.set (iter2, InputField.FILE_TRACK_NAME, mFile.TrackName); + inputStore.set (iter2, InputField.FILE_TRACK_NUM, mFile.TrackNumber); + inputStore.set (iter2, InputField.FILE_COMMENTS, mFile.Comment); + inputStore.set (iter2, InputField.FILE_RECORDED_DATE, mFile.RecordedDate); + inputStore.set (iter2, InputField.ROW_HEIGHT, 2); + } + } } - tvFiles.set_model (inputStore); + tv_files.set_model (inputStore); } //set visibility - columns @@ -1116,23 +1711,25 @@ col.Ref.visible = !App.TileView; } } - colSize.visible = !App.TileView; - colDuration.visible = !App.TileView; + col_size.visible = !App.TileView; + col_duration.visible = !App.TileView; //set visibility - column header - tvFiles.headers_visible = !App.TileView; + tv_files.headers_visible = !App.TileView; - tvFiles.columns_autosize(); + tv_files.columns_autosize(); } private enum InputField{ FILE_REF, + STREAM_REF, + IS_CHILD, + IS_SELECTED, FILE_PATH, FILE_NAME, FILE_SIZE, FILE_DURATION, FILE_STATUS, - FILE_CROPVAL, FILE_PROGRESS, FILE_PROGRESS_TEXT, FILE_THUMB, @@ -1154,7 +1751,8 @@ FILE_TRACK_NAME, FILE_TRACK_NUM, FILE_COMMENTS, - FILE_RECORDED_DATE + FILE_RECORDED_DATE, + ROW_HEIGHT } // presets ------------------------------------- @@ -1167,136 +1765,122 @@ toolbar2.toolbar_style = ToolbarStyle.BOTH_HORIZ; //toolbar2.margin_top = 3; toolbar2.set_icon_size(IconSize.SMALL_TOOLBAR); - //toolbar2.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR); - vboxMain.add (toolbar2); - - //btnAddPreset - btnAddPreset = new Gtk.ToolButton.from_stock ("gtk-new"); - btnAddPreset.is_important = true; - btnAddPreset.label = _("New Preset"); - btnAddPreset.clicked.connect (btnAddPreset_clicked); - btnAddPreset.set_tooltip_text (_("Add New Preset")); - toolbar2.add (btnAddPreset); - - //btnRemovePreset - btnRemovePreset = new Gtk.ToolButton.from_stock ("gtk-delete"); - btnRemovePreset.is_important = true; - btnRemovePreset.clicked.connect (btnRemovePreset_clicked); - btnRemovePreset.set_tooltip_text (_("Delete Preset")); - toolbar2.add (btnRemovePreset); - - /*//btnEditPreset - btnEditPreset = new Gtk.ToolButton.from_stock ("gtk-edit"); - btnEditPreset.is_important = true; - btnEditPreset.clicked.connect (btnEditPreset_clicked); - btnEditPreset.set_tooltip_text (_("Edit Preset")); - toolbar2.add (btnEditPreset);*/ - - //btnBrowsePresetFolder - btnBrowsePresetFolder = new Gtk.ToolButton.from_stock ("gtk-directory"); - btnBrowsePresetFolder.is_important = true; - btnBrowsePresetFolder.label = _("Browse"); - btnBrowsePresetFolder.clicked.connect (btnBrowsePresetFolder_clicked); - btnBrowsePresetFolder.set_tooltip_text (_("Open Folder")); - toolbar2.add (btnBrowsePresetFolder); - - /*//separator - var separator1 = new Gtk.SeparatorToolItem(); - separator1.set_draw (false); - separator1.set_expand (true); - toolbar2.add (separator1);*/ - - //btnPresetInfo - btnPresetInfo = new Gtk.ToolButton.from_stock ("gtk-info"); - btnPresetInfo.is_important = true; - btnPresetInfo.margin_right = 6; - btnPresetInfo.label = _("Info"); - btnPresetInfo.clicked.connect (btnPresetInfo_clicked); - btnPresetInfo.set_tooltip_text (_("Info")); - toolbar2.add (btnPresetInfo); + vbox_main.add (toolbar2); + + //btn_add_preset + btn_add_preset = new Gtk.ToolButton.from_stock ("gtk-new"); + btn_add_preset.is_important = true; + btn_add_preset.label = _("New Preset"); + btn_add_preset.clicked.connect (btn_add_preset_clicked); + btn_add_preset.set_tooltip_text (_("Add New Preset")); + toolbar2.add (btn_add_preset); + + //btn_remove_preset + btn_remove_preset = new Gtk.ToolButton.from_stock ("gtk-delete"); + btn_remove_preset.is_important = true; + btn_remove_preset.clicked.connect (btn_remove_preset_clicked); + btn_remove_preset.set_tooltip_text (_("Delete Preset")); + toolbar2.add (btn_remove_preset); + + //btn_open_preset_dir + btn_open_preset_dir = new Gtk.ToolButton.from_stock ("gtk-directory"); + btn_open_preset_dir.is_important = true; + btn_open_preset_dir.label = _("Browse"); + btn_open_preset_dir.clicked.connect (btn_open_preset_dir_clicked); + btn_open_preset_dir.set_tooltip_text (_("Open Folder")); + toolbar2.add (btn_open_preset_dir); + + //btn_preset_info + btn_preset_info = new Gtk.ToolButton.from_stock ("gtk-info"); + btn_preset_info.is_important = true; + btn_preset_info.margin_right = 6; + btn_preset_info.label = _("Info"); + btn_preset_info.clicked.connect (btn_preset_info_clicked); + btn_preset_info.set_tooltip_text (_("Info")); + toolbar2.add (btn_preset_info); } private void init_preset_dropdowns(){ - //vboxMain2 - vboxMain2 = new Box (Orientation.VERTICAL, 0); - vboxMain2.margin_left = 6; - vboxMain2.margin_right = 6; - vboxMain.add (vboxMain2); - - //gridConfig - gridConfig = new Grid(); - gridConfig.set_column_spacing (6); - gridConfig.set_row_spacing (6); - gridConfig.visible = false; - gridConfig.margin_top = 6; - gridConfig.margin_bottom = 6; - vboxMain2.add (gridConfig); - - //lblScriptFolder - lblScriptFolder = new Gtk.Label(_("Folder")); - lblScriptFolder.xalign = (float) 0.0; - gridConfig.attach(lblScriptFolder,0,0,1,1); - - //cmbScriptFolder - cmbScriptFolder = new ComboBox(); + //vbox_main_2 + vbox_main_2 = new Box (Orientation.VERTICAL, 0); + vbox_main_2.margin_left = 6; + vbox_main_2.margin_right = 6; + vbox_main.add (vbox_main_2); + + //grid_config + grid_config = new Grid(); + grid_config.set_column_spacing (6); + grid_config.set_row_spacing (6); + grid_config.visible = false; + grid_config.margin_top = 6; + grid_config.margin_bottom = 6; + vbox_main_2.add (grid_config); + + //lbl_script_dir + var lbl_script_dir = new Gtk.Label(_("Folder")); + lbl_script_dir.xalign = (float) 0.0; + grid_config.attach(lbl_script_dir,0,0,1,1); + + //cmb_script_dir + cmb_script_dir = new ComboBox(); CellRendererText cellScriptFolder = new CellRendererText(); - cmbScriptFolder.pack_start( cellScriptFolder, false ); - cmbScriptFolder.set_cell_data_func (cellScriptFolder, cellScriptFolder_render); - cmbScriptFolder.set_size_request(100,-1); - cmbScriptFolder.set_tooltip_text (_("Folder")); - cmbScriptFolder.changed.connect(cmbScriptFolder_changed); - gridConfig.attach(cmbScriptFolder,1,0,1,1); - - //lblScriptFile - lblScriptFile = new Gtk.Label(_("Preset")); - lblScriptFile.xalign = (float) 0.0; - gridConfig.attach(lblScriptFile,0,1,1,1); - - //cmbScriptFile - cmbScriptFile = new ComboBox(); - cmbScriptFile.hexpand = true; + cmb_script_dir.pack_start( cellScriptFolder, false ); + cmb_script_dir.set_cell_data_func (cellScriptFolder, cellScriptFolder_render); + cmb_script_dir.set_size_request(100,-1); + cmb_script_dir.set_tooltip_text (_("Folder")); + cmb_script_dir.changed.connect(cmb_script_dir_changed); + grid_config.attach(cmb_script_dir,1,0,1,1); + + //lbl_script_file + var lbl_script_file = new Gtk.Label(_("Preset")); + lbl_script_file.xalign = (float) 0.0; + grid_config.attach(lbl_script_file,0,1,1,1); + + //cmb_script_file + cmb_script_file = new ComboBox(); + cmb_script_file.hexpand = true; CellRendererText cellScriptFile = new CellRendererText(); - cmbScriptFile.pack_start( cellScriptFile, false ); - cmbScriptFile.set_cell_data_func (cellScriptFile, cellScriptFile_render); - cmbScriptFile.set_tooltip_text (_("Encoding Script or Preset File")); - cmbScriptFile.changed.connect(cmbScriptFile_changed); - gridConfig.attach(cmbScriptFile,1,1,1,1); - - //btnEditPreset - btnEditPreset = new Button.with_label(""); - btnEditPreset.always_show_image = true; - btnEditPreset.image = new Gtk.Image.from_file(App.SharedImagesFolder + "/video-edit.png"); - //btnEditPreset.image_position = PositionType.TOP; - //btnEditPreset.set_size_request(64,64); - btnEditPreset.set_tooltip_text(_("Edit Preset")); - btnEditPreset.clicked.connect(btnEditPreset_clicked); - gridConfig.attach(btnEditPreset,2,0,1,2); + cmb_script_file.pack_start( cellScriptFile, false ); + cmb_script_file.set_cell_data_func (cellScriptFile, cellScriptFile_render); + cmb_script_file.set_tooltip_text (_("Encoding Script or Preset File")); + cmb_script_file.changed.connect(cmb_script_file_changed); + grid_config.attach(cmb_script_file,1,1,1,1); + + //btn_edit_preset + btn_edit_preset = new Button.with_label(""); + btn_edit_preset.always_show_image = true; + btn_edit_preset.image = new Gtk.Image.from_file(App.SharedImagesFolder + "/video-edit.png"); + //btn_edit_preset.image_position = PositionType.TOP; + //btn_edit_preset.set_size_request(64,64); + btn_edit_preset.set_tooltip_text(_("Edit Preset")); + btn_edit_preset.clicked.connect(btn_edit_preset_clicked); + grid_config.attach(btn_edit_preset,2,0,1,2); } private void init_statusbar(){ - //lblStatus - lblStatus = new Label(""); - lblStatus.ellipsize = Pango.EllipsizeMode.END; - lblStatus.margin_top = 6; - lblStatus.margin_bottom = 6; - vboxMain2.add (lblStatus); + //lbl_status + lbl_status = new Label(""); + lbl_status.ellipsize = Pango.EllipsizeMode.END; + lbl_status.margin_top = 6; + lbl_status.margin_bottom = 6; + vbox_main_2.add (lbl_status); } private void init_regular_expressions(){ try{ - regexGeneric = new Regex("""([0-9]+[.]?[0-9]*)%"""); - regexMkvMerge = new Regex("""Progress: ([0-9]+[.]?[0-9]*)%"""); - regexFFmpeg = new Regex("""time=([0-9]+[:][0-9]+[:][0-9]+[.]?[0-9]*) """); - regexLibAV = new Regex("""time=[ ]*([0-9]+[.]?[0-9]*)[ ]*"""); + rex_generic = new Regex("""([0-9]+[.]?[0-9]*)%"""); + rex_mkvmerge = new Regex("""Progress: ([0-9]+[.]?[0-9]*)%"""); + rex_ffmpeg = new Regex("""time=([0-9]+[:][0-9]+[:][0-9]+[.]?[0-9]*) """); + rex_libav = new Regex("""time=[ ]*([0-9]+[.]?[0-9]*)[ ]*"""); //frame= 82 fps= 23 q=28.0 size= 133kB time=1.42 bitrate= 766.9kbits/s - regexLibAV_video = new Regex("""frame=[ ]*[0-9]+[ ]*fps=[ ]*([0-9]+)[.]?[0-9]*[ ]*q=[ ]*[0-9]+[.]?[0-9]*[ ]*size=[ ]*([0-9]+)kB[ ]*time=[ ]*[0-9]+[.]?[0-9]*[ ]*bitrate=[ ]*([0-9]+)[.]?[0-9]*"""); + rex_libav_video = new Regex("""frame=[ ]*[0-9]+[ ]*fps=[ ]*([0-9]+)[.]?[0-9]*[ ]*q=[ ]*[0-9]+[.]?[0-9]*[ ]*size=[ ]*([0-9]+)kB[ ]*time=[ ]*[0-9]+[.]?[0-9]*[ ]*bitrate=[ ]*([0-9]+)[.]?[0-9]*"""); //size= 1590kB time=30.62 bitrate= 425.3kbits/s - regexLibAV_audio = new Regex("""size=[ ]*([0-9]+)kB[ ]*time=[ ]*[0-9]+[.]?[0-9]*[ ]*bitrate=[ ]*([0-9]+)[.]?[0-9]*"""); + rex_libav_audio = new Regex("""size=[ ]*([0-9]+)kB[ ]*time=[ ]*[0-9]+[.]?[0-9]*[ ]*bitrate=[ ]*([0-9]+)[.]?[0-9]*"""); //[53.4%] 1652/3092 frames, 24.81 fps, 302.88 kb/s, eta 0:00:58 - regexX264 = new Regex("""\[[0-9]+[.]?[0-9]*%\][ \t]*[0-9]+/[0-9]+[ \t]*frames,[ \t]*([0-9]+)[.]?[0-9]*[ \t]*fps,[ \t]*([0-9]+)[.]?[0-9]*[ \t]*kb/s,[ \t]*eta ([0-9:]+)"""); + rex_x264 = new Regex("""\[[0-9]+[.]?[0-9]*%\][ \t]*[0-9]+/[0-9]+[ \t]*frames,[ \t]*([0-9]+)[.]?[0-9]*[ \t]*fps,[ \t]*([0-9]+)[.]?[0-9]*[ \t]*kb/s,[ \t]*eta ([0-9:]+)"""); } catch (Error e) { stderr.printf ("Error: %s\n", e.message); @@ -1311,7 +1895,7 @@ private void populate_script_folders(){ TreeStore model = new TreeStore(2, typeof(string), typeof(string)); - cmbScriptFolder.set_model(model); + cmb_script_dir.set_model(model); TreeIter iter0; model.append (out iter0, null); @@ -1347,12 +1931,12 @@ } - private void cmbScriptFolder_changed(){ + private void cmb_script_dir_changed(){ //create empty model - Gtk.ListStore model = new Gtk.ListStore(2, typeof(ScriptFile), typeof(string)); - cmbScriptFile.set_model(model); + var model = new Gtk.ListStore(2, typeof(ScriptFile), typeof(string)); + cmb_script_file.set_model(model); - string path = gtk_combobox_get_value(cmbScriptFolder,0,""); + string path = gtk_combobox_get_value(cmb_script_dir,0,""); try { @@ -1377,14 +1961,14 @@ model.set(iter, 0, sh, 1, fileName); if (App.SelectedScript != null && App.SelectedScript.Path == sh.Path) { - cmbScriptFile.set_active_iter(iter); + cmb_script_file.set_active_iter(iter); } } } } - if (cmbScriptFile.active < 0) { - cmbScriptFile.set_active(0); + if (cmb_script_file.active < 0) { + cmb_script_file.set_active(0); } } catch(Error e){ @@ -1392,21 +1976,21 @@ } } - private void cmbScriptFile_changed(){ - if ((cmbScriptFile == null)||(cmbScriptFile.model == null)||(cmbScriptFile.active < 0)){ return; } + private void cmb_script_file_changed(){ + if ((cmb_script_file == null)||(cmb_script_file.model == null)||(cmb_script_file.active < 0)){ return; } ScriptFile sh; TreeIter iter; - cmbScriptFile.get_active_iter(out iter); - cmbScriptFile.model.get (iter, 0, out sh, -1); + cmb_script_file.get_active_iter(out iter); + cmb_script_file.model.get (iter, 0, out sh, -1); App.SelectedScript = sh; } private bool select_script(){ if ((App.SelectedScript == null)||(file_exists(App.SelectedScript.Path) == false)){ - cmbScriptFolder.set_active(2); - cmbScriptFile.set_active(0); + cmb_script_dir.set_active(2); + cmb_script_file.set_active(0); return false; } @@ -1417,12 +2001,12 @@ TreeIter iter; //select folder - TreeStore model = (TreeStore) cmbScriptFolder.model; + TreeStore model = (TreeStore) cmb_script_dir.model; for (bool next = model.get_iter_first (out iter); next; next = model.iter_next (ref iter)) { string path; model.get (iter, 0, out path); if (path == dirPath){ - cmbScriptFolder.set_active_iter(iter); + cmb_script_dir.set_active_iter(iter); retVal = true; break; } @@ -1435,26 +2019,26 @@ //check if selected file is in some other folder if (retVal == false){ //unselect - cmbScriptFolder.set_active(-1); + cmb_script_dir.set_active(-1); //add the selected file - Gtk.ListStore model1 = new Gtk.ListStore(2, typeof(ScriptFile), typeof(string)); - cmbScriptFile.set_model(model1); + var model1 = new Gtk.ListStore(2, typeof(ScriptFile), typeof(string)); + cmb_script_file.set_model(model1); ScriptFile sh = new ScriptFile(filePath); model1.append(out iter); model1.set(iter, 0, sh, 1, sh.Title); //select it - cmbScriptFile.set_active(0); + cmb_script_file.set_active(0); } //select file - Gtk.ListStore model1 = (Gtk.ListStore) cmbScriptFile.model; + var model1 = (Gtk.ListStore) cmb_script_file.model; for (bool next = model1.get_iter_first (out iter); next; next = model1.iter_next (ref iter)) { ScriptFile sh = new ScriptFile(filePath); model1.get (iter, 0, out sh); if (sh.Path == filePath){ - cmbScriptFile.set_active_iter(iter); + cmb_script_file.set_active_iter(iter); retVal = true; break; } @@ -1464,7 +2048,7 @@ } private bool select_script_recurse_children (string filePath, TreeIter iter0){ - TreeStore model = (TreeStore) cmbScriptFolder.model; + TreeStore model = (TreeStore) cmb_script_dir.model; string dirPath = GLib.Path.get_dirname(filePath); bool retVal = false; @@ -1477,7 +2061,7 @@ model.get (iter1, 0, out path); if (path == dirPath){ - cmbScriptFolder.set_active_iter(iter1); + cmb_script_dir.set_active_iter(iter1); return true; } else if(model.iter_has_child(iter1)){ @@ -1501,17 +2085,17 @@ (cell as Gtk.CellRendererText).text = name; } - private void btnBrowsePresetFolder_clicked(){ + private void btn_open_preset_dir_clicked(){ string path; - TreeModel model = (TreeModel) cmbScriptFolder.model; + TreeModel model = (TreeModel) cmb_script_dir.model; TreeIter iter; - cmbScriptFolder.get_active_iter(out iter); + cmb_script_dir.get_active_iter(out iter); model.get (iter, 0, out path, -1); exo_open_folder (path + "/"); } - private void miFileOpenLogFile_clicked(){ - TreeSelection selection = tvFiles.get_selection(); + private void mi_file_open_logfile_clicked(){ + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() > 0){ TreeModel model; @@ -1525,38 +2109,29 @@ } private void preset_create(){ - var window = new EncoderConfigWindow(); - window.set_transient_for(this); - window.Folder = gtk_combobox_get_value(cmbScriptFolder,0,""); - window.Name = "New Preset"; - //window.CreateNew = true; - window.show_all(); + string folder = gtk_combobox_get_value(cmb_script_dir,0,""); + var window = new EncoderConfigWindow.from_preset(this, folder, "New Preset", true); window.run(); //App.SelectedScript will be set on click of 'Save' button - cmbScriptFolder_changed(); + cmb_script_dir_changed(); } private void preset_edit(){ ScriptFile sh; TreeIter iter; - cmbScriptFile.get_active_iter(out iter); - cmbScriptFile.model.get (iter, 0, out sh, -1); + cmb_script_file.get_active_iter(out iter); + cmb_script_file.model.get (iter, 0, out sh, -1); if (sh.Extension == ".json") { - var window = new EncoderConfigWindow(); - window.set_transient_for(this); - window.Folder = sh.Folder; - window.Name = sh.Title; - window.show_all(); - window.load_script(); + var window = new EncoderConfigWindow.from_preset(this, sh.Folder, sh.Title, false); window.run(); - cmbScriptFolder_changed(); + cmb_script_dir_changed(); } } private void script_create(){ - string folder = gtk_combobox_get_value(cmbScriptFolder,0,""); + string folder = gtk_combobox_get_value(cmb_script_dir,0,""); int k = 0; string new_script = "%s/new_script.sh".printf(folder); @@ -1568,25 +2143,25 @@ exo_open_textfile(new_script); App.SelectedScript = new ScriptFile(new_script); - cmbScriptFolder_changed(); + cmb_script_dir_changed(); } private void script_edit(){ ScriptFile sh; TreeIter iter; - cmbScriptFile.get_active_iter(out iter); - cmbScriptFile.model.get (iter, 0, out sh, -1); + cmb_script_file.get_active_iter(out iter); + cmb_script_file.model.get (iter, 0, out sh, -1); if (sh.Extension == ".sh") { exo_open_textfile(sh.Path); } } - private void btnAddPreset_clicked(){ + private void btn_add_preset_clicked(){ TreeIter iter; string folderName; - cmbScriptFolder.get_active_iter(out iter); - cmbScriptFolder.model.get (iter, 1, out folderName, -1); + cmb_script_dir.get_active_iter(out iter); + cmb_script_dir.model.get (iter, 1, out folderName, -1); if (folderName.has_prefix("scripts")){ script_create(); @@ -1596,26 +2171,26 @@ } } - private void btnRemovePreset_clicked(){ - if ((cmbScriptFile.model != null)&&(cmbScriptFile.active > -1)) { + private void btn_remove_preset_clicked(){ + if ((cmb_script_file.model != null)&&(cmb_script_file.active > -1)) { ScriptFile sh; TreeIter iter; - cmbScriptFile.get_active_iter(out iter); - cmbScriptFile.model.get (iter, 0, out sh, -1); + cmb_script_file.get_active_iter(out iter); + cmb_script_file.model.get (iter, 0, out sh, -1); file_delete(sh.Path); - cmbScriptFolder_changed(); + cmb_script_dir_changed(); statusbar_show_message (_("Preset deleted") + ": " + sh.Name + "", true, true); } } - private void btnEditPreset_clicked(){ - if ((cmbScriptFile.model == null)||(cmbScriptFile.active == -1)) { + private void btn_edit_preset_clicked(){ + if ((cmb_script_file.model == null)||(cmb_script_file.active == -1)) { TreeIter iter; string folderName; - cmbScriptFolder.get_active_iter(out iter); - cmbScriptFolder.model.get (iter, 1, out folderName, -1); + cmb_script_dir.get_active_iter(out iter); + cmb_script_dir.model.get (iter, 1, out folderName, -1); if (folderName.has_prefix("scripts")){ script_create(); @@ -1628,8 +2203,8 @@ ScriptFile sh; TreeIter iter; - cmbScriptFile.get_active_iter(out iter); - cmbScriptFile.model.get (iter, 0, out sh, -1); + cmb_script_file.get_active_iter(out iter); + cmb_script_file.model.get (iter, 0, out sh, -1); switch (sh.Extension){ case ".sh": @@ -1642,37 +2217,10 @@ } } - private void btnPresetInfo_clicked(){ - string msg = """Selene supports 2 types of presets: - -1) JSON Presets - -Ø These are files with a ".json" extension. - -Ø Files are present in $HOME/.config/selene/presets. - -Ø Clicking the "Edit" button on the toolbar will display a GUI for -configuring the preset file. - -2) Bash Scripts - -Ø These are bash scripts with a ".sh" extension. + private void btn_preset_info_clicked(){ + string msg = _("Selene supports 2 types of presets:\n\n1) JSON presets with a '.json' file extension. Clicking the Edit button on the toolbar will display a GUI for configuring the preset.\n\n2) Bash scripts with a '.sh' file extension. Clicking the Edit button will open the script file in a text editor. Bash scripts are useful if you need complete control over the encoding process. The script can use any set of commands for encoding the input files. Selene will try to parse the output and display the progress during encoding. See the sample scripts in '$HOME/.config/selene/scripts' for the syntax."); -Ø Files are present in $HOME/.config/selene/scripts. - -Ø Bash scripts can be used for converting files using any command line -utility (even those tools which are not directly supported by Selene) - -Ø These files have to be edited manually. Clicking the "Edit" button -on the toolbar will open the file in a text editor. -"""; - - var dlg = new Gtk.MessageDialog(null,Gtk.DialogFlags.MODAL, Gtk.MessageType.INFO, Gtk.ButtonsType.OK, msg); - dlg.set_title(_("Info")); - dlg.set_modal(true); - dlg.set_transient_for(this); - dlg.run(); - dlg.destroy(); + gtk_messagebox(_("Info"), msg, this, false); } // statusbar ------------------- @@ -1684,11 +2232,11 @@ white.parse ("rgba(0,0,0,1)"); if (is_error) - lblStatus.override_color (StateFlags.NORMAL, red); + lbl_status.override_color (StateFlags.NORMAL, red); else - lblStatus.override_color (StateFlags.NORMAL, null); + lbl_status.override_color (StateFlags.NORMAL, null); - lblStatus.label = message; + lbl_status.label = message; if (timeout) statusbar_set_timeout(); @@ -1701,7 +2249,7 @@ private bool statusbar_clear(){ //Source.remove (statusTimer); - lblStatus.label = ""; + lbl_status.label = ""; statusbar_default_message(); return true; } @@ -1724,15 +2272,15 @@ break; case AppStatus.RUNNING: - statusbar_show_message(_("Converting: '%s'").printf (App.CurrentFile.Path), false, false); + statusbar_show_message(_("Converting") + ": '%s'".printf(App.CurrentFile.Path), false, false); break; } } // file list context menu ------------------------- - private bool menuFile_popup (Gtk.Menu popup, Gdk.EventButton? event) { - TreeSelection selection = tvFiles.get_selection(); + private bool menu_file_popup (Gtk.Menu popup, Gdk.EventButton? event) { + TreeSelection selection = tv_files.get_selection(); int index = -1; MediaFile mFile = null; //if (selection.count_selected_rows() == 0){ @@ -1749,123 +2297,123 @@ switch(App.Status){ case AppStatus.NOTSTARTED: - miFileSkip.visible = false; - miFileOpenTemp.visible = false; - miFileOpenOutput.visible = false; - miFileOpenLogFile.visible = false; - - miFileInfo.visible = true; - miFileInfoOutput.visible = false; - miFilePlaySource.visible = true; - miFilePlayOutput.visible = false; - miFileCropAuto.visible = true; - miFileTrim.visible = true; - miFileRemove.visible = true; + mi_file_skip.visible = false; + mi_file_open_temp_dir.visible = false; + mi_file_open_output_dir.visible = false; + mi_file_open_logfile.visible = false; + + mi_file_info.visible = true; + mi_file_info_output.visible = false; + mi_file_play_src.visible = true; + mi_file_play_output.visible = false; + mi_file_crop.visible = true; + mi_file_trim.visible = true; + mi_file_remove.visible = true; miFileSeparator1.visible = true; miFileSeparator2.visible = false; - miListViewColumns.visible = !App.TileView; + mi_listview_columns.visible = !App.TileView; - miFileInfo.sensitive = (selection.count_selected_rows() == 1); - miFilePlaySource.sensitive = (selection.count_selected_rows() == 1); - miFileCropAuto.sensitive = (mFile != null) && (mFile.HasVideo); - miFileRemove.sensitive = (selection.count_selected_rows() > 0); + mi_file_info.sensitive = (selection.count_selected_rows() == 1); + mi_file_play_src.sensitive = (selection.count_selected_rows() == 1); + mi_file_crop.sensitive = (mFile != null) && (mFile.HasVideo); + mi_file_remove.sensitive = (selection.count_selected_rows() > 0); break; case AppStatus.RUNNING: - miFileSkip.visible = true; + mi_file_skip.visible = true; miFileSeparator1.visible = true; miFileSeparator2.visible = false; - miFileOpenTemp.visible = true; - miFileOpenOutput.visible = true; - miFileOpenLogFile.visible = false; + mi_file_open_temp_dir.visible = true; + mi_file_open_output_dir.visible = true; + mi_file_open_logfile.visible = false; - miListViewColumns.visible = false; + mi_listview_columns.visible = false; if (selection.count_selected_rows() == 1){ - //if (App.InputFiles[index].Status == FileStatus.RUNNING){ - //miFileSkip.sensitive = true; - //} - //else{ - miFileSkip.sensitive = false; - //} + if (App.InputFiles[index].Status == FileStatus.RUNNING){ + mi_file_skip.sensitive = true; + } + else{ + mi_file_skip.sensitive = false; + } if (dir_exists(App.InputFiles[index].TempDirectory)){ - miFileOpenTemp.sensitive = true; + mi_file_open_temp_dir.sensitive = true; } else{ - miFileOpenTemp.sensitive = false; + mi_file_open_temp_dir.sensitive = false; } - miFileOpenOutput.sensitive = false; + mi_file_open_output_dir.sensitive = false; } else{ - miFileSkip.sensitive = false; - miFileOpenTemp.sensitive = false; - miFileOpenOutput.sensitive = false; - } - - miFileInfo.visible = false; - miFileInfoOutput.visible = false; - miFilePlaySource.visible = false; - miFilePlayOutput.visible = false; - miFileCropAuto.visible = false; - miFileTrim.visible = false; - miFileRemove.visible = false; + mi_file_skip.sensitive = false; + mi_file_open_temp_dir.sensitive = false; + mi_file_open_output_dir.sensitive = false; + } + + mi_file_info.visible = false; + mi_file_info_output.visible = false; + mi_file_play_src.visible = false; + mi_file_play_output.visible = false; + mi_file_crop.visible = false; + mi_file_trim.visible = false; + mi_file_remove.visible = false; break; case AppStatus.IDLE: - miFileOpenTemp.visible = true; - miFileOpenOutput.visible = true; - miFileOpenLogFile.visible = true; + mi_file_open_temp_dir.visible = true; + mi_file_open_output_dir.visible = true; + mi_file_open_logfile.visible = true; if (index != -1){ - miFileOpenTemp.sensitive = true; - miFileOpenOutput.sensitive = true; + mi_file_open_temp_dir.sensitive = true; + mi_file_open_output_dir.sensitive = true; } else{ - miFileOpenTemp.sensitive = false; - miFileOpenOutput.sensitive = false; - } - - miFileSkip.visible = false; - miFileInfo.visible = true; - miFileInfoOutput.visible = true; - miFilePlaySource.visible = true; - miFilePlayOutput.visible = true; - miFileCropAuto.visible = false; - miFileTrim.visible = false; - miFileRemove.visible = false; + mi_file_open_temp_dir.sensitive = false; + mi_file_open_output_dir.sensitive = false; + } + + mi_file_skip.visible = false; + mi_file_info.visible = true; + mi_file_info_output.visible = true; + mi_file_play_src.visible = true; + mi_file_play_output.visible = true; + mi_file_crop.visible = false; + mi_file_trim.visible = false; + mi_file_remove.visible = false; miFileSeparator1.visible = false; miFileSeparator2.visible = true; - miListViewColumns.visible = false; + mi_listview_columns.visible = false; if (selection.count_selected_rows() == 1){ string outpath = App.InputFiles[index].OutputFilePath; if (outpath != null && outpath.length > 0 && file_exists(outpath)){ - miFileInfoOutput.sensitive = true; - miFilePlayOutput.sensitive = true; + mi_file_info_output.sensitive = true; + mi_file_play_output.sensitive = true; } } else{ - miFileInfoOutput.sensitive = false; - miFilePlayOutput.sensitive = false; + mi_file_info_output.sensitive = false; + mi_file_play_output.sensitive = false; } break; } if (event != null) { - menuFile.popup (null, null, null, event.button, event.time); + menu_file.popup (null, null, null, event.button, event.time); } else { - menuFile.popup (null, null, null, 0, Gtk.get_current_event_time()); + menu_file.popup (null, null, null, 0, Gtk.get_current_event_time()); } return true; } - private void miFileInfo_clicked() { - TreeSelection selection = tvFiles.get_selection(); + private void mi_file_info_clicked() { + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() > 0){ TreeModel model; @@ -1880,8 +2428,8 @@ } } - private void miFileInfoOutput_clicked() { - TreeSelection selection = tvFiles.get_selection(); + private void mi_file_info_output_clicked() { + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() > 0){ TreeModel model; @@ -1901,8 +2449,8 @@ } } - private void miFileCropAuto_clicked() { - TreeSelection selection = tvFiles.get_selection(); + private void mi_file_crop_clicked() { + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() != 1){ return; } TreeModel model; @@ -1921,8 +2469,8 @@ } } - private void miFileTrim_clicked() { - TreeSelection selection = tvFiles.get_selection(); + private void mi_file_trim_clicked() { + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() != 1){ return; } TreeModel model; @@ -1941,12 +2489,12 @@ } } - private void miFileRemove_clicked() { - btnRemoveFiles_clicked(); + private void mi_file_remove_clicked() { + btn_remove_files_clicked(); } - private void miFileOpenTemp_clicked() { - TreeSelection selection = tvFiles.get_selection(); + private void mi_file_open_temp_dir_clicked() { + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() == 0){ return; } TreeModel model; @@ -1962,8 +2510,8 @@ } } - private void miFileOpenOutput_clicked() { - TreeSelection selection = tvFiles.get_selection(); + private void mi_file_open_output_dir_clicked() { + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() == 0){ return; } TreeModel model; @@ -1984,15 +2532,15 @@ } } - private void btnOpenOutputFolder_click(){ + private void btn_open_output_dir_click(){ if (App.OutputDirectory.length > 0 && dir_exists(App.OutputDirectory)){ exo_open_folder (App.OutputDirectory + "/"); } } - private void miFilePlayOutput_clicked() { - TreeSelection selection = tvFiles.get_selection(); + private void mi_file_play_output_clicked() { + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() > 0){ TreeModel model; @@ -2006,8 +2554,8 @@ } } - private void miFilePlaySource_clicked() { - TreeSelection selection = tvFiles.get_selection(); + private void mi_file_play_src_clicked() { + TreeSelection selection = tv_files.get_selection(); if (selection.count_selected_rows() > 0){ TreeModel model; @@ -2087,18 +2635,18 @@ //progressDlg.destroy(); gtk_do_events(); - //Adjustment adj = swFiles.get_vadjustment(); + //Adjustment adj = sw_files.get_vadjustment(); //double pos = adj.get_value(); - //log_msg("%f".printf(tvFiles.vadjustment.get_value())); + //log_msg("%f".printf(tv_files.vadjustment.get_value())); refresh_list_view(); //adj.set_value(adj.upper-adj.page_size); - //swFiles.set_vadjustment(adj); + //sw_files.set_vadjustment(adj); - //log_msg("%f".printf(tvFiles.vadjustment.get_value())); + //log_msg("%f".printf(tv_files.vadjustment.get_value())); if (msg_add.length > 0){ - msg_add = _("Some files could not be opened:") + "\n\n" + msg_add; + msg_add = _("Some files could not be added:") + "\n\n" + msg_add; gtk_messagebox("Unknown Format",msg_add,this,true); msg_add = ""; } @@ -2162,9 +2710,23 @@ } private void add_file(string file_path){ - bool added = App.add_file (file_path); - if (added == false){ - msg_add += "%s\n".printf(file_basename(file_path)); + var mFile = App.add_file (file_path); + if (mFile == null){ + bool found = false; + foreach(MediaFile mf in App.InputFiles){ + foreach(MediaStream stream in mf.text_list){ + if ((stream as TextStream).SubFile == file_path){ + found = true; + break; + } + } + if (found){ + break; + } + } + if (!found){ + msg_add += "%s\n".printf(file_basename(file_path)); + } } } @@ -2184,97 +2746,97 @@ // treeview columns -------------------------------- - private void tvFiles_init_columns(){ + private void tv_files_init_columns(){ col_list = new Gee.HashMap<TreeViewColumn,TreeViewListColumn>(); - //col_list[colName] = new TreeViewListColumn("name",colName); - //col_list[colSize] = new TreeViewListColumn("size",colSize); - //col_list[colDuration] = new TreeViewListColumn("duration",colDuration); - col_list[colFileFormat] = new TreeViewListColumn("format","File Format",colFileFormat); - col_list[colAFormat] = new TreeViewListColumn("aformat","Audio Format",colAFormat); - col_list[colVFormat] = new TreeViewListColumn("vformat","Video Format",colVFormat); - col_list[colAChannels] = new TreeViewListColumn("channels","Audio Channels",colAChannels); - col_list[colARate] = new TreeViewListColumn("samplingrate","Audio Sampling Rate",colARate); - col_list[colVWidth] = new TreeViewListColumn("width","Video Width",colVWidth); - col_list[colVHeight] = new TreeViewListColumn("height","Video Height",colVHeight); - col_list[colVFps] = new TreeViewListColumn("framerate","Video Framerate",colVFps); - col_list[colBitrate] = new TreeViewListColumn("bitrate","Bitrate",colBitrate); - col_list[colABitrate] = new TreeViewListColumn("abitrate","Audio Bitrate",colABitrate); - col_list[colVBitrate] = new TreeViewListColumn("vbitrate","Video Bitrate",colVBitrate); - col_list[colArtist] = new TreeViewListColumn("artist","Artist",colArtist); - col_list[colAlbum] = new TreeViewListColumn("album","Album",colAlbum); - col_list[colGenre] = new TreeViewListColumn("genre","Genre",colGenre); - col_list[colTrackName] = new TreeViewListColumn("title","Title",colTrackName); - col_list[colTrackNum] = new TreeViewListColumn("tracknum","Track No.",colTrackNum); - col_list[colComments] = new TreeViewListColumn("comments","Comments",colComments); - col_list[colRecordedDate] = new TreeViewListColumn("recordeddate","RecordedDate",colRecordedDate); - //col_list[colProgress] = new TreeViewListColumn("status",colProgress); - //col_list[colSpacer] = new TreeViewListColumn("spacer",colSpacer); + //col_list[col_name] = new TreeViewListColumn("name",col_name); + //col_list[col_size] = new TreeViewListColumn("size",col_size); + //col_list[col_duration] = new TreeViewListColumn("duration",col_duration); + col_list[col_file_format] = new TreeViewListColumn("format",_("Format"),col_file_format); + col_list[col_aformat] = new TreeViewListColumn("aformat",_("Audio Format"),col_aformat); + col_list[col_vformat] = new TreeViewListColumn("vformat",_("Video Format"),col_vformat); + col_list[col_channels] = new TreeViewListColumn("channels",_("Audio Channels"),col_channels); + col_list[col_sampling] = new TreeViewListColumn("samplingrate",_("Audio Sampling Rate"),col_sampling); + col_list[col_width] = new TreeViewListColumn("width",_("Video Width"),col_width); + col_list[col_height] = new TreeViewListColumn("height",_("Video Height"),col_height); + col_list[col_fps] = new TreeViewListColumn("framerate",_("Video Framerate"),col_fps); + col_list[col_bitrate] = new TreeViewListColumn("bitrate",_("Bitrate"),col_bitrate); + col_list[col_abitrate] = new TreeViewListColumn("abitrate",_("Audio Bitrate"),col_abitrate); + col_list[col_vbitrate] = new TreeViewListColumn("vbitrate",_("Video Bitrate"),col_vbitrate); + col_list[col_artist] = new TreeViewListColumn("artist",_("Artist"),col_artist); + col_list[col_album] = new TreeViewListColumn("album",_("Album"),col_album); + col_list[col_genre] = new TreeViewListColumn("genre",_("Genre"),col_genre); + col_list[col_track_name] = new TreeViewListColumn("title",_("Title"),col_track_name); + col_list[col_track_num] = new TreeViewListColumn("tracknum",_("Track Number"),col_track_num); + col_list[col_comments] = new TreeViewListColumn("comments",_("Comments"),col_comments); + col_list[col_recorded_date] = new TreeViewListColumn("recordeddate",_("Recorded Date"),col_recorded_date); + //col_list[col_progress] = new TreeViewListColumn("status",col_progress); + //col_list[col_spacer] = new TreeViewListColumn("spacer",col_spacer); - tvFiles_load_columns(); + tv_files_load_columns(); //disconnect event handler before exit this.delete_event.connect(()=>{ - tvFiles.columns_changed.disconnect(tvFiles_columns_changed); + tv_files.columns_changed.disconnect(tv_files_columns_changed); return false; }); } - private void tvFiles_load_columns(){ + private void tv_files_load_columns(){ - tvFiles.columns_changed.disconnect(tvFiles_columns_changed); + tv_files.columns_changed.disconnect(tv_files_columns_changed); //remove all columns var list = new Gee.ArrayList<TreeViewColumn>(); - foreach(TreeViewColumn col in tvFiles.get_columns()){ + foreach(TreeViewColumn col in tv_files.get_columns()){ list.add(col); } foreach(TreeViewColumn col in list){ - tvFiles.remove_column(col); + tv_files.remove_column(col); } //add required columns - tvFiles.append_column(colName); - tvFiles.append_column(colSize); - tvFiles.append_column(colDuration); + tv_files.append_column(col_name); + tv_files.append_column(col_size); + tv_files.append_column(col_duration); //add selected columns foreach(string col_name in App.ListViewColumns.split(",")){ foreach(TreeViewListColumn col in col_list.values){ if (col.Name == col_name){ - tvFiles.append_column(col.Ref); + tv_files.append_column(col.Ref); break; } } } //add required columns - tvFiles.append_column(colProgress); - tvFiles.append_column(colSpacer); + tv_files.append_column(col_progress); + tv_files.append_column(col_spacer); //update Selected flag foreach(TreeViewListColumn col in col_list.values){ col.Selected = false; } - foreach(TreeViewColumn col in tvFiles.get_columns()){ + foreach(TreeViewColumn col in tv_files.get_columns()){ if (col_list.has_key(col)){ col_list[col].Selected = true; } } - tvFiles.columns_changed.connect(tvFiles_columns_changed); + tv_files.columns_changed.connect(tv_files_columns_changed); } - private void tvFiles_columns_changed(){ - tvFiles_save_columns(); + private void tv_files_columns_changed(){ + tv_files_save_columns(); } - private void tvFiles_save_columns(){ + private void tv_files_save_columns(){ if (col_list == null){ return; } string s = ""; - var list = tvFiles.get_columns(); + var list = tv_files.get_columns(); foreach(TreeViewColumn col in list){ //s += "'%s',".printf(col.title); if (col_list.has_key(col)){ @@ -2291,19 +2853,19 @@ // toolbar -------------------------------- - private void btnRemoveFiles_clicked(){ + private void btn_remove_files_clicked(){ Gee.ArrayList<MediaFile> list = new Gee.ArrayList<MediaFile>(); - TreeSelection sel = tvFiles.get_selection(); + TreeSelection sel = tv_files.get_selection(); TreeIter iter; - bool iterExists = tvFiles.model.get_iter_first (out iter); + bool iterExists = tv_files.model.get_iter_first (out iter); while (iterExists) { if (sel.iter_is_selected (iter)){ MediaFile mf; - tvFiles.model.get (iter, InputField.FILE_REF, out mf, -1); + tv_files.model.get (iter, InputField.FILE_REF, out mf, -1); list.add(mf); } - iterExists = tvFiles.model.iter_next (ref iter); + iterExists = tv_files.model.iter_next (ref iter); } App.remove_files(list); @@ -2354,7 +2916,7 @@ } - private void btnAbout_clicked(){ + private void btn_about_clicked(){ var dialog = new AboutWindow(); dialog.set_transient_for (this); @@ -2365,7 +2927,8 @@ dialog.translators = { "abuyop (Malay):launchpad.net/~abuyop", "B. W. Knight (Korean):launchpad.net/~kbd0651", - "Felix Moreno (Spanish):launchpad.net/~felix-justdust" + "Felix Moreno (Spanish):launchpad.net/~felix-justdust", + "Radek Otáhal (Czech):radek.otahal@email.cz" }; dialog.third_party = { @@ -2409,22 +2972,22 @@ dialog.destroy(); } - private void btnEncoders_clicked(){ + private void btn_encoders_clicked(){ var dialog = new EncoderStatusWindow(this); dialog.run(); dialog.destroy(); } - private void btnAppSettings_clicked(){ + private void btn_app_settings_clicked(){ var dialog = new AppConfigWindow(this); dialog.run(); dialog.destroy(); - refresh_list_view(false); + refresh_list_view(); } - private void btnShutdown_clicked(){ - App.Shutdown = btnShutdown.active; + private void btn_shutdown_clicked(){ + App.Shutdown = btn_shutdown.active; if (App.Shutdown){ log_msg (_("Shutdown Enabled") + "\n"); @@ -2434,13 +2997,13 @@ } } - private void btnBackground_clicked(){ + private void btn_background_clicked(){ App.BackgroundMode = true; App.set_priority(); this.iconify(); } - private void btnPause_clicked(){ + private void btn_pause_clicked(){ // pause or resume based on value of field 'pause' if (App.Status == AppStatus.RUNNING){ App.pause(); @@ -2452,15 +3015,15 @@ // set button statepause or resume based on value of field 'pause' switch (App.Status){ case AppStatus.PAUSED: - btnPause.label = _("Resume"); - btnPause.stock_id = "gtk-media-play"; - btnPause.set_tooltip_text (_("Resume")); + btn_pause.label = _("Resume"); + btn_pause.stock_id = "gtk-media-play"; + btn_pause.set_tooltip_text (_("Resume")); statusbar_default_message(); break; case AppStatus.RUNNING: - btnPause.label = _("Pause"); - btnPause.stock_id = "gtk-media-pause"; - btnPause.set_tooltip_text (_("Pause")); + btn_pause.label = _("Pause"); + btn_pause.stock_id = "gtk-media-pause"; + btn_pause.set_tooltip_text (_("Pause")); statusbar_default_message(); break; } @@ -2468,7 +3031,7 @@ update_status_all(); } - private void btnStop_clicked(){ + private void btn_stop_clicked(){ App.stop_batch(); update_status_all(); } @@ -2485,8 +3048,8 @@ ScriptFile sh; TreeIter iter; - cmbScriptFile.get_active_iter(out iter); - cmbScriptFile.model.get (iter, 0, out sh, -1); + cmb_script_file.get_active_iter(out iter); + cmb_script_file.model.get (iter, 0, out sh, -1); App.SelectedScript = sh; //check if encoders used by preset are available @@ -2505,32 +3068,35 @@ } private void convert_prepare(){ + App.Status = AppStatus.RUNNING; + refresh_list_view(); + toolbar2.visible = false; - gridConfig.visible = false; - btnShutdown.active = App.Shutdown; + grid_config.visible = false; + btn_shutdown.active = App.Shutdown; - btnShutdown.visible = App.AdminMode; - btnBackground.visible = true; - btnOpenOutputFolder.visible = dir_exists(App.OutputDirectory); + btn_shutdown.visible = App.AdminMode; + btn_background.visible = true; + btn_open_output_dir.visible = dir_exists(App.OutputDirectory); - btnEditFiles.visible = false; - btnStart.visible = false; - btnAddFiles.visible = true; - btnRemoveFiles.visible = false; - btnAppSettings.visible = false; - btnEncoders.visible = false; - btnDonate.visible = false; - btnAbout.visible = false; + btn_edit_files.visible = false; + btn_start.visible = false; + btn_add_files.visible = true; + btn_remove_files.visible = false; + btn_app_settings.visible = false; + btn_encoders.visible = false; + btn_donate.visible = false; + btn_about.visible = false; - btnShutdown.visible = App.AdminMode; - btnShutdown.active = App.Shutdown; + btn_shutdown.visible = App.AdminMode; + btn_shutdown.active = App.Shutdown; - btnPause.visible = true; - btnStop.visible = true; - btnFinish.visible = false; + btn_pause.visible = true; + btn_stop.visible = true; + btn_finish.visible = false; paused = false; - btnPause.stock_id = "gtk-media-pause"; + btn_pause.stock_id = "gtk-media-pause"; foreach(TreeViewListColumn col in col_list.values){ if (col.Selected){ @@ -2538,14 +3104,14 @@ } } //colCrop.visible = false; - colProgress.visible = true; + col_progress.visible = true; start_cpu_usage_timer(); } private void convert_finish(){ toolbar2.visible = true; - gridConfig.visible = true; + grid_config.visible = true; //show extra columns if (!App.TileView){ @@ -2556,39 +3122,41 @@ } } //colCrop.visible = !App.TileView; - colProgress.visible = false; - - btnEditFiles.visible = true; - btnStart.visible = true; - btnAddFiles.visible = true; - btnRemoveFiles.visible = true; - btnAppSettings.visible = true; - btnEncoders.visible = true; - btnDonate.visible = true; - btnAbout.visible = true; - - btnShutdown.visible = false; - btnBackground.visible = false; - btnOpenOutputFolder.visible = false; - - btnPause.visible = false; - btnStop.visible = false; - btnFinish.visible = false; + col_progress.visible = false; + + btn_edit_files.visible = true; + btn_start.visible = true; + btn_add_files.visible = true; + btn_remove_files.visible = true; + btn_app_settings.visible = true; + btn_encoders.visible = true; + btn_donate.visible = true; + btn_about.visible = true; + + btn_shutdown.visible = false; + btn_background.visible = false; + btn_open_output_dir.visible = false; + + btn_pause.visible = false; + btn_stop.visible = false; + btn_finish.visible = false; separator1.visible = true; App.convert_finish(); + refresh_list_view(); + statusbar_default_message(); } private bool update_status(){ TreeIter iter; - Gtk.ListStore model = (Gtk.ListStore)tvFiles.model; + var model = (Gtk.TreeStore)tv_files.model; switch (App.Status) { case AppStatus.PAUSED: - /*if (btnPause.active == false){ - btnPause.active = true; + /*if (btn_pause.active == false){ + btn_pause.active = true; }*/ break; @@ -2617,14 +3185,14 @@ update_status_all(); // update UI - btnShutdown.visible = false; - btnBackground.visible = false; - btnStart.visible = false; - btnPause.visible = false; - btnStop.visible = false; - btnAddFiles.visible = false; + btn_shutdown.visible = false; + btn_background.visible = false; + btn_start.visible = false; + btn_pause.visible = false; + btn_stop.visible = false; + btn_add_files.visible = false; separator1.visible = false; - btnFinish.visible = true; + btn_finish.visible = true; // update statusbar message statusbar_default_message(); @@ -2641,8 +3209,8 @@ statusLine = App.StatusLine; if(statusLine == null){ return false; } - /*if (btnPause.active){ - btnPause.active = false; + /*if (btn_pause.active){ + btn_pause.active = false; } */ @@ -2657,7 +3225,7 @@ model.set (iter, InputField.FILE_PROGRESS_TEXT, null); } - lblStatus.label = statusLine; + lbl_status.label = statusLine; break; } @@ -2681,7 +3249,7 @@ } private void update_status_all(){ - Gtk.ListStore model = (Gtk.ListStore)tvFiles.model; + var model = (Gtk.TreeStore)tv_files.model; MediaFile mf; int index = -1; TreeIter iter;
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/MediaFile.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/MediaFile.vala
Changed
@@ -18,10 +18,6 @@ public long Duration = 0; //in milliseconds public string ThumbnailImagePath = ""; - public string SubFile = ""; - public string SubName = ""; - public string SubExt = ""; - public string TrackName = ""; public string TrackNumber = ""; public string Album = ""; @@ -30,8 +26,6 @@ public string RecordedDate = ""; public string Comment = ""; - //public int CropW = 0; - //public int CropH = 0; public int CropL = 0; public int CropR = 0; public int CropT = 0; @@ -42,7 +36,11 @@ public double EndPos = 0.0; public Gee.ArrayList<MediaClip> clip_list; - //public int Status = 0; + public Gee.ArrayList<MediaStream> stream_list; + public Gee.ArrayList<AudioStream> audio_list; + public Gee.ArrayList<VideoStream> video_list; + public Gee.ArrayList<TextStream> text_list; + public FileStatus Status = FileStatus.PENDING; public bool IsValid; public string ProgressText = _("Queued"); @@ -51,10 +49,6 @@ public string InfoText = ""; public string InfoTextFormatted = ""; - public bool HasAudio = false; - public bool HasVideo = false; - public bool HasSubs = false; - public string FileFormat = ""; public string VideoFormat = ""; public string AudioFormat = ""; @@ -75,12 +69,28 @@ public static int ThumbnailWidth = 80; public static int ThumbnailHeight= 64; - - public MediaFile(string filePath, string av_encoder){ + + private string ff_encoder = ""; + private string ff_player = ""; + + public MediaFile(string filePath, string ff_encoder){ IsValid = false; if (file_exists (filePath) == false) { return; } + this.ff_encoder = ff_encoder; + + if (ff_encoder == "ffmpeg"){ + this.ff_player = "ffplay"; + } + else{ + this.ff_player = "avplay"; + } + clip_list = new Gee.ArrayList<MediaClip>(); + stream_list = new Gee.ArrayList<MediaStream>(); + audio_list = new Gee.ArrayList<AudioStream>(); + video_list = new Gee.ArrayList<VideoStream>(); + text_list = new Gee.ArrayList<TextStream>(); // set file properties ------------ @@ -112,17 +122,69 @@ // search for subtitle files --------------- try{ - var enumerator = fp.enumerate_children ("%s,%s".printf(FileAttribute.STANDARD_NAME,FileAttribute.STANDARD_TYPE), 0); + var enumerator = fp.enumerate_children ("%s,%s,%s".printf(FileAttribute.STANDARD_NAME,FileAttribute.STANDARD_TYPE,FileAttribute.STANDARD_SIZE), 0); var fileInfo = enumerator.next_file(); while (fileInfo != null) { if (fileInfo.get_file_type() == FileType.REGULAR) { string fname = fileInfo.get_name().down(); + if (fname.has_prefix(Title.down()) && (fname.has_suffix (".srt")||fname.has_suffix (".sub")||fname.has_suffix (".ssa")||fname.has_suffix (".ttxt")||fname.has_suffix (".xml")||fname.has_suffix (".lrc"))) { - SubName = fileInfo.get_name(); - SubFile = Location + "/" + SubName; - SubExt = SubFile[SubFile.last_index_of(".",0):SubFile.length].down(); - HasSubs = true; + var stream = new TextStream(); + stream_list.add(stream); + text_list.add(stream); + stream.TypeIndex = text_list.index_of(stream); + + if (fname.has_suffix (".srt")){ + stream.Format = "SRT"; + } + else if (fname.has_suffix (".ssa")){ + stream.Format = "SSA"; + } + else if (fname.has_suffix (".sub")){ + stream.Format = "SUB"; + } + else if (fname.has_suffix (".ttxt")){ + stream.Format = "TTXT"; + } + else if (fname.has_suffix (".lrc")){ + stream.Format = "LRC"; + } + else if (fname.has_suffix (".xml")){ + stream.Format = "XML"; + } + + stream.SubName = fileInfo.get_name(); + stream.SubFile = Location + "/" + stream.SubName; + stream.SubExt = stream.SubFile[stream.SubFile.last_index_of(".",0):stream.SubFile.length].down(); + stream.StreamSize = fileInfo.get_size(); + stream.get_character_encoding(); + + // try to parse language info from subtitle file name + + var SubtitleTitle = stream.SubName[0: stream.SubName.last_index_of(".",0)]; + //log_msg("sub=%s".printf(SubtitleTitle)); + + if (SubtitleTitle.length > Title.length){ + string lang = SubtitleTitle.down(); + lang = lang[Title.length:SubtitleTitle.length]; + lang = lang.replace("_","").replace("-","").strip(); + + //log_msg("lang='%s',length=%d".printf(lang,lang.length)); + + if (lang.length == 2){ + if (LanguageCodes.map_2_to_3.has_key(lang)){ + stream.LangCode = lang; + stream.Title = LanguageCodes.map_2_to_Name[lang]; + } + } + else if (lang.length == 3){ + if (LanguageCodes.map_3_to_2.has_key(lang)){ + stream.LangCode = LanguageCodes.map_3_to_2[lang]; + stream.Title = LanguageCodes.map_3_to_Name[lang]; + } + } + } //log ("file=%s, name=%s, ext=%s\n".printf(SubFile, SubName, SubExt)); } } @@ -133,10 +195,10 @@ log_error (e.message); } - + // get thumbnail --------- - generate_thumbnail(av_encoder); + generate_thumbnail(); IsValid = true; } @@ -149,26 +211,53 @@ } string sectionType = ""; - + MediaStream stream = null; + foreach (string line in InfoText.split ("\n")){ if (line == null || line.length == 0) { continue; } - if (line.contains (":") == false) - { + if (line.contains (":") == false){ if (line.contains ("Audio")){ + stream = new AudioStream(); + stream_list.add(stream); + stream.Index = stream_list.index_of(stream) - 1; //-1 to ignore GeneralStream + + var audio = stream as AudioStream; + audio_list.add(audio); + audio.TypeIndex = audio_list.index_of(audio); + sectionType = "audio"; - HasAudio = true; + //HasAudio = true; } else if (line.contains ("Video")){ + stream = new VideoStream(); + stream_list.add(stream); + stream.Index = stream_list.index_of(stream) - 1; //-1 to ignore GeneralStream + + var video = stream as VideoStream; + video_list.add(video); + video.TypeIndex = video_list.index_of(video); + sectionType = "video"; - HasVideo = true; + //HasVideo = true; } else if (line.contains ("General")){ + stream = new GeneralStream(); + stream_list.add(stream); + sectionType = "general"; } else if (line.contains ("Text")){ + stream = new TextStream(); + stream_list.add(stream); + stream.Index = stream_list.index_of(stream) - 1; //-1 to ignore GeneralStream + + var text = stream as TextStream; + text_list.add(text); + text.TypeIndex = text_list.index_of(text); + sectionType = "text"; - HasSubs = true; + //HasSubs = true; } } else{ @@ -181,18 +270,7 @@ if (sectionType == "general"){ switch (key.down()) { case "duration/string": - Duration = 0; - foreach(string p in val.split(" ")){ - string part = p.strip().down(); - if (part.contains ("h") || part.contains ("hr")) - Duration += long.parse(part.replace ("hr","").replace ("h","")) * 60 * 60 * 1000; - else if (part.contains ("mn") || part.contains ("min")) - Duration += long.parse(part.replace ("min","").replace ("mn","")) * 60 * 1000; - else if (part.contains ("ms")) - Duration += long.parse(part.replace ("ms","")); - else if (part.contains ("s")) - Duration += long.parse(part.replace ("s","")) * 1000; - } + Duration = parse_duration(val); break; case "track": TrackName = val; @@ -224,51 +302,146 @@ } } else if (sectionType == "video"){ + var video = stream as VideoStream; switch (key.down()) { + case "duration/string": + video.Duration = parse_duration(val); + break; case "width/string": SourceWidth = int.parse(val.split(" ")[0].strip()); + video.Width = SourceWidth; break; case "height/string": SourceHeight = int.parse(val.split(" ")[0].strip()); + video.Height = SourceHeight; break; case "framerate/string": case "framerate_original/string": SourceFrameRate = double.parse(val.split(" ")[0].strip()); + video.FrameRate = SourceFrameRate; break; case "format": VideoFormat = val; + video.Format = VideoFormat; break; case "bitrate/string": + case "bitrate_nominal/string": VideoBitRate = int.parse(val.split(" ")[0].strip()); + video.BitRate = VideoBitRate; + break; + case "streamsize/string": + double d = double.parse(val.split(" ")[0].strip()); + if (val.contains("GiB")){ + d = d * 1024 * 1024 * 1024; + } + else if (val.contains("MiB")){ + d = d * 1024 * 1024; + } + else if (val.contains("KiB")){ + d = d * 1024 ; + } + video.StreamSize = (int64) d; break; } } else if (sectionType == "audio"){ + var audio = stream as AudioStream; switch (key.down()) { + case "duration/string": + audio.Duration = parse_duration(val); + break; case "channel(s)/string": AudioChannels = int.parse(val.split(" ")[0].strip()); + audio.Channels = AudioChannels; break; case "samplingrate/string": AudioSampleRate = (int)(double.parse(val.split(" ")[0].strip()) * 1000); + audio.SampleRate = AudioSampleRate; break; case "format": AudioFormat = val; + audio.Format = AudioFormat; break; case "bitrate/string": + case "bitrate_nominal/string": AudioBitRate = int.parse(val.split(" ")[0].strip()); + audio.BitRate = AudioBitRate; + break; + case "language/string": + audio.LangCode = val.split(" ")[0].strip().down(); + break; + case "streamsize/string": + double d = double.parse(val.split(" ")[0].strip()); + if (val.contains("GiB")){ + d = d * 1024 * 1024 * 1024; + } + else if (val.contains("MiB")){ + d = d * 1024 * 1024; + } + else if (val.contains("KiB")){ + d = d * 1024 ; + } + audio.StreamSize = (int64) d; + break; + } + } + else if (sectionType == "text"){ + var text = stream as TextStream; + switch (key.down()) { + case "format": + text.Format = val; + break; + case "language/string": + text.LangCode = val.down(); + break; + case "title": + text.Title = val; break; } } } } + + //set derived properties + foreach(var st in stream_list){ + if (st is VideoStream){ + var video = st as VideoStream; + if ((video.StreamSize == 0) && (video.Duration > 0) && (video.BitRate > 0)){ + video.StreamSize = (int64) ((video.Duration / 1000.0) * video.BitRate * 1000.0 / 8); + } + //log_msg("dur=%ld".printf(video.Duration)); + } + else if (st is AudioStream){ + var audio = st as AudioStream; + if ((audio.StreamSize == 0) && (audio.Duration > 0) && (audio.BitRate > 0)){ + audio.StreamSize = (int64) ((audio.Duration / 1000.0) * audio.BitRate * 1000.0 / 8); + } + } + } } public void query_mediainfo_formatted(){ InfoTextFormatted = get_mediainfo (Path, false); } + public long parse_duration(string txt){ + long dur = 0; + foreach(string p in txt.split(" ")){ + string part = p.strip().down(); + if (part.contains ("h") || part.contains ("hr")) + dur += long.parse(part.replace ("hr","").replace ("h","")) * 60 * 60 * 1000; + else if (part.contains ("mn") || part.contains ("min")) + dur += long.parse(part.replace ("min","").replace ("mn","")) * 60 * 1000; + else if (part.contains ("ms")) + dur += long.parse(part.replace ("ms","")); + else if (part.contains ("s")) + dur += long.parse(part.replace ("s","")) * 1000; + } + return dur; + } + public void prepare (string baseTempDir){ - TempDirectory = baseTempDir + "/" + timestamp2() + " - " + Name; + TempDirectory = baseTempDir + "/" + timestamp2() + " - " + Title; LogFile = TempDirectory + "/" + "log.txt"; TempScriptFile = TempDirectory + "/convert.sh"; OutputFilePath = ""; @@ -283,17 +456,62 @@ } } - public void generate_thumbnail(string av_encoder){ + public void generate_thumbnail(){ if (HasVideo){ ThumbnailImagePath = get_temp_file_path() + ".png"; string std_out, std_err; - execute_command_script_sync("%s -ss 1 -i \"%s\" -y -f image2 -vframes 1 -r 1 -s %dx%d \"%s\"".printf(av_encoder,Path,ThumbnailWidth,ThumbnailHeight,ThumbnailImagePath), out std_out, out std_err); + execute_command_script_sync("%s -ss 1 -i \"%s\" -y -f image2 -vframes 1 -r 1 -s %dx%d \"%s\"".printf(ff_encoder,Path,ThumbnailWidth,ThumbnailHeight,ThumbnailImagePath), out std_out, out std_err); + + //log_msg(std_err); } else{ ThumbnailImagePath = "/usr/share/%s/images/%s".printf(AppShortName, "audio.svg"); } } + //properties --------------------------- + + public bool HasVideo{ + get { + bool has = false; + foreach(MediaStream stream in video_list){ + if (stream.IsSelected){ + has = true; + break; + } + } + return has; + } + } + + public bool HasAudio{ + get { + bool has = false; + foreach(MediaStream stream in audio_list){ + if (stream.IsSelected){ + has = true; + break; + } + } + return has; + } + } + + public bool HasSubs{ + get { + bool has = false; + foreach(MediaStream stream in text_list){ + if (stream.IsSelected){ + has = true; + break; + } + } + return has; + } + } + + //cropping -------------------- + public bool crop_detect(){ if (HasVideo == false) { AutoCropError = true; @@ -366,28 +584,26 @@ return "0,0,0,0"; } - public void play_source(string av_player){ - play_file(Path, av_player); - } - - //TODO: Remove - private void play_file(string file_path, string av_player){ - if (file_exists(file_path)){ + //playback ---------------------- + + public void play_file(bool play_audio = true, bool play_video = true){ + if (file_exists(Path)){ string output = ""; string error = ""; string cmd = ""; - switch(av_player){ - case "avplay": - case "ffplay": - cmd = "nohup %s -i \"%s\"".printf(av_player, file_path); - break; - default: - cmd = "nohup %s \"%s\"".printf(av_player, file_path); - break; + cmd = "nohup %s -i \"%s\"".printf(ff_player, Path); + if (!play_audio){ + cmd += " -an"; } - + if (!play_video){ + cmd += " -vn"; + cmd += " -x 500 -y 100"; + } + + log_debug(cmd); + try { Process.spawn_command_line_sync(cmd, out output, out error); } @@ -406,3 +622,270 @@ return (EndPos - StartPos); } } + +public abstract class MediaStream : GLib.Object{ + public MediaStreamType Type = MediaStreamType.UNKNOWN; + public int Index = -1; + public int TypeIndex = -1; + public string Description = ""; + public bool IsSelected = true; + + public MediaStream(MediaStreamType _type){ + Type = _type; + } + + public enum MediaStreamType{ + UNKNOWN, + GENERAL, + AUDIO, + VIDEO, + TEXT + } + + public abstract string description{ + owned get; + } +} + +public class GeneralStream : MediaStream { + public string Format = ""; + + public GeneralStream(){ + base(MediaStreamType.GENERAL); + } + + public override string description{ + owned get { + return "%s".printf(Format); + } + } +} + +public class VideoStream : MediaStream { + public string Format = ""; + public int Width = 0; + public int Height = 0; + public double FrameRate = 0; + public int BitRate = 0; + public int64 StreamSize = 0; + public long Duration = 0; + + public VideoStream(){ + base(MediaStreamType.VIDEO); + } + + public override string description{ + owned get { + string s = ""; + if (Format.length > 0){ + s += "%s".printf(Format); + } + if ((Width > 0) && (Height > 0)){ + if (s.length > 0){ + s += ", "; + } + s += "%dx%d".printf(Width, Height); + } + if (FrameRate > 0){ + if (s.length > 0){ + s += ", "; + } + s += "%.3f fps".printf(FrameRate); + } + if (BitRate > 0){ + if (s.length > 0){ + s += ", "; + } + s += "%d k".printf(BitRate); + } + return s; + } + } +} + +public class AudioStream : MediaStream { + public string Format = ""; + public string LangCode = ""; + public int Channels = 0; + public int SampleRate = 0; + public int BitRate = 0; + public int64 StreamSize = 0; + public long Duration = 0; + + public AudioStream(){ + base(MediaStreamType.AUDIO); + } + + public override string description{ + owned get { + string s = ""; + if (Format.length > 0){ + s += "%s".printf(Format); + } + if (Channels > 0){ + if (s.length > 0){ + s += ", "; + } + s += "%d ch".printf(Channels); + } + if (SampleRate > 0){ + if (s.length > 0){ + s += ", "; + } + s += "%d hz".printf(SampleRate); + } + if (BitRate > 0){ + if (s.length > 0){ + s += ", "; + } + s += "%d k".printf(BitRate); + } + if (LangCode.length > 0){ + if (s.length > 0){ + s += " "; + } + s += "(%s)".printf(LangCode); + } + return s; + } + } +} + +public class TextStream : MediaStream { + public string Format = ""; + public string LangCode = ""; + public string Title = ""; + public int64 StreamSize = 0; + + public string SubName = ""; + public string SubExt = ""; + public string SubFile = ""; + public string CharacterEncoding = ""; + + public TextStream(){ + base(MediaStreamType.TEXT); + } + + public override string description{ + owned get { + string s = ""; + + if (IsExternal){ + s += "%s".printf("External"); + if (CharacterEncoding.length > 0){ + s += ", %s".printf(CharacterEncoding); + } + if (Title.length > 0){ + if (s.length > 0){ + s += ", "; + } + s += "%s".printf(Title); + } + if (LangCode.length > 0){ + if (s.length > 0){ + s += " "; + } + s += "(%s)".printf(LangCode); + } + s += ", '%s'".printf(SubName); + } + else{ + if (Format.length > 0){ + s += "%s".printf(Format); + } + if (Title.length > 0){ + if (s.length > 0){ + s += ", "; + } + s += "%s".printf(Title); + } + if (LangCode.length > 0){ + if (s.length > 0){ + s += " "; + } + s += "(%s)".printf(LangCode); + } + } + + return s; + } + } + + public bool IsExternal{ + get { + return (SubFile.length > 0); + } + } + + public void get_character_encoding(){ + string stdout, stderr; + execute_command_script_sync("LC_ALL=C file -i \"%s\"".printf(SubFile), out stdout, out stderr); + //log_msg("LC_ALL=C file -i \"%s\"".printf(SubFile)); + //log_msg("out=%s".printf(stdout)); + foreach(string line in stdout.split("\n")){ + if (line.contains("charset=")){ + CharacterEncoding = line.split("charset=")[1].up(); + break; + } + } + } +} + +public class LanguageCodes : GLib.Object{ + public static Gee.HashMap<string,string> map_2_to_3; + public static Gee.HashMap<string,string> map_3_to_2; + public static Gee.HashMap<string,string> map_2_to_Name; + public static Gee.HashMap<string,string> map_3_to_Name; + + public static Gee.ArrayList<Language> lang_list; + + private static void initialize(){ + lang_list = new Gee.ArrayList<Language>(); + map_2_to_3 = new Gee.HashMap<string,string>(); + map_3_to_2 = new Gee.HashMap<string,string>(); + map_2_to_Name = new Gee.HashMap<string,string>(); + map_3_to_Name = new Gee.HashMap<string,string>(); + } + + public class Language : GLib.Object{ + public string Name = ""; + public string Code2 = ""; + public string Code3 = ""; + + public Language(string _Name, string _Code2, string _Code3){ + Name = _Name; + Code2 = _Code2; + Code3 = _Code3; + + map_2_to_3[Code2] = Code3; + map_3_to_2[Code3] = Code2; + map_2_to_Name[Code2] = Name; + map_3_to_Name[Code3] = Name; + lang_list.add(this); + } + } + + public static void build_maps(){ + initialize(); + + string stdout, stderr; + execute_command_script_sync("LC_ALL=C mkvmerge --list-languages", out stdout, out stderr); + foreach(string line in stdout.split("\n")){ + string[] parts = line.split("|"); + if (parts.length == 3){ + string name = parts[0].split(";")[0].split("(")[0].strip(); + string code3 = parts[1].strip().down(); + string code2 = parts[2].strip().down(); + new Language(name,code2,code3); + } + } + + //sort languages by name + CompareDataFunc<Language> func = (a, b) => { + return strcmp(a.Name, b.Name); + }; + lang_list.sort((owned)func); + } +} + +
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/MediaPlayerWindow.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/MediaPlayerWindow.vala
Changed
@@ -70,7 +70,7 @@ private uint tmr_init = 0; private string action = ""; private bool crop_detect_is_running = false; - + public static Gtk.Window CropVideo(MediaFile mf, Gtk.Window parent){ var win = new MediaPlayerWindow(mf, parent, "crop"); parent.hide(); @@ -113,16 +113,16 @@ resizable = false; action = _action; - + player = new MediaPlayer(); player.mFile = _mFile; mFile = _mFile; if (action == "crop"){ - title = "Crop Video"; + title = _("Crop Video"); } else if (action == "trim"){ - title = "Trim"; + title = _("Trim"); } else if (action == "play"){ title = mFile.Name + " - Selene"; @@ -149,6 +149,10 @@ status_timer_stop(); player.Exit(); //return false; + + if (action == "trim"){ + update_basic_mode_options(); + } }); show_all(); @@ -473,6 +477,8 @@ grid.attach(button,3,2,1,1); button.clicked.connect(()=>{ + update_basic_mode_options(); + grid_trim_basic.no_show_all = false; grid_trim_basic.show_all(); grid_trim_basic.visible = true; @@ -650,13 +656,13 @@ string time = ""; if (current_clip != null){ - msg += "<b>Clip #%d</b>\n\n".printf(index); + msg += "<b>" + _("Clip") + "#%d</b>\n\n".printf(index); time = format_duration((long) (current_clip.StartPos * 1000.0), true); - msg += "Start Pos:\t%s = %.3f sec\n".printf(time,current_clip.StartPos); + msg += _("Start Pos") + ":\t%s = %.3f sec\n".printf(time,current_clip.StartPos); time = format_duration((long) (current_clip.EndPos * 1000.0), true); - msg += "End Pos:\t%s = %.3f sec\n".printf(time,current_clip.EndPos); + msg += _("End Pos") + ":\t%s = %.3f sec\n".printf(time,current_clip.EndPos); time = format_duration((long) (current_clip.Duration() * 1000.0), true); - msg += "Duration:\t%s = %.3f sec".printf(time,current_clip.Duration()); + msg += _("Duration") + ":\t%s = %.3f sec".printf(time,current_clip.Duration()); timeline.set_tooltip_markup(msg); } else{ @@ -692,6 +698,7 @@ return true; } + //crop private void spinCrop_value_changed_connect(){ @@ -885,6 +892,16 @@ mFile.EndPos = spinEndPos.adjustment.value; } + private void update_basic_mode_options(){ + if (action == "trim"){ + if (mFile.clip_list.size > 0){ + var clip = mFile.clip_list[0]; + mFile.StartPos = clip.StartPos; + mFile.EndPos = clip.EndPos; + } + } + } + //load file private void load_file(){
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/Utility.vala -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/Utility.vala
Changed
@@ -1041,6 +1041,20 @@ return img_icon; } + + public static int CSS_AUTO_CLASS_INDEX = 0; + public static void apply_css(Gtk.Widget widget, string css_style){ + var css_provider = new Gtk.CssProvider(); + var css = ".style_%d { %s }".printf(++CSS_AUTO_CLASS_INDEX, css_style); + try { + css_provider.load_from_data(css,-1); + } catch (GLib.Error e) { + warning(e.message); + } + + widget.get_style_context().add_provider(css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + widget.get_style_context().add_class("style_%d".printf(CSS_AUTO_CLASS_INDEX)); + } } namespace TeeJee.Multimedia{ @@ -1152,9 +1166,6 @@ return output; } - - - } namespace TeeJee.System{ @@ -1698,11 +1709,21 @@ return t.format ("%Y-%d-%m_%H-%M-%S"); } + public string to_en_us_string(double d){ + return d.to_string().replace(",",".").replace(" ",""); + } + public string format_file_size (int64 size){ /* Format file size in MB */ - - return "%0.1f MB".printf (size / (1024.0 * 1024)); + + if (size > (1024.0 * 1024)){ + return "%0.1f MB".printf (size / (1024.0 * 1024)); + } + else{ + return "%0.1f KB".printf (size / (1024.0)); + } + } public string format_duration (long millis, bool show_millis = false){
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/makefile -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/makefile
Changed
@@ -53,7 +53,9 @@ msgfmt --check --verbose -o "$(DESTDIR)$(localedir)/ko/LC_MESSAGES/${app_name}.mo" ../po/${app_name}-ko.po mkdir -p "$(DESTDIR)$(localedir)/es/LC_MESSAGES" msgfmt --check --verbose -o "$(DESTDIR)$(localedir)/es/LC_MESSAGES/${app_name}.mo" ../po/${app_name}-es.po - + mkdir -p "$(DESTDIR)$(localedir)/cs/LC_MESSAGES" + msgfmt --check --verbose -o "$(DESTDIR)$(localedir)/cs/LC_MESSAGES/${app_name}.mo" ../po/${app_name}-cs.po + uninstall: #binary rm -f "$(DESTDIR)$(bindir)/${app_name}"
View file
selene_16.2.7~261~ubuntu16.04.1.tar.xz/src/selene.desktop -> selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/selene.desktop
Changed
@@ -6,7 +6,7 @@ GenericName=Audio-Video Converter Terminal=false Icon=selene -Caption=Audio-Video Converter +Comment=Audio-Video Converter X-KDE-StartupNotify=false Categories=AudioVideo; Name[en_IN]=selene
View file
selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/share/selene/images/general.svg
Added
@@ -0,0 +1,211 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="24" + height="24" + id="svg3879" + version="1.1" + inkscape:version="0.47 r22583" + sodipodi:docname="document-properties.svg"> + <defs + id="defs3881"> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3805" + id="linearGradient3830" + x1="12" + y1="16" + x2="12" + y2="8" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + id="linearGradient3805"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop3807" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop3809" /> + </linearGradient> + <linearGradient + gradientTransform="translate(0,8)" + inkscape:collect="always" + xlink:href="#linearGradient3805" + id="linearGradient3814" + gradientUnits="userSpaceOnUse" + x1="12.47939" + y1="2" + x2="12.47939" + y2="22.006775" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5128" + id="linearGradient3610" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.15623116,0,0,0.15623125,2.0012002,10.157431)" + x1="86.132919" + y1="105.105" + x2="84.63858" + y2="20.895" /> + <linearGradient + id="linearGradient5128"> + <stop + id="stop5130" + style="stop-color:#ffffff;stop-opacity:1" + offset="0" /> + <stop + id="stop5132" + style="stop-color:#959595;stop-opacity:1" + offset="1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3309-1" + id="linearGradient3614-2" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.77777782,0,0,0.77777782,-12.111112,-5.666669)" + x1="32.036148" + y1="19" + x2="32.036148" + y2="47.012184" /> + <linearGradient + x1="63.9995" + y1="3.1001" + x2="63.9995" + y2="122.8994" + id="linearGradient3309-1" + gradientUnits="userSpaceOnUse"> + <stop + id="stop3311-5" + style="stop-color:#f6f6f6;stop-opacity:1" + offset="0" /> + <stop + id="stop3313-0" + style="stop-color:#d2d2d2;stop-opacity:1" + offset="1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3397-0" + id="linearGradient3616-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.77777782,0,0,0.77777782,-12.111112,-5.666669)" + x1="25.922546" + y1="19" + x2="25.922546" + y2="47.044857" /> + <linearGradient + id="linearGradient3397-0"> + <stop + id="stop3399-4" + style="stop-color:#aaaaaa;stop-opacity:1" + offset="0" /> + <stop + id="stop3401-0" + style="stop-color:#8c8c8c;stop-opacity:1" + offset="1" /> + </linearGradient> + <linearGradient + id="linearGradient10691"> + <stop + id="stop10693" + style="stop-color:#000000;stop-opacity:1" + offset="0" /> + <stop + id="stop10695" + style="stop-color:#000000;stop-opacity:0" + offset="1" /> + </linearGradient> + <radialGradient + r="7.228416" + fy="73.615715" + fx="6.702713" + cy="73.615715" + cx="6.702713" + gradientTransform="matrix(1.6600963,0,0,0.36315008,0.8728521,2.6414479)" + gradientUnits="userSpaceOnUse" + id="radialGradient3877" + xlink:href="#linearGradient10691" + inkscape:collect="always" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.197802" + inkscape:cx="16" + inkscape:cy="16" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="603" + inkscape:window-height="479" + inkscape:window-x="417" + inkscape:window-y="169" + inkscape:window-maximized="0" /> + <metadata + id="metadata3884"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer" + transform="translate(0,-8)"> + <path + style="opacity:0.2;fill:url(#radialGradient3877);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible" + id="path10689" + d="M 23.999865,29.375 C 23.999865,30.824748 18.627342,32 12,32 5.3726571,32 1.348125e-4,30.824748 1.348125e-4,29.375 1.348125e-4,27.925253 5.3726571,26.75 12,26.75 c 6.627342,0 11.999865,1.175253 11.999865,2.625 z" /> + <path + style="color:#000000;fill:url(#linearGradient3614-2);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3616-9);stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" + d="m 10.5,9.5 c -0.554,0 -1,0.446 -1,1 l 0,1.375 C 8.9926705,12.030783 8.4932312,12.225474 8.03125,12.46875 L 7.0625,11.5 C 6.6707628,11.108263 6.0167372,11.108263 5.625,11.5 L 3.5,13.625 c -0.3917372,0.391737 -0.3917372,1.045763 0,1.4375 l 0.96875,0.96875 C 4.2254741,16.493231 4.0307828,16.99267 3.875,17.5 l -1.375,0 c -0.554,0 -1,0.446 -1,1 l 0,3 c 0,0.554 0.446,1 1,1 l 1.375,0 c 0.1557828,0.507329 0.3504741,1.006769 0.59375,1.46875 L 3.5,24.9375 c -0.3917372,0.391737 -0.3917372,1.045763 0,1.4375 L 5.625,28.5 c 0.3917372,0.391737 1.0457628,0.391737 1.4375,0 L 8.03125,27.53125 C 8.4932312,27.774526 8.9926705,27.969217 9.5,28.125 l 0,1.375 c 0,0.554 0.446,1 1,1 l 3,0 c 0.554,0 1,-0.446 1,-1 l 0,-1.375 c 0.507329,-0.155783 1.006769,-0.350474 1.46875,-0.59375 L 16.9375,28.5 c 0.391737,0.391737 1.045763,0.391737 1.4375,0 L 20.5,26.375 c 0.391737,-0.391737 0.391737,-1.045763 0,-1.4375 L 19.53125,23.96875 C 19.774526,23.506769 19.969217,23.007329 20.125,22.5 l 1.375,0 c 0.554,0 1,-0.446 1,-1 l 0,-3 c 0,-0.554 -0.446,-1 -1,-1 l -1.375,0 C 19.969217,16.99267 19.774526,16.493231 19.53125,16.03125 L 20.5,15.0625 c 0.391737,-0.391737 0.391737,-1.045763 0,-1.4375 L 18.375,11.5 c -0.391737,-0.391737 -1.045763,-0.391737 -1.4375,0 l -0.96875,0.96875 C 15.506769,12.225474 15.007329,12.030783 14.5,11.875 l 0,-1.375 c 0,-0.554 -0.446,-1 -1,-1 l -3,0 z m 1.5,8 c 1.380712,0 2.5,1.119288 2.5,2.5 0,1.380712 -1.119288,2.5 -2.5,2.5 -1.380712,0 -2.5,-1.119288 -2.5,-2.5 0,-1.380712 1.119288,-2.5 2.5,-2.5 z" + id="rect3623" /> + <path + style="opacity:0.05;fill:#000000;fill-opacity:1;stroke:none" + d="m 12,14 c -3.310303,0 -6,2.689698 -6,6 0,3.310302 2.689697,6 6,6 3.310301,0 6,-2.689698 6,-6 0,-3.310302 -2.689699,-6 -6,-6 z m 0,3 c 1.656854,0 3,1.343146 3,3 0,1.656854 -1.343146,3 -3,3 -1.656854,0 -3,-1.343146 -3,-3 0,-1.656854 1.343146,-3 3,-3 z" + id="path3315" /> + <path + style="fill:none;stroke:url(#linearGradient3610);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" + id="path28" + d="m 12,13.499999 c -3.5841018,0 -6.5,2.9159 -6.5,6.499999 C 5.5,23.5841 8.4158982,26.5 12,26.5 c 3.584101,0 6.5,-2.9159 6.5,-6.500002 0,-3.584099 -2.915899,-6.499999 -6.5,-6.499999 z" /> + <path + style="opacity:0.8;color:#000000;fill:none;stroke:url(#linearGradient3814);stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" + d="m 10.5,10.46875 c -0.07417,0.388719 -0.0095,0.901108 -0.03125,1.336433 0.06469,0.778079 -0.7702767,1.052854 -1.3682852,1.21661 -0.5470235,0.311236 -1.3489947,0.671898 -1.8369673,0.0542 C 6.9673317,12.779832 6.6711658,12.483666 6.375,12.1875 5.9432707,12.474172 5.5902425,12.950845 5.1889654,13.311035 4.8695012,13.671637 4.4334278,13.983938 4.1875,14.375 c 0.4070204,0.490131 1.0485159,0.837591 1.225798,1.476969 -0.024664,0.798464 -0.5401599,1.529218 -0.8123879,2.267025 -0.5018209,0.56435 -1.3150413,0.280668 -1.9743456,0.349756 -0.3445673,-0.01288 -0.070329,0.586347 -0.1578145,0.825709 0.00121,0.744981 -0.0024,1.490108 0.00179,2.234998 0.6455598,0.06419 1.3569859,-0.150581 1.9454937,0.179668 0.5556121,0.579212 0.6756354,1.474124 1.0067725,2.188766 0.04177,0.75274 -0.7323134,1.126431 -1.1493366,1.641136 -0.2173877,0.272406 0.385277,0.504146 0.5159207,0.750367 0.5077022,0.507702 1.0154043,1.015404 1.5231065,1.523106 0.5224633,-0.304869 0.8397278,-0.98896 1.4454346,-1.204942 0.8151392,-0.106648 1.5136871,0.546448 2.2838276,0.733976 0.650694,0.452082 0.363529,1.310427 0.426988,1.975154 -0.08851,0.418476 0.527859,0.12987 0.768962,0.214562 0.763896,-0.0012 1.527939,0.0024 2.291745,-0.0018 0.06419,-0.64556 -0.150581,-1.356986 0.179668,-1.945494 0.579212,-0.555612 1.474124,-0.675635 2.188766,-1.006772 0.75274,-0.04177 1.126431,0.732313 1.641136,1.149336 0.272406,0.217388 0.504146,-0.385277 0.750367,-0.515921 0.507702,-0.507702 1.015404,-1.015404 1.523106,-1.523106 -0.304869,-0.522463 -0.98896,-0.839728 -1.204942,-1.445435 -0.106648,-0.815139 0.546448,-1.513687 0.733976,-2.283827 0.452082,-0.650694 1.310427,-0.363529 1.975154,-0.426988 0.418476,0.08851 0.12987,-0.527859 0.214562,-0.768962 -0.0012,-0.763896 0.0024,-1.527939 -0.0018,-2.291745 -0.64556,-0.06419 -1.356986,0.150581 -1.945494,-0.179668 -0.555602,-0.579205 -0.675625,-1.474117 -1.006762,-2.188759 -0.04177,-0.75274 0.732313,-1.126431 1.149336,-1.641136 0.217388,-0.272406 -0.385277,-0.504146 -0.515921,-0.750366 -0.507702,-0.507703 -1.015404,-1.015405 -1.523106,-1.523107 -0.522463,0.304869 -0.839728,0.98896 -1.445435,1.204942 -0.815139,0.106648 -1.513687,-0.546448 -2.283827,-0.733976 -0.650694,-0.452082 -0.363529,-1.310427 -0.426988,-1.975154 0.08851,-0.418476 -0.527859,-0.12987 -0.768962,-0.214562 -0.754096,0 -1.508192,0 -2.262288,0 z" + id="path3799" + sodipodi:nodetypes="ccccccccccccccscccccccccscccccccccsccccccc" /> + <path + sodipodi:type="arc" + style="opacity:0.4;color:#000000;fill:none;stroke:url(#linearGradient3830);stroke-width:0.98852974;stroke-opacity:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" + id="path3822" + sodipodi:cx="12" + sodipodi:cy="12" + sodipodi:rx="3.4598541" + sodipodi:ry="3.4598541" + d="m 15.459854,12 c 0,1.910825 -1.549029,3.459854 -3.459854,3.459854 -1.910825,0 -3.4598541,-1.549029 -3.4598541,-3.459854 0,-1.910825 1.5490291,-3.4598541 3.4598541,-3.4598541 1.910825,0 3.459854,1.5490291 3.459854,3.4598541 z" + transform="matrix(1.0116033,0,0,1.0116033,-0.13923977,7.8607606)" /> + </g> +</svg>
View file
selene_16.3.3~280~ubuntu16.04.1.tar.xz/src/share/selene/images/subs.svg
Added
@@ -0,0 +1,188 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="1.0" + width="24" + height="24" + id="svg2622"> + <defs + id="defs2624"> + <linearGradient + id="linearGradient5048"> + <stop + id="stop5050" + style="stop-color:#000000;stop-opacity:0" + offset="0" /> + <stop + id="stop5056" + style="stop-color:#000000;stop-opacity:1" + offset="0.5" /> + <stop + id="stop5052" + style="stop-color:#000000;stop-opacity:0" + offset="1" /> + </linearGradient> + <linearGradient + x1="302.85715" + y1="366.64789" + x2="302.85715" + y2="609.50507" + id="linearGradient2616" + xlink:href="#linearGradient5048" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.0352071,0,0,0.00823529,-0.724852,18.980551)" /> + <radialGradient + cx="605.71429" + cy="486.64789" + r="117.14286" + fx="605.71429" + fy="486.64789" + id="radialGradient2613" + xlink:href="#linearGradient5060" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.01204859,0,0,0.00823529,10.761206,18.980568)" /> + <linearGradient + id="linearGradient5060"> + <stop + id="stop5062" + style="stop-color:#000000;stop-opacity:1" + offset="0" /> + <stop + id="stop5064" + style="stop-color:#000000;stop-opacity:0" + offset="1" /> + </linearGradient> + <radialGradient + cx="605.71429" + cy="486.64789" + r="117.14286" + fx="605.71429" + fy="486.64789" + id="radialGradient2610" + xlink:href="#linearGradient5060" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.01204859,0,0,0.00823529,13.238794,18.980568)" /> + <linearGradient + x1="-51.786404" + y1="50.786446" + x2="-51.786404" + y2="2.9062471" + id="linearGradient2607" + xlink:href="#linearGradient3104" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.3922135,0,0,0.4473607,29.199293,-1.2386997)" /> + <linearGradient + id="linearGradient3600"> + <stop + id="stop3602" + style="stop-color:#f4f4f4;stop-opacity:1" + offset="0" /> + <stop + id="stop3604" + style="stop-color:#dbdbdb;stop-opacity:1" + offset="1" /> + </linearGradient> + <linearGradient + x1="25.132275" + y1="0.98520643" + x2="25.132275" + y2="47.013336" + id="linearGradient2605" + xlink:href="#linearGradient3600" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.4857154,0,0,0.4780255,0.3428305,-0.7059501)" /> + <linearGradient + id="linearGradient3211"> + <stop + id="stop3213" + style="stop-color:#ffffff;stop-opacity:1" + offset="0" /> + <stop + id="stop3215" + style="stop-color:#ffffff;stop-opacity:0" + offset="1" /> + </linearGradient> + <linearGradient + x1="24" + y1="1.9999999" + x2="24" + y2="46.01725" + id="linearGradient2599" + xlink:href="#linearGradient3211" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.4545444,0,0,0.4651153,1.0909345,0.3372293)" /> + <linearGradient + id="linearGradient3104"> + <stop + id="stop3106" + style="stop-color:#aaaaaa;stop-opacity:1" + offset="0" /> + <stop + id="stop3108" + style="stop-color:#c8c8c8;stop-opacity:1" + offset="1" /> + </linearGradient> + <linearGradient + id="linearGradient8589"> + <stop + id="stop8591" + style="stop-color:#fefefe;stop-opacity:1" + offset="0" /> + <stop + id="stop8593" + style="stop-color:#cbcbcb;stop-opacity:1" + offset="1" /> + </linearGradient> + <linearGradient + x1="32.892288" + y1="8.0590115" + x2="36.358372" + y2="5.4565363" + id="linearGradient2595" + xlink:href="#linearGradient8589" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.4778466,0,0,0.5524833,0.3722548,-0.0761283)" /> + </defs> + <g + id="layer1"> + <rect + width="17" + height="1.9999981" + x="3.5000005" + y="21.999998" + id="rect2879" + style="opacity:0.15;fill:url(#linearGradient2616);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" /> + <path + d="m 3.5,22.000086 c 0,0 0,1.999889 0,1.999889 C 2.8795275,24.00374 2,23.551901 2,22.999901 2,22.447902 2.6924,22.000086 3.5,22.000086 z" + id="path2881" + style="opacity:0.15;fill:url(#radialGradient2613);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" /> + <path + d="m 20.5,22.000086 c 0,0 0,1.999889 0,1.999889 0.620472,0.0038 1.5,-0.448074 1.5,-1.000074 0,-0.551999 -0.692401,-0.999815 -1.5,-0.999815 z" + id="path2883" + style="opacity:0.15;fill:url(#radialGradient2610);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" /> + <path + d="m 3.4999617,0.49996097 c 3.8955799,0 7.6044553,0 11.5000383,0 C 15.683368,0.73725787 19.541325,3.628131 20.5,5.5 c 0,5.729157 3.9e-5,11.270881 3.9e-5,17.000039 -5.666693,0 -11.3333845,0 -17.0000773,0 0,-7.33336 0,-14.6667201 0,-22.00007803 z" + id="path4160" + style="fill:url(#linearGradient2605);fill-opacity:1;stroke:url(#linearGradient2607);stroke-width:0.99992162;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" /> + <path + d="m 19.500001,5.6770357 c 0,5.2083053 0,10.6146573 0,15.8229643 -5,0 -9.9999998,0 -15.000001,0 0,-6.66667 0,-13.3333343 0,-20.0000001 3.4372614,0 6.956499,0 10.393761,0" + id="path2435" + style="opacity:0.6;fill:none;stroke:url(#linearGradient2599);stroke-width:0.99999988;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" /> + <path + d="m 6,4.5050062 2.34375,0 -2.34375,0 z m 2.6875,0 2.1875,0 -2.1875,0 z m 2.53125,0 1.9375,0 -1.9375,0 z m 2.25,0 0.84375,0 -0.84375,0 z m 1.1875,0 0,0 z m -8.65625,2 3.65625,0 -3.65625,0 z m 4.0625,0 1.75,0 -1.75,0 z m 2.0625,0 0.875,0 -0.875,0 z m 1.21875,0 1.59375,0 -1.59375,0 z m 1.9375,0 1.625,0 -1.625,0 z M 6,8.5350541 l 1.59375,0 -1.59375,0 z m 2.09375,0 5.90625,0 -5.90625,0 z M 6,11.5 9.09375,11.5 6,11.5 z m 3.40625,0 5.0625,0 -5.0625,0 z m 5.375,0 2.46875,0 -2.46875,0 z M 6,13.5 8.34375,13.5 6,13.5 z m 2.6875,0 2.15625,0 -2.15625,0 z m 2.53125,0 1.9375,0 -1.9375,0 z m 2.25,0 0.84375,0 -0.84375,0 z m 1.1875,0 1.875,0 -1.875,0 z M 6,16.5 9.09375,16.5 6,16.5 z m 3.40625,0 5.0625,0 -5.0625,0 z m 5.375,0 2.46875,0 -2.46875,0 z M 6,18.5 9.8750002,18.5 6,18.5 z m 4.21875,0 1.75,0 -1.75,0 z m 2.0625,0 2.75,0 -2.75,0 z" + id="path2590" + style="fill:none;stroke:#aaaaaa;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + d="m 14.075474,1 c 1.156303,0.3287671 0.339059,4.6143789 0.339059,4.6143789 0,0 4.515388,-0.4277362 5.60771,1.1949961 C 21.511396,9.0216317 19.954018,6.1742029 19.848796,5.9876778 19.092868,4.6476323 15.982456,1.4405918 14.803387,1.0464703 14.715155,1.0169778 14.519511,1 14.075474,1 z" + id="path3370" + style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline" /> + <path + d="m 14,1 c 1.526166,0 1,4 1,4 0,0 4.992074,-0.45326 4.992074,2 0,-0.5977419 0.05575,-1.4784338 -0.06407,-1.6559326 C 19.088897,4.1010616 16.184239,1.4821803 15.129935,1.0464703 15.043957,1.0109384 14.444037,1 14,1 z" + id="path4474" + style="fill:url(#linearGradient2595);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline" /> + </g> +</svg>
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.