Skip to content

Commit

Permalink
Rework metadata and add support for PNG gamma correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishiranu committed Dec 30, 2020
1 parent 74a7241 commit b2d0eea
Show file tree
Hide file tree
Showing 28 changed files with 892 additions and 637 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ key.alias=%KEY_ALIAS%
key.password=%KEY_PASSWORD%
```

### Building extenions
### Building Extensions

The source code of extensions is available in
[Dashchan Extensions](https://github.com/Mishiranu/Dashchan-Extensions) repository.
Expand Down
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -12,7 +12,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand All @@ -25,14 +25,15 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion '30.0.2'
ndkVersion '21.3.6528147'
ndkVersion '21.4.7075529'

defaultConfig {
versionCode 1042
versionName '3.1.3'

minSdkVersion 16
targetSdkVersion 30
renderscriptTargetApi 21

// noinspection UnnecessaryQualifiedReference
def versionsData = new groovy.json.JsonSlurper().parse(new File('metadata/versions.json'))
Expand Down Expand Up @@ -123,7 +124,7 @@ dependencies {
implementation 'androidx.fragment:fragment:1.2.5'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
implementation 'androidx.webkit:webkit:1.3.0'
implementation 'androidx.webkit:webkit:1.4.0'
implementation 'org.brotli:dec:0.1.2'
}

Expand Down
4 changes: 2 additions & 2 deletions jni/src/player/native.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jintArray JCALL(getCurrentFrame)(JNIEnv * env, UNUSED jobject this, jlong pointe
return getCurrentFrame(env, pointer, dimensions);
}

jobjectArray JCALL(getTechnicalInfo)(JNIEnv * env, UNUSED jobject this, jlong pointer) {
return getTechnicalInfo(env, pointer);
jobjectArray JCALL(getMetadata)(JNIEnv * env, UNUSED jobject this, jlong pointer) {
return getMetadata(env, pointer);
}

jint JNI_OnLoad(JavaVM * javaVM, UNUSED void * reserved) {
Expand Down
2 changes: 1 addition & 1 deletion jni/src/player/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -1804,7 +1804,7 @@ static jstring newUtfStringSafe(JNIEnv * env, char * string) {
return 0;
}

jobjectArray getTechnicalInfo(JNIEnv * env, jlong pointer) {
jobjectArray getMetadata(JNIEnv * env, jlong pointer) {
char buffer[24];
Player * player = POINTER_CAST(pointer);
int entries = av_dict_count(player->av.format->metadata);
Expand Down
2 changes: 1 addition & 1 deletion jni/src/player/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void setPlaying(jlong, jboolean);
void setSurface(JNIEnv *, jlong, jobject);

jintArray getCurrentFrame(JNIEnv *, jlong, jintArray);
jobjectArray getTechnicalInfo(JNIEnv *, jlong);
jobjectArray getMetadata(JNIEnv *, jlong);

void initLibs(JavaVM * javaVM);

Expand Down
2 changes: 0 additions & 2 deletions lang/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
<string name="history_is_empty">Cronologia vuota</string>
<string name="huge_captcha">Captcha grossi</string>
<string name="icons_are_enabled">Icone abilitate</string>
<string name="image_contains_data__format_sentence">Questa immagine contiene i seguenti dati: %s.</string>
<string name="image_is_corrupted">Immagine corrotta</string>
<string name="images">Immagini</string>
<string name="images_are_disabled">Immagini disabilitate</string>
Expand Down Expand Up @@ -428,7 +427,6 @@
<string name="submission_form">Form di invio</string>
<string name="success_number_not_loaded_number__format">Con successo: %1$d, non caricati: %2$d</string>
<string name="summary">Indice</string>
<string name="technical_info">Informazioni tecniche</string>
<string name="test_string">Stringa di test</string>
<string name="text_scale">Dimensione testo</string>
<string name="themes">Temi</string>
Expand Down
1 change: 0 additions & 1 deletion lang/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@
<string name="submission_form">Formulário de envio</string>
<string name="success_number_not_loaded_number__format">Sucesso: %1$d, falhou: %2$d</string>
<string name="summary">Sumário</string>
<string name="technical_info">Informações técnicas</string>
<string name="text_scale">Escala do texto</string>
<string name="this_post">Este post</string>
<string name="this_recaptcha_is_not_supported">Esquema não suportado</string>
Expand Down
4 changes: 2 additions & 2 deletions lang/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<string name="favorites_first">Сначала избранное</string>
<string name="favorites_watcher">Отслеживание избранного</string>
<string name="fields_limit_exceeded">Превышение лимита полей</string>
<string name="file_contains_data__format_sentence">Данный файл содержит следующие данные: %s.</string>
<string name="file_format_is_not_supported">Формат файла не поддерживается</string>
<string name="file_name__format">Файл %s</string>
<string name="filed_on">Выдан</string>
Expand Down Expand Up @@ -194,7 +195,6 @@
<string name="history_is_empty">История пуста</string>
<string name="huge_captcha">Большая капча</string>
<string name="icons_are_enabled">Иконки включены</string>
<string name="image_contains_data__format_sentence">Данное изображение содержит следующие данные: %s.</string>
<string name="image_is_corrupted">Изображение повреждено</string>
<string name="images">Изображения</string>
<string name="images_are_disabled">Картинки отключены</string>
Expand Down Expand Up @@ -239,6 +239,7 @@
<string name="merge_pages">Объединить страницы</string>
<string name="merge_pages__summary">Отображать страницы для всех форумов</string>
<string name="message_data">Данные сообщения</string>
<string name="metadata">Метаданные</string>
<string name="minimize">Свернуть</string>
<string name="more_info">Подробнее</string>
<string name="more_themes">Больше тем</string>
Expand Down Expand Up @@ -479,7 +480,6 @@
<string name="submission_form">Форма отправки</string>
<string name="success_number_not_loaded_number__format">Успешно: %1$d, не загружено: %2$d</string>
<string name="summary">Информация</string>
<string name="technical_info">Технич. информация</string>
<string name="test_string">Тестовая строка</string>
<string name="text_scale">Масштаб текста</string>
<string name="themes">Темы</string>
Expand Down
4 changes: 2 additions & 2 deletions lang/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<string name="favorites_first">Favorites first</string>
<string name="favorites_watcher">Favorites watcher</string>
<string name="fields_limit_exceeded">Fields limit exceeded</string>
<string name="file_contains_data__format_sentence">This file contains the following data: %s.</string>
<string name="file_format_is_not_supported">File format is not supported</string>
<string name="file_name__format">File %s</string>
<string name="filed_on">Filed on</string>
Expand Down Expand Up @@ -194,7 +195,6 @@
<string name="history_is_empty">History is empty</string>
<string name="huge_captcha">Huge captcha</string>
<string name="icons_are_enabled">Icons are enabled</string>
<string name="image_contains_data__format_sentence">This image contains the following data: %s.</string>
<string name="image_is_corrupted">Image is corrupted</string>
<string name="images">Images</string>
<string name="images_are_disabled">Images are disabled</string>
Expand Down Expand Up @@ -238,6 +238,7 @@
<string name="merge_pages">Merge pages</string>
<string name="merge_pages__summary">Display pages for all forums</string>
<string name="message_data">Message data</string>
<string name="metadata">Metadata</string>
<string name="minimize">Minimize</string>
<string name="more_info">More info</string>
<string name="more_themes">More themes</string>
Expand Down Expand Up @@ -460,7 +461,6 @@
<string name="submission_form">Submission form</string>
<string name="success_number_not_loaded_number__format">Success: %1$d, not loaded: %2$d</string>
<string name="summary">Summary</string>
<string name="technical_info">Technical info</string>
<string name="test_string">Test string</string>
<string name="text_scale">Text scale</string>
<string name="themes">Themes</string>
Expand Down
20 changes: 1 addition & 19 deletions src/chan/text/ParseException.java
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
/*
* Copyright 2014-2016 Fukurou Mishiranu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package chan.text;

import chan.annotation.Extendable;
import chan.annotation.Public;

@Extendable
public class ParseException extends Exception {
private static final long serialVersionUID = 1L;

@Public
public ParseException() {
super();
Expand All @@ -36,4 +18,4 @@ public ParseException(String detailMessage) {
public ParseException(Throwable throwable) {
super(throwable);
}
}
}
Loading

0 comments on commit b2d0eea

Please sign in to comment.