Skip to content

Commit

Permalink
New Release 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
llamaret committed Dec 5, 2019
1 parent 7909e5c commit 3c3dfd2
Show file tree
Hide file tree
Showing 22 changed files with 4,399 additions and 610 deletions.
28 changes: 9 additions & 19 deletions converter/ffmpeginterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ struct FFmpegInterface::Private
QRegExp duration_pattern;

bool encoders_read;
bool __dummy_padding[7]; // Avoid internally padding of struct on RAM
QList<QString> audio_encoders;
QList<QString> video_encoders;
QList<QString> subtitle_encoders;
Expand Down Expand Up @@ -480,7 +481,6 @@ QStringList FFmpegInterface::Private::getOptionList(const ConversionParameters &
list.append("copy");
} else { // video enabled


// same video quality as source
if (o.video_same_quality) {
list.append("-sameq");
Expand All @@ -503,25 +503,15 @@ QStringList FFmpegInterface::Private::getOptionList(const ConversionParameters &
list.append(QString("%1x%2").arg(o.video_width).arg(o.video_height));
}

if (o.video_crop_top > 0) {
list.append("-croptop");
list.append(QString("%1").arg(o.video_crop_top));
}

if (o.video_crop_bottom > 0) {
list.append("-cropbottom");
list.append(QString("%1").arg(o.video_crop_bottom));
}
// crop video
list.append("-filter:v");

if (o.video_crop_left > 0) {
list.append("-cropleft");
list.append(QString("%1").arg(o.video_crop_left));
}

if (o.video_crop_right > 0) {
list.append("-cropright");
list.append(QString("%1").arg(o.video_crop_right));
}
QString crop = QString("crop=%1:%2:%3:%4")
.arg(o.video_crop_right - o.video_crop_left)
.arg(o.video_crop_bottom - o.video_crop_top)
.arg(o.video_crop_left)
.arg(o.video_crop_top);
list.append(crop);

/* -vf "setpts=<1/rate>*PTS": video filter to change video speed
<1/rate> is the reciprocal of the scaling factor (1.0 is original speed) */
Expand Down
7 changes: 7 additions & 0 deletions converter/mediaprobe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ struct MetaInformation
double duration; ///< duration in seconds
double start; ///< start time in seconds
int bitrate; ///< bitrate in kb/s
bool __dummy_padding[4];
QRegExp pattern;

MetaInformation() : pattern(patterns::meta) { clear(); }
Expand All @@ -111,6 +112,7 @@ struct MetaInformation
struct AudioInformation
{
bool has_audio;
bool __dummy_padding[3];
int sample_rate; ///< sample rate in kb/s
int bitrate; ///< bitrate in kb/s
int channels; ///< number of channels
Expand Down Expand Up @@ -165,10 +167,12 @@ struct AudioInformation
struct VideoInformation
{
bool has_video;
bool __dummy_padding[3];
int stream_index;
int width;
int height;
int bitrate; ///< bitrate in kb/s
bool __dummy_padding2[4];
double frame_rate; ///< frame rate in fps
QString codec;
QString format;
Expand Down Expand Up @@ -215,6 +219,7 @@ struct VideoInformation
struct SubtitleInformation
{
bool has_subtitle;
bool __dummy_padding[7];
QRegExp pattern;

SubtitleInformation() : pattern(patterns::subtitle) { }
Expand All @@ -241,6 +246,8 @@ struct MediaProbe::Private
QProcess ffprobe_proc;
int exitcode;

bool __dummy_padding[4];

void clear();
void parse_line(const QString& line);
};
Expand Down
6 changes: 4 additions & 2 deletions converter/presets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ struct Presets::Private
*/
unsigned int m_prev_id;

bool __dummy_padding[4];

Private() : m_prev_id(0) { }

bool parseXmlFile(QFile& file, bool removeUnavailableCodecs);
Expand Down Expand Up @@ -238,7 +240,7 @@ bool Presets::readFromFile(const char *filename, bool removeUnavailableCodecs)
bool Presets::getExtensions(QList<QString> &target) const
{
QList<Preset> presetList = p->presets.values();
qSort(presetList); // sort presets by id
std::sort(presetList.begin(), presetList.end()); // sort presets by id

target.clear();
QString extension("");
Expand All @@ -251,7 +253,7 @@ bool Presets::getExtensions(QList<QString> &target) const
// remove duplicate entries
target = target.toSet().toList();
// sort target
qSort(target);
std::sort(target.begin(), target.end());
return true;
}

Expand Down
8 changes: 5 additions & 3 deletions mystiq.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
#-------------------------------------------------

QT += core gui network opengl
QT += core gui network opengl multimedia qml widgets quick quickwidgets
#DEFINES += QT_DEPRECATED_WARNINGS

QMAKE_CFLAGS_RELEASE += -flto
Expand Down Expand Up @@ -125,11 +125,13 @@ FORMS += \

RESOURCES += \
images.qrc \
qml.qrc \
translator.qrc

TRANSLATIONS += \
translations/mystiq_es_ES.ts \
translations/mystiq_fr.ts
translations/mystiq_es.ts \
translations/mystiq_fr.ts \
translations/mystiq_de.ts

INCLUDEPATH += .

Expand Down
Loading

0 comments on commit 3c3dfd2

Please sign in to comment.