diff --git a/README.md b/README.md deleted file mode 100644 index b9baca9..0000000 --- a/README.md +++ /dev/null @@ -1,130 +0,0 @@ -# **TSRSDK接入指南** -## 1. **SDK授权申请** -请联系您的腾讯云商务开通服务。您需要提供将要集成SDK的App的这些信息:腾讯云账号APPID、App签名证书信息(签名证书的序列号、发布者、所有者)、App包名。 - -APPID可以在您的腾讯云【账号中心】->【账号信息】->【基本信息】中查看。 -App签名证书信息可以使用keytool命令查看,例如 -```keytool -list -v -keystore test.keystore``` - -![cert.png](./docs/cert.png) - -提供的信息 -|信息|值| -| :- | :- | -|APPID|12345678| -|包名|com.tencent.mps.srplayer| -|序列号|17ccecf2| -|所有者|test| -|发布者|test| - -离线授权方案分为授权申请和授权验证两个过程,其中授权申请在授权有效期内,只会进行一次。授权服务开通后,我们会给您提供离线的license,用于在TSRSDK初始化时进行鉴权。授权服务具有有效期限,当授权过期失效后需要重新获取授权。 - -## 2. **SDK接入指南** -### **2.1 程序流程** -![tsr-work-flow.png](./docs/tsr-work-flow.png) - -#### **2.1.1 TsrSdk** -TsrSdk包括init和release两个方法。init方法用于初始化SDK,release方法用于释放资源。 - -1. 离线鉴权初始化[TsrSdk](https://84dbcf40b9debaab4849688b5e0a7312.dlied1.cdntips.net/tcrsdk.tencent-cloud.com/tsr/api-documents/com/tencent/mps/tsr/api/TsrSdk.html?mkey=65a8ddf1716c6bc2&f=cf5f&cip=113.108.77.55&proto=https#init\(long,java.lang.String,com.tencent.mps.tsr.api.TsrLogger\)),您需要传入**APPID、license路径**用于离线鉴权,除此之外,还需要传入一个 [TsrLogger](https://84dbcf40b9debaab4849688b5e0a7312.dlied1.cdntips.net/tcrsdk.tencent-cloud.com/tsr/api-documents/com/tencent/mps/tsr/api/TsrLogger.html),用于获取SDK的日志。下面是示例代码: -``` -String licensePath = "----path to you sdk license.----"; -TsrSdk tsrSdk = TsrSdk.getInstance(); -SdkLicenseStatus status = tsrSdk.init(appId, licensePath, logger); -if (status == SdkLicenseStatus.AVAILABLE) { -// Perform super-resolution rendering using TsrPass class. -} else { -// Do something when the verification of sdk's license failed. -} -``` - - -2. 当您已经不需要使用TsrSdk时,需要调用TsrSdk的release方法,释放资源。**注意:在调用TsrSdk的release方法前,确保所有TsrPass已经被release,否则会有意想不到的问题。** -``` -// If you have created TsrPass, you should release it before release TsrSdk. -tsrPass.release(); -// Release resources when the TsrSdk object is no longer needed. -tsrSdk.release(); -``` -#### **2.1.2 TsrPass** -TsrPass是用于进行超分辨率渲染的类,它包括了init、render和release方法。在使用TsrPass前,您需要调用init方法进行初始化。在使用结束后,您需要调用release方法释放资源。 - -以下是代码示例: -``` -// Create a TsrPass object using the constructor. -TsrPass tsrPass = new TsrPass(); - -// The code below must be executed in glThread. -//----------------------GL Thread---------------------// -// Init TsrPass -tsrPass.init(inputWidth, inputHeight, srRatio); -// If the type of inputTexture is TextureOES, you must transform it to Texture2D. -int outputTextureId = tsrPass.render(inputTextureId); - -//----------------------GL Thread---------------------// - -// Release resources when the TsrPass object is no longer needed. -tsrPass.release(); -``` - -#### **2.1.3 TsrLogger** -TsrLogger用于接收SDK内部的日志,请将这些日志写到文件,以便定位外网问题。 -### **2.2 API文档** -您可以点击连接查看TSRSDK的API文档,内含接口注释与调用示例。 - -[TSRSDK API文档](https://tcrsdk.tencent-cloud.com/tsr/api-documents/index.html) -### **2.3 体验Demo** -#### **2.3.1 安装包** -请联系您的腾讯云商务获取。 -#### **2.3.2 源码** -我们开放了体验Demo的工程源码,供您接入参考。 - -为了编译运行,您需要先联系腾讯云商务获取SDK和授权,再配置到Demo工程中。步骤如下: - -1. 将SDK放在工程的libs文件夹下(可以自定义),在settings.gradle中添加 -``` -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { - mavenLocal() - maven { url 'https://jitpack.io' } - google() - mavenCentral() - - flatDir { - dirs "libs" - } - } - - versionCatalogs { - libs { - version('versionName', '1.0.0') - version('versionCode', '2') - version('compileSdk', '32') - version('minSdk', '21') - version('targetSdk', '32') - } - } -} -``` - -然后在app目录下的build.gradle中配置 -``` -implementation(name:'tsrsdk', ext:'aar') -``` - - -2. 在MainActivity.java下配置初始化参数,离线校验初始化需要APPID与licensePath。 - - ![verification-params.png](./docs/verification-params.png) - -如果您只是想快速的运行demo,您可以把license直接放入assets文件夹内,demo会去读取assets文件夹中的文件拷贝到sdcard中。 - -3. 对APK进行签名 -- 在Android Studio中,找到【File】-> 【Project Structure】 -> 【Modules】-> 【Signing Configs】中配置您的签名证书。 -- 或者您可以在【Build】-> 【Generate Signed Bundle / APK】使用证书生成签名的APK -- 无论您使用哪种方式,**请确保配置的签名证书与提供给我们的信息一致。** - -4. 运行demo - - diff --git a/SRPlayer/.gradle/7.4/checksums/checksums.lock b/SRPlayer/.gradle/7.4/checksums/checksums.lock deleted file mode 100644 index 153080a..0000000 Binary files a/SRPlayer/.gradle/7.4/checksums/checksums.lock and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/checksums/md5-checksums.bin b/SRPlayer/.gradle/7.4/checksums/md5-checksums.bin deleted file mode 100644 index f63699c..0000000 Binary files a/SRPlayer/.gradle/7.4/checksums/md5-checksums.bin and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/checksums/sha1-checksums.bin b/SRPlayer/.gradle/7.4/checksums/sha1-checksums.bin deleted file mode 100644 index 4d8f2f8..0000000 Binary files a/SRPlayer/.gradle/7.4/checksums/sha1-checksums.bin and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs$BundleAccessors.class b/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs$BundleAccessors.class deleted file mode 100644 index ada2ffd..0000000 Binary files a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs$BundleAccessors.class and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs$PluginAccessors.class b/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs$PluginAccessors.class deleted file mode 100644 index 67c475c..0000000 Binary files a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs$PluginAccessors.class and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs$VersionAccessors.class b/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs$VersionAccessors.class deleted file mode 100644 index d8f1555..0000000 Binary files a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs$VersionAccessors.class and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs.class b/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs.class deleted file mode 100644 index 8c0058d..0000000 Binary files a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/classes/org/gradle/accessors/dm/LibrariesForLibs.class and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/sources/org/gradle/accessors/dm/LibrariesForLibs.java b/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/sources/org/gradle/accessors/dm/LibrariesForLibs.java deleted file mode 100644 index 5e1f7ea..0000000 --- a/SRPlayer/.gradle/7.4/dependencies-accessors/4242ee3fb8b3e90b944fe67115493e53a4865f8b/sources/org/gradle/accessors/dm/LibrariesForLibs.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.gradle.accessors.dm; - -import org.gradle.api.NonNullApi; -import org.gradle.api.artifacts.MinimalExternalModuleDependency; -import org.gradle.plugin.use.PluginDependency; -import org.gradle.api.artifacts.ExternalModuleDependencyBundle; -import org.gradle.api.artifacts.MutableVersionConstraint; -import org.gradle.api.provider.Provider; -import org.gradle.api.provider.ProviderFactory; -import org.gradle.api.internal.catalog.AbstractExternalDependencyFactory; -import org.gradle.api.internal.catalog.DefaultVersionCatalog; -import java.util.Map; -import javax.inject.Inject; - -/** - * A catalog of dependencies accessible via the `libs` extension. -*/ -@NonNullApi -public class LibrariesForLibs extends AbstractExternalDependencyFactory { - - private final AbstractExternalDependencyFactory owner = this; - private final VersionAccessors vaccForVersionAccessors = new VersionAccessors(providers, config); - private final BundleAccessors baccForBundleAccessors = new BundleAccessors(providers, config); - private final PluginAccessors paccForPluginAccessors = new PluginAccessors(providers, config); - - @Inject - public LibrariesForLibs(DefaultVersionCatalog config, ProviderFactory providers) { - super(config, providers); - } - - /** - * Returns the group of versions at versions - */ - public VersionAccessors getVersions() { return vaccForVersionAccessors; } - - /** - * Returns the group of bundles at bundles - */ - public BundleAccessors getBundles() { return baccForBundleAccessors; } - - /** - * Returns the group of plugins at plugins - */ - public PluginAccessors getPlugins() { return paccForPluginAccessors; } - - public static class VersionAccessors extends VersionFactory { - - public VersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: compileSdk (32) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in settings file 'settings.gradle' - */ - public Provider getCompileSdk() { return getVersion("compileSdk"); } - - /** - * Returns the version associated to this alias: minSdk (21) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in settings file 'settings.gradle' - */ - public Provider getMinSdk() { return getVersion("minSdk"); } - - /** - * Returns the version associated to this alias: targetSdk (32) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in settings file 'settings.gradle' - */ - public Provider getTargetSdk() { return getVersion("targetSdk"); } - - /** - * Returns the version associated to this alias: versionCode (2) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in settings file 'settings.gradle' - */ - public Provider getVersionCode() { return getVersion("versionCode"); } - - /** - * Returns the version associated to this alias: versionName (1.0.0) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in settings file 'settings.gradle' - */ - public Provider getVersionName() { return getVersion("versionName"); } - - } - - public static class BundleAccessors extends BundleFactory { - - public BundleAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - } - - public static class PluginAccessors extends PluginFactory { - - public PluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - } - -} diff --git a/SRPlayer/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock b/SRPlayer/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock deleted file mode 100644 index 3ce79ca..0000000 Binary files a/SRPlayer/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/dependencies-accessors/executionHistory.bin b/SRPlayer/.gradle/7.4/dependencies-accessors/executionHistory.bin deleted file mode 100644 index ca89681..0000000 Binary files a/SRPlayer/.gradle/7.4/dependencies-accessors/executionHistory.bin and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/dependencies-accessors/gc.properties b/SRPlayer/.gradle/7.4/dependencies-accessors/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/SRPlayer/.gradle/7.4/executionHistory/executionHistory.lock b/SRPlayer/.gradle/7.4/executionHistory/executionHistory.lock deleted file mode 100644 index cad163a..0000000 Binary files a/SRPlayer/.gradle/7.4/executionHistory/executionHistory.lock and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/fileChanges/last-build.bin b/SRPlayer/.gradle/7.4/fileChanges/last-build.bin deleted file mode 100644 index f76dd23..0000000 Binary files a/SRPlayer/.gradle/7.4/fileChanges/last-build.bin and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/fileHashes/fileHashes.bin b/SRPlayer/.gradle/7.4/fileHashes/fileHashes.bin deleted file mode 100644 index a6329d2..0000000 Binary files a/SRPlayer/.gradle/7.4/fileHashes/fileHashes.bin and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/fileHashes/fileHashes.lock b/SRPlayer/.gradle/7.4/fileHashes/fileHashes.lock deleted file mode 100644 index 2852712..0000000 Binary files a/SRPlayer/.gradle/7.4/fileHashes/fileHashes.lock and /dev/null differ diff --git a/SRPlayer/.gradle/7.4/gc.properties b/SRPlayer/.gradle/7.4/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/SRPlayer/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/SRPlayer/.gradle/buildOutputCleanup/buildOutputCleanup.lock deleted file mode 100644 index f84a37c..0000000 Binary files a/SRPlayer/.gradle/buildOutputCleanup/buildOutputCleanup.lock and /dev/null differ diff --git a/SRPlayer/.gradle/buildOutputCleanup/cache.properties b/SRPlayer/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index ed60efc..0000000 --- a/SRPlayer/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Fri Jan 19 10:57:22 CST 2024 -gradle.version=7.4 diff --git a/SRPlayer/.gradle/file-system.probe b/SRPlayer/.gradle/file-system.probe deleted file mode 100644 index 1c76275..0000000 Binary files a/SRPlayer/.gradle/file-system.probe and /dev/null differ diff --git a/SRPlayer/.gradle/vcs-1/gc.properties b/SRPlayer/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/SRPlayer/.idea/.gitignore b/SRPlayer/.idea/.gitignore deleted file mode 100644 index fc0a9b9..0000000 --- a/SRPlayer/.idea/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -/checkstyle-idea.xml diff --git a/SRPlayer/.idea/compiler.xml b/SRPlayer/.idea/compiler.xml deleted file mode 100644 index fb7f4a8..0000000 --- a/SRPlayer/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/SRPlayer/.idea/gradle.xml b/SRPlayer/.idea/gradle.xml deleted file mode 100644 index a9f4e52..0000000 --- a/SRPlayer/.idea/gradle.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/SRPlayer/.idea/misc.xml b/SRPlayer/.idea/misc.xml deleted file mode 100644 index bdd9278..0000000 --- a/SRPlayer/.idea/misc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/SRPlayer/.idea/project_settings.xml b/SRPlayer/.idea/project_settings.xml deleted file mode 100644 index d680a71..0000000 --- a/SRPlayer/.idea/project_settings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/SRPlayer/.idea/vcs.xml b/SRPlayer/.idea/vcs.xml deleted file mode 100644 index 6c0b863..0000000 --- a/SRPlayer/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/SRPlayer/app/.gitignore b/SRPlayer/app/.gitignore deleted file mode 100644 index 07fa52b..0000000 --- a/SRPlayer/app/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/build -.DS_Store -build/ -/.gradle/ -/.codecc/ -/webrtc_sources -/local.properties -/bin diff --git a/SRPlayer/app/build.gradle b/SRPlayer/app/build.gradle deleted file mode 100644 index abf8848..0000000 --- a/SRPlayer/app/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -plugins { - id 'com.android.application' -} - -android { - namespace 'com.tencent.mps.srplayer' - compileSdk 33 - - defaultConfig { - applicationId "com.tencent.mps.srplayer" - minSdk 21 - targetSdk 33 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - applicationVariants.all { variant -> - variant.outputs.all { - outputFileName = "SRPlayer.apk" - } - } -} - -dependencies { - - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.8.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'androidx.preference:preference:1.1.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} \ No newline at end of file diff --git a/SRPlayer/app/proguard-rules.pro b/SRPlayer/app/proguard-rules.pro deleted file mode 100644 index 481bb43..0000000 --- a/SRPlayer/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/SRPlayer/app/src/androidTest/java/com/tencent/mps/srplayer/ExampleInstrumentedTest.java b/SRPlayer/app/src/androidTest/java/com/tencent/mps/srplayer/ExampleInstrumentedTest.java deleted file mode 100644 index 8b9e155..0000000 --- a/SRPlayer/app/src/androidTest/java/com/tencent/mps/srplayer/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.tencent.mps.srplayer; - -import android.content.Context; -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.tencent.mps.srplayer", appContext.getPackageName()); - } -} \ No newline at end of file diff --git a/SRPlayer/app/src/main/AndroidManifest.xml b/SRPlayer/app/src/main/AndroidManifest.xml deleted file mode 100644 index 94e0aa8..0000000 --- a/SRPlayer/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SRPlayer/app/src/main/assets/girl-544x960.mp4 b/SRPlayer/app/src/main/assets/girl-544x960.mp4 deleted file mode 100644 index c081999..0000000 Binary files a/SRPlayer/app/src/main/assets/girl-544x960.mp4 and /dev/null differ diff --git a/SRPlayer/app/src/main/assets/shaders/cmpTex.frag b/SRPlayer/app/src/main/assets/shaders/cmpTex.frag deleted file mode 100644 index 5f1461e..0000000 --- a/SRPlayer/app/src/main/assets/shaders/cmpTex.frag +++ /dev/null @@ -1,20 +0,0 @@ -#extension GL_OES_EGL_image_external : require - -precision mediump float; -varying vec2 vCoordinate; -uniform sampler2D uTexture0; -uniform sampler2D uTexture1; -uniform vec4 ViewportInfo[1]; -// 比对线的Y轴坐标 -uniform float lineX; - -void main() { - float lineXCoord = lineX / ViewportInfo[0].z; - if (vCoordinate.x > lineXCoord + 0.01) { - gl_FragColor = texture2D(uTexture1, vCoordinate); - } else if (vCoordinate.x < lineXCoord - 0.01) { - gl_FragColor = texture2D(uTexture0, vCoordinate); - } else { - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } -} diff --git a/SRPlayer/app/src/main/assets/shaders/cmpTex.vert b/SRPlayer/app/src/main/assets/shaders/cmpTex.vert deleted file mode 100644 index 54b98b3..0000000 --- a/SRPlayer/app/src/main/assets/shaders/cmpTex.vert +++ /dev/null @@ -1,8 +0,0 @@ -attribute vec4 aPosition; -attribute vec2 aCoordinate; -varying vec2 vCoordinate; - -void main(){ - gl_Position = aPosition; - vCoordinate = aCoordinate; -} \ No newline at end of file diff --git a/SRPlayer/app/src/main/assets/shaders/videoTex2D.frag b/SRPlayer/app/src/main/assets/shaders/videoTex2D.frag deleted file mode 100644 index 32553ec..0000000 --- a/SRPlayer/app/src/main/assets/shaders/videoTex2D.frag +++ /dev/null @@ -1,7 +0,0 @@ -precision mediump float; -varying vec2 vCoordinate; -uniform sampler2D uTexture; - -void main() { - gl_FragColor = texture2D(uTexture, vCoordinate); -} diff --git a/SRPlayer/app/src/main/assets/shaders/videoTexOES.frag b/SRPlayer/app/src/main/assets/shaders/videoTexOES.frag deleted file mode 100644 index 6bd0903..0000000 --- a/SRPlayer/app/src/main/assets/shaders/videoTexOES.frag +++ /dev/null @@ -1,9 +0,0 @@ -#extension GL_OES_EGL_image_external : require - -precision mediump float; -varying vec2 vCoordinate; -uniform samplerExternalOES uTexture; - -void main() { - gl_FragColor = texture2D(uTexture, vCoordinate); -} diff --git a/SRPlayer/app/src/main/assets/shaders/videoquad.vert b/SRPlayer/app/src/main/assets/shaders/videoquad.vert deleted file mode 100644 index f633f42..0000000 --- a/SRPlayer/app/src/main/assets/shaders/videoquad.vert +++ /dev/null @@ -1,9 +0,0 @@ -// 四维表示顶点坐标 -attribute vec4 aPosition; -attribute vec2 aCoordinate; -varying vec2 vCoordinate; - -void main(){ - gl_Position = aPosition; - vCoordinate = aCoordinate; -} \ No newline at end of file diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/MainActivity.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/MainActivity.java deleted file mode 100644 index d406c5c..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/MainActivity.java +++ /dev/null @@ -1,418 +0,0 @@ -package com.tencent.mps.srplayer; - -import android.annotation.SuppressLint; -import android.content.Context; -import android.content.SharedPreferences; -import android.content.pm.ActivityInfo; -import android.content.res.AssetFileDescriptor; -import android.content.res.AssetManager; -import android.graphics.SurfaceTexture; -import android.graphics.SurfaceTexture.OnFrameAvailableListener; -import android.media.AudioManager; -import android.media.MediaPlayer; -import android.media.MediaPlayer.OnPreparedListener; -import android.net.Uri; -import android.opengl.GLES30; -import android.opengl.GLSurfaceView; -import android.util.Log; -import android.view.Surface; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.Button; -import android.widget.FrameLayout; -import android.widget.FrameLayout.LayoutParams; -import android.widget.TextView; -import android.widget.Toast; -import androidx.appcompat.app.AppCompatActivity; -import android.os.Bundle; -import androidx.preference.PreferenceManager; -import com.tencent.mps.srplayer.helper.TapHelper; -import com.tencent.mps.srplayer.opengl.Texture; -import com.tencent.mps.srplayer.opengl.Texture.Type; -import com.tencent.mps.srplayer.pass.CompareTexDrawer; -import com.tencent.mps.srplayer.pass.BilinearRenderPass; -import com.tencent.mps.srplayer.pass.TexOESToTex2DPass; -import com.tencent.mps.srplayer.pass.VideoFrameDrawer; -import com.tencent.mps.tsr.api.TsrLogger; -import com.tencent.mps.tsr.api.TsrPass; -import com.tencent.mps.tsr.api.TsrSdk; -import com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import javax.microedition.khronos.egl.EGLConfig; -import javax.microedition.khronos.opengles.GL10; - -public class MainActivity extends AppCompatActivity implements GLSurfaceView.Renderer, OnFrameAvailableListener { - private static final String TAG = "MainActivity"; - - /**--------------------------------- THE PARAMS FOR SDK VERIFICATION----------------------------------------*/ - // Modify mAppId to your APPID which can be found in Tencent Cloud account. - private final long mAppId = -1; - - // Modify mLicensePath to your sdk license's path in your test phone. - // If you want to run demo as soon as possible, you can just put your sdk license to assets. Demo is going to - // copy .crt file from assets to sdcard as the mLicensePath is null, and will load it to init TsrSdk. - private String mLicensePath = null; - /**---------------------------------------------------------------------------------------------------------*/ - - // Time interval for double swipe to exit - private static final long TIME_EXIT = 2000; - // Double swipe to exit - private long mBackPressed; - // View for playing videos - private GLSurfaceView mGLSurfaceView; - // Button for controlling play and pause of video - private Button mPlayControlButton; - // Flag indicating if the video is currently paused - private boolean mIsPause; - // Drawer for rendering frames on screen - private VideoFrameDrawer mVideoFrameDrawer; - // Flag indicating if there is a new frame - private boolean updateTexture; - // SurfaceTexture bound to MediaPlayer - private SurfaceTexture mSurfaceTexture; - // Super-resolution pass - private TsrPass mTsrPass; - // Conversion of textureOES to texture2D - private TexOESToTex2DPass mTexOESToTex2DPass; - // Bilinear rendering pass - private BilinearRenderPass mBilinearRenderPass; - // Comparing two textures - private CompareTexDrawer mCompareTexDrawer; - // Width of the original video frame - private int mFrameWidth; - // Height of the original video frame - private int mFrameHeight; - // Flag indicating if bilinear interpolation comparison is needed - private boolean mIsCompareLerp; - // Super-resolution ratio - private float mSrRatio; - // Flag indicating if full-screen rendering is enabled - private boolean mIsFullScreenRender; - // MediaPlayer - private MediaPlayer mMediaPlayer; - // TsrLogger - private final TsrLogger mTsrLogger = new TsrLogger() { - @Override - public void v(String tag, String msg) { - Log.v(tag, msg); - } - - @Override - public void d(String tag, String msg) { - Log.d(tag, msg); - } - - @Override - public void i(String tag, String msg) { - Log.i(tag, msg); - } - - @Override - public void e(String tag, String msg) { - Log.e(tag, msg); - } - - @Override - public void w(String tag, String msg) { - Log.w(tag, msg); - } - }; - - @SuppressLint("ClickableViewAccessibility") - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - // Init - initViewAndMediaPlayer(); - } - - @Override - public void onSurfaceCreated(GL10 gl10, EGLConfig eglConfig) { - String version = GLES30.glGetString(GL10.GL_VERSION); - Log.i(TAG, "OpenGL ES Version: " + version ); - - mVideoFrameDrawer = new VideoFrameDrawer(); - mCompareTexDrawer = new CompareTexDrawer(); - try { - mVideoFrameDrawer.createOnGLThread(getApplicationContext()); - mCompareTexDrawer.createOnGLThread(getApplicationContext()); - } catch (IOException e) { - e.printStackTrace(); - } - - // Create input texture,bind it to SurfaceTexture to get frame from mediaPlayer. - Texture inputTexture = new Texture(false, Type.TEXTURE_OSE, 0, mFrameWidth, mFrameHeight); - mSurfaceTexture = new SurfaceTexture(inputTexture.getTextureId()); - mSurfaceTexture.setOnFrameAvailableListener(this); - Surface surface = new Surface(mSurfaceTexture); - if (mMediaPlayer != null) { - mMediaPlayer.setSurface(surface); - } else { - Log.w(TAG, "Set surface to MediaPlayer failed because MediaPlayer is null."); - } - surface.release(); - - // Create the pass that convert TextureOES to Texture2D. - mTexOESToTex2DPass = new TexOESToTex2DPass(inputTexture); - // Create BilinearPass - mBilinearRenderPass = new BilinearRenderPass(mTexOESToTex2DPass.getOutputTexture(), mSrRatio); - - /*-------------------------------- Step 1: create the TSRPass. -------------------------------------------*/ - mTsrPass.init(mTexOESToTex2DPass.getOutputTexture().getWidth(), - mTexOESToTex2DPass.getOutputTexture().getHeight(), mSrRatio); - } - - @Override - public void onSurfaceChanged(GL10 gl10, int width, int height) { - if (mCompareTexDrawer != null) { - mCompareTexDrawer.onSurfaceChanged(width, height); - } - if (mVideoFrameDrawer != null) { - mVideoFrameDrawer.onSurfaceChanged(width, height); - } - } - - @Override - public void onDrawFrame(GL10 gl10) { - if (mTexOESToTex2DPass == null || mTsrPass == null || mBilinearRenderPass == null - || mCompareTexDrawer == null) { - Log.w(TAG, "pass or drawer is null!"); - return; - } - - synchronized (this) { - if (updateTexture) { - mSurfaceTexture.updateTexImage(); - updateTexture = false; - } - } - /* Step 2: (Optional) If the type of your input texture is TextureOES, you must Convert TextureOES to Texture2D.*/ - int tex2dId = mTexOESToTex2DPass.render(); - - /* Step 3: Pass the input texture's id to TSRPass#render(int), and get the output texture's id. The output - texture is the result of super-resolution.*/ - int srTextureId = mTsrPass.render(tex2dId); - - /* Step 4: Use the TSRPass's output texture to do your own render. */ - if (mIsCompareLerp) { - int bilinearTextureId = mBilinearRenderPass.render(); - mCompareTexDrawer.draw(srTextureId, bilinearTextureId); - } else { - mVideoFrameDrawer.draw(srTextureId); - } - } - - @Override - synchronized public void onFrameAvailable(SurfaceTexture surfaceTexture) { - updateTexture = true; - } - - @Override - public void onBackPressed(){ - if(mBackPressed + TIME_EXIT > System.currentTimeMillis()){ - super.onBackPressed(); - }else{ - Toast.makeText(this,R.string.slide_again, Toast.LENGTH_SHORT).show(); - mBackPressed = System.currentTimeMillis(); - } - } - - @Override - protected void onDestroy() { - super.onDestroy(); - if (mBilinearRenderPass != null) { - mBilinearRenderPass.release(); - } - if (mTexOESToTex2DPass != null) { - mTexOESToTex2DPass.release(); - } - if (mTsrPass != null) { - mTsrPass.release(); - } - if (mMediaPlayer != null) { - mMediaPlayer.stop(); - mMediaPlayer.release(); - } - TsrSdk.getInstance().release(); - } - - private void initViewAndMediaPlayer() { - // Init playControllerButton - mPlayControlButton = findViewById(R.id.playControlButton); - mPlayControlButton.setText(R.string.pause_video); - mPlayControlButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View view) { - if (mIsPause) { - mIsPause = false; - mMediaPlayer.start(); - mPlayControlButton.setText(R.string.pause_video); - } else { - mIsPause = true; - mMediaPlayer.pause(); - mPlayControlButton.setText(R.string.play_video); - } - } - }); - - Context context = getApplicationContext(); - SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); - String fileName = sharedPreferences.getString(context.getString(R.string.video_title), ""); - mSrRatio = Float.parseFloat(sharedPreferences.getString(context.getString(R.string.sr_ratio), "2.0")); - mIsFullScreenRender = sharedPreferences.getBoolean(context.getString(R.string.full_screen_config), false); - mIsCompareLerp = sharedPreferences.getBoolean(context.getString(R.string.compare_lerp), true); - - // Whether to compare bilinear - TextView sr = findViewById(R.id.sr); - TextView lerp = findViewById(R.id.lerp); - if (!mIsCompareLerp) { - sr.setVisibility(View.INVISIBLE); - lerp.setVisibility(View.INVISIBLE); - } - - // Configure MediaPlayer - mMediaPlayer = new MediaPlayer(); - try { - String uriString = getIntent().getStringExtra("videoUri"); - if (uriString != null) { - Uri videoUri = Uri.parse(uriString); - if (videoUri != null) { - mMediaPlayer.setDataSource(context, videoUri); - } - } else { - AssetFileDescriptor afd = context.getAssets().openFd(fileName); - mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); - } - } catch (IOException e) { - Log.e(TAG, "open source failed: " + e.getMessage()); - return; - } - mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); - mMediaPlayer.setLooping(true); - mMediaPlayer.prepareAsync(); - mMediaPlayer.setOnPreparedListener(new OnPreparedListener() { - @Override - public void onPrepared(MediaPlayer mediaPlayer) { - mFrameWidth = mMediaPlayer.getVideoWidth(); - mFrameHeight = mMediaPlayer.getVideoHeight(); - Log.i(TAG, "width = " + mFrameWidth + ", height = " + mFrameHeight); - - if (mFrameWidth > mFrameHeight) { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } - - Context context = getApplicationContext(); - - offlineVerifyLicense(context); - } - }); - } - - private void offlineVerifyLicense(Context context) { - if (mLicensePath == null) { - copyAssetsFileToSDCard(context); - } - - SdkLicenseStatus status = TsrSdk.getInstance().init(mAppId, mLicensePath, mTsrLogger); - if (status == SdkLicenseStatus.AVAILABLE) { - Log.i(TAG, "Verify sdk license success: " + status.toString()); - createTsrPassAndAddView(context); - } else { - Log.i(TAG, "Verify sdk license failed: " + status.toString()); - runOnUiThread(new Runnable() { - @Override - public void run() { - Toast.makeText(context, "Verify sdk license failed: " + status.toString(), Toast.LENGTH_SHORT).show(); - finish(); - } - }); - } - } - - private void createTsrPassAndAddView(Context context) { - // Create TsrPass - mTsrPass = new TsrPass(); - - mGLSurfaceView = new GLSurfaceView(context); - mGLSurfaceView.setEGLContextClientVersion(3); - mGLSurfaceView.setRenderer(MainActivity.this); - - if (!mIsFullScreenRender) { - mGLSurfaceView.setLayoutParams(new LayoutParams((int) (mFrameWidth * mSrRatio), - (int) (mFrameHeight * mSrRatio))); - } - - runOnUiThread(new Runnable() { - @Override - public void run() { - FrameLayout frameLayout = findViewById(R.id.video_view); - frameLayout.addView(mGLSurfaceView); - frameLayout.setOnTouchListener(TapHelper.getInstance()); - - mMediaPlayer.start(); - } - }); - } - - private void copyAssetsFileToSDCard(Context context) { - AssetManager assetManager = context.getAssets(); - String licenseName = null; - String[] files = null; - try { - files = assetManager.list(""); - } catch (IOException e) { - e.printStackTrace(); - } - - if (files != null) { - for (String file : files) { - if (file.endsWith(".crt")) { - licenseName = file; - break; - } - } - } - - if (licenseName == null) { - Log.i(TAG, "license not found."); - return; - } - - InputStream in = null; - OutputStream out = null; - - try { - in = assetManager.open(licenseName); - mLicensePath = context.getExternalFilesDir("license/").getAbsolutePath() + "/" + licenseName; - File outFile = new File(mLicensePath); - out = new FileOutputStream(outFile); - byte[] buffer = new byte[1024]; - int read; - while ((read = in.read(buffer)) != -1) { - out.write(buffer, 0, read); - } - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (in != null) { - try { - in.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - if (out != null) { - try { - out.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - } -} \ No newline at end of file diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/SRApplication.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/SRApplication.java deleted file mode 100644 index 33afebe..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/SRApplication.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.tencent.mps.srplayer; - -import android.app.Application; -import android.content.Context; - -public class SRApplication extends Application { - private static Context sContext; - - @Override - public void onCreate() { - super.onCreate(); - sContext = getApplicationContext(); - } - - public static Context getContext() { - return sContext; - } -} diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/SettingsActivity.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/SettingsActivity.java deleted file mode 100644 index 4d27a8e..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/SettingsActivity.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.tencent.mps.srplayer; - -import android.annotation.SuppressLint; -import android.content.Intent; -import android.database.Cursor; -import android.net.Uri; -import android.os.Bundle; -import android.provider.OpenableColumns; -import android.util.Log; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.Button; -import android.widget.LinearLayout; -import android.widget.RadioButton; -import android.widget.RadioGroup; -import android.widget.TextView; -import android.widget.Toast; -import androidx.appcompat.app.ActionBar; -import androidx.appcompat.app.AppCompatActivity; -import androidx.preference.PreferenceCategory; -import androidx.preference.PreferenceFragmentCompat; -import com.tencent.mps.tsr.api.TsrLogger; -import com.tencent.mps.tsr.api.TsrSdk; -import java.util.Objects; - -public class SettingsActivity extends AppCompatActivity { - private Uri mVideoUri; - private String mFileName; - private boolean mVideoChooseLocal = true; - private static PreferenceCategory mLocalVideoChoosePreferenceCategory; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.settings_activity); - - if (savedInstanceState == null) { - getSupportFragmentManager() - .beginTransaction() - .replace(R.id.settings, new SettingsFragment()) - .commit(); - } - - ActionBar actionBar = getSupportActionBar(); - if (actionBar != null) { - actionBar.setDisplayHomeAsUpEnabled(true); - } - - LinearLayout localVideoLayout = findViewById(R.id.choose_local_video_layout); - localVideoLayout.setVisibility(View.VISIBLE); - - // 配置视频选择类型 - RadioGroup videoChooseRadioGroup = findViewById(R.id.choose_type); - videoChooseRadioGroup.setOnCheckedChangeListener((group, checkedID) -> { - RadioButton btn = findViewById(checkedID); - if (btn.getId() == R.id.local_video) { - mVideoChooseLocal = true; - localVideoLayout.setVisibility(View.VISIBLE); - mLocalVideoChoosePreferenceCategory.setVisible(false); - } else { - mVideoChooseLocal = false; - localVideoLayout.setVisibility(View.GONE); - mLocalVideoChoosePreferenceCategory.setVisible(true); - } - }); - - // 配置开始按钮 - Button startPlayButton = findViewById(R.id.start_play_button); - startPlayButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View view) { - Intent intent = new Intent(SettingsActivity.this, MainActivity.class); - - if (mVideoChooseLocal) { - if (mVideoUri == null) { - Toast.makeText(getApplicationContext(), R.string.video_choose_hint, Toast.LENGTH_SHORT).show(); - return; - } - - if (mFileName != null) { - String[] fileNameSplit = mFileName.split("\\."); - if (!Objects.equals(fileNameSplit[fileNameSplit.length - 1], "mp4") && - !Objects.equals(fileNameSplit[fileNameSplit.length - 1], "3gp") && - !Objects.equals(fileNameSplit[fileNameSplit.length - 1], "webm")) { - Toast.makeText(getApplicationContext(), R.string.video_format_not_support, Toast.LENGTH_SHORT).show(); - return; - } - } else { - Toast.makeText(getApplicationContext(), R.string.video_choose_hint, Toast.LENGTH_SHORT).show(); - return; - } - intent.putExtra("videoUri", mVideoUri.toString()); - } - startActivity(intent); - } - }); - - TextView chooseVideoButton = findViewById(R.id.choose_button); - chooseVideoButton.setText(R.string.video_choose); - chooseVideoButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View view) { - Intent intent = new Intent(Intent.ACTION_GET_CONTENT); - intent.setType("video/*"); //选择视频 (mp4 3gp 是android支持的视频格式) - intent.addCategory(Intent.CATEGORY_OPENABLE); - - /* 使用Intent.ACTION_GET_CONTENT这个Action */ - startActivityForResult(Intent.createChooser(intent, "选择文件"), 1); - } - }); - } - - public static class SettingsFragment extends PreferenceFragmentCompat { - - @Override - public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { - setPreferencesFromResource(R.xml.root_preferences, rootKey); - mLocalVideoChoosePreferenceCategory = findPreference("choose_app_video"); - mLocalVideoChoosePreferenceCategory.setVisible(false); - } - } - - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - // 选取图片的返回值 - if (requestCode == 1) { - // - if (resultCode == RESULT_OK) { - mVideoUri = data.getData(); - TextView chooseVideoButton = findViewById(R.id.choose_button); - mFileName = getFileName(mVideoUri); - chooseVideoButton.setText(mFileName); - } - } - super.onActivityResult(requestCode, resultCode, data); - } - - @SuppressLint("Range") - private String getFileName(Uri uri) { - String fileName = null; - if (uri.getScheme().equals("content")) { - try (Cursor cursor = getContentResolver().query(uri, new String[]{OpenableColumns.DISPLAY_NAME}, null, null, - null)) { - if (cursor != null && cursor.moveToFirst()) { - fileName = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); - } - } - } else if (uri.getScheme().equals("file")) { - fileName = uri.getLastPathSegment(); - } - return fileName; - } -} \ No newline at end of file diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/helper/TapHelper.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/helper/TapHelper.java deleted file mode 100644 index db419b1..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/helper/TapHelper.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.tencent.mps.srplayer.helper; - -import android.util.Log; -import android.view.MotionEvent; -import android.view.View; -import android.view.View.OnTouchListener; - -public class TapHelper implements OnTouchListener { - private static final String TAG = "TapHelper"; - - /** - * 首次按下时的x坐标 - */ - private volatile float mDownX = -1; - /** - * 首次按下时的y坐标 - */ - private volatile float mDownY = -1; - - private TapHelper() { - } - - @Override - public boolean onTouch(View view, MotionEvent motionEvent) { - view.performClick(); - int action = motionEvent.getAction(); - switch (action) { - case MotionEvent.ACTION_DOWN: - case MotionEvent.ACTION_MOVE: - case MotionEvent.ACTION_UP: - mDownX = motionEvent.getX(); - mDownY = motionEvent.getY(); - Log.i(TAG, "onTouch y= " + mDownY); - break; - } - return true; - } - - public float getDownX() { - return mDownX; - } - - public float getDownY() { - return mDownY; - } - - public static TapHelper getInstance() { - return Holder.instance; - } - - private static final class Holder { - private static final TapHelper instance = new TapHelper(); - } -} \ No newline at end of file diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/GlShader.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/GlShader.java deleted file mode 100644 index 204b9fc..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/GlShader.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.tencent.mps.srplayer.opengl; - -import android.opengl.GLES30; -import android.opengl.GLES31; -import android.util.Log; -import java.nio.FloatBuffer; - - -// Helper class for handling OpenGL shaders and shader programs. -public class GlShader { - private static final String TAG = "GlShader"; - - private static int compileShader(int shaderType, String source) { - final int shader = GLES30.glCreateShader(shaderType); - if (shader == 0) { - throw new RuntimeException("glCreateShader() failed. GLES30 error: " + GLES30.glGetError()); - } - GLES30.glShaderSource(shader, source); - GLES30.glCompileShader(shader); - int[] compileStatus = new int[] {GLES30.GL_FALSE}; - GLES30.glGetShaderiv(shader, GLES30.GL_COMPILE_STATUS, compileStatus, 0); - if (compileStatus[0] != GLES30.GL_TRUE) { - Log.e( - TAG, "Compile error " + GLES30.glGetShaderInfoLog(shader) + " in shader:\n" + source); - throw new RuntimeException(GLES30.glGetShaderInfoLog(shader)); - } - return shader; - } - - private int program; - - public GlShader(String vertexSource, String fragmentSource) { - final int vertexShader = compileShader(GLES31.GL_VERTEX_SHADER, vertexSource); - final int fragmentShader = compileShader(GLES31.GL_FRAGMENT_SHADER, fragmentSource); - program = GLES31.glCreateProgram(); - if (program == 0) { - throw new RuntimeException("glCreateProgram() failed. GLES30 error: " + GLES30.glGetError()); - } - GLES31.glAttachShader(program, vertexShader); - GLES31.glAttachShader(program, fragmentShader); - GLES31.glLinkProgram(program); - int[] linkStatus = new int[] {GLES31.GL_FALSE}; - GLES31.glGetProgramiv(program, GLES31.GL_LINK_STATUS, linkStatus, 0); - if (linkStatus[0] != GLES31.GL_TRUE) { - Log.e(TAG, "Could not link program: " + GLES31.glGetProgramInfoLog(program)); - throw new RuntimeException(GLES31.glGetProgramInfoLog(program)); - } - // According to the documentation of glLinkProgram(): - // "After the link operation, applications are free to modify attached shader objects, compile - // attached shader objects, detach shader objects, delete shader objects, and attach additional - // shader objects. None of these operations affects the information log or the program that is - // part of the program object." - // But in practice, detaching shaders from the program seems to break some devices. Deleting the - // shaders are fine however - it will delete them when they are no longer attached to a program. - GLES31.glDeleteShader(vertexShader); - GLES31.glDeleteShader(fragmentShader); - } - - public int getAttribLocation(String label) { - if (program == -1) { - throw new RuntimeException("The program has been released"); - } - int location = GLES30.glGetAttribLocation(program, label); - if (location < 0) { - throw new RuntimeException("Could not locate '" + label + "' in program"); - } - return location; - } - - /** - * Enable and upload a vertex array for attribute `label`. The vertex data is specified in - * `buffer` with `dimension` number of components per vertex. - */ - public void setVertexAttribArray(String label, int dimension, FloatBuffer buffer) { - setVertexAttribArray(label, dimension, 0 /* stride */, buffer); - } - - /** - * Enable and upload a vertex array for attribute `label`. The vertex data is specified in - * `buffer` with `dimension` number of components per vertex and specified `stride`. - */ - public void setVertexAttribArray(String label, int dimension, int stride, FloatBuffer buffer) { - if (program == -1) { - throw new RuntimeException("The program has been released"); - } - int location = getAttribLocation(label); - GLES30.glEnableVertexAttribArray(location); - GLES30.glVertexAttribPointer(location, dimension, GLES30.GL_FLOAT, false, stride, buffer); - } - - public int getUniformLocation(String label) { - if (program == -1) { - throw new RuntimeException("The program has been released"); - } - return GLES30.glGetUniformLocation(program, label); - } - - public void useProgram() { - if (program == -1) { - throw new RuntimeException("The program has been released"); - } - GLES30.glUseProgram(program); - } - - public void release() { - Log.d(TAG, "Deleting shader."); - // Delete program, automatically detaching any shaders from it. - if (program != -1) { - GLES30.glDeleteProgram(program); - program = -1; - } - } -} diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/GlUtils.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/GlUtils.java deleted file mode 100644 index 3d548f9..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/GlUtils.java +++ /dev/null @@ -1,178 +0,0 @@ -package com.tencent.mps.srplayer.opengl; - -import android.content.Context; -import android.opengl.GLES20; -import android.opengl.GLES30; -import android.opengl.GLException; -import android.util.Log; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import java.util.Map; -import java.util.TreeMap; - -/** Shader helper functions. */ -public class GlUtils { - - private static final String TAG = GlUtils.class.getSimpleName(); - /** - * Converts a raw text file, saved as a resource, into an OpenGL ES shader. - * - * @param type The type of shader we will be creating. - * @param filename The filename of the asset file about to be turned into a shader. - * @param defineValuesMap The #define values to add to the top of the shader source code. - * @return The shader object handler. - */ - public static int loadGLShader( - String tag, Context context, int type, String filename, Map defineValuesMap) - throws IOException { - // Load shader source code. - String code = readShaderFileFromAssets(context, filename); - - // Prepend any #define values specified during this run. - String defines = ""; - for (Map.Entry entry : defineValuesMap.entrySet()) { - defines += "#define " + entry.getKey() + " " + entry.getValue() + "\n"; - } - code = defines + code; - - // Compiles shader code. - int shader = GLES20.glCreateShader(type); - GLES20.glShaderSource(shader, code); - GLES20.glCompileShader(shader); - - // Get the compilation status. - final int[] compileStatus = new int[1]; - GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compileStatus, 0); - - // If the compilation failed, delete the shader. - if (compileStatus[0] == 0) { - Log.e(tag, "Error compiling shader: " + GLES20.glGetShaderInfoLog(shader)); - GLES20.glDeleteShader(shader); - shader = 0; - } - - if (shader == 0) { - throw new RuntimeException("Error creating shader."); - } - - return shader; - } - - /** Overload of loadGLShader that assumes no additional #define values to add. */ - public static int loadGLShader(String tag, Context context, int type, String filename) - throws IOException { - Map emptyDefineValuesMap = new TreeMap<>(); - return loadGLShader(tag, context, type, filename, emptyDefineValuesMap); - } - - /** - * Checks if we've had an error inside of OpenGL ES, and if so what that error is. - * - * @param label Label to report in case of error. - * @throws RuntimeException If an OpenGL error is detected. - */ - public static void checkGLError(String tag, String label) { - int lastError = GLES20.GL_NO_ERROR; - // Drain the queue of all errors. - int error; - while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { - Log.e(tag, label + ": glError " + error); - lastError = error; - } - if (lastError != GLES20.GL_NO_ERROR) { - throw new RuntimeException(label + ": glError " + lastError); - } - } - - /** - * Converts a raw shader file into a string. - * - * @param filename The filename of the shader file about to be turned into a shader. - * @return The context of the text file, or null in case of error. - */ - public static String readShaderFileFromAssets(Context context, String filename) - throws IOException { - try (InputStream inputStream = context.getAssets().open(filename); - BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { - StringBuilder sb = new StringBuilder(); - String line; - while ((line = reader.readLine()) != null) { - String[] tokens = line.split(" ", -1); - if (tokens[0].equals("#include")) { - String includeFilename = tokens[1]; - includeFilename = includeFilename.replace("\"", ""); - if (includeFilename.equals(filename)) { - throw new IOException("Do not include the calling file."); - } - sb.append(readShaderFileFromAssets(context, includeFilename)); - } else { - sb.append(line).append("\n"); - } - } - return sb.toString(); - } - } - - public static void checkShaderError(int shader) { - int[] compileStatus = new int[1]; - GLES30.glGetShaderiv(shader, GLES30.GL_COMPILE_STATUS, compileStatus, 0); - if (compileStatus[0] == 0) { - throw new RuntimeException(GLES30.glGetShaderInfoLog(shader)); - } - } - - public static void checkGlError() { - int errorCode = GLES30.glGetError(); - if (errorCode != GLES30.GL_NO_ERROR) { - throw new RuntimeException("GlError=" + errorCode); - } - } - - public static class GlOutOfMemoryException extends GLException { - public GlOutOfMemoryException(int error, String msg) { - super(error, msg); - } - } - - // Assert that no OpenGL ES 2.0 error has been raised. - public static void checkNoGLES2Error(String msg) { - int error = GLES30.glGetError(); - if (error != GLES30.GL_NO_ERROR) { - throw error == GLES30.GL_OUT_OF_MEMORY - ? new GlOutOfMemoryException(error, msg) - : new GLException(error, msg + ": GLES30 error: " + error); - } - } - - public static FloatBuffer createFloatBuffer(float[] coords) { - // Allocate a direct ByteBuffer, using 4 bytes per float, and copy coords into it. - ByteBuffer bb = ByteBuffer.allocateDirect(coords.length * 4); - bb.order(ByteOrder.nativeOrder()); - FloatBuffer fb = bb.asFloatBuffer(); - fb.put(coords); - fb.position(0); - return fb; - } - - /** - * Generate texture with standard parameters. - */ - public static int generateTexture(int target) { - final int[] textureArray = new int[1]; - GLES30.glGenTextures(1, textureArray, 0); - checkNoGLES2Error("genTexture"); - final int textureId = textureArray[0]; - GLES30.glBindTexture(target, textureId); - GLES30.glTexParameterf(target, GLES30.GL_TEXTURE_MIN_FILTER, GLES30.GL_LINEAR); - GLES30.glTexParameterf(target, GLES30.GL_TEXTURE_MAG_FILTER, GLES30.GL_LINEAR); - GLES30.glTexParameterf(target, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE); - GLES30.glTexParameterf(target, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE); - checkNoGLES2Error("generateTexture"); - return textureId; - } -} diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/RenderPipeLine.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/RenderPipeLine.java deleted file mode 100644 index ac1bfee..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/RenderPipeLine.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.tencent.mps.srplayer.opengl; - -import android.opengl.GLES20; -import android.opengl.GLES30; -import android.util.Pair; -import androidx.annotation.NonNull; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import java.util.ArrayList; -import java.util.List; - -/** - * 一个绘制到平面上的可定制渲染管线。
- * 使用方可通过{@link RenderPipeLine#RenderPipeLine(List, String, String)} 的{@code fragmentShader} 参数指定片段着色器, - * 决定如何渲染每一个像素。 - */ -public class RenderPipeLine { - - /** - * 存储纹理和Uniform变量位置的映射 - */ - private final List> mInputTextures = new ArrayList<>(); - - /** - * OpenGL的渲染器和程序对象 - */ - private GlShader mShader; - /** - * 顶点缓冲区索引 - */ - private final int mVertexBuffer; - /** - * (超分)Viewport在shader中uniform变量的位置 - */ - private final int mViewportInfoLocation; - - - /** - * 构造一个渲染管线实例。 - * @param inputTextures 该渲染管线的输入纹理,纹理的数量需要和{@code fragmentShader}中tex纹理变量数量一致。 - * 被传入的{@link Texture}对象不需要手动调用{@link Texture#release()}。 - * @param fragmentShader 着色器代码,其中的纹理需要命名为tex0、tex1、tex2... - */ - public RenderPipeLine(@NonNull List inputTextures, @NonNull String vertexShader, @NonNull String fragmentShader) { - mShader = new GlShader(vertexShader, fragmentShader); - mShader.useProgram(); - - // 顶点着色器中的Attribute变量 - final String INPUT_VERTEX_COORDINATE_NAME = "aPosition"; - final String INPUT_TEXTURE_COORDINATE_NAME = "aCoordinate"; - - // 获取Attribute变量位置 - int inPosLocation = mShader.getAttribLocation(INPUT_VERTEX_COORDINATE_NAME); - int inTcLocation = mShader.getAttribLocation(INPUT_TEXTURE_COORDINATE_NAME); - - // 创建一个顶点缓冲对象 - int[] buffer = new int[1]; - GLES20.glGenBuffers(1, buffer, 0); - mVertexBuffer = buffer[0]; - GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, mVertexBuffer); - - // 矩形平面的顶点和纹理坐标数据 - // 顶点顺序: 左下, 左上, 右下, 右上 - float[] RECTANGLE_VERTEX_DATA = { - -1.0f, -1.0f, 0.0f, 0.0f, - -1.0f, 1.0f, 0.0f, 1.0f, - 1.0f, -1.0f, 1.0f, 0.0f, - 1.0f, 1.0f, 1.0f, 1.0f, - }; - ByteBuffer mVertexByteBuffer = ByteBuffer.allocateDirect(RECTANGLE_VERTEX_DATA.length * 4); - mVertexByteBuffer.order(ByteOrder.nativeOrder()); - FloatBuffer fb = mVertexByteBuffer.asFloatBuffer(); - fb.put(RECTANGLE_VERTEX_DATA); - fb.position(0); - GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, RECTANGLE_VERTEX_DATA.length * 4, fb, GLES20.GL_STATIC_DRAW); - - // 设置绘制顶点位置的属性 - GLES20.glVertexAttribPointer(inPosLocation, 2, GLES20.GL_FLOAT, false, 4 * 4, 0); - GLES20.glEnableVertexAttribArray(inPosLocation); - - // 设置纹理位置的属性 - GLES20.glVertexAttribPointer(inTcLocation, 2, GLES20.GL_FLOAT, false, 4 * 4, 2 * 4); - GLES20.glEnableVertexAttribArray(inTcLocation); - - // 获取Uniform变量位置 - for (int i = 0; i < inputTextures.size(); i++) { - String uniformLocation = "tex" + i; - mInputTextures.add(new Pair<>(inputTextures.get(0), mShader.getUniformLocation(uniformLocation))); - } - // 获取Uniform变量的ViewportInfo位置 - mViewportInfoLocation = mShader.getUniformLocation("ViewportInfo"); - } - - /** - * 将该管线渲染到渲染状态上。 - */ - public void render(RenderState renderState){ - mShader.useProgram(); - - // 绑定帧缓冲 - GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, renderState.getFrameBufferId()); - GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, mVertexBuffer); - - // 清空颜色缓冲 - GLES20.glClearColor(0 /* red */, 0 /* green */, 0 /* blue */, 0 /* alpha */); - - // 关闭面剔除: - // 面剔除会根据三角形的顶点顺序剔除背面, 而我们使用GL_TRIANGLE_STRIP的方式的矩形由正面和背面两个三角形构成 - GLES20.glDisable(GLES20.GL_CULL_FACE); - - // 禁用裁剪区域: - // 我们绘制的是整个视口区域, 不需要裁剪 - GLES20.glDisable(GLES20.GL_SCISSOR_TEST); - - // 设置OpenGL渲染区域(视口) - Texture renderTarget = renderState.getRenderTarget(); - GLES20.glViewport(0, 0, renderTarget.getWidth(), renderTarget.getHeight()); - - // 设置Uniform变量ViewportInfo - if (mViewportInfoLocation > -1) { - float viewportWidth = mInputTextures.get(0).first.getWidth(); - float viewportHeight = mInputTextures.get(0).first.getHeight(); - float viewportWidthInverse = (float) (1.0 / viewportWidth); - float viewportHeightInverse = (float) (1.0 / viewportHeight); - float[] viewportInfo = new float[] {viewportWidthInverse, viewportHeightInverse, viewportWidth, viewportHeight}; - int viewportInfoLocation = mShader.getUniformLocation("ViewportInfo"); - GLES30.glUniform4fv(viewportInfoLocation, 1, viewportInfo, 0); - } - - // 激活纹理单元 & 绑定纹理 - for (int i = 0; i < mInputTextures.size(); i++) { - GLES20.glActiveTexture(GLES20.GL_TEXTURE0 + i); - Texture texture = mInputTextures.get(i).first; - GLES20.glBindTexture(texture.getTarget(), texture.getTextureId()); - GLES20.glUniform1i(mInputTextures.get(i).second, i); - } - - // 绘制 - GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4); - - GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0); - GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0); - } - - /** - * 释放实例并且回收资源。
- * 这个调用会释放构造函数传入的{@link Texture}。 - */ - public void release() { - if (mShader != null) { - mShader.release(); - mShader = null; - } - for (Pair texture: mInputTextures) { - texture.first.release(); - } - mInputTextures.clear(); - } -} diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/RenderState.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/RenderState.java deleted file mode 100644 index 03bcf56..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/RenderState.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.tencent.mps.srplayer.opengl; - -import android.opengl.GLES20; -import android.util.Log; - -/** - * 该类用于管理渲染状态,包括渲染目标和帧缓冲。 - */ -public class RenderState { - private static final String TAG = "RenderState"; - /** - * 渲染目标 - */ - private final Texture mRenderTarget; - - /** - * 帧缓冲ID - */ - private int mFrameBufferId; - - /** - * 构造一个渲染状态实例。
- * 构造时会创建帧缓冲,并把渲染目标挂到帧缓冲上。 - */ - public RenderState(Texture renderTarget) { - this.mRenderTarget = renderTarget; - - // 创建一个帧缓冲 - if (mFrameBufferId == 0) { - final int[] frameBuffers = new int[1]; - GLES20.glGenFramebuffers(1, frameBuffers, 0); - mFrameBufferId = frameBuffers[0]; - } - - // 将渲染目标添加到帧缓冲上 - GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, mFrameBufferId); - GLES20.glFramebufferTexture2D( - GLES20.GL_FRAMEBUFFER, GLES20.GL_COLOR_ATTACHMENT0, GLES20.GL_TEXTURE_2D, renderTarget.getTextureId(), - 0); - - // 检查帧缓冲的状态。 - final int status = GLES20.glCheckFramebufferStatus(GLES20.GL_FRAMEBUFFER); - if (status != GLES20.GL_FRAMEBUFFER_COMPLETE) { - Log.e(TAG, "Framebuffer not complete, status: " + status); - return; - } - - // 解绑帧缓冲 - GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0); - } - - /** - * 获取渲染目标。 - */ - public Texture getRenderTarget() { - return mRenderTarget; - } - - /** - * 获取帧缓冲ID。 - */ - public int getFrameBufferId() { - return mFrameBufferId; - } - - /** - * 释放帧缓冲。 - */ - public void release() { - if (mFrameBufferId != 0) { - GLES20.glDeleteFramebuffers(1, new int[]{mFrameBufferId}, 0); - mFrameBufferId = 0; - } - } -} diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/Texture.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/Texture.java deleted file mode 100644 index 645b55d..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/opengl/Texture.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.tencent.mps.srplayer.opengl; - -import android.opengl.GLES11Ext; -import android.opengl.GLES20; -import androidx.annotation.NonNull; - -public class Texture { - public enum Type { - TEXTURE_2D, - TEXTURE_OSE - } - - /** - * 纹理类型 - */ - private final Type mType; - - /** - * 该纹理的纹理ID - */ - private int mTextureId; - - - /** - * 纹理对象的宽 - */ - private int mWidth; - - /** - * 纹理对象的高 - */ - private int mHeight; - - /** - * 构造一个纹理。 - * @param external 该纹理是否由外部创建。若false则内部会创建纹理并分配空间。 - * @param type 该纹理的类型。取值为:
- * {@link GLES20#GL_TEXTURE_2D}
- * {@link GLES11Ext#GL_TEXTURE_EXTERNAL_OES} - * @param textureId 纹理的ID, 只有外部纹理该值才有意义。 - * @param width 该纹理的宽。 - * @param height 该纹理的高。 - */ - public Texture(boolean external, Type type, int textureId, int width, int height) { - mType = type; - mTextureId = textureId; - mWidth = width; - mHeight = height; - - int target = getTarget(); - - if (!external) { - mTextureId = GlUtils.generateTexture(target); - GLES20.glActiveTexture(GLES20.GL_TEXTURE0); - GLES20.glBindTexture(target, mTextureId); - - // 为纹理对象分配内存空间 - int PIXEL_FORMAT = GLES20.GL_RGBA; - GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, PIXEL_FORMAT, width, height, 0, PIXEL_FORMAT, - GLES20.GL_UNSIGNED_BYTE, null); - - GLES20.glBindTexture(target, 0); - } - } - - /** - * 构造一个类型为{@link Type#TEXTURE_2D} 的内部纹理。 - * @param width 该纹理的宽。 - * @param height 该纹理的高。 - */ - public Texture(int width, int height) { - this(false, Type.TEXTURE_2D, 0, width, height); - } - - /** - * 返回纹理对象的宽。 - */ - public int getWidth() { - return mWidth; - } - - /** - * 返回纹理对象的高。 - */ - public int getHeight() { - return mHeight; - } - - /** - * 返回纹理对象的纹理ID。 - */ - public int getTextureId() { - return mTextureId; - } - - /** - * 返回纹理对象的纹理目标。
- *
- * {@link GLES20#GL_TEXTURE_2D} - * {@link GLES11Ext#GL_TEXTURE_EXTERNAL_OES} - */ - public int getTarget() { - return mType == Type.TEXTURE_2D ? - GLES20.GL_TEXTURE_2D : GLES11Ext.GL_TEXTURE_EXTERNAL_OES; - } - - /** - * 释放纹理对象。 - */ - public void release() { - if (mTextureId != 0) { - GLES20.glDeleteTextures(1, new int[] {mTextureId}, 0); - mTextureId = 0; - mWidth = 0; - mHeight = 0; - } - } - - @NonNull - @Override - public String toString() { - return "Texture{" - + "mType=" + mType - + ", mTextureId=" + mTextureId - + ", mWidth=" + mWidth - + ", mHeight=" + mHeight - + '}'; - } -} diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/BilinearRenderPass.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/BilinearRenderPass.java deleted file mode 100644 index 285351e..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/BilinearRenderPass.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.tencent.mps.srplayer.pass; - -import android.util.Log; -import com.tencent.mps.srplayer.SRApplication; -import com.tencent.mps.srplayer.opengl.GlUtils; -import com.tencent.mps.srplayer.opengl.RenderPipeLine; -import com.tencent.mps.srplayer.opengl.RenderState; -import com.tencent.mps.srplayer.opengl.Texture; -import java.io.IOException; -import java.util.Collections; - -public class BilinearRenderPass { - public static final String TAG = "BilinearRenderPass"; - /** - * Shaders - */ - private static final String VERTEX_SHADER_NAME = "shaders/videoquad.vert"; - private static final String FRAGMENT_SHADER_NAME = "shaders/videoTex2D.frag"; - - /** - * The texture that this pass render to. - */ - private Texture mBilinearTexture; - /** - * Handle render - */ - private RenderPipeLine mBilinearRenderPipeLine; - /** - * Create FBO - */ - private RenderState mBilinearRenderState; - - public BilinearRenderPass(Texture inputTexture, float srRatio) { - int destWidth = (int) (inputTexture.getWidth() * srRatio); - int destHeight = (int) (inputTexture.getHeight() * srRatio); - Log.i(TAG, "creating LERPRenderPass: src resolution = " - + inputTexture.getWidth() + "x" + inputTexture.getHeight() + ", dest resolution = " - + destWidth + "x" + destHeight); - // 创建目标texture - mBilinearTexture = new Texture(destWidth, destHeight); - - // 创建FBO,将mSuperResolutionTexture与FBO绑定 - mBilinearRenderState = new RenderState(mBilinearTexture); - - try { - final String VERTEX_SHADER_2D = GlUtils.readShaderFileFromAssets(SRApplication.getContext(), VERTEX_SHADER_NAME); - final String FRAGMENT_SHADER_2D = GlUtils.readShaderFileFromAssets(SRApplication.getContext(), FRAGMENT_SHADER_NAME); - mBilinearRenderPipeLine = new RenderPipeLine(Collections.singletonList(inputTexture), - VERTEX_SHADER_2D, FRAGMENT_SHADER_2D); - } catch (IOException e) { - Log.e(TAG, e.getMessage()); - } - } - - /** - * 将输入的纹理进行超分处理后绘制到FBO绑定的纹理中 - */ - public int render() { - if (mBilinearRenderPipeLine != null) { - mBilinearRenderPipeLine.render(mBilinearRenderState); - } - return mBilinearTexture.getTextureId(); - } - - /** - * 释放资源 - */ - public void release() { - if (mBilinearRenderPipeLine != null) { - mBilinearRenderPipeLine.release(); - mBilinearRenderPipeLine = null; - } - if (mBilinearRenderState != null) { - mBilinearRenderState.release(); - mBilinearRenderState = null; - } - if (mBilinearTexture != null) { - mBilinearTexture.release(); - mBilinearTexture = null; - } - } - - - /** - * 返回超分处理后的Texture - * - * @return 超分处理后的Texture - */ - public Texture getOutputTexture() { - return mBilinearTexture; - } -} diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/CompareTexDrawer.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/CompareTexDrawer.java deleted file mode 100644 index 5dfe941..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/CompareTexDrawer.java +++ /dev/null @@ -1,190 +0,0 @@ -package com.tencent.mps.srplayer.pass; - -import android.content.Context; -import android.opengl.GLES20; -import android.opengl.GLES30; -import com.tencent.mps.srplayer.helper.TapHelper; -import com.tencent.mps.srplayer.opengl.GlUtils; -import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; - -public class CompareTexDrawer { - private static final String TAG = "CompareTexDrawer"; - - /** - * shaders - */ - private static final String VERTEX_SHADER_NAME = "shaders/cmpTex.vert"; - private static final String FRAGMENT_SHADER_NAME = "shaders/cmpTex.frag"; - - private final float[] mVertexCoors = new float[]{ - -1f, -1f, - 1f, -1f, - -1f, 1f, - 1f, 1f - }; - private final float[] mTextureCoors = new float[]{ - 0f, 1f, - 1f, 1f, - 0f, 0f, - 1f, 0f - }; - - /** - * application context - */ - private Context mContext; - - /** - * OpenGL program - */ - private int mProgram = -1; - - /** - * vertex - */ - private int mVertexPosHandler = -1; - - /** - * coords - */ - private int mTexturePosHandler = -1; - - /** - * uniform ViewportLocation - */ - private int mViewportInfoLocation = -1; - - /** - * uniform lineY - */ - private int mLineXLocation = -1; - - /** - * X pos - */ - private volatile float mTouchXPos = 0; - - private FloatBuffer mVertexBuffer; - private FloatBuffer mTextureBuffer; - - int mViewportWidth; - int mViewportHeight; - - public CompareTexDrawer(){ - - } - - /** - * In the GLThread, initialize the Drawer by sequentially performing the following steps: bind the texture, load the - * shader, create the GLProgram, add the shader to the GLProgram, and connect them. - * @param context applicationContext - * @throws IOException IOException - */ - public void createOnGLThread(Context context) throws IOException { - mContext = context.getApplicationContext(); - - ByteBuffer vertexByteBuffer = ByteBuffer.allocateDirect(mVertexCoors.length * 4); - vertexByteBuffer.order(ByteOrder.nativeOrder()); - - mVertexBuffer = vertexByteBuffer.asFloatBuffer(); - mVertexBuffer.put(mVertexCoors); - mVertexBuffer.position(0); - - ByteBuffer textureByteBuffer = ByteBuffer.allocateDirect(mTextureCoors.length * 4); - textureByteBuffer.order(ByteOrder.nativeOrder()); - - mTextureBuffer = textureByteBuffer.asFloatBuffer(); - mTextureBuffer.put(mTextureCoors); - mTextureBuffer.position(0); - - createGLProgram(); - } - - private void createGLProgram() throws IOException { - if (mProgram == -1) { - int vertexShader = - GlUtils.loadGLShader(TAG, mContext, GLES30.GL_VERTEX_SHADER, VERTEX_SHADER_NAME); - int fragmentShader = - GlUtils.loadGLShader(TAG, mContext, GLES30.GL_FRAGMENT_SHADER, FRAGMENT_SHADER_NAME); - - mProgram = GLES20.glCreateProgram(); - GLES20.glAttachShader(mProgram, vertexShader); - GLES20.glAttachShader(mProgram, fragmentShader); - GLES20.glLinkProgram(mProgram); - - mVertexPosHandler = GLES20.glGetAttribLocation(mProgram, "aPosition"); - mTexturePosHandler = GLES20.glGetAttribLocation(mProgram, "aCoordinate"); - - mViewportInfoLocation = GLES20.glGetUniformLocation(mProgram, "ViewportInfo"); - mLineXLocation = GLES20.glGetUniformLocation(mProgram, "lineX"); - GlUtils.checkGLError(TAG, "CompareImgDrawer"); - } - GLES20.glUseProgram(mProgram); - } - - /** - * render SurfaceTexture - */ - public void draw(int texId0, int texId1) { - GlUtils.checkGLError(TAG, "CompareImgDrawer"); - GLES30.glUseProgram(mProgram); - - GLES30.glActiveTexture(GLES20.GL_TEXTURE0); - GLES30.glBindTexture(GLES20.GL_TEXTURE_2D, texId0); - int textureLocation0 = GLES20.glGetUniformLocation(mProgram, "uTexture0"); - GLES20.glUniform1i(textureLocation0, 0); - - GLES30.glActiveTexture(GLES20.GL_TEXTURE1); - GLES30.glBindTexture(GLES20.GL_TEXTURE_2D, texId1); - int textureLocation1 = GLES20.glGetUniformLocation(mProgram, "uTexture1"); - GLES20.glUniform1i(textureLocation1, 1); - - GLES20.glViewport(0, 0, mViewportWidth, mViewportHeight); - - if (mViewportInfoLocation > -1) { - float viewportWidthInverse = (float) (1.0 / mViewportWidth); - float viewportHeightInverse = (float) (1.0 / mViewportHeight); - float[] viewportInfo = new float[] {viewportWidthInverse, viewportHeightInverse, mViewportWidth, - mViewportHeight}; - int viewportInfoLocation = GLES20.glGetUniformLocation(mProgram, "ViewportInfo"); - GLES30.glUniform4fv(viewportInfoLocation, 1, viewportInfo, 0); - } - - if (mLineXLocation > -1) { - if (TapHelper.getInstance().getDownX() >= 0) { - mTouchXPos = TapHelper.getInstance().getDownX(); - } - GLES30.glUniform1f(mLineXLocation, mTouchXPos); - } - - GlUtils.checkGLError(TAG, "CompareImgDrawer"); - - GLES20.glVertexAttribPointer(mVertexPosHandler, 2, GLES20.GL_FLOAT, false, 0, mVertexBuffer); - GLES20.glVertexAttribPointer(mTexturePosHandler, 2, GLES20.GL_FLOAT, false, 0, mTextureBuffer); - GlUtils.checkGLError(TAG, "CompareImgDrawer"); - - GLES20.glEnableVertexAttribArray(mVertexPosHandler); - GLES20.glEnableVertexAttribArray(mTexturePosHandler); - GlUtils.checkGLError(TAG, "CompareImgDrawer"); - - GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0,4); - GlUtils.checkGLError(TAG, "CompareImgDrawer"); - } - - public void onSurfaceChanged(int surfaceWidth, int surfaceHeight) { - ByteBuffer textureByteBuffer = ByteBuffer.allocateDirect(mTextureCoors.length * 4); - textureByteBuffer.order(ByteOrder.nativeOrder()); - - mTextureBuffer = textureByteBuffer.asFloatBuffer(); - mTextureBuffer.put(mTextureCoors); - mTextureBuffer.position(0); - - mViewportWidth = surfaceWidth; - mViewportHeight = surfaceHeight; - - mTouchXPos = mViewportWidth / 2.0f; - } -} diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/TexOESToTex2DPass.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/TexOESToTex2DPass.java deleted file mode 100644 index ec47395..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/TexOESToTex2DPass.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.tencent.mps.srplayer.pass; - -import android.util.Log; -import com.tencent.mps.srplayer.SRApplication; -import com.tencent.mps.srplayer.opengl.GlUtils; -import com.tencent.mps.srplayer.opengl.RenderPipeLine; -import com.tencent.mps.srplayer.opengl.RenderState; -import com.tencent.mps.srplayer.opengl.Texture; -import java.io.IOException; -import java.util.Collections; - -public class TexOESToTex2DPass { - public static final String TAG = "TexOESToTex2DPass"; - - /** - * Shaders - */ - private static final String VERTEX_SHADER_NAME = "shaders/videoquad.vert"; - private static final String FRAGMENT_SHADER_NAME = "shaders/videoTexOES.frag"; - /** - * The texture that this pass render to. - */ - private Texture mTexture; - /** - * Handle render - */ - private RenderPipeLine mRenderPipeLine; - /** - * Create FBO - */ - private RenderState mRenderState; - - public TexOESToTex2DPass(Texture inputTexture) { - int destWidth = inputTexture.getWidth(); - int destHeight = inputTexture.getHeight(); - Log.i(TAG, "creating Texture2DRenderPass: src resolution = " - + inputTexture.getWidth() + "x" + inputTexture.getHeight() + ", dest resolution = " - + destWidth + "x" + destHeight); - // create the target texture - mTexture = new Texture(destWidth, destHeight); - - // create FBO and bind it to the target texture. - mRenderState = new RenderState(mTexture); - - try { - final String VERTEX_SHADER_2D = GlUtils.readShaderFileFromAssets(SRApplication.getContext(), VERTEX_SHADER_NAME); - final String FRAGMENT_SHADER_2D = GlUtils.readShaderFileFromAssets(SRApplication.getContext(), FRAGMENT_SHADER_NAME); - mRenderPipeLine = new RenderPipeLine(Collections.singletonList(inputTexture), - VERTEX_SHADER_2D, FRAGMENT_SHADER_2D); - } catch (IOException e) { - Log.e(TAG, e.getMessage()); - } - } - - /** - * Convert TextureOES to Texture2D - * - * @return The id of output texture - */ - public int render() { - if (mRenderPipeLine != null) { - mRenderPipeLine.render(mRenderState); - } - return mTexture.getTextureId(); - } - - /** - * release resource - */ - public void release() { - if (mRenderPipeLine != null) { - mRenderPipeLine.release(); - mRenderPipeLine = null; - } - if (mRenderState != null) { - mRenderState.release(); - mRenderState = null; - } - if (mTexture != null) { - mTexture.release(); - mTexture = null; - } - } - - public Texture getOutputTexture() { - return mTexture; - } -} diff --git a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/VideoFrameDrawer.java b/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/VideoFrameDrawer.java deleted file mode 100644 index b0f1785..0000000 --- a/SRPlayer/app/src/main/java/com/tencent/mps/srplayer/pass/VideoFrameDrawer.java +++ /dev/null @@ -1,150 +0,0 @@ -package com.tencent.mps.srplayer.pass; - -import android.content.Context; -import android.opengl.GLES20; -import android.opengl.GLES30; -import com.tencent.mps.srplayer.opengl.GlUtils; -import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; - -public class VideoFrameDrawer { - private static final String TAG = "VideoFrameDrawer"; - - /** - * Shaders - */ - private static final String VERTEX_SHADER_NAME = "shaders/videoquad.vert"; - private static final String FRAGMENT_SHADER_NAME = "shaders/videoTex2D.frag"; - - private final float[] mVertexCoors = new float[]{ - -1f, -1f, - 1f, -1f, - -1f, 1f, - 1f, 1f - }; - private final float[] mTextureCoors = new float[]{ - 0f, 1f, - 1f, 1f, - 0f, 0f, - 1f, 0f - }; - - /** - * application context - */ - private Context mContext; - - /** - * OpenGL program - */ - private int mProgram = -1; - - /** - * vertex - */ - private int mVertexPosHandler = -1; - - /** - * coords - */ - private int mTexturePosHandler = -1; - - /** - * tex - */ - private int mTextureHandler = -1; - - private FloatBuffer mVertexBuffer; - private FloatBuffer mTextureBuffer; - - private int[] textures; - - int mWidth; - int mHeight; - - public VideoFrameDrawer(){ - - } - - /** - * In the GLThread, initialize the Drawer by sequentially performing the following steps: bind the texture, load - * the shader, create the GLProgram, add the shader to the GLProgram, and connect them. - * @param context applicationContext - * @throws IOException IOException - */ - public void createOnGLThread(Context context) throws IOException { - mContext = context.getApplicationContext(); - - ByteBuffer vertexByteBuffer = ByteBuffer.allocateDirect(mVertexCoors.length * 4); - vertexByteBuffer.order(ByteOrder.nativeOrder()); - - mVertexBuffer = vertexByteBuffer.asFloatBuffer(); - mVertexBuffer.put(mVertexCoors); - mVertexBuffer.position(0); - - ByteBuffer textureByteBuffer = ByteBuffer.allocateDirect(mTextureCoors.length * 4); - textureByteBuffer.order(ByteOrder.nativeOrder()); - - mTextureBuffer = textureByteBuffer.asFloatBuffer(); - mTextureBuffer.put(mTextureCoors); - mTextureBuffer.position(0); - - createGLProgram(); - } - - private void createGLProgram() throws IOException { - if (mProgram == -1) { - int vertexShader = - GlUtils.loadGLShader(TAG, mContext, GLES30.GL_VERTEX_SHADER, VERTEX_SHADER_NAME); - int fragmentShader = - GlUtils.loadGLShader(TAG, mContext, GLES30.GL_FRAGMENT_SHADER, FRAGMENT_SHADER_NAME); - - mProgram = GLES20.glCreateProgram(); - GLES20.glAttachShader(mProgram, vertexShader); - GLES20.glAttachShader(mProgram, fragmentShader); - GLES20.glLinkProgram(mProgram); - - mVertexPosHandler = GLES20.glGetAttribLocation(mProgram, "aPosition"); - mTexturePosHandler = GLES20.glGetAttribLocation(mProgram, "aCoordinate"); - mTextureHandler = GLES20.glGetUniformLocation(mProgram, "uTexture"); - GlUtils.checkGLError(TAG, "CloudVideoDraw"); - } - GLES20.glUseProgram(mProgram); - } - - /** - * 进行SurfaceTexture的绘制 - */ - public void draw(int textureId) { - GlUtils.checkGLError(TAG, "VideoFrameDrawer"); - GLES30.glActiveTexture(GLES20.GL_TEXTURE0); - GLES30.glBindTexture(GLES20.GL_TEXTURE_2D, textureId); - - GLES30.glUseProgram(mProgram); - GLES20.glUniform1i(mTextureHandler, 0); - GLES20.glViewport(0, 0, mWidth, mHeight); - - GLES20.glVertexAttribPointer(mVertexPosHandler, 2, GLES20.GL_FLOAT, false, 0, mVertexBuffer); - GLES20.glVertexAttribPointer(mTexturePosHandler, 2, GLES20.GL_FLOAT, false, 0, mTextureBuffer); - - GLES20.glEnableVertexAttribArray(mVertexPosHandler); - GLES20.glEnableVertexAttribArray(mTexturePosHandler); - - GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0,4); - GlUtils.checkGLError(TAG, "VideoFrameDrawer"); - } - - public void onSurfaceChanged(int surfaceWidth, int surfaceHeight) { - ByteBuffer textureByteBuffer = ByteBuffer.allocateDirect(mTextureCoors.length * 4); - textureByteBuffer.order(ByteOrder.nativeOrder()); - - mTextureBuffer = textureByteBuffer.asFloatBuffer(); - mTextureBuffer.put(mTextureCoors); - mTextureBuffer.position(0); - - mWidth = surfaceWidth; - mHeight = surfaceHeight; - } -} diff --git a/SRPlayer/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/SRPlayer/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index 8a2bdbf..0000000 --- a/SRPlayer/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/SRPlayer/app/src/main/res/drawable/ic_launcher_background.xml b/SRPlayer/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index e4a5389..0000000 --- a/SRPlayer/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SRPlayer/app/src/main/res/layout/activity_main.xml b/SRPlayer/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 1a0fc9c..0000000 --- a/SRPlayer/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - +
+
+
+
说明
+ +
+
This interface represents the log callbacks of the TsrSdk.
+
+ +
+
TsrPass is a class responsible for performing super-resolution rendering on input images.
+
+ +
+
TsrSdk is a class responsible for managing and verifying the license of the super-resolution SDK.
+
+ +
+
Enum representing the status of an SDK license.
+
+
+
+ + + + + + diff --git a/api-document/allpackages-index.html b/api-document/allpackages-index.html new file mode 100644 index 0000000..24567a7 --- /dev/null +++ b/api-document/allpackages-index.html @@ -0,0 +1,63 @@ + + + + +所有程序包 + + + + + + + + + + + + + + + +
+ +
+
+
+

所有程序包

+
+
程序包概要
+
+
程序包
+
说明
+ +
 
+
+
+
+
+ + diff --git a/api-document/com/tencent/mps/tsr/api/TsrLogger.html b/api-document/com/tencent/mps/tsr/api/TsrLogger.html new file mode 100644 index 0000000..706860a --- /dev/null +++ b/api-document/com/tencent/mps/tsr/api/TsrLogger.html @@ -0,0 +1,179 @@ + + + + +TsrLogger + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

接口 TsrLogger

+
+
+
+
public interface TsrLogger
+
This interface represents the log callbacks of the TsrSdk.
+
+
另请参阅:
+
+ +
+
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/api-document/com/tencent/mps/tsr/api/TsrPass.html b/api-document/com/tencent/mps/tsr/api/TsrPass.html new file mode 100644 index 0000000..42f1ac9 --- /dev/null +++ b/api-document/com/tencent/mps/tsr/api/TsrPass.html @@ -0,0 +1,248 @@ + + + + +TsrPass + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

类 TsrPass

+
+
java.lang.Object +
com.tencent.mps.tsr.api.TsrPass
+
+
+
+
public class TsrPass +extends Object
+
TsrPass is a class responsible for performing super-resolution rendering on input images. + The class creates a TSRPass object and provides methods for initialization, rendering, and + releasing resources. +

Usage:

+
    +
  1. Create a TsrPass object using the constructor.
  2. +
  3. (In glThread) Initialize the TsrPass object by calling the init(int, int, float) method.
  4. +
  5. (In glThread) Perform super-resolution rendering on an input opengl texture by calling the render(int) + method.
  6. +
  7. Release resources when the TsrPass object is no longer needed by calling the release() + method.
  8. +
+

Example:

+
+ // Create a TsrPass object using the constructor.
+ TsrPass tsrPass = new TsrPass();
+
+ // The code below must be executed in glThread.
+ //----------------------GL Thread------------------------------------//
+
+ tsrPass.init(inputWidth, inputHeight, srRatio);
+
+ // If the type of inputTexture is TextureOES, you must transform it to Texture2D.
+ int outputTextureId = tsrPass.render(inputTextureId);
+
+ //----------------------GL Thread------------------------------------//
+
+ // Release resources when the TsrPass object is no longer needed.
+ tsrPass.release();
+ 
+
+
+
    + +
  • +
    +

    构造器概要

    +
    构造器
    +
    +
    构造器
    +
    说明
    + +
    +
    Creates a TSRPass object for super-resolution.
    +
    +
    +
    +
  • + +
  • +
    +

    方法概要

    +
    +
    +
    +
    +
    修饰符和类型
    +
    方法
    +
    说明
    +
    void
    +
    init(int inputWidth, + int inputHeight, + float srRatio)
    +
    +
    Init TSRPass object for super-resolution.
    +
    +
    void
    + +
    +
    Releases the resources.
    +
    +
    int
    +
    render(int textureId)
    +
    +
    Performs the super-resolution rendering operation on the input image.
    +
    +
    +
    +
    +
    +

    从类继承的方法 java.lang.Object

    +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    构造器详细资料

    + +
    +
  • + +
  • +
    +

    方法详细资料

    +
      +
    • +
      +

      init

      +
      public void init(int inputWidth, + int inputHeight, + float srRatio)
      +
      Init TSRPass object for super-resolution. This method must be called in the GLThread.
      +
      +
      参数:
      +
      inputWidth - The width of the input image
      +
      inputHeight - The height of the input image
      +
      srRatio - The magnification factor for super-resolution, ranging from 1 to 2. When srRatio is less than 1, + set its value to 1; when srRatio is greater than 2, set its value to 2.
      +
      +
      +
    • +
    • +
      +

      render

      +
      public int render(int textureId)
      +
      Performs the super-resolution rendering operation on the input image. This method must be performed in the + GLThread. +
      + This method applies the super-resolution rendering process to the input image, improving its quality. The + processed image is rendered onto a texture within the TSRPass object. And the return is the texture's id. +
      +
      + NOTE: The type of the texture corresponding to the textureId you pass in must be texture2D. +
      +
      +
      参数:
      +
      textureId - The OpenGL textureId of the input image that needs to be processed for super-resolution. The + corresponding texture is a texture2D texture.
      +
      返回:
      +
      The textureId of the texture2D after super-resolution rendering, which is stored inside the TSRPass + object. The size of the output texture is (inputWidth * srRatio, inputHeight * srRatio).
      +
      +
      +
    • +
    • +
      +

      release

      +
      public void release()
      +
      Releases the resources. +
      + This method should be called when the TSRPass object is no longer needed, to free up the memory and other + resources.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/api-document/com/tencent/mps/tsr/api/TsrSdk.SdkLicenseStatus.html b/api-document/com/tencent/mps/tsr/api/TsrSdk.SdkLicenseStatus.html new file mode 100644 index 0000000..91c5e51 --- /dev/null +++ b/api-document/com/tencent/mps/tsr/api/TsrSdk.SdkLicenseStatus.html @@ -0,0 +1,358 @@ + + + + +TsrSdk.SdkLicenseStatus + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class TsrSdk.SdkLicenseStatus

+
+
java.lang.Object +
java.lang.Enum<TsrSdk.SdkLicenseStatus> +
com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
+
+
+
所有已实现的接口:
+
Serializable, Comparable<TsrSdk.SdkLicenseStatus>, Constable
+
+
+
封闭类:
+
TsrSdk
+
+
+
public static enum TsrSdk.SdkLicenseStatus +extends Enum<TsrSdk.SdkLicenseStatus>
+
Enum representing the status of an SDK license.
+
+
+ +
+
+
    + +
  • +
    +

    枚举常量详细资料

    +
      +
    • +
      +

      UNKNOWN

      +
      public static final TsrSdk.SdkLicenseStatus UNKNOWN
      +
      License status is unknown.
      +
      +
    • +
    • +
      +

      INTERNAL_ERR

      +
      public static final TsrSdk.SdkLicenseStatus INTERNAL_ERR
      +
      Internal operating logic error.
      +
      +
    • +
    • +
      +

      SIGN_NOT_MATCHED

      +
      public static final TsrSdk.SdkLicenseStatus SIGN_NOT_MATCHED
      +
      License sign not matched.
      +
      +
    • +
    • +
      +

      SIGN_MATCHED

      +
      public static final TsrSdk.SdkLicenseStatus SIGN_MATCHED
      +
      License sign matched.
      +
      +
    • +
    • +
      +

      ERROR_INVALID

      +
      public static final TsrSdk.SdkLicenseStatus ERROR_INVALID
      +
      License server verify failed (invalid appid/sdkid, or disabled).
      +
      +
    • +
    • +
      +

      EXPIRES

      +
      public static final TsrSdk.SdkLicenseStatus EXPIRES
      +
      License expires.
      +
      +
    • +
    • +
      +

      LIMIT_COUNT

      +
      public static final TsrSdk.SdkLicenseStatus LIMIT_COUNT
      +
      License limit count.
      +
      +
    • +
    • +
      +

      NO_AVAILBALE_AUTH

      +
      public static final TsrSdk.SdkLicenseStatus NO_AVAILBALE_AUTH
      +
      License not available for user request (online authorization).
      +
      +
    • +
    • +
      +

      TRIALS

      +
      public static final TsrSdk.SdkLicenseStatus TRIALS
      +
      Net abort, trials.
      +
      +
    • +
    • +
      +

      UNAVAILABLE

      +
      public static final TsrSdk.SdkLicenseStatus UNAVAILABLE
      +
      License verify failed (mismatched certificate info or incorrect format or file not found).
      +
      +
    • +
    • +
      +

      AVAILABLE

      +
      public static final TsrSdk.SdkLicenseStatus AVAILABLE
      +
      Verify successful.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    方法详细资料

    +
      +
    • +
      +

      values

      +
      public static TsrSdk.SdkLicenseStatus[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      返回:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static TsrSdk.SdkLicenseStatus valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      参数:
      +
      name - 要返回的枚举常量的名称。
      +
      返回:
      +
      返回带有指定名称的枚举常量
      +
      抛出:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - 如果参数为空值
      +
      +
      +
    • +
    • +
      +

      findEnumByCode

      +
      public static TsrSdk.SdkLicenseStatus findEnumByCode(Integer code)
      +
      +
    • +
    • +
      +

      getCode

      +
      public int getCode()
      +
      +
    • +
    • +
      +

      toString

      +
      @NonNull +public String toString()
      +
      +
      覆盖:
      +
      toString 在类中 Enum<TsrSdk.SdkLicenseStatus>
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/api-document/com/tencent/mps/tsr/api/TsrSdk.html b/api-document/com/tencent/mps/tsr/api/TsrSdk.html new file mode 100644 index 0000000..88634fe --- /dev/null +++ b/api-document/com/tencent/mps/tsr/api/TsrSdk.html @@ -0,0 +1,224 @@ + + + + +TsrSdk + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

类 TsrSdk

+
+
java.lang.Object +
com.tencent.mps.tsr.api.TsrSdk
+
+
+
+
public class TsrSdk +extends Object
+
TsrSdk is a class responsible for managing and verifying the license of the super-resolution SDK. +The class provides methods for initializing the SDK with offline license verification, + and releasing the resources when the SDK is no longer needed. It also allows setting a custom + logger for logging purposes. +

Usage:

+
    +
  1. Get an instance of TsrSdk using the getInstance() method.
  2. +
  3. Initialize the TsrSdk object with offline license verification using the + init(long, String, TsrLogger) methods.
  4. +
  5. Perform super-resolution rendering using the TsrPass class.
  6. +
  7. Release resources when the TsrSdk object is no longer needed by calling the release() method.
  8. +
+ +

Example for offline verification:

+
+ String licensePath = "----path to you sdk license.----";
+ TsrSdk tsrSdk = TsrSdk.getInstance();
+ SdkLicenseStatus status = tsrSdk.init(appId, licensePath, logger);
+ if (status == SdkLicenseStatus.AVAILABLE) {
+    // Perform super-resolution rendering using TsrPass class.
+ } else {
+    // Do something when the verification of sdk's license failed.
+ }
+
+ // If you have created TsrPass, you should release it before release TsrSdk.
+ tsrPass.release();
+ // Release resources when the TsrSdk object is no longer needed.
+ tsrSdk.release();
+ 
+
+
+ +
+
+
    + +
  • +
    +

    方法详细资料

    +
      +
    • +
      +

      getInstance

      +
      public static TsrSdk getInstance()
      +
      +
    • +
    • +
      +

      init

      +
      public TsrSdk.SdkLicenseStatus init(long appId, + String licensePath, + TsrLogger logger)
      +
      Initializes the TsrSdk with offline license verification. This method only can be executed once before the + release() is executed.
      +
      +
      参数:
      +
      appId - appId
      +
      licensePath - The path of the license
      +
      logger - Set a logger for the TsrSdk. The Logger must not be null.
      +
      返回:
      +
      The result of the verification of sdk's license.
      +
      +
      +
    • +
    • +
      +

      release

      +
      public void release()
      +
      Releases the resources associated with the TsrSdk instance. +

      + This method should be called when the TsrSdk instance is no longer needed, to free up memory and other + resources. + Before calling this method, make sure to release all associated TsrPass objects by calling their + TsrPass.release() method, as they depend on the resources provided by the TsrSdk instance. Failing to + release TsrPass objects before releasing the TsrSdk may lead to unexpected errors or undefined behavior. +

      +

      + After calling this method, you must re-initialize the TsrSdk instance using one of the init methods + init(long, String, TsrLogger)) before using it again. +

      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/api-document/com/tencent/mps/tsr/api/package-summary.html b/api-document/com/tencent/mps/tsr/api/package-summary.html new file mode 100644 index 0000000..020692f --- /dev/null +++ b/api-document/com/tencent/mps/tsr/api/package-summary.html @@ -0,0 +1,101 @@ + + + + +com.tencent.mps.tsr.api + + + + + + + + + + + + + + + +
+ +
+
+
+

程序包 com.tencent.mps.tsr.api

+
+
+
package com.tencent.mps.tsr.api
+
+
    +
  • +
    +
    +
    +
    +
    +
    说明
    + +
    +
    This interface represents the log callbacks of the TsrSdk.
    +
    + +
    +
    TsrPass is a class responsible for performing super-resolution rendering on input images.
    +
    + +
    +
    TsrSdk is a class responsible for managing and verifying the license of the super-resolution SDK.
    +
    + +
    +
    Enum representing the status of an SDK license.
    +
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/api-document/com/tencent/mps/tsr/api/package-tree.html b/api-document/com/tencent/mps/tsr/api/package-tree.html new file mode 100644 index 0000000..d7760b0 --- /dev/null +++ b/api-document/com/tencent/mps/tsr/api/package-tree.html @@ -0,0 +1,87 @@ + + + + +com.tencent.mps.tsr.api 类分层结构 + + + + + + + + + + + + + + + +
+ +
+
+
+

程序包com.tencent.mps.tsr.api的分层结构

+
+
+

类分层结构

+ +
+
+

接口分层结构

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/api-document/element-list b/api-document/element-list new file mode 100644 index 0000000..33bdb53 --- /dev/null +++ b/api-document/element-list @@ -0,0 +1 @@ +com.tencent.mps.tsr.api diff --git a/api-document/help-doc.html b/api-document/help-doc.html new file mode 100644 index 0000000..e85fae7 --- /dev/null +++ b/api-document/help-doc.html @@ -0,0 +1,170 @@ + + + + +API 帮助 + + + + + + + + + + + + + + + +
+ +
+
+

此 API 文档的组织方式

+ +
+
+

Navigation

+Starting from the 概览 page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The 索引 and Search box allow you to navigate to specific declarations and summary pages, including: 所有程序包, All Classes and Interfaces + +
+
+
+

Kinds of Pages

+The following sections describe the different kinds of pages in this collection. +
+

程序包

+

每个程序包都有一页,其中包含它的类和接口的列表及其概要。这些页可以包含六个类别:

+
    +
  • 接口
  • +
  • +
  • Enum Classes
  • +
  • 异常错误
  • +
  • 错误
  • +
  • Annotation Interfaces
  • +
+
+
+

类或接口

+

每个类, 接口, 嵌套类和嵌套接口都有各自的页面。其中每个页面都由三部分 (类/接口说明, 概要表, 以及详细的成员说明) 组成:

+
    +
  • 类继承图
  • +
  • 直接子类
  • +
  • 所有已知子接口
  • +
  • 所有已知实现类
  • +
  • 类或接口声明
  • +
  • 类或接口说明
  • +
+
+
    +
  • 嵌套类概要
  • +
  • 枚举常量概要
  • +
  • 字段概要
  • +
  • 属性概要
  • +
  • 构造器概要
  • +
  • 方法概要
  • +
  • 必需元素概要
  • +
  • 可选元素概要
  • +
+
+
    +
  • 枚举常量详细资料
  • +
  • 字段详细资料
  • +
  • 属性详细资料
  • +
  • 构造器详细资料
  • +
  • 方法详细资料
  • +
  • 元素详细资料
  • +
+

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Other Files

+

Packages and modules may contain pages with additional information related to the declarations nearby.

+
+
+

树 (类分层结构)

+

对于所有程序包,都有一个 类分层结构 页,以及每个程序包的分层结构。每个分层结构页都包含类的列表和接口的列表。从 java.lang.Object 开始,按继承结构对类进行排列。接口不从 java.lang.Object 继承。

+
    +
  • 查看“概览”页面时, 单击 "树" 将显示所有程序包的分层结构。
  • +
  • 查看特定程序包、类或接口页时,单击“树”将仅显示该程序包的分层结构。
  • +
+
+
+

All Packages

+

The 所有程序包 page contains an alphabetic index of all packages contained in the documentation.

+
+
+

All Classes and Interfaces

+

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

+
+
+

索引

+

索引 包含所有类、接口、构造器、方法和字段的按字母顺序排列的索引,以及所有程序包和所有类的列表。

+
+
+
+此帮助文件适用于由标准 doclet 生成的 API 文档。
+
+
+ + diff --git a/api-document/index-files/index-1.html b/api-document/index-files/index-1.html new file mode 100644 index 0000000..7b9f562 --- /dev/null +++ b/api-document/index-files/index-1.html @@ -0,0 +1,64 @@ + + + + +A - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

A

+
+
AVAILABLE - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
Verify successful.
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-10.html b/api-document/index-files/index-10.html new file mode 100644 index 0000000..5f43e13 --- /dev/null +++ b/api-document/index-files/index-10.html @@ -0,0 +1,72 @@ + + + + +R - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

R

+
+
release() - 类中的方法 com.tencent.mps.tsr.api.TsrPass
+
+
Releases the resources.
+
+
release() - 类中的方法 com.tencent.mps.tsr.api.TsrSdk
+
+
Releases the resources associated with the TsrSdk instance.
+
+
render(int) - 类中的方法 com.tencent.mps.tsr.api.TsrPass
+
+
Performs the super-resolution rendering operation on the input image.
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-11.html b/api-document/index-files/index-11.html new file mode 100644 index 0000000..42530e7 --- /dev/null +++ b/api-document/index-files/index-11.html @@ -0,0 +1,68 @@ + + + + +S - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

S

+
+
SIGN_MATCHED - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
License sign matched.
+
+
SIGN_NOT_MATCHED - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
License sign not matched.
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-12.html b/api-document/index-files/index-12.html new file mode 100644 index 0000000..ae21275 --- /dev/null +++ b/api-document/index-files/index-12.html @@ -0,0 +1,86 @@ + + + + +T - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

T

+
+
toString() - enum class中的方法 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
 
+
TRIALS - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
Net abort, trials.
+
+
TsrLogger - com.tencent.mps.tsr.api中的接口
+
+
This interface represents the log callbacks of the TsrSdk.
+
+
TsrPass - com.tencent.mps.tsr.api中的类
+
+
TsrPass is a class responsible for performing super-resolution rendering on input images.
+
+
TsrPass() - 类的构造器 com.tencent.mps.tsr.api.TsrPass
+
+
Creates a TSRPass object for super-resolution.
+
+
TsrSdk - com.tencent.mps.tsr.api中的类
+
+
TsrSdk is a class responsible for managing and verifying the license of the super-resolution SDK.
+
+
TsrSdk.SdkLicenseStatus - com.tencent.mps.tsr.api中的Enum Class
+
+
Enum representing the status of an SDK license.
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-13.html b/api-document/index-files/index-13.html new file mode 100644 index 0000000..2bfea59 --- /dev/null +++ b/api-document/index-files/index-13.html @@ -0,0 +1,68 @@ + + + + +U - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

U

+
+
UNAVAILABLE - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
License verify failed (mismatched certificate info or incorrect format or file not found).
+
+
UNKNOWN - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
License status is unknown.
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-14.html b/api-document/index-files/index-14.html new file mode 100644 index 0000000..8e33c2c --- /dev/null +++ b/api-document/index-files/index-14.html @@ -0,0 +1,71 @@ + + + + +V - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

V

+
+
v(String, String) - 接口中的方法 com.tencent.mps.tsr.api.TsrLogger
+
 
+
valueOf(String) - enum class中的静态方法 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
Returns the enum constant of this class with the specified name.
+
+
values() - enum class中的静态方法 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-15.html b/api-document/index-files/index-15.html new file mode 100644 index 0000000..dfe0156 --- /dev/null +++ b/api-document/index-files/index-15.html @@ -0,0 +1,62 @@ + + + + +W - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

W

+
+
w(String, String) - 接口中的方法 com.tencent.mps.tsr.api.TsrLogger
+
 
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-2.html b/api-document/index-files/index-2.html new file mode 100644 index 0000000..9ce6bba --- /dev/null +++ b/api-document/index-files/index-2.html @@ -0,0 +1,62 @@ + + + + +C - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

C

+
+
com.tencent.mps.tsr.api - 程序包 com.tencent.mps.tsr.api
+
 
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-3.html b/api-document/index-files/index-3.html new file mode 100644 index 0000000..a4142a2 --- /dev/null +++ b/api-document/index-files/index-3.html @@ -0,0 +1,62 @@ + + + + +D - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

D

+
+
d(String, String) - 接口中的方法 com.tencent.mps.tsr.api.TsrLogger
+
 
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-4.html b/api-document/index-files/index-4.html new file mode 100644 index 0000000..11b8dc4 --- /dev/null +++ b/api-document/index-files/index-4.html @@ -0,0 +1,70 @@ + + + + +E - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

E

+
+
e(String, String) - 接口中的方法 com.tencent.mps.tsr.api.TsrLogger
+
 
+
ERROR_INVALID - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
License server verify failed (invalid appid/sdkid, or disabled).
+
+
EXPIRES - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
License expires.
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-5.html b/api-document/index-files/index-5.html new file mode 100644 index 0000000..1d0d086 --- /dev/null +++ b/api-document/index-files/index-5.html @@ -0,0 +1,62 @@ + + + + +F - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

F

+
+
findEnumByCode(Integer) - enum class中的静态方法 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
 
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-6.html b/api-document/index-files/index-6.html new file mode 100644 index 0000000..e9a5905 --- /dev/null +++ b/api-document/index-files/index-6.html @@ -0,0 +1,64 @@ + + + + +G - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

G

+
+
getCode() - enum class中的方法 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
 
+
getInstance() - 类中的静态方法 com.tencent.mps.tsr.api.TsrSdk
+
 
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-7.html b/api-document/index-files/index-7.html new file mode 100644 index 0000000..d1f4023 --- /dev/null +++ b/api-document/index-files/index-7.html @@ -0,0 +1,74 @@ + + + + +I - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

I

+
+
i(String, String) - 接口中的方法 com.tencent.mps.tsr.api.TsrLogger
+
 
+
init(int, int, float) - 类中的方法 com.tencent.mps.tsr.api.TsrPass
+
+
Init TSRPass object for super-resolution.
+
+
init(long, String, TsrLogger) - 类中的方法 com.tencent.mps.tsr.api.TsrSdk
+
+
Initializes the TsrSdk with offline license verification.
+
+
INTERNAL_ERR - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
Internal operating logic error.
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-8.html b/api-document/index-files/index-8.html new file mode 100644 index 0000000..90f0e88 --- /dev/null +++ b/api-document/index-files/index-8.html @@ -0,0 +1,64 @@ + + + + +L - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

L

+
+
LIMIT_COUNT - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
License limit count.
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index-files/index-9.html b/api-document/index-files/index-9.html new file mode 100644 index 0000000..065ca4a --- /dev/null +++ b/api-document/index-files/index-9.html @@ -0,0 +1,64 @@ + + + + +N - 索引 + + + + + + + + + + + + + + + +
+ +
+
+
+

索引

+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包 +

N

+
+
NO_AVAILBALE_AUTH - enum class 中的枚举常量 com.tencent.mps.tsr.api.TsrSdk.SdkLicenseStatus
+
+
License not available for user request (online authorization).
+
+
+A C D E F G I L N R S T U V W 
All Classes and Interfaces|所有程序包
+
+
+ + diff --git a/api-document/index.html b/api-document/index.html new file mode 100644 index 0000000..bfa8d0a --- /dev/null +++ b/api-document/index.html @@ -0,0 +1,26 @@ + + + + +生成的文档 (无标题) + + + + + + + + + + + +
+ +

com/tencent/mps/tsr/api/package-summary.html

+
+ + diff --git a/api-document/jquery-ui.overrides.css b/api-document/jquery-ui.overrides.css new file mode 100644 index 0000000..facf852 --- /dev/null +++ b/api-document/jquery-ui.overrides.css @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; + border: 1px solid #F8981D; +} diff --git a/api-document/legal/ADDITIONAL_LICENSE_INFO b/api-document/legal/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000..ff700cd --- /dev/null +++ b/api-document/legal/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/api-document/legal/ASSEMBLY_EXCEPTION b/api-document/legal/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000..065b8d9 --- /dev/null +++ b/api-document/legal/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/api-document/legal/LICENSE b/api-document/legal/LICENSE new file mode 100644 index 0000000..8b400c7 --- /dev/null +++ b/api-document/legal/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/api-document/legal/jquery.md b/api-document/legal/jquery.md new file mode 100644 index 0000000..d468b31 --- /dev/null +++ b/api-document/legal/jquery.md @@ -0,0 +1,72 @@ +## jQuery v3.6.1 + +### jQuery License +``` +jQuery v 3.6.1 +Copyright OpenJS Foundation and other contributors, https://openjsf.org/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +****************************************** + +The jQuery JavaScript Library v3.6.1 also includes Sizzle.js + +Sizzle.js includes the following license: + +Copyright JS Foundation and other contributors, https://js.foundation/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/sizzle + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +********************* + +``` diff --git a/api-document/legal/jqueryUI.md b/api-document/legal/jqueryUI.md new file mode 100644 index 0000000..8031bdb --- /dev/null +++ b/api-document/legal/jqueryUI.md @@ -0,0 +1,49 @@ +## jQuery UI v1.12.1 + +### jQuery UI License +``` +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +``` diff --git a/api-document/member-search-index.js b/api-document/member-search-index.js new file mode 100644 index 0000000..0090eb3 --- /dev/null +++ b/api-document/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"AVAILABLE"},{"p":"com.tencent.mps.tsr.api","c":"TsrLogger","l":"d(String, String)","u":"d(java.lang.String,java.lang.String)"},{"p":"com.tencent.mps.tsr.api","c":"TsrLogger","l":"e(String, String)","u":"e(java.lang.String,java.lang.String)"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"ERROR_INVALID"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"EXPIRES"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"findEnumByCode(Integer)","u":"findEnumByCode(java.lang.Integer)"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"getCode()"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk","l":"getInstance()"},{"p":"com.tencent.mps.tsr.api","c":"TsrLogger","l":"i(String, String)","u":"i(java.lang.String,java.lang.String)"},{"p":"com.tencent.mps.tsr.api","c":"TsrPass","l":"init(int, int, float)","u":"init(int,int,float)"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk","l":"init(long, String, TsrLogger)","u":"init(long,java.lang.String,com.tencent.mps.tsr.api.TsrLogger)"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"INTERNAL_ERR"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"LIMIT_COUNT"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"NO_AVAILBALE_AUTH"},{"p":"com.tencent.mps.tsr.api","c":"TsrPass","l":"release()"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk","l":"release()"},{"p":"com.tencent.mps.tsr.api","c":"TsrPass","l":"render(int)"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"SIGN_MATCHED"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"SIGN_NOT_MATCHED"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"toString()"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"TRIALS"},{"p":"com.tencent.mps.tsr.api","c":"TsrPass","l":"TsrPass()","u":"%3Cinit%3E()"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"UNAVAILABLE"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"UNKNOWN"},{"p":"com.tencent.mps.tsr.api","c":"TsrLogger","l":"v(String, String)","u":"v(java.lang.String,java.lang.String)"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.tencent.mps.tsr.api","c":"TsrSdk.SdkLicenseStatus","l":"values()"},{"p":"com.tencent.mps.tsr.api","c":"TsrLogger","l":"w(String, String)","u":"w(java.lang.String,java.lang.String)"}];updateSearchResults(); \ No newline at end of file diff --git a/api-document/module-search-index.js b/api-document/module-search-index.js new file mode 100644 index 0000000..0d59754 --- /dev/null +++ b/api-document/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/api-document/overview-tree.html b/api-document/overview-tree.html new file mode 100644 index 0000000..8e05b97 --- /dev/null +++ b/api-document/overview-tree.html @@ -0,0 +1,91 @@ + + + + +类分层结构 + + + + + + + + + + + + + + + +
+ +
+
+
+

所有程序包的分层结构

+程序包分层结构: + +
+
+

类分层结构

+ +
+
+

接口分层结构

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/api-document/package-search-index.js b/api-document/package-search-index.js new file mode 100644 index 0000000..5d7687a --- /dev/null +++ b/api-document/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"com.tencent.mps.tsr.api"},{"l":"所有程序包","u":"allpackages-index.html"}];updateSearchResults(); \ No newline at end of file diff --git a/api-document/resources/glass.png b/api-document/resources/glass.png new file mode 100644 index 0000000..a7f591f Binary files /dev/null and b/api-document/resources/glass.png differ diff --git a/api-document/resources/x.png b/api-document/resources/x.png new file mode 100644 index 0000000..30548a7 Binary files /dev/null and b/api-document/resources/x.png differ diff --git a/api-document/script-dir/jquery-3.6.1.min.js b/api-document/script-dir/jquery-3.6.1.min.js new file mode 100644 index 0000000..2c69bc9 --- /dev/null +++ b/api-document/script-dir/jquery-3.6.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=x.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthC(E(s),E(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),l.offset(x.extend(u,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,l=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=x("
    ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("
    ").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=x("
    ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||x.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?x(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(x.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=x.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(x("
    ").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),x.extend(x.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(x.ui.autocomplete.escapeRegex(e),"i");return x.grep(t,function(t){return i.test(t.label||t.value||t)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(e))},100))}});x.ui.autocomplete}); \ No newline at end of file diff --git a/api-document/script.js b/api-document/script.js new file mode 100644 index 0000000..864989c --- /dev/null +++ b/api-document/script.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/api-document/search.js b/api-document/search.js new file mode 100644 index 0000000..db3b2f4 --- /dev/null +++ b/api-document/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Classes and Interfaces"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search-input"); + var reset = $("#reset-button"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
  • " + item.category + "
  • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
  • ").appendTo(ul); + var div = $("
    ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
    " + + item.d + "
    "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search-input").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search-input").focus(); + } + } + }); +}); diff --git a/api-document/stylesheet.css b/api-document/stylesheet.css new file mode 100644 index 0000000..4a576bd --- /dev/null +++ b/api-document/stylesheet.css @@ -0,0 +1,869 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:15px; +} +h5 { + font-size:14px; +} +h6 { + font-size:13px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.see-list, ul.see-list-long { + padding-left: 0; + list-style: none; +} +ul.see-list li { + display: inline; +} +ul.see-list li:not(:last-child):after, +ul.see-list-long li:not(:last-child):after { + content: ", "; + white-space: pre-wrap; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0; + padding-top:10px; + padding-left:1px; + margin:0; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:0; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.result-item { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; + background-color: #FFFFFF; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.result-highlight { + font-weight:bold; +} +.ui-autocomplete .result-item { + font-size: inherit; +} +#search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset-button { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +span.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search-input { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search-input { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search-input { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/api-document/tag-search-index.js b/api-document/tag-search-index.js new file mode 100644 index 0000000..0367dae --- /dev/null +++ b/api-document/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/api-document/type-search-index.js b/api-document/type-search-index.js new file mode 100644 index 0000000..1aa77db --- /dev/null +++ b/api-document/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"com.tencent.mps.tsr.api","l":"TsrSdk.SdkLicenseStatus"},{"p":"com.tencent.mps.tsr.api","l":"TsrLogger"},{"p":"com.tencent.mps.tsr.api","l":"TsrPass"},{"p":"com.tencent.mps.tsr.api","l":"TsrSdk"}];updateSearchResults(); \ No newline at end of file diff --git a/docs/cert.png b/docs/cert.png deleted file mode 100644 index c04d21c..0000000 Binary files a/docs/cert.png and /dev/null differ diff --git a/docs/tsr-work-flow.png b/docs/tsr-work-flow.png deleted file mode 100644 index 732ef44..0000000 Binary files a/docs/tsr-work-flow.png and /dev/null differ diff --git a/docs/verification-params.png b/docs/verification-params.png deleted file mode 100644 index 9a78edb..0000000 Binary files a/docs/verification-params.png and /dev/null differ