35 | * Created by android on 10/20/17.
36 | */
37 |
38 | public class ApiServiceFactory {
39 |
40 | private static Retrofit mRetrofit;
41 | private static void attachRetrofit() {
42 | mRetrofit = NetworkManager.getInstance().getRetrofit();
43 | }
44 |
45 | public static T createService(Class serviceClass) {
46 | if (null == mRetrofit) {
47 | attachRetrofit();
48 | }
49 | return mRetrofit.create(serviceClass);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/applicationmanagement/src/main/java/app/mobile/nativeapp/com/applicationmanagement/network/api_service/ApiServiceConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.applicationmanagement.network.api_service;
29 |
30 | /**
31 | * Created by android on 10/20/17.
32 | * @author android
33 | */
34 |
35 | public interface ApiServiceConstants {
36 |
37 |
38 | String BASE_URL = "http://app.pearvideo.com/";
39 | }
40 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/applicationmanagement/src/main/java/app/mobile/nativeapp/com/applicationmanagement/utils/AppUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.applicationmanagement.utils;
29 |
30 | import android.content.Context;
31 | import android.content.pm.ApplicationInfo;
32 | import android.content.pm.PackageManager;
33 | import android.net.TrafficStats;
34 |
35 | /**
36 | * Created by android on 11/22/17.
37 | */
38 |
39 | public class AppUtils {
40 |
41 | public static long getRxBytes() {
42 | return TrafficStats.getUidRxBytes(android.os.Process.myUid());
43 | }
44 |
45 | public static long getTxBytes() {
46 | return TrafficStats.getUidTxBytes(android.os.Process.myUid());
47 | }
48 |
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/applicationmanagement/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
27 |
28 |
29 | ApplicationManagement
30 |
31 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/applicationmanagement/src/test/java/app/mobile/nativeapp/com/applicationmanagement/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.applicationmanagement;
29 |
30 | import org.junit.Test;
31 |
32 | import static org.junit.Assert.*;
33 |
34 | /**
35 | * Example local unit test, which will execute on the development machine (host).
36 | *
37 | * @see Testing documentation
38 | */
39 | public class ExampleUnitTest {
40 | @Test
41 | public void addition_isCorrect() throws Exception {
42 | assertEquals(4, 2 + 2);
43 | }
44 | }
--------------------------------------------------------------------------------
/MediaPlus/libraries/libdatabase/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libdatabase/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libdatabase/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
27 |
28 |
30 |
31 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libdatabase/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
27 |
28 |
29 | Libdatabase
30 |
31 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libdatabase/src/test/java/app/mobile/nativeapp/com/libdatabase/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libdatabase;
29 |
30 | import org.junit.Test;
31 |
32 | import static org.junit.Assert.*;
33 |
34 | /**
35 | * Example local unit test, which will execute on the development machine (host).
36 | *
37 | * @see Testing documentation
38 | */
39 | public class ExampleUnitTest {
40 | @Test
41 | public void addition_isCorrect() throws Exception {
42 | assertEquals(4, 2 + 2);
43 | }
44 | }
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply from: "${project.rootDir}/global.gradle"
3 |
4 | android {
5 | compileSdkVersion COMPILE_SDK_VERSION
6 | buildToolsVersion BUILD_TOOLS_VERSION
7 | publishNonDefault true
8 |
9 |
10 | defaultConfig {
11 | minSdkVersion 15
12 | targetSdkVersion 23
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17 | externalNativeBuild {
18 | cmake {
19 | cppFlags "-std=c++11 -frtti -fno-exceptions"
20 | // -frtti 开启RTTI的支持(dynamic_cast和typeid需要用到),和vs c++不同,这在gcc中是默认选项。使用"-fno-rtti"将其禁用。
21 | // -fno-rtti 禁用运行时类型信息
22 | // -fno-exceptions 禁用异常机制
23 | }
24 | }
25 | ndk {
26 | abiFilters 'armeabi-v7a'
27 | }
28 |
29 | }
30 | externalNativeBuild {
31 | cmake {
32 | path "CMakeLists.txt"
33 | }
34 | }
35 |
36 | splits {
37 | abi {
38 | enable true
39 | reset()
40 | include 'armeabi-v7a'
41 | universalApk false
42 | }
43 | }
44 |
45 | // sourceSets {
46 | // main {
47 | // jniLibs.srcDirs = ['libs']
48 | // }
49 | // }
50 |
51 |
52 | buildTypes {
53 | release {
54 | minifyEnabled false
55 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
56 | debuggable true
57 | jniDebuggable true
58 | }
59 | debug {
60 | debuggable true
61 | jniDebuggable true
62 | }
63 | }
64 |
65 |
66 | }
67 |
68 |
69 |
70 | dependencies {
71 | compile fileTree(include: ['*.jar'], dir: 'libs')
72 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
73 | exclude group: 'com.android.support', module: 'support-annotations'
74 | })
75 | compile supportDependencies["appCompatV7"]
76 | testCompile testDependecencies["junit"]
77 | compile project(':libraries:applicationmanagement')
78 | compile files('libs/avcapture.jar')
79 | }
80 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/libs/armeabi-v7a/libFfmpeg.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/MediaPlus/libraries/libmedia/libs/armeabi-v7a/libFfmpeg.so
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/libs/armeabi-v7a/libMedia.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/MediaPlus/libraries/libmedia/libs/armeabi-v7a/libMedia.so
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/libs/armeabi-v7a/libyuv.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/MediaPlus/libraries/libmedia/libs/armeabi-v7a/libyuv.so
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/libs/avcapture.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/MediaPlus/libraries/libmedia/libs/avcapture.jar
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/androidTest/java/app/mobile/anative/com/libmedia/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package app.mobile.anative.com.libmedia;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("app.mobile.anative.com.libmedia.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/PrefixHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/12/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_PREFIXHEADER_H
6 | #define NATIVEAPP_PREFIXHEADER_H
7 |
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include "core/VideoEncodeArgs.h"
13 | #include "base_include.h"
14 | #include "core/AudioEncodeArgs.h"
15 |
16 |
17 | using namespace std;
18 | //测试数据写入文件
19 | #if 0
20 | #define WRITE_YUV_TO_FILE
21 | #define WRITE_PCM_TO_FILE
22 | #endif
23 |
24 |
25 | #if 0
26 | #define ENCODE_INFO
27 | #endif
28 |
29 | #if 0
30 | #define PTS_INFO
31 | #endif
32 |
33 | #if 0
34 | #define SHOW_DEBUG_INFO
35 | #endif
36 |
37 |
38 |
39 | enum CameraID {
40 | FRONT, BACK
41 | };
42 |
43 |
44 | #endif //NATIVEAPP_PREFIXHEADER_H
45 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/base_include.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 8/17/17.
3 | //
4 |
5 |
6 | #ifndef NATIVEAPP_BASE_INCLUDE_H
7 | #define NATIVEAPP_BASE_INCLUDE_H
8 |
9 |
10 | #include
11 | #include
12 | #include
13 | #include "core/debug.h"
14 | #include
15 | #include "core/threadsafe_queue.cpp"
16 |
17 | #ifdef __cplusplus
18 | extern "C" {
19 | #endif
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include "ffmpeg/libavfilter/avfiltergraph.h"
25 | #include "ffmpeg/libavfilter/buffersink.h"
26 | #include "ffmpeg/libavfilter/buffersrc.h"
27 | #include "ffmpeg/libavcodec/avcodec.h"
28 | #include "ffmpeg/libavformat/avformat.h"
29 | #include "ffmpeg/libavutil/opt.h"
30 | #include "ffmpeg/libavutil/avutil.h"
31 | #include "ffmpeg/libavutil/frame.h"
32 | #include "ffmpeg/libavutil/time.h"
33 | #include "ffmpeg/libavfilter/avfilter.h"
34 | #include "ffmpeg/libswscale/swscale.h"
35 | #include "ffmpeg/libavutil/pixfmt.h"
36 | #include "ffmpeg/libavutil/imgutils.h"
37 | #include "yuv/libyuv.h"
38 | #include "ffmpeg/libswresample/swresample.h"
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif
43 |
44 |
45 |
46 | #endif //NATIVEAPP_BASE_INCLUDE_H
47 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/AudioCapture.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/12/17.
3 | //
4 |
5 | #include "AudioCapture.h"
6 |
7 | AudioCapture::AudioCapture() {
8 |
9 | }
10 |
11 | AudioCapture::~AudioCapture() {
12 | if (NULL != audioEncodeArgs) {
13 | delete audioEncodeArgs;
14 | }
15 | }
16 |
17 | AudioCapture *AudioCapture::Get() {
18 | static AudioCapture audioCapture;
19 | return &audioCapture;
20 | }
21 |
22 | /**
23 | * 资源回收
24 | */
25 | int AudioCapture::Release() {
26 | LOG_D(DEBUG, "Release Audio Capture!");
27 | return 0;
28 | }
29 |
30 | /**
31 | *
32 | */
33 | bool AudioCapture::CloseCapture() {
34 | std::lock_guard lk(mut);
35 | if (!ExitCapture) {
36 | ExitCapture = true;
37 | LOG_D(DEBUG, "Close Audio Capture");
38 | }
39 | return ExitCapture;
40 | }
41 |
42 |
43 | bool AudioCapture::StartCapture() {
44 | std::lock_guard lk(mut);
45 | ExitCapture = false;
46 | LOG_D(DEBUG, "Start Audio Capture");
47 | return !ExitCapture;
48 | }
49 |
50 |
51 | void AudioCapture::SetAudioEncodeArgs(AudioEncodeArgs *audioEncodeArgs) {
52 | this->audioEncodeArgs = audioEncodeArgs;
53 | }
54 |
55 | AudioEncodeArgs *AudioCapture::GetAudioEncodeArgs() {
56 | return this->audioEncodeArgs;
57 | }
58 |
59 | bool AudioCapture::GetCaptureState() {
60 | return ExitCapture;
61 | }
62 |
63 | /**
64 | * 往除列添加音频原数据
65 | */
66 | int AudioCapture::PushAudioData(OriginData *originData) {
67 | if (ExitCapture) {
68 | return 0;
69 | }
70 | originData->pts = av_gettime();
71 | LOG_D(DEBUG,"audio capture pts :%lld",originData->pts);
72 | audioCaputureframeQueue.push(originData);
73 | return 0;
74 | }
75 |
76 | OriginData *AudioCapture::GetAudioData() {
77 | if (ExitCapture) {
78 | return NULL;
79 | }
80 | if (audioCaputureframeQueue.empty()) {
81 | return NULL;
82 | } else {
83 | const shared_ptr &ptr = audioCaputureframeQueue.try_pop();
84 | return NULL == ptr ? NULL : *ptr.get();
85 | }
86 | }
87 |
88 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/AudioCapture.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/12/17.
3 | //
4 |
5 |
6 | #ifndef NATIVEAPP_AUDIOCAPTURE_H
7 | #define NATIVEAPP_AUDIOCAPTURE_H
8 |
9 | #include
10 | #include "MediaCapture.h"
11 | #include "../PrefixHeader.h"
12 |
13 | using namespace std;
14 |
15 | /**
16 | * 音频数据接收
17 | */
18 | class AudioCapture : public MediaCapture {
19 |
20 | private:
21 | AudioCapture();
22 |
23 | AudioEncodeArgs *audioEncodeArgs = NULL;
24 | public :
25 | ~AudioCapture();
26 |
27 | // list AudioCaptureDatalist;
28 |
29 | threadsafe_queue audioCaputureframeQueue;
30 |
31 | static AudioCapture *Get();
32 |
33 | bool CloseCapture();
34 |
35 | bool StartCapture();
36 |
37 | int Release();
38 |
39 | int PushAudioData(OriginData *originData);
40 |
41 | OriginData *GetAudioData();
42 | /**
43 | * 设置编码参数
44 | */
45 | void SetAudioEncodeArgs(AudioEncodeArgs *audioEncodeArgs);
46 |
47 | AudioEncodeArgs *GetAudioEncodeArgs();
48 |
49 | /**
50 | * 获取音频采集状态
51 | */
52 | bool GetCaptureState();
53 |
54 |
55 |
56 | };
57 |
58 | #endif //NATIVEAPP_AUDIOCAPTURE_H
59 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/AudioEncodeArgs.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/13/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_AUDIOENCODEARGS_H
6 | #define NATIVEAPP_AUDIOENCODEARGS_H
7 |
8 | #include
9 | #include
10 | #include
11 | #include "../PrefixHeader.h"
12 | using namespace std;
13 | struct AudioEncodeArgs{
14 | int channels;
15 | AVSampleFormat avSampleFormat;
16 | int ch_layout=AV_CH_LAYOUT_STEREO;
17 | int sampleRate;
18 | int bitRate;
19 | int nb_samples;
20 | };
21 |
22 | #endif //NATIVEAPP_AUDIOENCODEARGS_H
23 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/AudioEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/13/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_AUDIOENCODER_H
6 | #define NATIVEAPP_AUDIOENCODER_H
7 |
8 | #include "MediaEncoder.h"
9 | #include "AudioCapture.h"
10 | #include
11 |
12 | using namespace std;
13 |
14 | class AudioEncoder : public MediaEncoder {
15 |
16 | private:
17 | AudioCapture *audioCapture = NULL;
18 |
19 | public:
20 | AVCodec *avCodec = NULL;
21 | AVStream *outStream = NULL;
22 | AVFrame *outputFrame = NULL;
23 | AVCodecContext *audioCodecContext = NULL;
24 | AVPacket audioPacket = {0};
25 |
26 |
27 | static AudioEncoder *Get();
28 |
29 |
30 | bool isEncoding = false;
31 |
32 | static void *EncodeTask(void *p);
33 |
34 | /**
35 | * 音频已编码数据队列
36 | */
37 | threadsafe_queue aframeQueue;
38 |
39 |
40 | // list AudioDatalist;
41 |
42 | AudioEncoder();
43 |
44 | ~AudioEncoder();
45 |
46 | /**
47 | * 开启编码
48 | */
49 | int StartEncode();
50 |
51 | /**
52 | * 初始化视频编码器
53 | */
54 | int InitEncode();
55 |
56 | /**
57 | * 关闭编码器
58 | */
59 | int CloseEncode();
60 |
61 |
62 | int EncodeAAC(OriginData **originData);
63 |
64 | /**
65 | * 资源回收
66 | */
67 | int Release();
68 |
69 | /**
70 | * 设置数据采集
71 | */
72 | void SetAudioCapture(AudioCapture *audioCapture);
73 |
74 | AudioCapture *GetAudioCapture();
75 |
76 | /**
77 | * 获取编码器状态
78 | */
79 | bool GetEncodeState();
80 | };
81 |
82 |
83 | #endif //NATIVEAPP_AUDIOENCODER_H
84 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/CombineVideoHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 12/4/17.
3 | //
4 |
5 | #ifndef MEDIAPLUS_COMBINEVIDEOHELPER_H
6 | #define MEDIAPLUS_COMBINEVIDEOHELPER_H
7 |
8 | #include "../PrefixHeader.h"
9 |
10 | #define RGBRound(a) a>255?255:a<0?0:a
11 |
12 |
13 | struct WaterMarkConfig {
14 |
15 | ~WaterMarkConfig() {
16 | if (waterByteData) {
17 | free(waterByteData);
18 | }
19 | }
20 |
21 | unsigned char enable;
22 |
23 | int frameWidth = 0;
24 | int frameHeight = 0;
25 | int x = 0;
26 | int y = 0;
27 | int waterWidth = 0;
28 | int waterHeight = 0;
29 | uint8_t *waterByteData = nullptr;
30 | };
31 |
32 | class CombineVideoHelper {
33 |
34 |
35 | private:
36 | WaterMarkConfig *waterMarkConfig = nullptr;
37 |
38 | CombineVideoHelper();
39 |
40 | public:
41 | ~CombineVideoHelper();
42 |
43 | static CombineVideoHelper *Instance();
44 |
45 |
46 | int CombineWaterMark(uint8_t *dst, uint8_t *&src);
47 |
48 | void SetWaterMarkConfig(WaterMarkConfig *&waterMarkConfig);
49 |
50 | };
51 |
52 | #endif //MEDIAPLUS_COMBINEVIDEOHELPER_H
53 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/DrawTextFilter.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/28/17.
3 | //
4 |
5 | #include "DrawTextFilter.h"
6 |
7 | DrawTextFilter::~DrawTextFilter() {
8 |
9 | }
10 |
11 | DrawTextFilter::DrawTextFilter(const char *fontFilePath, const char *context, int *x, int *y)
12 | : MediaFilter() {
13 | this->mContext = context;
14 | this->x = x;
15 | this->y = y;
16 | this->fontFilePath = fontFilePath;
17 | LOG_D(DEBUG, "set draw text filter fontFile:%s context:%s x=%d,y=%d", this->fontFilePath,
18 | this->mContext, *this->x, *this->y);
19 | }
20 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/DrawTextFilter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/28/17.
3 | //
4 |
5 | #include "MediaFilter.h"
6 |
7 |
8 | #ifndef MEDIAPLUS_DRAWTEXTFILTER_H
9 | #define MEDIAPLUS_DRAWTEXTFILTER_H
10 |
11 | class DrawTextFilter : public MediaFilter {
12 |
13 |
14 | public:
15 | DrawTextFilter(const char *fontFilePath, const char *context, int *x, int *y);
16 |
17 | ~DrawTextFilter();
18 |
19 | int *x = nullptr;
20 | int *y = nullptr;
21 | const char *mContext = nullptr;
22 | const char *fontFilePath = nullptr;
23 | };
24 |
25 | #endif //MEDIAPLUS_DRAWTEXTFILTER_H
26 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/FilterFactory.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/28/17.
3 | //
4 |
5 | #include "FilterFactory.h"
6 |
7 |
8 | FilterFactory::FilterFactory() {
9 |
10 | }
11 |
12 | FilterFactory::~FilterFactory() {
13 |
14 | }
15 |
16 | FilterFactory *FilterFactory::Get() {
17 | static FilterFactory filterFactory;
18 | return &filterFactory;
19 | }
20 |
21 | DrawTextFilter *FilterFactory::createDrawTextFilter(const char *fontPath,const char *context, int *x, int *y) {
22 | std::lock_guard lk(mut);
23 | return new DrawTextFilter(fontPath,context, x, y);
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/FilterFactory.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/28/17.
3 | //
4 |
5 | #include "MediaFilter.h"
6 | #include "DrawTextFilter.h"
7 |
8 | #ifndef MEDIAPLUS_FILTERFACTORY_H
9 | #define MEDIAPLUS_FILTERFACTORY_H
10 |
11 | class FilterFactory {
12 | private:
13 | FilterFactory();
14 |
15 | public:
16 | ~FilterFactory();
17 |
18 | mutable mutex mut;
19 |
20 | static FilterFactory *Get();
21 |
22 | DrawTextFilter *createDrawTextFilter(const char *fontPath, const char *context, int *x, int *y);
23 |
24 | };
25 |
26 | #endif //MEDIAPLUS_FILTERFACTORY_H
27 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/FilterType.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/28/17.
3 | //
4 |
5 | #ifndef MEDIAPLUS_FILTERTYPE_H
6 | #define MEDIAPLUS_FILTERTYPE_H
7 | enum FilterType{
8 | DRAWTEXT,//文字
9 | WATER_MARK,//图片水印
10 | };
11 |
12 | #endif //MEDIAPLUS_FILTERTYPE_H
13 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/MediaCapture.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/12/17.
3 | //
4 |
5 | #include "MediaCapture.h"
6 |
7 | MediaCapture::MediaCapture() {
8 |
9 | }
10 |
11 | MediaCapture::~MediaCapture() {
12 |
13 | }
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/MediaCapture.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/12/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_MEDIACAPTURE_H
6 | #define NATIVEAPP_MEDIACAPTURE_H
7 |
8 | #include "threadsafe_queue.cpp"
9 | #include "OriginData.h"
10 | #include "debug.h"
11 | #include "../PrefixHeader.h"
12 |
13 | class MediaCapture {
14 |
15 | protected:
16 |
17 | mutable mutex mut;
18 |
19 | MediaCapture();
20 |
21 | virtual ~MediaCapture();
22 |
23 | virtual bool CloseCapture() = 0;
24 |
25 | virtual int Release() = 0;
26 |
27 | bool ExitCapture;
28 | public:
29 |
30 | };
31 |
32 | #endif //NATIVEAPP_MEDIACAPTURE_H
33 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/MediaEncoder.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/13/17.
3 | //
4 |
5 | #include "MediaEncoder.h"
6 |
7 | bool MediaEncoder::first = true;
8 |
9 | MediaEncoder::MediaEncoder() {
10 | RegisterAVCodec();
11 | }
12 |
13 | MediaEncoder::~MediaEncoder() {
14 |
15 | }
16 |
17 | /**
18 | * 注册公用编码器并初始化网络
19 | */
20 | void MediaEncoder::RegisterAVCodec() {
21 | //一次初始化
22 | if (first) {
23 | first = false;
24 | av_register_all();
25 | avfilter_register_all();//
26 | RegisterAVNetwork();
27 | LOG_D(DEBUG, "MediaEncoder av_register_all success!");
28 | LOG_D(DEBUG, "MediaEncoder avformat_network_init success!");
29 | }
30 | return;
31 | }
32 |
33 | void MediaEncoder::RegisterAVNetwork() {
34 | avformat_network_init();
35 | return;
36 | }
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/MediaEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/13/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_MEDIAENCODER_H
6 | #define NATIVEAPP_MEDIAENCODER_H
7 |
8 | #include "../PrefixHeader.h"
9 | #include "debug.h"
10 |
11 | class MediaEncoder {
12 | protected:
13 |
14 | mutable mutex mut;
15 |
16 | MediaEncoder();
17 |
18 | virtual ~MediaEncoder();
19 |
20 | void RegisterAVCodec();
21 |
22 | void RegisterAVNetwork();
23 |
24 | virtual int StartEncode() = 0;
25 |
26 | virtual int InitEncode() = 0;
27 |
28 | virtual int CloseEncode() = 0;
29 |
30 | virtual int Release() = 0;
31 |
32 | static bool first;
33 |
34 |
35 | };
36 |
37 |
38 | #endif //NATIVEAPP_MEDIAENCODER_H
39 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/MediaFilter.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/28/17.
3 | //
4 |
5 | #include "MediaFilter.h"
6 |
7 | MediaFilter::MediaFilter() {
8 |
9 | }
10 |
11 | MediaFilter::~MediaFilter() {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/MediaFilter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/28/17.
3 | //
4 |
5 | #include "FilterType.h"
6 | #include "../PrefixHeader.h"
7 | #ifndef MEDIAPLUS_MEDIAFILTER_H
8 | #define MEDIAPLUS_MEDIAFILTER_H
9 |
10 | class MediaFilter{
11 |
12 | public:
13 | MediaFilter();
14 | virtual ~MediaFilter();
15 |
16 | //mutable mutex mut;
17 | };
18 |
19 | #endif //MEDIAPLUS_MEDIAFILTER_H
20 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/MediaStreamer.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/14/17.
3 | //
4 |
5 | #include "MediaStreamer.h"
6 | MediaStreamer::MediaStreamer() {
7 |
8 | }
9 |
10 | MediaStreamer::~MediaStreamer() {
11 |
12 | }
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/MediaStreamer.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/14/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_MEDIARTMPSTREAMER_H
6 | #define NATIVEAPP_MEDIARTMPSTREAMER_H
7 |
8 | #include "MediaEncoder.h"
9 | #include "AudioEncoder.h"
10 | #include "../PrefixHeader.h"
11 | #include "VideoEncoder.h"
12 | #include "debug.h"
13 |
14 | class MediaStreamer {
15 |
16 | protected:
17 | MediaStreamer();
18 |
19 |
20 | mutable std::mutex mut;
21 | mutable std::mutex mut1;
22 | mutable std::mutex mut2;
23 |
24 | AudioEncoder *audioEncoder = NULL;
25 | VideoEncoder *videoEncoder = NULL;
26 |
27 | AVStream *audioStream = NULL;
28 | AVStream *videoStream = NULL;
29 |
30 | AVCodecContext *audioCodecContext = NULL;
31 | AVCodecContext *videoCodecContext = NULL;
32 | AVFormatContext *iAvFormatContext = NULL;
33 |
34 |
35 | int videoStreamIndex = -1;
36 | int audioStreamIndex = -1;
37 |
38 | const char *outputUrl = NULL;
39 |
40 | bool isPushStream=false;
41 |
42 | ~MediaStreamer();
43 |
44 | /**
45 | * 初始化推流器
46 | */
47 | virtual int InitStreamer(const char *url) = 0;
48 |
49 | /**
50 | * 设置推流音频编码器,用于获取已编码数据
51 | */
52 | virtual int SetAudioEncoder(AudioEncoder *audioEncoder) = 0;
53 |
54 | /**
55 | * 设置推流视频编码器,用于获取已编码数据
56 | */
57 | virtual int SetVideoEncoder(VideoEncoder *videoEncoder) = 0;
58 |
59 | /**
60 | * 添加音视频流
61 | */
62 | virtual int AddStream(AVCodecContext *avCodecContext) = 0;
63 |
64 | /**
65 | * 开始推流
66 | */
67 | virtual int StartPushStream() = 0;
68 |
69 | /**
70 | * 关闭推流
71 | */
72 | virtual int ClosePushStream() = 0;
73 | };
74 |
75 | #endif //NATIVEAPP_MEDIARTMPSTREAMER_H
76 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/NativeCrashHandler.h:
--------------------------------------------------------------------------------
1 | #ifndef __NATIVE_CRASH_HANDLER__
2 | #define __NATIVE_CRASH_HANDLER__
3 |
4 | #include
5 |
6 | #ifdef __cplusplus
7 | extern "C" {
8 | #endif
9 |
10 | //void nativeCrashHandler_onLoad(JavaVM* jvm);
11 | jint JNI_OnLoad(JavaVM *vm, void *reserved);
12 |
13 | void makeNativeCrashReport(const char *reason);
14 |
15 | //extern char * (*crash_data_getter)();
16 |
17 | void __nativeCrashHandler_stack_call(const char *file, int line);
18 |
19 | void __nativeCrashHandler_stack_push(const char *mtd, const char *file, int line);
20 |
21 | void __nativeCrashHandler_stack_pop();
22 |
23 | #ifndef NDEBUG
24 | #define native_stack_start __nativeCrashHandler_stack_push(__func__, __FILE__, __LINE__)
25 | #define native_stack_end __nativeCrashHandler_stack_pop()
26 | #define native_stack_call __nativeCrashHandler_stack_call(__FILE__, __LINE__)
27 | #else
28 | #define native_stack_start
29 | #define native_stack_end
30 | #define native_stack_call
31 | #endif
32 |
33 | #ifdef __cplusplus
34 | }
35 | #endif
36 |
37 | #endif // !__NATIVE_CRASH_HANDLER__
38 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/OriginData.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/12/17.
3 | //
4 |
5 | #include "OriginData.h"
6 |
7 | OriginData::OriginData() {
8 |
9 | }
10 |
11 | OriginData::~OriginData() {
12 |
13 | }
14 |
15 | void OriginData::Drop() {
16 | if (data) {
17 | free(data);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/OriginData.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/12/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_ORIGINDATA_H
6 | #define NATIVEAPP_ORIGINDATA_H
7 |
8 | #include
9 | #include "../PrefixHeader.h"
10 |
11 | using namespace std;
12 |
13 | class OriginData {
14 | public:
15 | OriginData();
16 |
17 | ~OriginData();
18 |
19 | int64_t pts=0;
20 | AVFrame *frame = NULL;
21 | AVPacket *avPacket = NULL;
22 | uint8_t *data = NULL;
23 | int size=NULL;
24 | void Drop();
25 |
26 | };
27 |
28 | #endif //NATIVEAPP_ORIGINDATA_H
29 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/RtmpStreamer.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/14/17.
3 | //
4 |
5 | #include "MediaStreamer.h"
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | #ifndef NATIVEAPP_RTMPSTREAMER_H
13 | #define NATIVEAPP_RTMPSTREAMER_H
14 |
15 | using namespace std;
16 |
17 | /**
18 | * Rtmp推流器
19 | */
20 | class RtmpStreamer : public MediaStreamer {
21 |
22 | private:
23 | RtmpStreamer();
24 |
25 |
26 | public:
27 | ~RtmpStreamer();
28 |
29 | bool writeHeadFinish=false;
30 |
31 | pthread_t t1;
32 | pthread_t t2;
33 | pthread_t t3;
34 |
35 | static RtmpStreamer *Get();
36 |
37 | static void *PushAudioStreamTask(void *pObj);
38 |
39 | static void *PushVideoStreamTask(void *pObj);
40 |
41 | static void *PushStreamTask(void *pObj);
42 |
43 | static void *WriteHead(void *pObj);
44 |
45 | int InitStreamer(const char *url);
46 |
47 | /**
48 | * 设置音频编码器
49 | */
50 | int SetAudioEncoder(AudioEncoder *audioEncoder);
51 |
52 | /**
53 | * 设置视频编码器
54 | */
55 | int SetVideoEncoder(VideoEncoder *videoEncoder);
56 |
57 | /**
58 | * 添加音视频流
59 | */
60 | int AddStream(AVCodecContext *avCodecContext);
61 |
62 | /**
63 | * 写入头
64 | */
65 |
66 |
67 | /**
68 | * 开启推流
69 | */
70 | int StartPushStream();
71 |
72 | /**
73 | * 关闭推流
74 | */
75 | int ClosePushStream();
76 |
77 | int SendAudioFrame(OriginData *originData, int streamIndex);
78 |
79 | int SendVideoFrame(OriginData *originData, int streamIndex);
80 |
81 | int SendFrame(OriginData *pData, int i);
82 | };
83 |
84 | #endif //NATIVEAPP_RTMPSTREAMER_H
85 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/StringUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/28/17.
3 | //
4 |
5 | #ifndef MEDIAPLUS_STRINGUTILS_H
6 | #define MEDIAPLUS_STRINGUTILS_H
7 |
8 | #ifdef __cplusplus
9 | extern "C" {
10 | #endif
11 |
12 | #include
13 | #include
14 |
15 |
16 | #ifdef __cplusplus
17 | }
18 | #endif
19 |
20 | #endif //MEDIAPLUS_STRINGUTILS_H
21 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/VideoCapture.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/12/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_VIDEOCAPTURE_H
6 | #define NATIVEAPP_VIDEOCAPTURE_H
7 |
8 | #include
9 | #include "MediaCapture.h"
10 | #include "../PrefixHeader.h"
11 | using namespace std;
12 |
13 |
14 | /**
15 | * 视频数据接收
16 | */
17 | class VideoCapture : public MediaCapture {
18 |
19 | private:
20 | VideoCapture();
21 |
22 | VideoEncodeArgs *videoEncodeArgs = NULL;
23 | public:
24 | ~VideoCapture();
25 |
26 | static VideoCapture *Get();
27 |
28 | bool CloseCapture();
29 |
30 | bool StartCapture();
31 |
32 | int Release();
33 |
34 | int PushVideoData(OriginData *originData);
35 |
36 | void SetCameraID(CameraID cameraID);
37 |
38 | CameraID GetCameraID();
39 |
40 | OriginData *GetVideoData();
41 |
42 |
43 | CameraID mCameraId;
44 |
45 |
46 | /**
47 | * 设置编码参数
48 | */
49 | void SetVideoEncodeArgs(VideoEncodeArgs *videoEncodeArgs);
50 |
51 | VideoEncodeArgs *GetVideoEncodeArgs();
52 |
53 |
54 | // list VideoCaptureDatalist;
55 |
56 | threadsafe_queue videoCaputureframeQueue;
57 | /**
58 | * 获取视频采集状态
59 | */
60 | bool GetCaptureState();
61 |
62 | /**
63 | * nv21源数据处理(旋转)
64 | */
65 | uint8_t *NV21ProcessYUV420P(int in_width, int in_height, int out_width, int out_heigth,
66 | uint8_t *src, uint8_t *dst, CameraID cameraID, int needMirror);
67 |
68 | bool enableWaterMark;
69 | };
70 |
71 | #endif //NATIVEAPP_VIDEOCAPTURE_H
72 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/VideoEncodeArgs.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/13/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_VIDEOENCODEARGS_H
6 | #define NATIVEAPP_VIDEOENCODEARGS_H
7 |
8 | #include
9 | using namespace std;
10 | struct VideoEncodeArgs{
11 |
12 | int in_width;
13 | int in_height;
14 | int out_width;
15 | int out_height;
16 | int mirror;
17 | int fps;
18 |
19 | };
20 |
21 | #endif //NATIVEAPP_VIDEOENCODEARGS_H
22 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/VideoProcess.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/16/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_VIDEOPROCESS_H
6 | #define NATIVEAPP_VIDEOPROCESS_H
7 |
8 |
9 | #import "../PrefixHeader.h"
10 | using namespace libyuv;
11 |
12 | /**
13 | * YUV色彩空间处理
14 | */
15 |
16 | class VideoProcess {
17 | public:
18 |
19 | /**
20 | * android camera data NV21 convert to I420
21 | */
22 | static int NV21TOI420(int in_width, int in_hegith,
23 | const uint8_t *srcData,
24 | uint8_t *dstData);
25 |
26 | /**
27 | * mirror I420
28 | */
29 | static int MirrorI420(int in_width, int in_hegith,
30 | const uint8_t *srcData,
31 | uint8_t *dstData);
32 |
33 | /**
34 | * rotate I420 by RotationMode
35 | */
36 | static int RotateI420(int in_width, int in_hegith,
37 | const uint8_t *srcData,
38 | uint8_t *dstData, int rotationMode);
39 |
40 | };
41 |
42 | #endif //NATIVEAPP_LIBVIDEOPROCESS_H
43 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/debug.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 8/17/17.
3 | //
4 |
5 | #include "debug.h"
6 |
7 |
8 | int DEBUG=0;
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/core/debug.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 8/17/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_JNI_DEBUG_H
6 | #define NATIVEAPP_JNI_DEBUG_H
7 |
8 |
9 | #include
10 |
11 | extern int DEBUG;
12 |
13 | #define LOG_E(debug, format, ...) if(debug){__android_log_print(ANDROID_LOG_ERROR, "ffmpeg_native", format, ##__VA_ARGS__);}
14 |
15 | #define LOG_I(debug, format, ...) if(debug){__android_log_print(ANDROID_LOG_INFO, "ffmpeg_native", format, ##__VA_ARGS__);}
16 |
17 | #define LOG_D(debug, format, ...) if(debug){__android_log_print(ANDROID_LOG_DEBUG, "ffmpeg_native", format, ##__VA_ARGS__);}
18 |
19 |
20 | #endif //NATIVEAPP_JNI_DEBUG_H
21 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/event/EventBus.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014, Dan Quist
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | #include "EventBus.hpp"
24 |
25 | // Declare the static instance since this can't be done in the header file
26 | EventBus* EventBus::instance = nullptr;
27 |
28 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/event/HandlerRegistration.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014, Dan Quist
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | #ifndef _SRC_EVENT_HANDLER_REGISTRATION_HPP_
24 | #define _SRC_EVENT_HANDLER_REGISTRATION_HPP_
25 |
26 | #include "Object.hpp"
27 |
28 | /**
29 | * \brief Interface that that allows event handlers to be removed from the EventBus
30 | */
31 | class HandlerRegistration : public Object {
32 | public:
33 | virtual ~HandlerRegistration() { }
34 |
35 | virtual void removeHandler() = 0;
36 | };
37 |
38 | #endif /* _SRC_EVENT_HANDLER_REGISTRATION_HPP_ */
39 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/event/Object.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014, Dan Quist
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | #ifndef _SRC_EVENT_OBJECT_HPP_
24 | #define _SRC_EVENT_OBJECT_HPP_
25 |
26 | /**
27 | * \brief Root class of the type hierarchy
28 | *
29 | * All events and event handlers derive from this class
30 | */
31 | class Object {
32 | public:
33 | /**
34 | * \brief Default empty constructor
35 | */
36 | Object() { }
37 |
38 |
39 | /**
40 | * Empty virtual destructor
41 | */
42 | virtual ~Object() { }
43 |
44 |
45 | /**
46 | * Default empty copy constructor
47 | * @param other The instance to copy from
48 | */
49 | Object (const Object& other) { }
50 | };
51 |
52 | #endif /* _SRC_EVENT_OBJECT_HPP_ */
53 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/event/PlayerChatEvent.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014, Dan Quist
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | #ifndef _SRC_EVENT_PLAYER_CHAT_EVENT_HPP_
24 | #define _SRC_EVENT_PLAYER_CHAT_EVENT_HPP_
25 |
26 | #include "Event.hpp"
27 | #include "Player.hpp"
28 |
29 | #include
30 |
31 | class PlayerChatEvent : public Event
32 | {
33 | public:
34 | PlayerChatEvent(Object & sender, Player & player, std::string const & msg) :
35 | Event(sender),
36 | player(player),
37 | msg(msg) {
38 | }
39 |
40 | virtual ~PlayerChatEvent() { }
41 |
42 | Player & getPlayer() {
43 | return player;
44 | }
45 |
46 | std::string const & getMessage() {
47 | return msg;
48 | }
49 |
50 | private:
51 | Player & player;
52 | std::string const & msg;
53 |
54 | };
55 |
56 | #endif /* _SRC_EVENT_PLAYER_CHAT_EVENT_HPP_ */
57 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/event/PlayerMoveEvent.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014, Dan Quist
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | #ifndef _SRC_EVENT_PLAYER_MOVE_EVENT_HPP_
24 | #define _SRC_EVENT_PLAYER_MOVE_EVENT_HPP_
25 |
26 | #include "Event.hpp"
27 | #include "Player.hpp"
28 |
29 | #include
30 |
31 | /**
32 | * \brief Example event class to showcase some of the features of the EventBus
33 | *
34 | * This is not part of the core functionality and can be modified or deleted as desired
35 | */
36 | class PlayerMoveEvent : public Event
37 | {
38 | public:
39 | PlayerMoveEvent(Object & sender, Player & player, int oldX, int oldY, int oldZ) :
40 | Event(sender),
41 | player(player),
42 | oldX(oldX),
43 | oldY(oldY),
44 | oldZ(oldZ) {
45 | }
46 |
47 | virtual ~PlayerMoveEvent() { }
48 |
49 | Player & getPlayer() {
50 | return player;
51 | }
52 |
53 | int getOldX() {
54 | return oldX;
55 | }
56 |
57 | int getOldY() {
58 | return oldY;
59 | }
60 |
61 | int getOldZ() {
62 | return oldZ;
63 | }
64 |
65 | private:
66 | Player & player;
67 |
68 | int oldX;
69 | int oldY;
70 | int oldZ;
71 |
72 | };
73 |
74 | #endif /* _SRC_EVENT_PLAYER_MOVE_EVENT_HPP_ */
75 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavcodec/jni.h:
--------------------------------------------------------------------------------
1 | /*
2 | * JNI public API functions
3 | *
4 | * Copyright (c) 2015-2016 Matthieu Bouron
5 | *
6 | * This file is part of FFmpeg.
7 | *
8 | * FFmpeg is free software; you can redistribute it and/or
9 | * modify it under the terms of the GNU Lesser General Public
10 | * License as published by the Free Software Foundation; either
11 | * version 2.1 of the License, or (at your option) any later version.
12 | *
13 | * FFmpeg is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | * Lesser General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Lesser General Public
19 | * License along with FFmpeg; if not, write to the Free Software
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 | */
22 |
23 | #ifndef AVCODEC_JNI_H
24 | #define AVCODEC_JNI_H
25 |
26 | /*
27 | * Manually set a Java virtual machine which will be used to retrieve the JNI
28 | * environment. Once a Java VM is set it cannot be changed afterwards, meaning
29 | * you can call multiple times av_jni_set_java_vm with the same Java VM pointer
30 | * however it will error out if you try to set a different Java VM.
31 | *
32 | * @param vm Java virtual machine
33 | * @param log_ctx context used for logging, can be NULL
34 | * @return 0 on success, < 0 otherwise
35 | */
36 | int av_jni_set_java_vm(void *vm, void *log_ctx);
37 |
38 | /*
39 | * Get the Java virtual machine which has been set with av_jni_set_java_vm.
40 | *
41 | * @param vm Java virtual machine
42 | * @return a pointer to the Java virtual machine
43 | */
44 | void *av_jni_get_java_vm(void *log_ctx);
45 |
46 | #endif /* AVCODEC_JNI_H */
47 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavdevice/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVDEVICE_VERSION_H
20 | #define AVDEVICE_VERSION_H
21 |
22 | /**
23 | * @file
24 | * @ingroup lavd
25 | * Libavdevice version macros
26 | */
27 |
28 | #include "libavutil/version.h"
29 |
30 | #define LIBAVDEVICE_VERSION_MAJOR 57
31 | #define LIBAVDEVICE_VERSION_MINOR 6
32 | #define LIBAVDEVICE_VERSION_MICRO 100
33 |
34 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
35 | LIBAVDEVICE_VERSION_MINOR, \
36 | LIBAVDEVICE_VERSION_MICRO)
37 | #define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \
38 | LIBAVDEVICE_VERSION_MINOR, \
39 | LIBAVDEVICE_VERSION_MICRO)
40 | #define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT
41 |
42 | #define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION)
43 |
44 | /**
45 | * FF_API_* defines may be placed below to indicate public API that will be
46 | * dropped at a future version bump. The defines themselves are not part of
47 | * the public API and may change, break or disappear at any time.
48 | */
49 |
50 | #endif /* AVDEVICE_VERSION_H */
51 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavfilter/avfiltergraph.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Filter graphs
3 | * copyright (c) 2007 Bobby Bingham
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVFILTER_AVFILTERGRAPH_H
23 | #define AVFILTER_AVFILTERGRAPH_H
24 |
25 | #include "avfilter.h"
26 | #include "libavutil/log.h"
27 |
28 | #endif /* AVFILTER_AVFILTERGRAPH_H */
29 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/adler32.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Mans Rullgard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | /**
22 | * @file
23 | * @ingroup lavu_adler32
24 | * Public header for Adler-32 hash function implementation.
25 | */
26 |
27 | #ifndef AVUTIL_ADLER32_H
28 | #define AVUTIL_ADLER32_H
29 |
30 | #include
31 | #include "attributes.h"
32 |
33 | /**
34 | * @defgroup lavu_adler32 Adler-32
35 | * @ingroup lavu_hash
36 | * Adler-32 hash function implementation.
37 | *
38 | * @{
39 | */
40 |
41 | /**
42 | * Calculate the Adler32 checksum of a buffer.
43 | *
44 | * Passing the return value to a subsequent av_adler32_update() call
45 | * allows the checksum of multiple buffers to be calculated as though
46 | * they were concatenated.
47 | *
48 | * @param adler initial checksum value
49 | * @param buf pointer to input buffer
50 | * @param len size of input buffer
51 | * @return updated checksum
52 | */
53 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
54 | unsigned int len) av_pure;
55 |
56 | /**
57 | * @}
58 | */
59 |
60 | #endif /* AVUTIL_ADLER32_H */
61 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/aes.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2007 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_AES_H
22 | #define AVUTIL_AES_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_aes AES
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_aes_size;
36 |
37 | struct AVAES;
38 |
39 | /**
40 | * Allocate an AVAES context.
41 | */
42 | struct AVAES *av_aes_alloc(void);
43 |
44 | /**
45 | * Initialize an AVAES context.
46 | * @param key_bits 128, 192 or 256
47 | * @param decrypt 0 for encryption, 1 for decryption
48 | */
49 | int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt);
50 |
51 | /**
52 | * Encrypt or decrypt a buffer using a previously initialized context.
53 | * @param count number of 16 byte blocks
54 | * @param dst destination array, can be equal to src
55 | * @param src source array, can be equal to dst
56 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used
57 | * @param decrypt 0 for encryption, 1 for decryption
58 | */
59 | void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
60 |
61 | /**
62 | * @}
63 | */
64 |
65 | #endif /* AVUTIL_AES_H */
66 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/avconfig.h:
--------------------------------------------------------------------------------
1 | /* Generated by ffconf */
2 | #ifndef AVUTIL_AVCONFIG_H
3 | #define AVUTIL_AVCONFIG_H
4 | #define AV_HAVE_BIGENDIAN 0
5 | #define AV_HAVE_FAST_UNALIGNED 0
6 | #endif /* AVUTIL_AVCONFIG_H */
7 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/ffversion.h:
--------------------------------------------------------------------------------
1 | /* Automatically generated by version.sh, do not manually edit! */
2 | #ifndef AVUTIL_FFVERSION_H
3 | #define AVUTIL_FFVERSION_H
4 | #define FFMPEG_VERSION "7861716"
5 | #endif /* AVUTIL_FFVERSION_H */
6 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/hwcontext_cuda.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 |
20 | #ifndef AVUTIL_HWCONTEXT_CUDA_H
21 | #define AVUTIL_HWCONTEXT_CUDA_H
22 |
23 | #ifndef CUDA_VERSION
24 | #include
25 | #endif
26 |
27 | #include "pixfmt.h"
28 |
29 | /**
30 | * @file
31 | * An API-specific header for AV_HWDEVICE_TYPE_CUDA.
32 | *
33 | * This API supports dynamic frame pools. AVHWFramesContext.pool must return
34 | * AVBufferRefs whose data pointer is a CUdeviceptr.
35 | */
36 |
37 | typedef struct AVCUDADeviceContextInternal AVCUDADeviceContextInternal;
38 |
39 | /**
40 | * This struct is allocated as AVHWDeviceContext.hwctx
41 | */
42 | typedef struct AVCUDADeviceContext {
43 | CUcontext cuda_ctx;
44 | AVCUDADeviceContextInternal *internal;
45 | } AVCUDADeviceContext;
46 |
47 | /**
48 | * AVHWFramesContext.hwctx is currently not used
49 | */
50 |
51 | #endif /* AVUTIL_HWCONTEXT_CUDA_H */
52 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/hwcontext_qsv.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_HWCONTEXT_QSV_H
20 | #define AVUTIL_HWCONTEXT_QSV_H
21 |
22 | #include
23 |
24 | /**
25 | * @file
26 | * An API-specific header for AV_HWDEVICE_TYPE_QSV.
27 | *
28 | * This API does not support dynamic frame pools. AVHWFramesContext.pool must
29 | * contain AVBufferRefs whose data pointer points to an mfxFrameSurface1 struct.
30 | */
31 |
32 | /**
33 | * This struct is allocated as AVHWDeviceContext.hwctx
34 | */
35 | typedef struct AVQSVDeviceContext {
36 | mfxSession session;
37 | } AVQSVDeviceContext;
38 |
39 | /**
40 | * This struct is allocated as AVHWFramesContext.hwctx
41 | */
42 | typedef struct AVQSVFramesContext {
43 | mfxFrameSurface1 *surfaces;
44 | int nb_surfaces;
45 |
46 | /**
47 | * A combination of MFX_MEMTYPE_* describing the frame pool.
48 | */
49 | int frame_type;
50 | } AVQSVFramesContext;
51 |
52 | #endif /* AVUTIL_HWCONTEXT_QSV_H */
53 |
54 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/hwcontext_vdpau.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_HWCONTEXT_VDPAU_H
20 | #define AVUTIL_HWCONTEXT_VDPAU_H
21 |
22 | #include
23 |
24 | /**
25 | * @file
26 | * An API-specific header for AV_HWDEVICE_TYPE_VDPAU.
27 | *
28 | * This API supports dynamic frame pools. AVHWFramesContext.pool must return
29 | * AVBufferRefs whose data pointer is a VdpVideoSurface.
30 | */
31 |
32 | /**
33 | * This struct is allocated as AVHWDeviceContext.hwctx
34 | */
35 | typedef struct AVVDPAUDeviceContext {
36 | VdpDevice device;
37 | VdpGetProcAddress *get_proc_address;
38 | } AVVDPAUDeviceContext;
39 |
40 | /**
41 | * AVHWFramesContext.hwctx is currently not used
42 | */
43 |
44 | #endif /* AVUTIL_HWCONTEXT_VDPAU_H */
45 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/intfloat.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2011 Mans Rullgard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_INTFLOAT_H
22 | #define AVUTIL_INTFLOAT_H
23 |
24 | #include
25 | #include "attributes.h"
26 |
27 | union av_intfloat32 {
28 | uint32_t i;
29 | float f;
30 | };
31 |
32 | union av_intfloat64 {
33 | uint64_t i;
34 | double f;
35 | };
36 |
37 | /**
38 | * Reinterpret a 32-bit integer as a float.
39 | */
40 | static av_always_inline float av_int2float(uint32_t i)
41 | {
42 | union av_intfloat32 v;
43 | v.i = i;
44 | return v.f;
45 | }
46 |
47 | /**
48 | * Reinterpret a float as a 32-bit integer.
49 | */
50 | static av_always_inline uint32_t av_float2int(float f)
51 | {
52 | union av_intfloat32 v;
53 | v.f = f;
54 | return v.i;
55 | }
56 |
57 | /**
58 | * Reinterpret a 64-bit integer as a double.
59 | */
60 | static av_always_inline double av_int2double(uint64_t i)
61 | {
62 | union av_intfloat64 v;
63 | v.i = i;
64 | return v.f;
65 | }
66 |
67 | /**
68 | * Reinterpret a double as a 64-bit integer.
69 | */
70 | static av_always_inline uint64_t av_double2int(double f)
71 | {
72 | union av_intfloat64 v;
73 | v.f = f;
74 | return v.i;
75 | }
76 |
77 | #endif /* AVUTIL_INTFLOAT_H */
78 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/macros.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | /**
20 | * @file
21 | * @ingroup lavu
22 | * Utility Preprocessor macros
23 | */
24 |
25 | #ifndef AVUTIL_MACROS_H
26 | #define AVUTIL_MACROS_H
27 |
28 | /**
29 | * @addtogroup preproc_misc Preprocessor String Macros
30 | *
31 | * String manipulation macros
32 | *
33 | * @{
34 | */
35 |
36 | #define AV_STRINGIFY(s) AV_TOSTRING(s)
37 | #define AV_TOSTRING(s) #s
38 |
39 | #define AV_GLUE(a, b) a ## b
40 | #define AV_JOIN(a, b) AV_GLUE(a, b)
41 |
42 | /**
43 | * @}
44 | */
45 |
46 | #define AV_PRAGMA(s) _Pragma(#s)
47 |
48 | #define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1))
49 |
50 | #endif /* AVUTIL_MACROS_H */
51 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/motion_vector.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_MOTION_VECTOR_H
20 | #define AVUTIL_MOTION_VECTOR_H
21 |
22 | #include
23 |
24 | typedef struct AVMotionVector {
25 | /**
26 | * Where the current macroblock comes from; negative value when it comes
27 | * from the past, positive value when it comes from the future.
28 | * XXX: set exact relative ref frame reference instead of a +/- 1 "direction".
29 | */
30 | int32_t source;
31 | /**
32 | * Width and height of the block.
33 | */
34 | uint8_t w, h;
35 | /**
36 | * Absolute source position. Can be outside the frame area.
37 | */
38 | int16_t src_x, src_y;
39 | /**
40 | * Absolute destination position. Can be outside the frame area.
41 | */
42 | int16_t dst_x, dst_y;
43 | /**
44 | * Extra flag information.
45 | * Currently unused.
46 | */
47 | uint64_t flags;
48 | /**
49 | * Motion vector
50 | * src_x = dst_x + motion_x / motion_scale
51 | * src_y = dst_y + motion_y / motion_scale
52 | */
53 | int32_t motion_x, motion_y;
54 | uint16_t motion_scale;
55 | } AVMotionVector;
56 |
57 | #endif /* AVUTIL_MOTION_VECTOR_H */
58 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/pixelutils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_PIXELUTILS_H
20 | #define AVUTIL_PIXELUTILS_H
21 |
22 | #include
23 | #include
24 | #include "common.h"
25 |
26 | /**
27 | * Sum of abs(src1[x] - src2[x])
28 | */
29 | typedef int (*av_pixelutils_sad_fn)(const uint8_t *src1, ptrdiff_t stride1,
30 | const uint8_t *src2, ptrdiff_t stride2);
31 |
32 | /**
33 | * Get a potentially optimized pointer to a Sum-of-absolute-differences
34 | * function (see the av_pixelutils_sad_fn prototype).
35 | *
36 | * @param w_bits 1<
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_RANDOM_SEED_H
22 | #define AVUTIL_RANDOM_SEED_H
23 |
24 | #include
25 | /**
26 | * @addtogroup lavu_crypto
27 | * @{
28 | */
29 |
30 | /**
31 | * Get a seed to use in conjunction with random functions.
32 | * This function tries to provide a good seed at a best effort bases.
33 | * Its possible to call this function multiple times if more bits are needed.
34 | * It can be quite slow, which is why it should only be used as seed for a faster
35 | * PRNG. The quality of the seed depends on the platform.
36 | */
37 | uint32_t av_get_random_seed(void);
38 |
39 | /**
40 | * @}
41 | */
42 |
43 | #endif /* AVUTIL_RANDOM_SEED_H */
44 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/rc4.h:
--------------------------------------------------------------------------------
1 | /*
2 | * RC4 encryption/decryption/pseudo-random number generator
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_RC4_H
22 | #define AVUTIL_RC4_H
23 |
24 | #include
25 |
26 | /**
27 | * @defgroup lavu_rc4 RC4
28 | * @ingroup lavu_crypto
29 | * @{
30 | */
31 |
32 | typedef struct AVRC4 {
33 | uint8_t state[256];
34 | int x, y;
35 | } AVRC4;
36 |
37 | /**
38 | * Allocate an AVRC4 context.
39 | */
40 | AVRC4 *av_rc4_alloc(void);
41 |
42 | /**
43 | * @brief Initializes an AVRC4 context.
44 | *
45 | * @param key_bits must be a multiple of 8
46 | * @param decrypt 0 for encryption, 1 for decryption, currently has no effect
47 | * @return zero on success, negative value otherwise
48 | */
49 | int av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt);
50 |
51 | /**
52 | * @brief Encrypts / decrypts using the RC4 algorithm.
53 | *
54 | * @param count number of bytes
55 | * @param dst destination array, can be equal to src
56 | * @param src source array, can be equal to dst, may be NULL
57 | * @param iv not (yet) used for RC4, should be NULL
58 | * @param decrypt 0 for encryption, 1 for decryption, not (yet) used
59 | */
60 | void av_rc4_crypt(struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | #endif /* AVUTIL_RC4_H */
67 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/replaygain.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_REPLAYGAIN_H
20 | #define AVUTIL_REPLAYGAIN_H
21 |
22 | #include
23 |
24 | /**
25 | * ReplayGain information (see
26 | * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).
27 | * The size of this struct is a part of the public ABI.
28 | */
29 | typedef struct AVReplayGain {
30 | /**
31 | * Track replay gain in microbels (divide by 100000 to get the value in dB).
32 | * Should be set to INT32_MIN when unknown.
33 | */
34 | int32_t track_gain;
35 | /**
36 | * Peak track amplitude, with 100000 representing full scale (but values
37 | * may overflow). 0 when unknown.
38 | */
39 | uint32_t track_peak;
40 | /**
41 | * Same as track_gain, but for the whole album.
42 | */
43 | int32_t album_gain;
44 | /**
45 | * Same as track_peak, but for the whole album,
46 | */
47 | uint32_t album_peak;
48 | } AVReplayGain;
49 |
50 | #endif /* AVUTIL_REPLAYGAIN_H */
51 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libavutil/time.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000-2003 Fabrice Bellard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_TIME_H
22 | #define AVUTIL_TIME_H
23 |
24 | #include
25 |
26 | /**
27 | * Get the current time in microseconds.
28 | */
29 | int64_t av_gettime(void);
30 |
31 | /**
32 | * Get the current time in microseconds since some unspecified starting point.
33 | * On platforms that support it, the time comes from a monotonic clock
34 | * This property makes this time source ideal for measuring relative time.
35 | * The returned values may not be monotonic on platforms where a monotonic
36 | * clock is not available.
37 | */
38 | int64_t av_gettime_relative(void);
39 |
40 | /**
41 | * Indicates with a boolean result if the av_gettime_relative() time source
42 | * is monotonic.
43 | */
44 | int av_gettime_relative_is_monotonic(void);
45 |
46 | /**
47 | * Sleep for a period of time. Although the duration is expressed in
48 | * microseconds, the actual delay may be rounded to the precision of the
49 | * system timer.
50 | *
51 | * @param usec Number of microseconds to sleep.
52 | * @return zero on success or (negative) error code.
53 | */
54 | int av_usleep(unsigned usec);
55 |
56 | #endif /* AVUTIL_TIME_H */
57 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libpostproc/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef POSTPROC_VERSION_H
22 | #define POSTPROC_VERSION_H
23 |
24 | /**
25 | * @file
26 | * Libpostproc version macros
27 | */
28 |
29 | #include "libavutil/avutil.h"
30 |
31 | #define LIBPOSTPROC_VERSION_MAJOR 54
32 | #define LIBPOSTPROC_VERSION_MINOR 5
33 | #define LIBPOSTPROC_VERSION_MICRO 100
34 |
35 | #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
36 | LIBPOSTPROC_VERSION_MINOR, \
37 | LIBPOSTPROC_VERSION_MICRO)
38 | #define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \
39 | LIBPOSTPROC_VERSION_MINOR, \
40 | LIBPOSTPROC_VERSION_MICRO)
41 | #define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT
42 |
43 | #define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION)
44 |
45 | #ifndef FF_API_QP_TYPE
46 | #define FF_API_QP_TYPE (LIBPOSTPROC_VERSION_MAJOR < 55)
47 | #endif
48 |
49 | #endif /* POSTPROC_VERSION_H */
50 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libswresample/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of libswresample
5 | *
6 | * libswresample is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * libswresample is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with libswresample; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef SWRESAMPLE_VERSION_H
22 | #define SWRESAMPLE_VERSION_H
23 |
24 | /**
25 | * @file
26 | * Libswresample version macros
27 | */
28 |
29 | #include "libavutil/avutil.h"
30 |
31 | #define LIBSWRESAMPLE_VERSION_MAJOR 2
32 | #define LIBSWRESAMPLE_VERSION_MINOR 7
33 | #define LIBSWRESAMPLE_VERSION_MICRO 100
34 |
35 | #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
36 | LIBSWRESAMPLE_VERSION_MINOR, \
37 | LIBSWRESAMPLE_VERSION_MICRO)
38 | #define LIBSWRESAMPLE_VERSION AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \
39 | LIBSWRESAMPLE_VERSION_MINOR, \
40 | LIBSWRESAMPLE_VERSION_MICRO)
41 | #define LIBSWRESAMPLE_BUILD LIBSWRESAMPLE_VERSION_INT
42 |
43 | #define LIBSWRESAMPLE_IDENT "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION)
44 |
45 | #endif /* SWRESAMPLE_VERSION_H */
46 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/libswscale/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef SWSCALE_VERSION_H
20 | #define SWSCALE_VERSION_H
21 |
22 | /**
23 | * @file
24 | * swscale version macros
25 | */
26 |
27 | #include "libavutil/version.h"
28 |
29 | #define LIBSWSCALE_VERSION_MAJOR 4
30 | #define LIBSWSCALE_VERSION_MINOR 6
31 | #define LIBSWSCALE_VERSION_MICRO 100
32 |
33 | #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
34 | LIBSWSCALE_VERSION_MINOR, \
35 | LIBSWSCALE_VERSION_MICRO)
36 | #define LIBSWSCALE_VERSION AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \
37 | LIBSWSCALE_VERSION_MINOR, \
38 | LIBSWSCALE_VERSION_MICRO)
39 | #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT
40 |
41 | #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION)
42 |
43 | /**
44 | * FF_API_* defines may be placed below to indicate public API that will be
45 | * dropped at a future version bump. The defines themselves are not part of
46 | * the public API and may change, break or disappear at any time.
47 | */
48 |
49 | #ifndef FF_API_SWS_VECTOR
50 | #define FF_API_SWS_VECTOR (LIBSWSCALE_VERSION_MAJOR < 6)
51 | #endif
52 |
53 | #endif /* SWSCALE_VERSION_H */
54 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_clipboard.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file SDL_clipboard.h
24 | *
25 | * Include file for SDL clipboard handling
26 | */
27 |
28 | #ifndef _SDL_clipboard_h
29 | #define _SDL_clipboard_h
30 |
31 | #include "SDL_stdinc.h"
32 |
33 | #include "begin_code.h"
34 | /* Set up for C function definitions, even when using C++ */
35 | #ifdef __cplusplus
36 | extern "C" {
37 | #endif
38 |
39 | /* Function prototypes */
40 |
41 | /**
42 | * \brief Put UTF-8 text into the clipboard
43 | *
44 | * \sa SDL_GetClipboardText()
45 | */
46 | extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
47 |
48 | /**
49 | * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()
50 | *
51 | * \sa SDL_SetClipboardText()
52 | */
53 | extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
54 |
55 | /**
56 | * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty
57 | *
58 | * \sa SDL_GetClipboardText()
59 | */
60 | extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
61 |
62 |
63 | /* Ends C function definitions when using C++ */
64 | #ifdef __cplusplus
65 | }
66 | #endif
67 | #include "close_code.h"
68 |
69 | #endif /* _SDL_clipboard_h */
70 |
71 | /* vi: set ts=4 sw=4 expandtab: */
72 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_config.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | #ifndef _SDL_config_h
23 | #define _SDL_config_h
24 |
25 | #include "SDL_platform.h"
26 |
27 | /**
28 | * \file SDL_config.h
29 | */
30 |
31 | /* Add any platform that doesn't build using the configure system. */
32 | #ifdef USING_PREMAKE_CONFIG_H
33 | #include "SDL_config_premake.h"
34 | #elif defined(__WIN32__)
35 | #include "SDL_config_windows.h"
36 | #elif defined(__WINRT__)
37 | #include "SDL_config_winrt.h"
38 | #elif defined(__MACOSX__)
39 | #include "SDL_config_macosx.h"
40 | #elif defined(__IPHONEOS__)
41 | #include "SDL_config_iphoneos.h"
42 | #elif defined(__ANDROID__)
43 | #include "SDL_config_android.h"
44 | #elif defined(__PSP__)
45 | #include "SDL_config_psp.h"
46 | #else
47 | /* This is a minimal configuration just to get SDL running on new platforms */
48 | #include "SDL_config_minimal.h"
49 | #endif /* platform config */
50 |
51 | #ifdef USING_GENERATED_CONFIG_H
52 | #error Wrong SDL_config.h, check your include path?
53 | #endif
54 |
55 | #endif /* _SDL_config_h */
56 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_copying.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_name.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | #ifndef _SDLname_h_
23 | #define _SDLname_h_
24 |
25 | #if defined(__STDC__) || defined(__cplusplus)
26 | #define NeedFunctionPrototypes 1
27 | #endif
28 |
29 | #define SDL_NAME(X) SDL_##X
30 |
31 | #endif /* _SDLname_h_ */
32 |
33 | /* vi: set ts=4 sw=4 expandtab: */
34 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_opengles.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file SDL_opengles.h
24 | *
25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers.
26 | */
27 | #include "SDL_config.h"
28 |
29 | #ifdef __IPHONEOS__
30 | #include
31 | #include
32 | #else
33 | #include
34 | #include
35 | #endif
36 |
37 | #ifndef APIENTRY
38 | #define APIENTRY
39 | #endif
40 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_opengles2.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file SDL_opengles2.h
24 | *
25 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
26 | */
27 | #include "SDL_config.h"
28 |
29 | #ifndef _MSC_VER
30 |
31 | #ifdef __IPHONEOS__
32 | #include
33 | #include
34 | #else
35 | #include
36 | #include
37 | #include
38 | #endif
39 |
40 | #else /* _MSC_VER */
41 |
42 | /* OpenGL ES2 headers for Visual Studio */
43 | #include "SDL_opengles2_khrplatform.h"
44 | #include "SDL_opengles2_gl2platform.h"
45 | #include "SDL_opengles2_gl2.h"
46 | #include "SDL_opengles2_gl2ext.h"
47 |
48 | #endif /* _MSC_VER */
49 |
50 | #ifndef APIENTRY
51 | #define APIENTRY GL_APIENTRY
52 | #endif
53 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_opengles2_gl2platform.h:
--------------------------------------------------------------------------------
1 | #ifndef __gl2platform_h_
2 | #define __gl2platform_h_
3 |
4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
5 |
6 | /*
7 | * This document is licensed under the SGI Free Software B License Version
8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
9 | */
10 |
11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
12 | *
13 | * Adopters may modify khrplatform.h and this file to suit their platform.
14 | * You are encouraged to submit all modifications to the Khronos group so that
15 | * they can be included in future versions of this file. Please submit changes
16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
17 | * by filing a bug against product "OpenGL-ES" component "Registry".
18 | */
19 |
20 | /*#include */
21 |
22 | #ifndef GL_APICALL
23 | #define GL_APICALL KHRONOS_APICALL
24 | #endif
25 |
26 | #ifndef GL_APIENTRY
27 | #define GL_APIENTRY KHRONOS_APIENTRY
28 | #endif
29 |
30 | #endif /* __gl2platform_h_ */
31 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_revision.h:
--------------------------------------------------------------------------------
1 | #define SDL_REVISION "hg-10556:007dfe83abf8"
2 | #define SDL_REVISION_NUMBER 10556
3 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file SDL_test.h
24 | *
25 | * Include file for SDL test framework.
26 | *
27 | * This code is a part of the SDL2_test library, not the main SDL library.
28 | */
29 |
30 | #ifndef _SDL_test_h
31 | #define _SDL_test_h
32 |
33 | #include "SDL.h"
34 | #include "SDL_test_common.h"
35 | #include "SDL_test_font.h"
36 | #include "SDL_test_random.h"
37 | #include "SDL_test_fuzzer.h"
38 | #include "SDL_test_crc32.h"
39 | #include "SDL_test_md5.h"
40 | #include "SDL_test_log.h"
41 | #include "SDL_test_assert.h"
42 | #include "SDL_test_harness.h"
43 | #include "SDL_test_images.h"
44 | #include "SDL_test_compare.h"
45 |
46 | #include "begin_code.h"
47 | /* Set up for C function definitions, even when using C++ */
48 | #ifdef __cplusplus
49 | extern "C" {
50 | #endif
51 |
52 | /* Global definitions */
53 |
54 | /*
55 | * Note: Maximum size of SDLTest log message is less than SDL's limit
56 | * to ensure we can fit additional information such as the timestamp.
57 | */
58 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584
59 |
60 | /* Ends C function definitions when using C++ */
61 | #ifdef __cplusplus
62 | }
63 | #endif
64 | #include "close_code.h"
65 |
66 | #endif /* _SDL_test_h */
67 |
68 | /* vi: set ts=4 sw=4 expandtab: */
69 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_test_log.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file SDL_test_log.h
24 | *
25 | * Include file for SDL test framework.
26 | *
27 | * This code is a part of the SDL2_test library, not the main SDL library.
28 | */
29 |
30 | /*
31 | *
32 | * Wrapper to log in the TEST category
33 | *
34 | */
35 |
36 | #ifndef _SDL_test_log_h
37 | #define _SDL_test_log_h
38 |
39 | #include "begin_code.h"
40 | /* Set up for C function definitions, even when using C++ */
41 | #ifdef __cplusplus
42 | extern "C" {
43 | #endif
44 |
45 | /**
46 | * \brief Prints given message with a timestamp in the TEST category and INFO priority.
47 | *
48 | * \param fmt Message to be logged
49 | */
50 | void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
51 |
52 | /**
53 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority.
54 | *
55 | * \param fmt Message to be logged
56 | */
57 | void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
58 |
59 | /* Ends C function definitions when using C++ */
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 | #include "close_code.h"
64 |
65 | #endif /* _SDL_test_log_h */
66 |
67 | /* vi: set ts=4 sw=4 expandtab: */
68 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/SDL_types.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file SDL_types.h
24 | *
25 | * \deprecated
26 | */
27 |
28 | /* DEPRECATED */
29 | #include "SDL_stdinc.h"
30 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/ffmpeg/sdl2/close_code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file close_code.h
24 | *
25 | * This file reverses the effects of begin_code.h and should be included
26 | * after you finish any function and structure declarations in your headers
27 | */
28 |
29 | #undef _begin_code_h
30 |
31 | /* Reset structure packing at previous byte alignment */
32 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__)
33 | #ifdef __BORLANDC__
34 | #pragma nopackwarning
35 | #endif
36 | #pragma pack(pop)
37 | #endif /* Compiler needs structure packing set */
38 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/jni/Jni_Live_Manage.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/12/17.
3 | //
4 | /**
5 | * JNI 底层推流
6 | */
7 | #ifndef NATIVEAPP_JNI_LIVE_MANAGE_H
8 | #define NATIVEAPP_JNI_LIVE_MANAGE_H
9 |
10 | #include "../core/VideoCapture.h"
11 | #include "../core/AudioCapture.h"
12 | #include "../PrefixHeader.h"
13 | #include "../core/VideoEncoder.h"
14 | #include "../core/AudioEncoder.h"
15 | #include "../core/RtmpStreamer.h"
16 | #include "../core/AudioCapture.h"
17 | #include "../core/CombineVideoHelper.h"
18 |
19 | AudioCapture *audioCapture = NULL;
20 | VideoCapture *videoCapture = NULL;
21 |
22 | VideoEncoder *videoEncoder = NULL;
23 | AudioEncoder *audioEncoder = NULL;
24 |
25 | RtmpStreamer *rtmpStreamer=NULL;
26 |
27 | CombineVideoHelper *combineVideoHelper=NULL;
28 |
29 | /**
30 | * 初始化采集数据接收
31 | */
32 | bool audioCaptureInit=false;
33 | bool videoCaptureInit=false;
34 | bool isClose = true;
35 | bool isRelease = false;
36 | bool startStream;
37 |
38 | mutex mMutex;
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/jni/jni_Video_Process.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by developer on 11/16/17.
3 | //
4 |
5 | #ifndef NATIVEAPP_JNI_VIDEO_PROCESS_H
6 | #define NATIVEAPP_JNI_VIDEO_PROCESS_H
7 |
8 | #include "../PrefixHeader.h"
9 | #include "../core/VideoProcess.h"
10 |
11 |
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | using namespace cv;
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 |
24 |
25 |
26 | void CopyYUVToImage(uchar *dst, uint8_t *pY, uint8_t *pU, uint8_t *pV, int width, int height) {
27 | uint32_t size = width * height;
28 | memcpy(dst, pY, size);
29 | memcpy(dst + size, pU, size / 4);
30 | memcpy(dst + size + size / 4, pV, size / 4);
31 | }
32 |
33 | void CopyImageToYUV(uint8_t *pY, uint8_t *pU, uint8_t *pV, uchar *src, int width, int height) {
34 | uint32_t size = width * height;
35 | memcpy(pY, src, size);
36 | memcpy(pU, src + size, size / 4);
37 | memcpy(pV, src + size + size / 4, size / 4);
38 | }
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif
43 |
44 |
45 | #endif
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/opencv/opencv/cxmisc.h:
--------------------------------------------------------------------------------
1 | #ifndef OPENCV_OLD_CXMISC_H
2 | #define OPENCV_OLD_CXMISC_H
3 |
4 | #ifdef __cplusplus
5 | # include "opencv2/core/utility.hpp"
6 | #endif
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/opencv/opencv2/core/bufferpool.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 | //
5 | // Copyright (C) 2014, Advanced Micro Devices, Inc., all rights reserved.
6 |
7 | #ifndef OPENCV_CORE_BUFFER_POOL_HPP
8 | #define OPENCV_CORE_BUFFER_POOL_HPP
9 |
10 | #ifdef _MSC_VER
11 | #pragma warning(push)
12 | #pragma warning(disable: 4265)
13 | #endif
14 |
15 | namespace cv
16 | {
17 |
18 | //! @addtogroup core
19 | //! @{
20 |
21 | class BufferPoolController
22 | {
23 | protected:
24 | ~BufferPoolController() { }
25 | public:
26 | virtual size_t getReservedSize() const = 0;
27 | virtual size_t getMaxReservedSize() const = 0;
28 | virtual void setMaxReservedSize(size_t size) = 0;
29 | virtual void freeAllReservedBuffers() = 0;
30 | };
31 |
32 | //! @}
33 |
34 | }
35 |
36 | #ifdef _MSC_VER
37 | #pragma warning(pop)
38 | #endif
39 |
40 | #endif // OPENCV_CORE_BUFFER_POOL_HPP
41 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/opencv/opencv2/core/ovx.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | // Copyright (C) 2016, Intel Corporation, all rights reserved.
6 | // Third party copyrights are property of their respective owners.
7 |
8 | // OpenVX related definitions and declarations
9 |
10 | #pragma once
11 | #ifndef OPENCV_OVX_HPP
12 | #define OPENCV_OVX_HPP
13 |
14 | #include "cvdef.h"
15 |
16 | namespace cv
17 | {
18 | /// Check if use of OpenVX is possible
19 | CV_EXPORTS_W bool haveOpenVX();
20 |
21 | /// Check if use of OpenVX is enabled
22 | CV_EXPORTS_W bool useOpenVX();
23 |
24 | /// Enable/disable use of OpenVX
25 | CV_EXPORTS_W void setUseOpenVX(bool flag);
26 | } // namespace cv
27 |
28 | #endif // OPENCV_OVX_HPP
29 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/opencv/opencv2/flann/config.h:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | * Software License Agreement (BSD License)
3 | *
4 | * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
5 | * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions
9 | * are met:
10 | *
11 | * 1. Redistributions of source code must retain the above copyright
12 | * notice, this list of conditions and the following disclaimer.
13 | * 2. Redistributions in binary form must reproduce the above copyright
14 | * notice, this list of conditions and the following disclaimer in the
15 | * documentation and/or other materials provided with the distribution.
16 | *
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *************************************************************************/
28 |
29 |
30 | #ifndef OPENCV_FLANN_CONFIG_H_
31 | #define OPENCV_FLANN_CONFIG_H_
32 |
33 | #ifdef FLANN_VERSION_
34 | #undef FLANN_VERSION_
35 | #endif
36 | #define FLANN_VERSION_ "1.6.10"
37 |
38 | #endif /* OPENCV_FLANN_CONFIG_H_ */
39 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/opencv/opencv2/flann/dummy.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef OPENCV_FLANN_DUMMY_H_
3 | #define OPENCV_FLANN_DUMMY_H_
4 |
5 | namespace cvflann
6 | {
7 |
8 | #if (defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS
9 | __declspec(dllexport)
10 | #endif
11 | void dummyfunc();
12 |
13 | }
14 |
15 |
16 | #endif /* OPENCV_FLANN_DUMMY_H_ */
17 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/opencv/opencv2/flann/general.h:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | * Software License Agreement (BSD License)
3 | *
4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
6 | *
7 | * THE BSD LICENSE
8 | *
9 | * Redistribution and use in source and binary forms, with or without
10 | * modification, are permitted provided that the following conditions
11 | * are met:
12 | *
13 | * 1. Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * 2. Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | *
19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | *************************************************************************/
30 |
31 | #ifndef OPENCV_FLANN_GENERAL_H_
32 | #define OPENCV_FLANN_GENERAL_H_
33 |
34 | #include "opencv2/core.hpp"
35 |
36 | namespace cvflann
37 | {
38 |
39 | class FLANNException : public cv::Exception
40 | {
41 | public:
42 | FLANNException(const char* message) : cv::Exception(0, message, "", __FILE__, __LINE__) { }
43 |
44 | FLANNException(const cv::String& message) : cv::Exception(0, message, "", __FILE__, __LINE__) { }
45 | };
46 |
47 | }
48 |
49 |
50 | #endif /* OPENCV_FLANN_GENERAL_H_ */
51 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/opencv/opencv2/imgproc/hal/interface.h:
--------------------------------------------------------------------------------
1 | #ifndef OPENCV_IMGPROC_HAL_INTERFACE_H
2 | #define OPENCV_IMGPROC_HAL_INTERFACE_H
3 |
4 | //! @addtogroup imgproc_hal_interface
5 | //! @{
6 |
7 | //! @name Interpolation modes
8 | //! @sa cv::InterpolationFlags
9 | //! @{
10 | #define CV_HAL_INTER_NEAREST 0
11 | #define CV_HAL_INTER_LINEAR 1
12 | #define CV_HAL_INTER_CUBIC 2
13 | #define CV_HAL_INTER_AREA 3
14 | #define CV_HAL_INTER_LANCZOS4 4
15 | //! @}
16 |
17 | //! @name Morphology operations
18 | //! @sa cv::MorphTypes
19 | //! @{
20 | #define CV_HAL_MORPH_ERODE 0
21 | #define CV_HAL_MORPH_DILATE 1
22 | //! @}
23 |
24 | //! @}
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/opencv/opencv2/opencv_modules.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * ** File generated automatically, do not modify **
3 | *
4 | * This file defines the list of modules available in current build configuration
5 | *
6 | *
7 | */
8 |
9 | // This definition means that OpenCV is built with enabled non-free code.
10 | // For example, patented algorithms for non-profit/non-commercial use only.
11 | /* #undef OPENCV_ENABLE_NONFREE */
12 |
13 | #define HAVE_OPENCV_CALIB3D
14 | #define HAVE_OPENCV_CORE
15 | #define HAVE_OPENCV_DNN
16 | #define HAVE_OPENCV_FEATURES2D
17 | #define HAVE_OPENCV_FLANN
18 | #define HAVE_OPENCV_HIGHGUI
19 | #define HAVE_OPENCV_IMGCODECS
20 | #define HAVE_OPENCV_IMGPROC
21 | #define HAVE_OPENCV_ML
22 | #define HAVE_OPENCV_OBJDETECT
23 | #define HAVE_OPENCV_PHOTO
24 | #define HAVE_OPENCV_SHAPE
25 | #define HAVE_OPENCV_STITCHING
26 | #define HAVE_OPENCV_SUPERRES
27 | #define HAVE_OPENCV_VIDEO
28 | #define HAVE_OPENCV_VIDEOIO
29 | #define HAVE_OPENCV_VIDEOSTAB
30 |
31 |
32 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/yuv/libyuv.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_H_ // NOLINT
12 | #define INCLUDE_LIBYUV_H_
13 |
14 | #include "libyuv/basic_types.h"
15 | #include "libyuv/compare.h"
16 | #include "libyuv/convert.h"
17 | #include "libyuv/convert_argb.h"
18 | #include "libyuv/convert_from.h"
19 | #include "libyuv/convert_from_argb.h"
20 | #include "libyuv/cpu_id.h"
21 | #include "libyuv/mjpeg_decoder.h"
22 | #include "libyuv/planar_functions.h"
23 | #include "libyuv/rotate.h"
24 | #include "libyuv/rotate_argb.h"
25 | #include "libyuv/row.h"
26 | #include "libyuv/scale.h"
27 | #include "libyuv/scale_argb.h"
28 | #include "libyuv/scale_row.h"
29 | #include "libyuv/version.h"
30 | #include "libyuv/video_common.h"
31 |
32 | #endif // INCLUDE_LIBYUV_H_ NOLINT
33 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/yuv/libyuv/rotate_argb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ // NOLINT
12 | #define INCLUDE_LIBYUV_ROTATE_ARGB_H_
13 |
14 | #include "libyuv/basic_types.h"
15 | #include "libyuv/rotate.h" // For RotationMode.
16 |
17 | #ifdef __cplusplus
18 | namespace libyuv {
19 | extern "C" {
20 | #endif
21 |
22 | // Rotate ARGB frame
23 | LIBYUV_API
24 | int ARGBRotate(const uint8* src_argb, int src_stride_argb,
25 | uint8* dst_argb, int dst_stride_argb,
26 | int src_width, int src_height, enum RotationMode mode);
27 |
28 | #ifdef __cplusplus
29 | } // extern "C"
30 | } // namespace libyuv
31 | #endif
32 |
33 | #endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_ NOLINT
34 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/cpp/yuv/libyuv/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
12 | #define INCLUDE_LIBYUV_VERSION_H_
13 |
14 | #define LIBYUV_VERSION 1580
15 |
16 | #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
17 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/java/app/mobile/nativeapp/com/libmedia/core/config/VideoSizeConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libmedia.core.config;
29 |
30 | /**
31 | * Created by android on 10/31/17.
32 | */
33 |
34 | public class VideoSizeConfig {
35 |
36 |
37 | public short srcFrameWidth = 640;
38 | public short srcFrameHeight = 480;
39 |
40 |
41 | public short desWidth = 640;
42 | public short desHeight = 480;
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/java/app/mobile/nativeapp/com/libmedia/core/jni/FilterType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libmedia.core.jni;
29 |
30 | /**
31 | * 滤镜类型
32 | * Created by android on 11/12/17.
33 | */
34 | public enum FilterType {
35 | BEAUTY
36 | }
37 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/java/app/mobile/nativeapp/com/libmedia/core/nativehandler/NativeCrashActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libmedia.core.nativehandler;
29 |
30 | import android.app.Activity;
31 | import android.os.Bundle;
32 |
33 | /**
34 | * Shell M. Shrader - 1/17/16
35 | * https://github.com/SalomonBrys/__deprecated__Native-Crash-Handler
36 | * All Rights Reserved
37 | */
38 | public class NativeCrashActivity extends Activity {
39 | public NativeCrashActivity() {
40 | }
41 |
42 | protected void onCreate(Bundle savedInstanceState) {
43 | super.onCreate(savedInstanceState);
44 | NativeError e = (NativeError)this.getIntent().getSerializableExtra("error");
45 | throw e;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/java/app/mobile/nativeapp/com/libmedia/core/player/PlayerBase.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.anative.com.libmedia.core.player;
29 |
30 | /**
31 | * 播放器基类
32 | */
33 |
34 | public class PlayerBase {
35 | }
36 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/java/app/mobile/nativeapp/com/libmedia/core/streamer/PushBase.java:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * MIT License
4 | *
5 | * Copyright (c) 2017 Huawque
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all
15 | * copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | * SOFTWARE.
24 | *
25 | * @author:weichang
26 | * https://github.com/javandoc/MediaPlus
27 | */
28 |
29 | package app.mobile.nativeapp.com.libmedia.core.streamer;
30 |
31 | /**
32 | * 推流器基类
33 | */
34 |
35 | public abstract class PushBase {
36 |
37 | static {
38 | System.loadLibrary("Media");
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/java/app/mobile/nativeapp/com/libmedia/core/streamer/PushStreamCall.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libmedia.core.streamer;
29 |
30 | /**
31 | * 推流回调
32 | */
33 | public interface PushStreamCall {
34 |
35 | void PushSucess();
36 | void PushFailed();
37 | }
38 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/jniLibs/armeabi-v7a/libffmpeg.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/MediaPlus/libraries/libmedia/src/main/jniLibs/armeabi-v7a/libffmpeg.so
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/jniLibs/armeabi-v7a/libyuv.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/MediaPlus/libraries/libmedia/src/main/jniLibs/armeabi-v7a/libyuv.so
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LibMedia
3 |
4 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmedia/src/test/java/app/mobile/nativeapp/com/libmedia/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package app.mobile.nativeapp.com.libmedia;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmodule/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmodule/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 |
20 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmodule/src/androidTest/java/app/mobile/anative/com/libmodule/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.anative.com.libmodule;
29 |
30 | import android.content.Context;
31 | import android.support.test.InstrumentationRegistry;
32 | import android.support.test.runner.AndroidJUnit4;
33 |
34 | import org.junit.Test;
35 | import org.junit.runner.RunWith;
36 |
37 | import static org.junit.Assert.*;
38 |
39 | /**
40 | * Instrumentation test, which will execute on an Android device.
41 | *
42 | * @see Testing documentation
43 | */
44 | @RunWith(AndroidJUnit4.class)
45 | public class ExampleInstrumentedTest {
46 | @Test
47 | public void useAppContext() throws Exception {
48 | // Context of the app under test.
49 | Context appContext = InstrumentationRegistry.getTargetContext();
50 |
51 | assertEquals("app.mobile.anative.com.libmodule.test", appContext.getPackageName());
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmodule/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
27 |
28 |
30 |
31 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmodule/src/main/java/app/mobile/nativeapp/com/libmodule/database/DataBase.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.anative.com.libmodule.database;
29 |
30 | /**
31 | * Created by android on 10/19/17.
32 | */
33 |
34 | public class DataBase {
35 | }
36 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmodule/src/main/java/app/mobile/nativeapp/com/libmodule/mvp/MyDagger.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.anative.com.libmodule.mvp;
29 |
30 | /**
31 | * Created by android on 10/19/17.
32 | */
33 |
34 | public class MyDagger {
35 | }
36 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmodule/src/main/java/app/mobile/nativeapp/com/libmodule/net/NetManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.anative.com.libmodule.net;
29 |
30 | /**
31 | * Created by android on 10/19/17.
32 | */
33 |
34 | public class NetManager {
35 | }
36 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmodule/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
27 |
28 |
29 | LibModule
30 |
31 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmodule/src/test/java/app/mobile/nativeapp/com/libmodule/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libmodule;
29 |
30 | import org.junit.Test;
31 |
32 | import static org.junit.Assert.*;
33 |
34 | /**
35 | * Example local unit test, which will execute on the development machine (host).
36 | *
37 | * @see Testing documentation
38 | */
39 | public class ExampleUnitTest {
40 | @Test
41 | public void addition_isCorrect() throws Exception {
42 | assertEquals(4, 2 + 2);
43 | }
44 | }
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmvp/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmvp/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmvp/src/androidTest/java/app/mobile/nativeapp/com/libmvp/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libmvp;
29 |
30 | import android.content.Context;
31 | import android.support.test.InstrumentationRegistry;
32 | import android.support.test.runner.AndroidJUnit4;
33 |
34 | import org.junit.Test;
35 | import org.junit.runner.RunWith;
36 |
37 | import static org.junit.Assert.*;
38 |
39 | /**
40 | * Instrumentation test, which will execute on an Android device.
41 | *
42 | * @see Testing documentation
43 | */
44 | @RunWith(AndroidJUnit4.class)
45 | public class ExampleInstrumentedTest {
46 | @Test
47 | public void useAppContext() throws Exception {
48 | // Context of the app under test.
49 | Context appContext = InstrumentationRegistry.getTargetContext();
50 |
51 | assertEquals("app.mobile.nativeapp.com.libmvp.test", appContext.getPackageName());
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmvp/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
27 |
28 |
30 |
31 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmvp/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
27 |
28 |
29 | LibMvp
30 |
31 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libmvp/src/test/java/app/mobile/nativeapp/com/libmvp/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libmvp;
29 |
30 | import org.junit.Test;
31 |
32 | import static org.junit.Assert.*;
33 |
34 | /**
35 | * Example local unit test, which will execute on the development machine (host).
36 | *
37 | * @see Testing documentation
38 | */
39 | public class ExampleUnitTest {
40 | @Test
41 | public void addition_isCorrect() throws Exception {
42 | assertEquals(4, 2 + 2);
43 | }
44 | }
--------------------------------------------------------------------------------
/MediaPlus/libraries/libnet/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libnet/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libnet/src/androidTest/java/app/mobile/nativeapp/com/libnet/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libnet;
29 |
30 | import android.content.Context;
31 | import android.support.test.InstrumentationRegistry;
32 | import android.support.test.runner.AndroidJUnit4;
33 |
34 | import org.junit.Test;
35 | import org.junit.runner.RunWith;
36 |
37 | import static org.junit.Assert.*;
38 |
39 | /**
40 | * Instrumentation test, which will execute on an Android device.
41 | *
42 | * @see Testing documentation
43 | */
44 | @RunWith(AndroidJUnit4.class)
45 | public class ExampleInstrumentedTest {
46 | @Test
47 | public void useAppContext() throws Exception {
48 | // Context of the app under test.
49 | Context appContext = InstrumentationRegistry.getTargetContext();
50 |
51 | assertEquals("app.mobile.nativeapp.com.libnet.test", appContext.getPackageName());
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libnet/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
27 |
28 |
30 |
31 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libnet/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
27 |
28 |
29 | LibNet
30 |
31 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/libnet/src/test/java/app/mobile/nativeapp/com/libnet/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this app.mobile.nativeapp.com.applicationmanagement.permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package app.mobile.nativeapp.com.libnet;
29 |
30 | import org.junit.Test;
31 |
32 | import static org.junit.Assert.*;
33 |
34 | /**
35 | * Example local unit test, which will execute on the development machine (host).
36 | *
37 | * @see Testing documentation
38 | */
39 | public class ExampleUnitTest {
40 | @Test
41 | public void addition_isCorrect() throws Exception {
42 | assertEquals(4, 2 + 2);
43 | }
44 | }
--------------------------------------------------------------------------------
/MediaPlus/libraries/processor/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/processor/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | apply plugin: 'java'
29 |
30 | dependencies {
31 | compile fileTree(dir: 'libs', include: ['*.jar'])
32 | }
33 |
34 | sourceCompatibility = "1.7"
35 | targetCompatibility = "1.7"
36 |
--------------------------------------------------------------------------------
/MediaPlus/libraries/processor/src/main/java/com/nativeapp/processor/myprocessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2017 Huawque
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | *
24 | * @author:weichang
25 | * https://github.com/javandoc/MediaPlus
26 | */
27 |
28 | package com.nativeapp.processor;
29 |
30 | public class myprocessor {
31 | }
32 |
--------------------------------------------------------------------------------
/MediaPlus/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':libraries:libmedia', ':libraries:libmodule', ':libraries:libnet', ':libraries:libmvp', ':libraries:libdatabase', ':libraries:applicationmanagement', 'libraries:processor'
2 |
--------------------------------------------------------------------------------
/Resource/MediaPlus.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/Resource/MediaPlus.xmind
--------------------------------------------------------------------------------
/Resource/MediaPlus_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/Resource/MediaPlus_2.png
--------------------------------------------------------------------------------
/Resource/MediaPlus_xmind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/Resource/MediaPlus_xmind.png
--------------------------------------------------------------------------------
/Resource/app-debug1.0.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javandcpp/MediaPlus/8f58cbe6110e004ad9900a30e971e6f520f927c9/Resource/app-debug1.0.apk
--------------------------------------------------------------------------------
/Resource/camera.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Resource/javadoc/app/mobile/nativeapp/com/libmedia/core/config/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | app.mobile.nativeapp.com.libmedia.core.config
7 |
8 |
9 |
10 |
11 |
12 |