* CMake tweaks to make the project more linux packager friendly
- Add install target for tsMuxerGUI
- Add install for contributed desktop file
- Install icon for desktop file
- Don't check for C when all sources are C++.
Previous versions used the "last output directory" when opening the "Browse"
dialog in the main window, using the current "File name" only if the "last
output directory " is not yet defined. This change reverses this, which means
that the folder of the path currently entered as the "File name" will be used
as the folder to display. The file name will be carried over to the dialog.
Fixes#372 .
Pointers to widgets can be simply compared directly against the pointers in the
UI struct, which is admittedly less fragile than relying on object names for the
same purpose.
updateTracksComboBox() was called after the indices are updated, but before the
row being removed is actually removed from the trackLV structure. This caused
the new generated track descriptions to refer to invalid tracks.
Indices in both combo boxes must be updated, since an audio track index might
have changed when a subtitle track is removed and vice versa : there is only one
array which holds information about tracks that these combo boxes reference via
the data contained in their items' UserRoles.
When a file with multiple video tracks is added (e.g. with Dolby Vision), tsMuxer swaps the order of the video tracks in the output.
This change, prevents such behavior and maintains the order of the inserted tracks.
It turns out that playing sound files available as application resources is as simple as using QSoundEffect with a qrc URL. This saves us from all the shenanigans previously done in order to save the resource to a file just to be able to pass it to a QSound object.
The contents of the UI tab were saved as inline HTML in the UI file for TsMuxerWindow. Making them translatable would've exported the content to .ts files, which means that translators would have to put up with not only HTML, but HTML with XML escaping applied into it.
Moving the content to an external file seems like a best approach in this case. The content of the file is loaded in the appropriate language when switching languages. The HTML files themselves are included as resources at build time.
This commit erases all usages of std::wstring from the face of the project and reduces wchar_t usages to the necessary minimum, mostly for interoperability with WinAPI functions. UTF-8 encoded std::strings are used in place of std::wstring objects, and code which must operate on actual characters instead of the bytes which might represent a character has been modified in order to work properly - mostly the subtitle renderer and reader classes.
This change brings translation support to the tsMuxeR GUI. We have a Russian translation available so far, thanks to @abakum. The last selected translation is saved in the settings file and restored at the application's next startup. The currently used language is selectable by a combo box in the lower left corner of the window.
This commit uses "wide" (i.e. UTF-16) commandline arguments when launching the
program on Windows, and uses the "wide" Windows APIs when dealing with strings.
This makes it independent from the currently selected active code page on the
system, and hopefully fixes issues with "nonstandard" characters appearing in
file and directory paths.
Fixes#172.
All pgStreams3D[pgTrackNum] (coming from clpi) must be changed to streamInfo (coming from mpls)
When 3d-plane is "FF", this means it is 'undefined' (i.e. 2D), not 'zero'.
QString::toDouble (and ::toFloat) behaviour changed between Qt4 and Qt5 : in
the older version, the function tried to convert the string according to the
current locale and, if unsuccessful, fell back to parsing according to the "C"
locale.
In Qt5, the conversion is always performed in the "C" locale, which means that
all the shenanigans related to finding and replacing the decimal point are not
needed anymore, since the main tsMuxer binary always runs in the "C" locale due
to not calling setlocale() at all.
Also, if Qt 4.8 documentation is to be believed, all this code wasn't ever
needed in the first place, as the conversion function would've just used the
"C" locale after failing to convert the string due to a mismatch in the used
decimal point character - and thus succeeded.
GitHub runners only checkout the particular revision that's going to be built
instead of the whole tree, which results in the revision count always being set
to 1. The short revision checksum is enough anyway.
This replaces the occurrences of the static version number with a version string
if building in a Git repository and Git is available on the build host.
This isn't perfect, since the revision is only going to be fetched when running
qmake or cmake, while it's possible that it changes between consecutive
compilations, not just reconfigurations. However, the main purpose of this is
to add a version tag to the builds built centrally by the GitHub runners, which
always configure the project from scratch.
Fixes#127.