changed latin encoding to utf8 for #176
This commit is contained in:
@@ -14,7 +14,7 @@ void setup_debug() {
|
||||
debug_file.setFileName(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/debug_log");
|
||||
if (debug_file.open(QFile::WriteOnly)) {
|
||||
QString debug_intro = "Olive Session " + QString::number(QDateTime::currentMSecsSinceEpoch());
|
||||
debug_file.write(debug_intro.toLatin1());
|
||||
debug_file.write(debug_intro.toUtf8());
|
||||
} else {
|
||||
debug_out = QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).debug();
|
||||
}
|
||||
|
||||
+2
-2
@@ -129,7 +129,7 @@ bool ExportThread::setupVideo() {
|
||||
|
||||
switch (video_compression_type) {
|
||||
case COMPRESSION_TYPE_CFR:
|
||||
av_opt_set(vcodec_ctx->priv_data, "crf", QString::number(static_cast<int>(video_bitrate)).toLatin1(), AV_OPT_SEARCH_CHILDREN);
|
||||
av_opt_set(vcodec_ctx->priv_data, "crf", QString::number(static_cast<int>(video_bitrate)).toUtf8(), AV_OPT_SEARCH_CHILDREN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@ void ExportThread::run() {
|
||||
}
|
||||
|
||||
// copy filename
|
||||
QByteArray ba = filename.toLatin1();
|
||||
QByteArray ba = filename.toUtf8();
|
||||
c_filename = new char[ba.size()+1];
|
||||
strcpy(c_filename, ba.data());
|
||||
|
||||
|
||||
@@ -407,7 +407,7 @@ void PreviewGenerator::run() {
|
||||
Q_ASSERT(footage != NULL);
|
||||
Q_ASSERT(media != NULL);
|
||||
|
||||
QByteArray ba = footage->url.toLatin1();
|
||||
QByteArray ba = footage->url.toUtf8();
|
||||
char* filename = new char[ba.size()+1];
|
||||
strcpy(filename, ba.data());
|
||||
|
||||
@@ -434,7 +434,7 @@ void PreviewGenerator::run() {
|
||||
QFileInfo file_info(footage->url);
|
||||
QString cache_file = footage->url.mid(footage->url.lastIndexOf('/')+1) + QString::number(file_info.size()) + QString::number(file_info.lastModified().toMSecsSinceEpoch());
|
||||
//dout << "using hash" << cache_file;
|
||||
QString hash = QCryptographicHash::hash(cache_file.toLatin1(), QCryptographicHash::Md5).toHex();
|
||||
QString hash = QCryptographicHash::hash(cache_file.toUtf8(), QCryptographicHash::Md5).toHex();
|
||||
|
||||
if (retrieve_preview(hash)) {
|
||||
sem.acquire();
|
||||
|
||||
+4
-4
@@ -791,17 +791,17 @@ void Effect::process_shader(double timecode, GLTextureCoords&) {
|
||||
if (!field->id.isEmpty()) {
|
||||
switch (field->type) {
|
||||
case EFFECT_FIELD_DOUBLE:
|
||||
glslProgram->setUniformValue(field->id.toLatin1().constData(), (GLfloat) field->get_double_value(timecode));
|
||||
glslProgram->setUniformValue(field->id.toUtf8().constData(), (GLfloat) field->get_double_value(timecode));
|
||||
break;
|
||||
case EFFECT_FIELD_COLOR:
|
||||
glslProgram->setUniformValue(field->id.toLatin1().constData(), field->get_color_value(timecode).redF(), field->get_color_value(timecode).greenF(), field->get_color_value(timecode).blueF());
|
||||
glslProgram->setUniformValue(field->id.toUtf8().constData(), field->get_color_value(timecode).redF(), field->get_color_value(timecode).greenF(), field->get_color_value(timecode).blueF());
|
||||
break;
|
||||
case EFFECT_FIELD_STRING: break; // can you even send a string to a uniform value?
|
||||
case EFFECT_FIELD_BOOL:
|
||||
glslProgram->setUniformValue(field->id.toLatin1().constData(), field->get_bool_value(timecode));
|
||||
glslProgram->setUniformValue(field->id.toUtf8().constData(), field->get_bool_value(timecode));
|
||||
break;
|
||||
case EFFECT_FIELD_COMBO:
|
||||
glslProgram->setUniformValue(field->id.toLatin1().constData(), field->get_combo_index(timecode));
|
||||
glslProgram->setUniformValue(field->id.toUtf8().constData(), field->get_combo_index(timecode));
|
||||
break;
|
||||
case EFFECT_FIELD_FONT: break; // can you even send a string to a uniform value?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user