getCameraSize(Activity activity){
23 | return LiveRop.getInstance().build(activity).getCameraSize();
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/livecollector/src/main/java/com/dzm/collector/LiveEncodeListener.java:
--------------------------------------------------------------------------------
1 | package com.dzm.collector;
2 |
3 | import android.media.MediaCodec;
4 |
5 | import java.nio.ByteBuffer;
6 |
7 | /**
8 | * Created by 83642 on 2017/9/2.
9 | */
10 |
11 | public interface LiveEncodeListener {
12 |
13 | void videoToYuv420sp(byte[] yuv);
14 |
15 | void videoToHard(ByteBuffer bb, MediaCodec.BufferInfo info);
16 |
17 | void audioToHard(ByteBuffer bb, MediaCodec.BufferInfo info);
18 |
19 | void audioToSoft(byte[] data);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/livecollector/src/main/java/com/dzm/collector/LiveNativeInitListener.java:
--------------------------------------------------------------------------------
1 | package com.dzm.collector;
2 |
3 | /**
4 | * Created by 83642 on 2017/9/2.
5 | */
6 |
7 | public interface LiveNativeInitListener {
8 |
9 | void initNative(LiveBuild build);
10 |
11 | void releaseNative();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/livecollector/src/main/java/com/dzm/collector/LiveRopMain.java:
--------------------------------------------------------------------------------
1 | package com.dzm.collector;
2 |
3 | import android.view.SurfaceHolder;
4 |
5 | /**
6 | *
7 | * @author 邓治民
8 | * date 2017/8/29 9:37
9 | */
10 |
11 | public interface LiveRopMain {
12 |
13 | LiveRopMain setEncodeListener(LiveEncodeListener encodeListener);
14 |
15 |
16 | LiveRopMain setBitrate(int bitrate);
17 |
18 | LiveRopMain setFps(int fps);
19 |
20 | LiveRopMain setVideoEncodeType(VideoEncodeType videoEncodeType);
21 |
22 | LiveRopMain setRtmpUrl(String rtmpUrl);
23 |
24 | LiveRopMain setVideoWidth(int videoWidth);
25 |
26 | LiveRopMain setVideoHeight(int videoHeight);
27 |
28 | LiveRopMain setHolder(SurfaceHolder holder);
29 |
30 | void initEncode();
31 |
32 | void startEncode();
33 |
34 | void releaseEncode();
35 | }
36 |
--------------------------------------------------------------------------------
/livecollector/src/main/java/com/dzm/collector/VideoEncodeType.java:
--------------------------------------------------------------------------------
1 | package com.dzm.collector;
2 |
3 | /**
4 | * Created by 83642 on 2017/8/29.
5 | */
6 |
7 | public enum VideoEncodeType {
8 |
9 | SOFT,HARD
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/livecollector/src/main/java/com/dzm/collector/Yuv420Util.java:
--------------------------------------------------------------------------------
1 | package com.dzm.collector;
2 |
3 | /**
4 | * Created by blueberry on 1/5/2017.
5 | */
6 |
7 | public class Yuv420Util {
8 | /**
9 | * Nv21:
10 | * YYYYYYYY
11 | * YYYYYYYY
12 | * YYYYYYYY
13 | * YYYYYYYY
14 | * VUVU
15 | * VUVU
16 | * VUVU
17 | * VUVU
18 | *
19 | * I420:
20 | * YYYYYYYY
21 | * YYYYYYYY
22 | * YYYYYYYY
23 | * YYYYYYYY
24 | * UUUU
25 | * UUUU
26 | * VVVV
27 | * VVVV
28 | *
29 | * @param data Nv21数据
30 | * @param dstData I420(YUV420)数据
31 | * @param w 宽度
32 | * @param h 长度
33 | */
34 | public static void Nv21ToI420(byte[] data, byte[] dstData, int w, int h) {
35 |
36 | int size = w * h;
37 | // Y
38 | System.arraycopy(data, 0, dstData, 0, size);
39 | for (int i = 0; i < size / 4; i++) {
40 | dstData[size + i] = data[size + i * 2 + 1]; //U
41 | dstData[size + size / 4 + i] = data[size + i * 2]; //V
42 | }
43 | }
44 |
45 | /**
46 | * 将Nv21数据转换为Yuv420SP数据
47 | * @param data Nv21数据
48 | * @param dstData Yuv420sp数据
49 | * @param w 宽度
50 | * @param h 高度
51 | */
52 | public static void Nv21ToYuv420SP(byte[] data, byte[] dstData, int w, int h) {
53 | int size = w * h;
54 | // Y
55 | System.arraycopy(data, 0, dstData, 0, size);
56 |
57 | for (int i = 0; i < size / 4; i++) {
58 | dstData[size + i * 2] = data[size + i * 2 + 1]; //U
59 | dstData[size + i * 2 + 1] = data[size + i * 2]; //V
60 | }
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/livecollector/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LiveCollector
3 |
4 |
--------------------------------------------------------------------------------
/livecollector/src/test/java/com/dzm/collector/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.dzm.collector;
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 | * @see Testing documentation
10 | */
11 | public class ExampleUnitTest {
12 | @Test
13 | public void addition_isCorrect() throws Exception {
14 | assertEquals(4, 2 + 2);
15 | }
16 | }
--------------------------------------------------------------------------------
/liveffmpeg/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/liveffmpeg/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Sets the minimum version of CMake required to build the native
2 | # library. You should either keep the default value or only pass a
3 | # value of 3.4.0 or lower.
4 |
5 | cmake_minimum_required(VERSION 3.4.1)
6 |
7 | #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fpermissive -std=c++11 -D__STDC_CONSTANT_MACROS -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT="" -UHAVE_CONFIG_H ")
8 | #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2 -DSYS=posix -DNO_CRYPTO")
9 |
10 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
11 |
12 | set(main_path ${CMAKE_SOURCE_DIR}/src/main/cpp)
13 | file(GLOB cpp_path ${main_path}/*.cpp)
14 |
15 | find_library(log-lib log )
16 |
17 |
18 | #
19 | add_library(avcodec SHARED IMPORTED)
20 | set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ../../../../libs/armeabi-v7a/libavcodec-56.so)
21 |
22 | add_library(avdevice SHARED IMPORTED)
23 | set_target_properties(avdevice PROPERTIES IMPORTED_LOCATION ../../../../libs/armeabi-v7a/libavdevice-56.so)
24 |
25 | #
26 | add_library(avfilter SHARED IMPORTED)
27 | set_target_properties(avfilter PROPERTIES IMPORTED_LOCATION ../../../../libs/armeabi-v7a/libavfilter-5.so)
28 |
29 | #
30 | add_library(avformat SHARED IMPORTED)
31 | set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ../../../../libs/armeabi-v7a/libavformat-56.so)
32 |
33 | #
34 | add_library(avutil SHARED IMPORTED)
35 | set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ../../../../libs/armeabi-v7a/libavutil-54.so)
36 |
37 | #
38 | add_library(postproc SHARED IMPORTED)
39 | set_target_properties(postproc PROPERTIES IMPORTED_LOCATION ../../../../libs/armeabi-v7a/libpostproc-53.so)
40 |
41 | #
42 | add_library(swresample SHARED IMPORTED)
43 | set_target_properties(swresample PROPERTIES IMPORTED_LOCATION ../../../../libs/armeabi-v7a/libswresample-1.so)
44 |
45 | #
46 | add_library(swscale SHARED IMPORTED)
47 | set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ../../../../libs/armeabi-v7a/libswscale-3.so)
48 |
49 | add_library(native-lib SHARED ${cpp_path} )
50 | add_library(ffmpeg-lib STATIC src/main/cpp/native-lib.cpp src/main/cpp/Stream.cpp)
51 | target_link_libraries(ffmpeg-lib)
52 | target_link_libraries(native-lib avcodec avdevice avfilter avformat avutil postproc swresample swscale ffmpeg-lib ${log-lib} )
53 |
54 | include_directories(${main_path}/include ${main_path})
55 |
56 |
--------------------------------------------------------------------------------
/liveffmpeg/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 |
7 | defaultConfig {
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 |
13 | externalNativeBuild {
14 | cmake {
15 | cppFlags "-fexceptions"
16 | abiFilters "armeabi-v7a"
17 | arguments "-DANDROID_PLATFORM=android-9"
18 | }
19 | }
20 |
21 | ndk {
22 | abiFilters "armeabi-v7a"
23 | }
24 |
25 | }
26 | buildTypes {
27 | release {
28 | minifyEnabled false
29 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
30 | }
31 | }
32 |
33 | sourceSets.main {
34 | jniLibs.srcDirs = ['libs']
35 | jni.srcDirs = []
36 | }
37 |
38 | externalNativeBuild {
39 | cmake {
40 | path "CMakeLists.txt"
41 | }
42 | }
43 | }
44 |
45 | dependencies {
46 | compile fileTree(dir: 'libs', include: ['*.jar'])
47 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
48 | exclude group: 'com.android.support', module: 'support-annotations'
49 | })
50 | compile 'com.android.support:appcompat-v7:25.3.1'
51 | testCompile 'junit:junit:4.12'
52 | compile project(':livecollector')
53 | }
54 |
--------------------------------------------------------------------------------
/liveffmpeg/libs/armeabi-v7a/libavcodec-56.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/liveffmpeg/libs/armeabi-v7a/libavcodec-56.so
--------------------------------------------------------------------------------
/liveffmpeg/libs/armeabi-v7a/libavdevice-56.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/liveffmpeg/libs/armeabi-v7a/libavdevice-56.so
--------------------------------------------------------------------------------
/liveffmpeg/libs/armeabi-v7a/libavfilter-5.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/liveffmpeg/libs/armeabi-v7a/libavfilter-5.so
--------------------------------------------------------------------------------
/liveffmpeg/libs/armeabi-v7a/libavformat-56.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/liveffmpeg/libs/armeabi-v7a/libavformat-56.so
--------------------------------------------------------------------------------
/liveffmpeg/libs/armeabi-v7a/libavutil-54.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/liveffmpeg/libs/armeabi-v7a/libavutil-54.so
--------------------------------------------------------------------------------
/liveffmpeg/libs/armeabi-v7a/libpostproc-53.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/liveffmpeg/libs/armeabi-v7a/libpostproc-53.so
--------------------------------------------------------------------------------
/liveffmpeg/libs/armeabi-v7a/libswresample-1.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/liveffmpeg/libs/armeabi-v7a/libswresample-1.so
--------------------------------------------------------------------------------
/liveffmpeg/libs/armeabi-v7a/libswscale-3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/liveffmpeg/libs/armeabi-v7a/libswscale-3.so
--------------------------------------------------------------------------------
/liveffmpeg/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 D:\androidstudio\assdk/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 |
--------------------------------------------------------------------------------
/liveffmpeg/src/androidTest/java/com/dzm/ffmpeg/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.dzm.ffmpeg;
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 | * @see Testing documentation
15 | */
16 | @RunWith(AndroidJUnit4.class)
17 | public class ExampleInstrumentedTest {
18 | @Test
19 | public void useAppContext() throws Exception {
20 | // Context of the app under test.
21 | Context appContext = InstrumentationRegistry.getTargetContext();
22 |
23 | assertEquals("com.dzm.ffmpeg.test", appContext.getPackageName());
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/Stream.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by 83642 on 2017/9/2.
3 | //
4 |
5 | #ifndef LIVE_RTMP2_STREAM_H
6 | #define LIVE_RTMP2_STREAM_H
7 |
8 | #include
9 | #include
10 | #include
11 |
12 | #include
13 |
14 | #define LOGD(...) __android_log_print(3,"NDK",__VA_ARGS__)
15 | extern "C"
16 | {
17 | #include "include/libavformat/avformat.h"
18 | #include "include/libavutil/opt.h"
19 | #include "include/libavcodec/avcodec.h"
20 | #include "include/libavutil/time.h"
21 |
22 | typedef unsigned char UCHAR;
23 |
24 | class Stream {
25 |
26 | private:
27 |
28 | int mWidth;
29 | int mHeight;
30 |
31 | //输出
32 | AVOutputFormat *pOutFormt;
33 | AVFormatContext *pOfmtCtx;
34 |
35 | //编码
36 | //编码设置
37 | AVFormatContext *pEncodeFmtCtx;
38 | AVCodec *pEncodeCodec;
39 | AVCodecContext *pEncodeCtx;
40 | AVStream *video_st;
41 | int64_t start_time;
42 | AVPacket enc_pkt;
43 | int framecnt;
44 |
45 |
46 | public:
47 | void init_ffmpeg(char*rtmp_path,int width,int height);
48 |
49 | void add_yuv_data(UCHAR * yuv,jboolean isBack);
50 |
51 | private:
52 | int init_encode(int width,int height);
53 |
54 | void n420_spin(char *dstyuv, char *srcdata, int imageWidth, int imageHeight);
55 |
56 | void n420_spin2(char *dstyuv, char *srcdata, int imageWidth, int imageHeight);
57 | };
58 |
59 |
60 | };
61 |
62 |
63 |
64 |
65 | #endif //LIVE_RTMP2_STREAM_H
66 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavcodec/dxva2.h:
--------------------------------------------------------------------------------
1 | /*
2 | * DXVA2 HW acceleration
3 | *
4 | * copyright (c) 2009 Laurent Aimar
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_DXVA_H
24 | #define AVCODEC_DXVA_H
25 |
26 | /**
27 | * @file
28 | * @ingroup lavc_codec_hwaccel_dxva2
29 | * Public libavcodec DXVA2 header.
30 | */
31 |
32 | #if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
33 | #undef _WIN32_WINNT
34 | #define _WIN32_WINNT 0x0600
35 | #endif
36 |
37 | #include
38 | #include
39 | #include
40 |
41 | /**
42 | * @defgroup lavc_codec_hwaccel_dxva2 DXVA2
43 | * @ingroup lavc_codec_hwaccel
44 | *
45 | * @{
46 | */
47 |
48 | #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
49 | #define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for DXVA2 and old Intel GPUs with ClearVideo interface
50 |
51 | /**
52 | * This structure is used to provides the necessary configurations and data
53 | * to the DXVA2 FFmpeg HWAccel implementation.
54 | *
55 | * The application must make it available as AVCodecContext.hwaccel_context.
56 | */
57 | struct dxva_context {
58 | /**
59 | * DXVA2 decoder object
60 | */
61 | IDirectXVideoDecoder *decoder;
62 |
63 | /**
64 | * DXVA2 configuration used to create the decoder
65 | */
66 | const DXVA2_ConfigPictureDecode *cfg;
67 |
68 | /**
69 | * The number of surface in the surface array
70 | */
71 | unsigned surface_count;
72 |
73 | /**
74 | * The array of Direct3D surfaces used to create the decoder
75 | */
76 | LPDIRECT3DSURFACE9 *surface;
77 |
78 | /**
79 | * A bit field configuring the workarounds needed for using the decoder
80 | */
81 | uint64_t workaround;
82 |
83 | /**
84 | * Private to the FFmpeg AVHWAccel implementation
85 | */
86 | unsigned report_id;
87 | };
88 |
89 | /**
90 | * @}
91 | */
92 |
93 | #endif /* AVCODEC_DXVA_H */
94 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavcodec/qsv.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Intel MediaSDK QSV public API
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 AVCODEC_QSV_H
22 | #define AVCODEC_QSV_H
23 |
24 | #include
25 |
26 | typedef struct AVQSVContext {
27 | mfxSession session;
28 | int iopattern;
29 |
30 | mfxExtBuffer **ext_buffers;
31 | int nb_ext_buffers;
32 | } AVQSVContext;
33 |
34 | /**
35 | * Allocate a new context.
36 | *
37 | * It must be freed by the caller with av_free().
38 | */
39 | AVQSVContext *av_qsv_alloc_context(void);
40 |
41 | #endif /* AVCODEC_QSV_H */
42 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavcodec/vorbis_parser.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * This file is part of FFmpeg.
4 | *
5 | * FFmpeg is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) any later version.
9 | *
10 | * FFmpeg is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with FFmpeg; if not, write to the Free Software
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 | */
19 |
20 | /**
21 | * @file
22 | * A public API for Vorbis parsing
23 | *
24 | * Determines the duration for each packet.
25 | */
26 |
27 | #ifndef AVCODEC_VORBIS_PARSE_H
28 | #define AVCODEC_VORBIS_PARSE_H
29 |
30 | #include
31 |
32 | typedef struct AVVorbisParseContext AVVorbisParseContext;
33 |
34 | /**
35 | * Allocate and initialize the Vorbis parser using headers in the extradata.
36 | *
37 | * @param avctx codec context
38 | * @param s Vorbis parser context
39 | */
40 | AVVorbisParseContext *av_vorbis_parse_init(const uint8_t *extradata,
41 | int extradata_size);
42 |
43 | /**
44 | * Free the parser and everything associated with it.
45 | */
46 | void av_vorbis_parse_free(AVVorbisParseContext **s);
47 |
48 | #define VORBIS_FLAG_HEADER 0x00000001
49 | #define VORBIS_FLAG_COMMENT 0x00000002
50 | #define VORBIS_FLAG_SETUP 0x00000004
51 |
52 | /**
53 | * Get the duration for a Vorbis packet.
54 | *
55 | * If @p flags is @c NULL,
56 | * special frames are considered invalid.
57 | *
58 | * @param s Vorbis parser context
59 | * @param buf buffer containing a Vorbis frame
60 | * @param buf_size size of the buffer
61 | * @param flags flags for special frames
62 | */
63 | int av_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf,
64 | int buf_size, int *flags);
65 |
66 | /**
67 | * Get the duration for a Vorbis packet.
68 | *
69 | * @param s Vorbis parser context
70 | * @param buf buffer containing a Vorbis frame
71 | * @param buf_size size of the buffer
72 | */
73 | int av_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf,
74 | int buf_size);
75 |
76 | void av_vorbis_parse_reset(AVVorbisParseContext *s);
77 |
78 | #endif /* AVCODEC_VORBIS_PARSE_H */
79 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 56
31 | #define LIBAVDEVICE_VERSION_MINOR 4
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 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavfilter/avcodec.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 AVFILTER_AVCODEC_H
20 | #define AVFILTER_AVCODEC_H
21 |
22 | /**
23 | * @file
24 | * libavcodec/libavfilter gluing utilities
25 | *
26 | * This should be included in an application ONLY if the installed
27 | * libavfilter has been compiled with libavcodec support, otherwise
28 | * symbols defined below will not be available.
29 | */
30 |
31 | #include "avfilter.h"
32 |
33 | #if FF_API_AVFILTERBUFFER
34 | /**
35 | * Create and return a picref reference from the data and properties
36 | * contained in frame.
37 | *
38 | * @param perms permissions to assign to the new buffer reference
39 | * @deprecated avfilter APIs work natively with AVFrame instead.
40 | */
41 | attribute_deprecated
42 | AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
43 |
44 |
45 | /**
46 | * Create and return a picref reference from the data and properties
47 | * contained in frame.
48 | *
49 | * @param perms permissions to assign to the new buffer reference
50 | * @deprecated avfilter APIs work natively with AVFrame instead.
51 | */
52 | attribute_deprecated
53 | AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame,
54 | int perms);
55 |
56 | /**
57 | * Create and return a buffer reference from the data and properties
58 | * contained in frame.
59 | *
60 | * @param perms permissions to assign to the new buffer reference
61 | * @deprecated avfilter APIs work natively with AVFrame instead.
62 | */
63 | attribute_deprecated
64 | AVFilterBufferRef *avfilter_get_buffer_ref_from_frame(enum AVMediaType type,
65 | const AVFrame *frame,
66 | int perms);
67 | #endif
68 |
69 | #endif /* AVFILTER_AVCODEC_H */
70 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavformat/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 AVFORMAT_VERSION_H
22 | #define AVFORMAT_VERSION_H
23 |
24 | /**
25 | * @file
26 | * @ingroup libavf
27 | * Libavformat version macros
28 | */
29 |
30 | #include "libavutil/version.h"
31 |
32 | #define LIBAVFORMAT_VERSION_MAJOR 56
33 | #define LIBAVFORMAT_VERSION_MINOR 25
34 | #define LIBAVFORMAT_VERSION_MICRO 101
35 |
36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
37 | LIBAVFORMAT_VERSION_MINOR, \
38 | LIBAVFORMAT_VERSION_MICRO)
39 | #define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \
40 | LIBAVFORMAT_VERSION_MINOR, \
41 | LIBAVFORMAT_VERSION_MICRO)
42 | #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
43 |
44 | #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
45 |
46 | /**
47 | * FF_API_* defines may be placed below to indicate public API that will be
48 | * dropped at a future version bump. The defines themselves are not part of
49 | * the public API and may change, break or disappear at any time.
50 | */
51 | #ifndef FF_API_LAVF_BITEXACT
52 | #define FF_API_LAVF_BITEXACT (LIBAVFORMAT_VERSION_MAJOR < 57)
53 | #endif
54 | #ifndef FF_API_LAVF_FRAC
55 | #define FF_API_LAVF_FRAC (LIBAVFORMAT_VERSION_MAJOR < 57)
56 | #endif
57 | #ifndef FF_API_LAVF_CODEC_TB
58 | #define FF_API_LAVF_CODEC_TB (LIBAVFORMAT_VERSION_MAJOR < 57)
59 | #endif
60 | #ifndef FF_API_URL_FEOF
61 | #define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57)
62 | #endif
63 |
64 | #ifndef FF_API_R_FRAME_RATE
65 | #define FF_API_R_FRAME_RATE 1
66 | #endif
67 | #endif /* AVFORMAT_VERSION_H */
68 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 | #ifndef AVUTIL_ADLER32_H
22 | #define AVUTIL_ADLER32_H
23 |
24 | #include
25 | #include "attributes.h"
26 |
27 | /**
28 | * @file
29 | * Public header for libavutil Adler32 hasher
30 | *
31 | * @defgroup lavu_adler32 Adler32
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | /**
37 | * Calculate the Adler32 checksum of a buffer.
38 | *
39 | * Passing the return value to a subsequent av_adler32_update() call
40 | * allows the checksum of multiple buffers to be calculated as though
41 | * they were concatenated.
42 | *
43 | * @param adler initial checksum value
44 | * @param buf pointer to input buffer
45 | * @param len size of input buffer
46 | * @return updated checksum
47 | */
48 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
49 | unsigned int len) av_pure;
50 |
51 | /**
52 | * @}
53 | */
54 |
55 | #endif /* AVUTIL_ADLER32_H */
56 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/audioconvert.h:
--------------------------------------------------------------------------------
1 |
2 | #include "version.h"
3 |
4 | #if FF_API_AUDIOCONVERT
5 | #include "channel_layout.h"
6 | #endif
7 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/avassert.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2010 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 | /**
22 | * @file
23 | * simple assert() macros that are a bit more flexible than ISO C assert().
24 | * @author Michael Niedermayer
25 | */
26 |
27 | #ifndef AVUTIL_AVASSERT_H
28 | #define AVUTIL_AVASSERT_H
29 |
30 | #include
31 | #include "avutil.h"
32 | #include "log.h"
33 |
34 | /**
35 | * assert() equivalent, that is always enabled.
36 | */
37 | #define av_assert0(cond) do { \
38 | if (!(cond)) { \
39 | av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n", \
40 | AV_STRINGIFY(cond), __FILE__, __LINE__); \
41 | abort(); \
42 | } \
43 | } while (0)
44 |
45 |
46 | /**
47 | * assert() equivalent, that does not lie in speed critical code.
48 | * These asserts() thus can be enabled without fearing speedloss.
49 | */
50 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0
51 | #define av_assert1(cond) av_assert0(cond)
52 | #else
53 | #define av_assert1(cond) ((void)0)
54 | #endif
55 |
56 |
57 | /**
58 | * assert() equivalent, that does lie in speed critical code.
59 | */
60 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1
61 | #define av_assert2(cond) av_assert0(cond)
62 | #else
63 | #define av_assert2(cond) ((void)0)
64 | #endif
65 |
66 | #endif /* AVUTIL_AVASSERT_H */
67 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 1
6 | #define AV_HAVE_INCOMPATIBLE_LIBAV_ABI 0
7 | #endif /* AVUTIL_AVCONFIG_H */
8 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/base64.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com)
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_BASE64_H
22 | #define AVUTIL_BASE64_H
23 |
24 | #include
25 |
26 | /**
27 | * @defgroup lavu_base64 Base64
28 | * @ingroup lavu_crypto
29 | * @{
30 | */
31 |
32 |
33 | /**
34 | * Decode a base64-encoded string.
35 | *
36 | * @param out buffer for decoded data
37 | * @param in null-terminated input string
38 | * @param out_size size in bytes of the out buffer, must be at
39 | * least 3/4 of the length of in
40 | * @return number of bytes written, or a negative value in case of
41 | * invalid input
42 | */
43 | int av_base64_decode(uint8_t *out, const char *in, int out_size);
44 |
45 | /**
46 | * Encode data to base64 and null-terminate.
47 | *
48 | * @param out buffer for encoded data
49 | * @param out_size size in bytes of the out buffer (including the
50 | * null terminator), must be at least AV_BASE64_SIZE(in_size)
51 | * @param in input buffer containing the data to encode
52 | * @param in_size size in bytes of the in buffer
53 | * @return out or NULL in case of error
54 | */
55 | char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);
56 |
57 | /**
58 | * Calculate the output size needed to base64-encode x bytes to a
59 | * null-terminated string.
60 | */
61 | #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1)
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | #endif /* AVUTIL_BASE64_H */
68 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/blowfish.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Blowfish algorithm
3 | * Copyright (c) 2012 Samuel Pitoiset
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 AVUTIL_BLOWFISH_H
23 | #define AVUTIL_BLOWFISH_H
24 |
25 | #include
26 |
27 | /**
28 | * @defgroup lavu_blowfish Blowfish
29 | * @ingroup lavu_crypto
30 | * @{
31 | */
32 |
33 | #define AV_BF_ROUNDS 16
34 |
35 | typedef struct AVBlowfish {
36 | uint32_t p[AV_BF_ROUNDS + 2];
37 | uint32_t s[4][256];
38 | } AVBlowfish;
39 |
40 | /**
41 | * Initialize an AVBlowfish context.
42 | *
43 | * @param ctx an AVBlowfish context
44 | * @param key a key
45 | * @param key_len length of the key
46 | */
47 | void av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len);
48 |
49 | /**
50 | * Encrypt or decrypt a buffer using a previously initialized context.
51 | *
52 | * @param ctx an AVBlowfish context
53 | * @param xl left four bytes halves of input to be encrypted
54 | * @param xr right four bytes halves of input to be encrypted
55 | * @param decrypt 0 for encryption, 1 for decryption
56 | */
57 | void av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr,
58 | int decrypt);
59 |
60 | /**
61 | * Encrypt or decrypt a buffer using a previously initialized context.
62 | *
63 | * @param ctx an AVBlowfish context
64 | * @param dst destination array, can be equal to src
65 | * @param src source array, can be equal to dst
66 | * @param count number of 8 byte blocks
67 | * @param iv initialization vector for CBC mode, if NULL ECB will be used
68 | * @param decrypt 0 for encryption, 1 for decryption
69 | */
70 | void av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
71 | int count, uint8_t *iv, int decrypt);
72 |
73 | /**
74 | * @}
75 | */
76 |
77 | #endif /* AVUTIL_BLOWFISH_H */
78 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/camellia.h:
--------------------------------------------------------------------------------
1 | /*
2 | * An implementation of the CAMELLIA algorithm as mentioned in RFC3713
3 | * Copyright (c) 2014 Supraja Meedinti
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 AVUTIL_CAMELLIA_H
23 | #define AVUTIL_CAMELLIA_H
24 |
25 | #include
26 |
27 |
28 | /**
29 | * @file
30 | * @brief Public header for libavutil CAMELLIA algorithm
31 | * @defgroup lavu_camellia CAMELLIA
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_camellia_size;
37 |
38 | struct AVCAMELLIA;
39 |
40 | /**
41 | * Allocate an AVCAMELLIA context
42 | * To free the struct: av_free(ptr)
43 | */
44 | struct AVCAMELLIA *av_camellia_alloc(void);
45 |
46 | /**
47 | * Initialize an AVCAMELLIA context.
48 | *
49 | * @param ctx an AVCAMELLIA context
50 | * @param key a key of 16, 24, 32 bytes used for encryption/decryption
51 | * @param key_bits number of keybits: possible are 128, 192, 256
52 | */
53 | int av_camellia_init(struct AVCAMELLIA *ctx, const uint8_t *key, int key_bits);
54 |
55 | /**
56 | * Encrypt or decrypt a buffer using a previously initialized context
57 | *
58 | * @param ctx an AVCAMELLIA context
59 | * @param dst destination array, can be equal to src
60 | * @param src source array, can be equal to dst
61 | * @param count number of 16 byte blocks
62 | * @paran iv initialization vector for CBC mode, NULL for ECB mode
63 | * @param decrypt 0 for encryption, 1 for decryption
64 | */
65 | void av_camellia_crypt(struct AVCAMELLIA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);
66 |
67 | /**
68 | * @}
69 | */
70 | #endif /* AVUTIL_CAMELLIA_H */
71 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/cast5.h:
--------------------------------------------------------------------------------
1 | /*
2 | * An implementation of the CAST128 algorithm as mentioned in RFC2144
3 | * Copyright (c) 2014 Supraja Meedinti
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 AVUTIL_CAST5_H
23 | #define AVUTIL_CAST5_H
24 |
25 | #include
26 |
27 |
28 | /**
29 | * @file
30 | * @brief Public header for libavutil CAST5 algorithm
31 | * @defgroup lavu_cast5 CAST5
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_cast5_size;
37 |
38 | struct AVCAST5;
39 |
40 | /**
41 | * Allocate an AVCAST5 context
42 | * To free the struct: av_free(ptr)
43 | */
44 | struct AVCAST5 *av_cast5_alloc(void);
45 | /**
46 | * Initialize an AVCAST5 context.
47 | *
48 | * @param ctx an AVCAST5 context
49 | * @param key a key of 5,6,...16 bytes used for encryption/decryption
50 | * @param key_bits number of keybits: possible are 40,48,...,128
51 | */
52 | int av_cast5_init(struct AVCAST5 *ctx, const uint8_t *key, int key_bits);
53 |
54 | /**
55 | * Encrypt or decrypt a buffer using a previously initialized context, ECB mode only
56 | *
57 | * @param ctx an AVCAST5 context
58 | * @param dst destination array, can be equal to src
59 | * @param src source array, can be equal to dst
60 | * @param count number of 8 byte blocks
61 | * @param decrypt 0 for encryption, 1 for decryption
62 | */
63 | void av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, int decrypt);
64 |
65 | /**
66 | * Encrypt or decrypt a buffer using a previously initialized context
67 | *
68 | * @param ctx an AVCAST5 context
69 | * @param dst destination array, can be equal to src
70 | * @param src source array, can be equal to dst
71 | * @param count number of 8 byte blocks
72 | * @param iv initialization vector for CBC mode, NULL for ECB mode
73 | * @param decrypt 0 for encryption, 1 for decryption
74 | */
75 | void av_cast5_crypt2(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
76 | /**
77 | * @}
78 | */
79 | #endif /* AVUTIL_CAST5_H */
80 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/ffversion.h:
--------------------------------------------------------------------------------
1 | #ifndef AVUTIL_FFVERSION_H
2 | #define AVUTIL_FFVERSION_H
3 | #define FFMPEG_VERSION "2.6.3"
4 | #endif /* AVUTIL_FFVERSION_H */
5 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/file.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_FILE_H
20 | #define AVUTIL_FILE_H
21 |
22 | #include
23 |
24 | #include "avutil.h"
25 |
26 | /**
27 | * @file
28 | * Misc file utilities.
29 | */
30 |
31 | /**
32 | * Read the file with name filename, and put its content in a newly
33 | * allocated buffer or map it with mmap() when available.
34 | * In case of success set *bufptr to the read or mmapped buffer, and
35 | * *size to the size in bytes of the buffer in *bufptr.
36 | * The returned buffer must be released with av_file_unmap().
37 | *
38 | * @param log_offset loglevel offset used for logging
39 | * @param log_ctx context used for logging
40 | * @return a non negative number in case of success, a negative value
41 | * corresponding to an AVERROR error code in case of failure
42 | */
43 | int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
44 | int log_offset, void *log_ctx);
45 |
46 | /**
47 | * Unmap or free the buffer bufptr created by av_file_map().
48 | *
49 | * @param size size in bytes of bufptr, must be the same as returned
50 | * by av_file_map()
51 | */
52 | void av_file_unmap(uint8_t *bufptr, size_t size);
53 |
54 | /**
55 | * Wrapper to work around the lack of mkstemp() on mingw.
56 | * Also, tries to create file in /tmp first, if possible.
57 | * *prefix can be a character constant; *filename will be allocated internally.
58 | * @return file descriptor of opened file (or negative value corresponding to an
59 | * AVERROR code on error)
60 | * and opened file name in **filename.
61 | * @note On very old libcs it is necessary to set a secure umask before
62 | * calling this, av_tempfile() can't call umask itself as it is used in
63 | * libraries and could interfere with the calling application.
64 | */
65 | int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
66 |
67 | #endif /* AVUTIL_FILE_H */
68 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/lfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Lagged Fibonacci PRNG
3 | * Copyright (c) 2008 Michael Niedermayer
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 AVUTIL_LFG_H
23 | #define AVUTIL_LFG_H
24 |
25 | typedef struct AVLFG {
26 | unsigned int state[64];
27 | int index;
28 | } AVLFG;
29 |
30 | void av_lfg_init(AVLFG *c, unsigned int seed);
31 |
32 | /**
33 | * Get the next random unsigned 32-bit number using an ALFG.
34 | *
35 | * Please also consider a simple LCG like state= state*1664525+1013904223,
36 | * it may be good enough and faster for your specific use case.
37 | */
38 | static inline unsigned int av_lfg_get(AVLFG *c){
39 | c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63];
40 | return c->state[c->index++ & 63];
41 | }
42 |
43 | /**
44 | * Get the next random unsigned 32-bit number using a MLFG.
45 | *
46 | * Please also consider av_lfg_get() above, it is faster.
47 | */
48 | static inline unsigned int av_mlfg_get(AVLFG *c){
49 | unsigned int a= c->state[(c->index-55) & 63];
50 | unsigned int b= c->state[(c->index-24) & 63];
51 | return c->state[c->index++ & 63] = 2*a*b+a+b;
52 | }
53 |
54 | /**
55 | * Get the next two numbers generated by a Box-Muller Gaussian
56 | * generator using the random numbers issued by lfg.
57 | *
58 | * @param out array where the two generated numbers are placed
59 | */
60 | void av_bmg_get(AVLFG *lfg, double out[2]);
61 |
62 | #endif /* AVUTIL_LFG_H */
63 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/lzo.h:
--------------------------------------------------------------------------------
1 | /*
2 | * LZO 1x decompression
3 | * copyright (c) 2006 Reimar Doeffinger
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 AVUTIL_LZO_H
23 | #define AVUTIL_LZO_H
24 |
25 | /**
26 | * @defgroup lavu_lzo LZO
27 | * @ingroup lavu_crypto
28 | *
29 | * @{
30 | */
31 |
32 | #include
33 |
34 | /** @name Error flags returned by av_lzo1x_decode
35 | * @{ */
36 | /// end of the input buffer reached before decoding finished
37 | #define AV_LZO_INPUT_DEPLETED 1
38 | /// decoded data did not fit into output buffer
39 | #define AV_LZO_OUTPUT_FULL 2
40 | /// a reference to previously decoded data was wrong
41 | #define AV_LZO_INVALID_BACKPTR 4
42 | /// a non-specific error in the compressed bitstream
43 | #define AV_LZO_ERROR 8
44 | /** @} */
45 |
46 | #define AV_LZO_INPUT_PADDING 8
47 | #define AV_LZO_OUTPUT_PADDING 12
48 |
49 | /**
50 | * @brief Decodes LZO 1x compressed data.
51 | * @param out output buffer
52 | * @param outlen size of output buffer, number of bytes left are returned here
53 | * @param in input buffer
54 | * @param inlen size of input buffer, number of bytes left are returned here
55 | * @return 0 on success, otherwise a combination of the error flags above
56 | *
57 | * Make sure all buffers are appropriately padded, in must provide
58 | * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes.
59 | */
60 | int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | #endif /* AVUTIL_LZO_H */
67 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 | #endif /* AVUTIL_MACROS_H */
49 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/md5.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 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_MD5_H
22 | #define AVUTIL_MD5_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_md5 MD5
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_md5_size;
36 |
37 | struct AVMD5;
38 |
39 | /**
40 | * Allocate an AVMD5 context.
41 | */
42 | struct AVMD5 *av_md5_alloc(void);
43 |
44 | /**
45 | * Initialize MD5 hashing.
46 | *
47 | * @param ctx pointer to the function context (of size av_md5_size)
48 | */
49 | void av_md5_init(struct AVMD5 *ctx);
50 |
51 | /**
52 | * Update hash value.
53 | *
54 | * @param ctx hash function context
55 | * @param src input data to update hash with
56 | * @param len input data length
57 | */
58 | void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, int len);
59 |
60 | /**
61 | * Finish hashing and output digest value.
62 | *
63 | * @param ctx hash function context
64 | * @param dst buffer where output digest value is stored
65 | */
66 | void av_md5_final(struct AVMD5 *ctx, uint8_t *dst);
67 |
68 | /**
69 | * Hash an array of data.
70 | *
71 | * @param dst The output buffer to write the digest into
72 | * @param src The data to hash
73 | * @param len The length of the data, in bytes
74 | */
75 | void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len);
76 |
77 | /**
78 | * @}
79 | */
80 |
81 | #endif /* AVUTIL_MD5_H */
82 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 | } AVMotionVector;
49 |
50 | #endif /* AVUTIL_MOTION_VECTOR_H */
51 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/murmur3.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Reimar Döffinger
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_MURMUR3_H
22 | #define AVUTIL_MURMUR3_H
23 |
24 | #include
25 |
26 | struct AVMurMur3 *av_murmur3_alloc(void);
27 | void av_murmur3_init_seeded(struct AVMurMur3 *c, uint64_t seed);
28 | void av_murmur3_init(struct AVMurMur3 *c);
29 | void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len);
30 | void av_murmur3_final(struct AVMurMur3 *c, uint8_t dst[16]);
31 |
32 | #endif /* AVUTIL_MURMUR3_H */
33 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/replaygain.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * This file is part of FFmpeg.
4 | *
5 | * FFmpeg is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) any later version.
9 | *
10 | * FFmpeg is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with FFmpeg; if not, write to the Free Software
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 | */
19 |
20 | #ifndef AVUTIL_REPLAYGAIN_H
21 | #define AVUTIL_REPLAYGAIN_H
22 |
23 | #include
24 |
25 | /**
26 | * ReplayGain information (see
27 | * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).
28 | * The size of this struct is a part of the public ABI.
29 | */
30 | typedef struct AVReplayGain {
31 | /**
32 | * Track replay gain in microbels (divide by 100000 to get the value in dB).
33 | * Should be set to INT32_MIN when unknown.
34 | */
35 | int32_t track_gain;
36 | /**
37 | * Peak track amplitude, with 100000 representing full scale (but values
38 | * may overflow). 0 when unknown.
39 | */
40 | uint32_t track_peak;
41 | /**
42 | * Same as track_gain, but for the whole album.
43 | */
44 | int32_t album_gain;
45 | /**
46 | * Same as track_peak, but for the whole album,
47 | */
48 | uint32_t album_peak;
49 | } AVReplayGain;
50 |
51 | #endif /* AVUTIL_REPLAYGAIN_H */
52 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/ripemd.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Michael Niedermayer
3 | * Copyright (C) 2013 James Almer
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 AVUTIL_RIPEMD_H
23 | #define AVUTIL_RIPEMD_H
24 |
25 | #include
26 |
27 | #include "attributes.h"
28 | #include "version.h"
29 |
30 | /**
31 | * @defgroup lavu_ripemd RIPEMD
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_ripemd_size;
37 |
38 | struct AVRIPEMD;
39 |
40 | /**
41 | * Allocate an AVRIPEMD context.
42 | */
43 | struct AVRIPEMD *av_ripemd_alloc(void);
44 |
45 | /**
46 | * Initialize RIPEMD hashing.
47 | *
48 | * @param context pointer to the function context (of size av_ripemd_size)
49 | * @param bits number of bits in digest (128, 160, 256 or 320 bits)
50 | * @return zero if initialization succeeded, -1 otherwise
51 | */
52 | int av_ripemd_init(struct AVRIPEMD* context, int bits);
53 |
54 | /**
55 | * Update hash value.
56 | *
57 | * @param context hash function context
58 | * @param data input data to update hash with
59 | * @param len input data length
60 | */
61 | void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len);
62 |
63 | /**
64 | * Finish hashing and output digest value.
65 | *
66 | * @param context hash function context
67 | * @param digest buffer where output digest value is stored
68 | */
69 | void av_ripemd_final(struct AVRIPEMD* context, uint8_t *digest);
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | #endif /* AVUTIL_RIPEMD_H */
76 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/sha.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_SHA_H
22 | #define AVUTIL_SHA_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_sha SHA
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_sha_size;
36 |
37 | struct AVSHA;
38 |
39 | /**
40 | * Allocate an AVSHA context.
41 | */
42 | struct AVSHA *av_sha_alloc(void);
43 |
44 | /**
45 | * Initialize SHA-1 or SHA-2 hashing.
46 | *
47 | * @param context pointer to the function context (of size av_sha_size)
48 | * @param bits number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits)
49 | * @return zero if initialization succeeded, -1 otherwise
50 | */
51 | int av_sha_init(struct AVSHA* context, int bits);
52 |
53 | /**
54 | * Update hash value.
55 | *
56 | * @param context hash function context
57 | * @param data input data to update hash with
58 | * @param len input data length
59 | */
60 | void av_sha_update(struct AVSHA* context, const uint8_t* data, unsigned int len);
61 |
62 | /**
63 | * Finish hashing and output digest value.
64 | *
65 | * @param context hash function context
66 | * @param digest buffer where output digest value is stored
67 | */
68 | void av_sha_final(struct AVSHA* context, uint8_t *digest);
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | #endif /* AVUTIL_SHA_H */
75 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/sha512.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Michael Niedermayer
3 | * Copyright (C) 2013 James Almer
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 AVUTIL_SHA512_H
23 | #define AVUTIL_SHA512_H
24 |
25 | #include
26 |
27 | #include "attributes.h"
28 | #include "version.h"
29 |
30 | /**
31 | * @defgroup lavu_sha512 SHA512
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_sha512_size;
37 |
38 | struct AVSHA512;
39 |
40 | /**
41 | * Allocate an AVSHA512 context.
42 | */
43 | struct AVSHA512 *av_sha512_alloc(void);
44 |
45 | /**
46 | * Initialize SHA-2 512 hashing.
47 | *
48 | * @param context pointer to the function context (of size av_sha512_size)
49 | * @param bits number of bits in digest (224, 256, 384 or 512 bits)
50 | * @return zero if initialization succeeded, -1 otherwise
51 | */
52 | int av_sha512_init(struct AVSHA512* context, int bits);
53 |
54 | /**
55 | * Update hash value.
56 | *
57 | * @param context hash function context
58 | * @param data input data to update hash with
59 | * @param len input data length
60 | */
61 | void av_sha512_update(struct AVSHA512* context, const uint8_t* data, unsigned int len);
62 |
63 | /**
64 | * Finish hashing and output digest value.
65 | *
66 | * @param context hash function context
67 | * @param digest buffer where output digest value is stored
68 | */
69 | void av_sha512_final(struct AVSHA512* context, uint8_t *digest);
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | #endif /* AVUTIL_SHA512_H */
76 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/twofish.h:
--------------------------------------------------------------------------------
1 | /*
2 | * An implementation of the TwoFish algorithm
3 | * Copyright (c) 2015 Supraja Meedinti
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 AVUTIL_TWOFISH_H
23 | #define AVUTIL_TWOFISH_H
24 |
25 | #include
26 |
27 |
28 | /**
29 | * @file
30 | * @brief Public header for libavutil TWOFISH algorithm
31 | * @defgroup lavu_twofish TWOFISH
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_twofish_size;
37 |
38 | struct AVTWOFISH;
39 |
40 | /**
41 | * Allocate an AVTWOFISH context
42 | * To free the struct: av_free(ptr)
43 | */
44 | struct AVTWOFISH *av_twofish_alloc(void);
45 |
46 | /**
47 | * Initialize an AVTWOFISH context.
48 | *
49 | * @param ctx an AVTWOFISH context
50 | * @param key a key of size ranging from 1 to 32 bytes used for encryption/decryption
51 | * @param key_bits number of keybits: 128, 192, 256 If less than the required, padded with zeroes to nearest valid value; return value is 0 if key_bits is 128/192/256, -1 if less than 0, 1 otherwise
52 | */
53 | int av_twofish_init(struct AVTWOFISH *ctx, const uint8_t *key, int key_bits);
54 |
55 | /**
56 | * Encrypt or decrypt a buffer using a previously initialized context
57 | *
58 | * @param ctx an AVTWOFISH context
59 | * @param dst destination array, can be equal to src
60 | * @param src source array, can be equal to dst
61 | * @param count number of 16 byte blocks
62 | * @paran iv initialization vector for CBC mode, NULL for ECB mode
63 | * @param decrypt 0 for encryption, 1 for decryption
64 | */
65 | void av_twofish_crypt(struct AVTWOFISH *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);
66 |
67 | /**
68 | * @}
69 | */
70 | #endif /* AVUTIL_TWOFISH_H */
71 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/libavutil/xtea.h:
--------------------------------------------------------------------------------
1 | /*
2 | * A 32-bit implementation of the XTEA algorithm
3 | * Copyright (c) 2012 Samuel Pitoiset
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 AVUTIL_XTEA_H
23 | #define AVUTIL_XTEA_H
24 |
25 | #include
26 |
27 | /**
28 | * @file
29 | * @brief Public header for libavutil XTEA algorithm
30 | * @defgroup lavu_xtea XTEA
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | typedef struct AVXTEA {
36 | uint32_t key[16];
37 | } AVXTEA;
38 |
39 | /**
40 | * Initialize an AVXTEA context.
41 | *
42 | * @param ctx an AVXTEA context
43 | * @param key a key of 16 bytes used for encryption/decryption
44 | */
45 | void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);
46 |
47 | /**
48 | * Encrypt or decrypt a buffer using a previously initialized context.
49 | *
50 | * @param ctx an AVXTEA context
51 | * @param dst destination array, can be equal to src
52 | * @param src source array, can be equal to dst
53 | * @param count number of 8 byte blocks
54 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used
55 | * @param decrypt 0 for encryption, 1 for decryption
56 | */
57 | void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
58 | int count, uint8_t *iv, int decrypt);
59 |
60 | /**
61 | * @}
62 | */
63 |
64 | #endif /* AVUTIL_XTEA_H */
65 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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_POSTPROCESS_VERSION_H
22 | #define POSTPROC_POSTPROCESS_VERSION_H
23 |
24 | /**
25 | * @file
26 | * Libpostproc version macros
27 | */
28 |
29 | #include "libavutil/avutil.h"
30 |
31 | #define LIBPOSTPROC_VERSION_MAJOR 53
32 | #define LIBPOSTPROC_VERSION_MINOR 3
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 | #endif /* POSTPROC_POSTPROCESS_VERSION_H */
46 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 SWR_VERSION_H
22 | #define SWR_VERSION_H
23 |
24 | /**
25 | * @file
26 | * Libswresample version macros
27 | */
28 |
29 | #include "libavutil/avutil.h"
30 |
31 | #define LIBSWRESAMPLE_VERSION_MAJOR 1
32 | #define LIBSWRESAMPLE_VERSION_MINOR 1
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 /* SWR_VERSION_H */
46 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/include/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 3
30 | #define LIBSWSCALE_VERSION_MINOR 1
31 | #define LIBSWSCALE_VERSION_MICRO 101
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_CPU_CAPS
50 | #define FF_API_SWS_CPU_CAPS (LIBSWSCALE_VERSION_MAJOR < 4)
51 | #endif
52 | #ifndef FF_API_ARCH_BFIN
53 | #define FF_API_ARCH_BFIN (LIBSWSCALE_VERSION_MAJOR < 4)
54 | #endif
55 |
56 | #endif /* SWSCALE_VERSION_H */
57 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/cpp/native-lib.cpp:
--------------------------------------------------------------------------------
1 |
2 | extern "C"
3 | {
4 | #include "Stream.h"
5 |
6 | Stream *stream;
7 |
8 | JNIEXPORT void JNICALL
9 | Java_com_dzm_ffmpeg_LivePusher_init(JNIEnv *env, jobject instance, jint width, jint height,
10 | jstring rtmpPath_) {
11 |
12 |
13 | stream = new Stream();
14 | if(stream){
15 | const char *rtmpPath = env->GetStringUTFChars(rtmpPath_, 0);
16 | stream->init_ffmpeg((char *) rtmpPath, width, height);
17 | env->ReleaseStringUTFChars(rtmpPath_, rtmpPath);
18 | }
19 | }
20 |
21 | JNIEXPORT void JNICALL
22 | Java_com_dzm_ffmpeg_LivePusher_addVideo(JNIEnv *env, jobject instance, jbyteArray data_,
23 | jboolean isBack) {
24 | if(!stream){
25 | return;
26 | }
27 | jbyte *data = env->GetByteArrayElements(data_, NULL);
28 |
29 | stream->add_yuv_data((UCHAR *) data, isBack);
30 |
31 | env->ReleaseByteArrayElements(data_, data, 0);
32 | }
33 |
34 |
35 |
36 | }
--------------------------------------------------------------------------------
/liveffmpeg/src/main/java/com/dzm/ffmpeg/LiveFfmpegManager.java:
--------------------------------------------------------------------------------
1 | package com.dzm.ffmpeg;
2 |
3 | import android.app.Activity;
4 | import android.hardware.Camera;
5 | import android.media.MediaCodec;
6 |
7 | import com.dzm.collector.LiveBuild;
8 | import com.dzm.collector.LiveConfig;
9 | import com.dzm.collector.LiveEncodeListener;
10 | import com.dzm.collector.LiveNativeInitListener;
11 | import com.dzm.collector.LiveRop;
12 |
13 | import java.nio.ByteBuffer;
14 |
15 |
16 | /**
17 | *
18 | * @author 邓治民
19 | * date 2017/9/5 15:46
20 | */
21 |
22 | public class LiveFfmpegManager {
23 |
24 | public static LiveRop build(Activity activity){
25 | return LiveRop.getInstance().build(activity).setEncodeListener(new LiveEncodeListener() {
26 | @Override
27 | public void videoToYuv420sp(byte[] yuv) {
28 | LivePusher.getInscance().addVideo(yuv, LiveConfig.isBack);
29 | }
30 |
31 | @Override
32 | public void videoToHard(ByteBuffer bb, MediaCodec.BufferInfo info) {
33 | }
34 |
35 | @Override
36 | public void audioToHard(ByteBuffer bb, MediaCodec.BufferInfo info) {
37 | }
38 |
39 | @Override
40 | public void audioToSoft(byte[] data) {
41 |
42 | }
43 | }).setNativeInitListener(new LiveNativeInitListener() {
44 | @Override
45 | public void initNative(LiveBuild build) {
46 | LivePusher.getInscance().init(build.getVideoWidth(),build.getVideoHeight(),build.getRtmpUrl());
47 | }
48 |
49 | @Override
50 | public void releaseNative() {
51 |
52 | }
53 | });
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/java/com/dzm/ffmpeg/LivePusher.java:
--------------------------------------------------------------------------------
1 | package com.dzm.ffmpeg;
2 |
3 | /**
4 | *
5 | * @author 邓治民
6 | * date 2017/9/5 15:39
7 | */
8 |
9 | class LivePusher {
10 |
11 | static {
12 | System.loadLibrary("native-lib");
13 | }
14 |
15 | private static LivePusher livePush;
16 |
17 | static LivePusher getInscance(){
18 | if(null == livePush){
19 | synchronized (LivePusher.class){
20 | if(null == livePush){
21 | livePush = new LivePusher();
22 | }
23 | }
24 | }
25 | return livePush;
26 | }
27 |
28 | public native void init(int width,int height,String rtmpPath);
29 |
30 | public native void addVideo(byte[] data,boolean isBack);
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/liveffmpeg/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LiveFfmpeg
3 |
4 |
--------------------------------------------------------------------------------
/liveffmpeg/src/test/java/com/dzm/ffmpeg/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.dzm.ffmpeg;
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 | * @see Testing documentation
10 | */
11 | public class ExampleUnitTest {
12 | @Test
13 | public void addition_isCorrect() throws Exception {
14 | assertEquals(4, 2 + 2);
15 | }
16 | }
--------------------------------------------------------------------------------
/livepush/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/livepush/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | #版本号
3 | cmake_minimum_required(VERSION 3.4.1)
4 | #加载其他的cmake文件
5 | add_subdirectory(src/main/cpp/librtmp)
6 |
7 | set(my_lib_path ${CMAKE_SOURCE_DIR}/src/main/cpp/lib)
8 | #导入编译好的静态库
9 | add_library(avutil STATIC IMPORTED)
10 | #设置导入的路径
11 | set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${my_lib_path}/libavutil.a)
12 | #导入编译好的静态库
13 | add_library(swscale STATIC IMPORTED)
14 | #设置导入的路径
15 | set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ${my_lib_path}/libswscale.a)
16 | #导入编译好的静态库
17 | add_library(x264 STATIC IMPORTED)
18 | #设置导入的路径
19 | set_target_properties(x264 PROPERTIES IMPORTED_LOCATION ${my_lib_path}/libx264.a)
20 | #导入编译好的静态库
21 | add_library(faac STATIC IMPORTED)
22 | #设置导入的路径
23 | set_target_properties(faac PROPERTIES IMPORTED_LOCATION ${my_lib_path}/libfaac.a)
24 |
25 | include_directories(src/main/cpp)
26 |
27 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fpermissive -mfloat-abi=softfp -mfpu=vfpv3-d16 -D__STDC_CONSTANT_MACROS" )
28 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
29 |
30 |
31 | file(GLOB my_source_path src/main/cpp/*.cpp src/main/cpp/*.c)
32 | #添加模块
33 | add_library( #模块名
34 | Dvr
35 | # 动态库
36 | SHARED
37 | #源文件
38 | ${my_source_path} )
39 |
40 |
41 | #查找系统库
42 | find_library(
43 | #变量名
44 | log-lib
45 | #库名
46 | log )
47 |
48 | find_library(
49 | #变量名
50 | z-lib
51 | #库名
52 | z )
53 | find_library(
54 | #变量名
55 | jnigraphics-lib
56 | #库名
57 | jnigraphics )
58 |
59 |
60 | #需要链接或者编译的库
61 | target_link_libraries(
62 | Dvr
63 | rtmp
64 | swscale
65 | avutil
66 | x264
67 | faac
68 | ${log-lib}
69 | ${z-lib}
70 | ${jnigraphics-lib})
71 |
--------------------------------------------------------------------------------
/livepush/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 |
7 | defaultConfig {
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 |
13 | externalNativeBuild {
14 | cmake {
15 | cppFlags "-fexceptions"
16 | abiFilters "armeabi-v7a"
17 | arguments "-DANDROID_PLATFORM=android-9"
18 | }
19 | }
20 | }
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 | externalNativeBuild {
28 | cmake {
29 | path "CMakeLists.txt"
30 | }
31 | }
32 | }
33 |
34 | dependencies {
35 | compile fileTree(include: ['*.jar'], dir: 'libs')
36 | testCompile 'junit:junit:4.12'
37 | // provided 'com.android.support:appcompat-v7:23.0.0'
38 | compile project(':livecollector')
39 | }
40 |
--------------------------------------------------------------------------------
/livepush/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 D:\androidstudio\assdk/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 |
--------------------------------------------------------------------------------
/livepush/src/androidTest/java/com/dzm/live/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.dzm.live;
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 | * @see Testing documentation
15 | */
16 | @RunWith(AndroidJUnit4.class)
17 | public class ExampleInstrumentedTest {
18 | @Test
19 | public void useAppContext() throws Exception {
20 | // Context of the app under test.
21 | Context appContext = InstrumentationRegistry.getTargetContext();
22 |
23 | assertEquals("com.dzm.live.test", appContext.getPackageName());
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/livepush/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/faac/faac.h:
--------------------------------------------------------------------------------
1 | /*
2 | * FAAC - Freeware Advanced Audio Coder
3 | * Copyright (C) 2001 Menno Bakker
4 | *
5 | * This library is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) any later version.
9 | *
10 | * This library is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 |
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with this library; if not, write to the Free Software
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | *
19 | * $Id: faac.h,v 1.36 2009/01/25 18:50:32 menno Exp $
20 | */
21 |
22 | #ifndef _FAAC_H_
23 | #define _FAAC_H_
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif /* __cplusplus */
28 |
29 | #if defined(_WIN32) && !defined(__MINGW32__)
30 | # ifndef FAACAPI
31 | # define FAACAPI __stdcall
32 | # endif
33 | #else
34 | # ifndef FAACAPI
35 | # define FAACAPI
36 | # endif
37 | #endif
38 |
39 | #pragma pack(push, 1)
40 |
41 | typedef struct {
42 | void *ptr;
43 | char *name;
44 | }
45 | psymodellist_t;
46 |
47 | #include "faaccfg.h"
48 |
49 |
50 | typedef void *faacEncHandle;
51 |
52 | #ifndef HAVE_INT32_T
53 | typedef signed int int32_t;
54 | #endif
55 |
56 | /*
57 | Allows an application to get FAAC version info. This is intended
58 | purely for informative purposes.
59 |
60 | Returns FAAC_CFG_VERSION.
61 | */
62 | int FAACAPI faacEncGetVersion(char **faac_id_string,
63 | char **faac_copyright_string);
64 |
65 |
66 | faacEncConfigurationPtr FAACAPI
67 | faacEncGetCurrentConfiguration(faacEncHandle hEncoder);
68 |
69 |
70 | int FAACAPI faacEncSetConfiguration(faacEncHandle hEncoder,
71 | faacEncConfigurationPtr config);
72 |
73 |
74 | faacEncHandle FAACAPI faacEncOpen(unsigned long sampleRate,
75 | unsigned int numChannels,
76 | unsigned long *inputSamples,
77 | unsigned long *maxOutputBytes);
78 |
79 |
80 | int FAACAPI faacEncGetDecoderSpecificInfo(faacEncHandle hEncoder, unsigned char **ppBuffer,
81 | unsigned long *pSizeOfDecoderSpecificInfo);
82 |
83 |
84 | int FAACAPI faacEncEncode(faacEncHandle hEncoder, int32_t * inputBuffer, unsigned int samplesInput,
85 | unsigned char *outputBuffer,
86 | unsigned int bufferSize);
87 |
88 |
89 | int FAACAPI faacEncClose(faacEncHandle hEncoder);
90 |
91 |
92 |
93 | #pragma pack(pop)
94 |
95 | #ifdef __cplusplus
96 | }
97 | #endif /* __cplusplus */
98 |
99 | #endif /* _FAAC_H_ */
100 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 | #ifndef AVUTIL_ADLER32_H
22 | #define AVUTIL_ADLER32_H
23 |
24 | #include
25 | #include "attributes.h"
26 |
27 | /**
28 | * @file
29 | * Public header for libavutil Adler32 hasher
30 | *
31 | * @defgroup lavu_adler32 Adler32
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | /**
37 | * Calculate the Adler32 checksum of a buffer.
38 | *
39 | * Passing the return value to a subsequent av_adler32_update() call
40 | * allows the checksum of multiple buffers to be calculated as though
41 | * they were concatenated.
42 | *
43 | * @param adler initial checksum value
44 | * @param buf pointer to input buffer
45 | * @param len size of input buffer
46 | * @return updated checksum
47 | */
48 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
49 | unsigned int len) av_pure;
50 |
51 | /**
52 | * @}
53 | */
54 |
55 | #endif /* AVUTIL_ADLER32_H */
56 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/avassert.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2010 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 | /**
22 | * @file
23 | * simple assert() macros that are a bit more flexible than ISO C assert().
24 | * @author Michael Niedermayer
25 | */
26 |
27 | #ifndef AVUTIL_AVASSERT_H
28 | #define AVUTIL_AVASSERT_H
29 |
30 | #include
31 | #include "avutil.h"
32 | #include "log.h"
33 |
34 | /**
35 | * assert() equivalent, that is always enabled.
36 | */
37 | #define av_assert0(cond) do { \
38 | if (!(cond)) { \
39 | av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n", \
40 | AV_STRINGIFY(cond), __FILE__, __LINE__); \
41 | abort(); \
42 | } \
43 | } while (0)
44 |
45 |
46 | /**
47 | * assert() equivalent, that does not lie in speed critical code.
48 | * These asserts() thus can be enabled without fearing speedloss.
49 | */
50 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0
51 | #define av_assert1(cond) av_assert0(cond)
52 | #else
53 | #define av_assert1(cond) ((void)0)
54 | #endif
55 |
56 |
57 | /**
58 | * assert() equivalent, that does lie in speed critical code.
59 | */
60 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1
61 | #define av_assert2(cond) av_assert0(cond)
62 | #else
63 | #define av_assert2(cond) ((void)0)
64 | #endif
65 |
66 | #endif /* AVUTIL_AVASSERT_H */
67 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 1
6 | #define AV_HAVE_INCOMPATIBLE_LIBAV_ABI 0
7 | #endif /* AVUTIL_AVCONFIG_H */
8 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/base64.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com)
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_BASE64_H
22 | #define AVUTIL_BASE64_H
23 |
24 | #include
25 |
26 | /**
27 | * @defgroup lavu_base64 Base64
28 | * @ingroup lavu_crypto
29 | * @{
30 | */
31 |
32 |
33 | /**
34 | * Decode a base64-encoded string.
35 | *
36 | * @param out buffer for decoded data
37 | * @param in null-terminated input string
38 | * @param out_size size in bytes of the out buffer, must be at
39 | * least 3/4 of the length of in
40 | * @return number of bytes written, or a negative value in case of
41 | * invalid input
42 | */
43 | int av_base64_decode(uint8_t *out, const char *in, int out_size);
44 |
45 | /**
46 | * Encode data to base64 and null-terminate.
47 | *
48 | * @param out buffer for encoded data
49 | * @param out_size size in bytes of the out buffer (including the
50 | * null terminator), must be at least AV_BASE64_SIZE(in_size)
51 | * @param in input buffer containing the data to encode
52 | * @param in_size size in bytes of the in buffer
53 | * @return out or NULL in case of error
54 | */
55 | char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);
56 |
57 | /**
58 | * Calculate the output size needed to base64-encode x bytes to a
59 | * null-terminated string.
60 | */
61 | #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1)
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | #endif /* AVUTIL_BASE64_H */
68 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/blowfish.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Blowfish algorithm
3 | * Copyright (c) 2012 Samuel Pitoiset
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 AVUTIL_BLOWFISH_H
23 | #define AVUTIL_BLOWFISH_H
24 |
25 | #include
26 |
27 | /**
28 | * @defgroup lavu_blowfish Blowfish
29 | * @ingroup lavu_crypto
30 | * @{
31 | */
32 |
33 | #define AV_BF_ROUNDS 16
34 |
35 | typedef struct AVBlowfish {
36 | uint32_t p[AV_BF_ROUNDS + 2];
37 | uint32_t s[4][256];
38 | } AVBlowfish;
39 |
40 | /**
41 | * Allocate an AVBlowfish context.
42 | */
43 | AVBlowfish *av_blowfish_alloc(void);
44 |
45 | /**
46 | * Initialize an AVBlowfish context.
47 | *
48 | * @param ctx an AVBlowfish context
49 | * @param key a key
50 | * @param key_len length of the key
51 | */
52 | void av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len);
53 |
54 | /**
55 | * Encrypt or decrypt a buffer using a previously initialized context.
56 | *
57 | * @param ctx an AVBlowfish context
58 | * @param xl left four bytes halves of input to be encrypted
59 | * @param xr right four bytes halves of input to be encrypted
60 | * @param decrypt 0 for encryption, 1 for decryption
61 | */
62 | void av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr,
63 | int decrypt);
64 |
65 | /**
66 | * Encrypt or decrypt a buffer using a previously initialized context.
67 | *
68 | * @param ctx an AVBlowfish context
69 | * @param dst destination array, can be equal to src
70 | * @param src source array, can be equal to dst
71 | * @param count number of 8 byte blocks
72 | * @param iv initialization vector for CBC mode, if NULL ECB will be used
73 | * @param decrypt 0 for encryption, 1 for decryption
74 | */
75 | void av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
76 | int count, uint8_t *iv, int decrypt);
77 |
78 | /**
79 | * @}
80 | */
81 |
82 | #endif /* AVUTIL_BLOWFISH_H */
83 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/camellia.h:
--------------------------------------------------------------------------------
1 | /*
2 | * An implementation of the CAMELLIA algorithm as mentioned in RFC3713
3 | * Copyright (c) 2014 Supraja Meedinti
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 AVUTIL_CAMELLIA_H
23 | #define AVUTIL_CAMELLIA_H
24 |
25 | #include
26 |
27 |
28 | /**
29 | * @file
30 | * @brief Public header for libavutil CAMELLIA algorithm
31 | * @defgroup lavu_camellia CAMELLIA
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_camellia_size;
37 |
38 | struct AVCAMELLIA;
39 |
40 | /**
41 | * Allocate an AVCAMELLIA context
42 | * To free the struct: av_free(ptr)
43 | */
44 | struct AVCAMELLIA *av_camellia_alloc(void);
45 |
46 | /**
47 | * Initialize an AVCAMELLIA context.
48 | *
49 | * @param ctx an AVCAMELLIA context
50 | * @param key a key of 16, 24, 32 bytes used for encryption/decryption
51 | * @param key_bits number of keybits: possible are 128, 192, 256
52 | */
53 | int av_camellia_init(struct AVCAMELLIA *ctx, const uint8_t *key, int key_bits);
54 |
55 | /**
56 | * Encrypt or decrypt a buffer using a previously initialized context
57 | *
58 | * @param ctx an AVCAMELLIA context
59 | * @param dst destination array, can be equal to src
60 | * @param src source array, can be equal to dst
61 | * @param count number of 16 byte blocks
62 | * @paran iv initialization vector for CBC mode, NULL for ECB mode
63 | * @param decrypt 0 for encryption, 1 for decryption
64 | */
65 | void av_camellia_crypt(struct AVCAMELLIA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);
66 |
67 | /**
68 | * @}
69 | */
70 | #endif /* AVUTIL_CAMELLIA_H */
71 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/cast5.h:
--------------------------------------------------------------------------------
1 | /*
2 | * An implementation of the CAST128 algorithm as mentioned in RFC2144
3 | * Copyright (c) 2014 Supraja Meedinti
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 AVUTIL_CAST5_H
23 | #define AVUTIL_CAST5_H
24 |
25 | #include
26 |
27 |
28 | /**
29 | * @file
30 | * @brief Public header for libavutil CAST5 algorithm
31 | * @defgroup lavu_cast5 CAST5
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_cast5_size;
37 |
38 | struct AVCAST5;
39 |
40 | /**
41 | * Allocate an AVCAST5 context
42 | * To free the struct: av_free(ptr)
43 | */
44 | struct AVCAST5 *av_cast5_alloc(void);
45 | /**
46 | * Initialize an AVCAST5 context.
47 | *
48 | * @param ctx an AVCAST5 context
49 | * @param key a key of 5,6,...16 bytes used for encryption/decryption
50 | * @param key_bits number of keybits: possible are 40,48,...,128
51 | * @return 0 on success, less than 0 on failure
52 | */
53 | int av_cast5_init(struct AVCAST5 *ctx, const uint8_t *key, int key_bits);
54 |
55 | /**
56 | * Encrypt or decrypt a buffer using a previously initialized context, ECB mode only
57 | *
58 | * @param ctx an AVCAST5 context
59 | * @param dst destination array, can be equal to src
60 | * @param src source array, can be equal to dst
61 | * @param count number of 8 byte blocks
62 | * @param decrypt 0 for encryption, 1 for decryption
63 | */
64 | void av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, int decrypt);
65 |
66 | /**
67 | * Encrypt or decrypt a buffer using a previously initialized context
68 | *
69 | * @param ctx an AVCAST5 context
70 | * @param dst destination array, can be equal to src
71 | * @param src source array, can be equal to dst
72 | * @param count number of 8 byte blocks
73 | * @param iv initialization vector for CBC mode, NULL for ECB mode
74 | * @param decrypt 0 for encryption, 1 for decryption
75 | */
76 | void av_cast5_crypt2(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
77 | /**
78 | * @}
79 | */
80 | #endif /* AVUTIL_CAST5_H */
81 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/des.h:
--------------------------------------------------------------------------------
1 | /*
2 | * DES encryption/decryption
3 | * Copyright (c) 2007 Reimar Doeffinger
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 AVUTIL_DES_H
23 | #define AVUTIL_DES_H
24 |
25 | #include
26 |
27 | /**
28 | * @defgroup lavu_des DES
29 | * @ingroup lavu_crypto
30 | * @{
31 | */
32 |
33 | typedef struct AVDES {
34 | uint64_t round_keys[3][16];
35 | int triple_des;
36 | } AVDES;
37 |
38 | /**
39 | * Allocate an AVDES context.
40 | */
41 | AVDES *av_des_alloc(void);
42 |
43 | /**
44 | * @brief Initializes an AVDES context.
45 | *
46 | * @param key_bits must be 64 or 192
47 | * @param decrypt 0 for encryption/CBC-MAC, 1 for decryption
48 | * @return zero on success, negative value otherwise
49 | */
50 | int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt);
51 |
52 | /**
53 | * @brief Encrypts / decrypts using the DES algorithm.
54 | *
55 | * @param count number of 8 byte blocks
56 | * @param dst destination array, can be equal to src, must be 8-byte aligned
57 | * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL
58 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used,
59 | * must be 8-byte aligned
60 | * @param decrypt 0 for encryption, 1 for decryption
61 | */
62 | void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
63 |
64 | /**
65 | * @brief Calculates CBC-MAC using the DES algorithm.
66 | *
67 | * @param count number of 8 byte blocks
68 | * @param dst destination array, can be equal to src, must be 8-byte aligned
69 | * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL
70 | */
71 | void av_des_mac(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count);
72 |
73 | /**
74 | * @}
75 | */
76 |
77 | #endif /* AVUTIL_DES_H */
78 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 "N-76639-g58d32c0"
5 | #endif /* AVUTIL_FFVERSION_H */
6 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/file.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_FILE_H
20 | #define AVUTIL_FILE_H
21 |
22 | #include
23 |
24 | #include "avutil.h"
25 |
26 | /**
27 | * @file
28 | * Misc file utilities.
29 | */
30 |
31 | /**
32 | * Read the file with name filename, and put its content in a newly
33 | * allocated buffer or map it with mmap() when available.
34 | * In case of success set *bufptr to the read or mmapped buffer, and
35 | * *size to the size in bytes of the buffer in *bufptr.
36 | * The returned buffer must be released with av_file_unmap().
37 | *
38 | * @param log_offset loglevel offset used for logging
39 | * @param log_ctx context used for logging
40 | * @return a non negative number in case of success, a negative value
41 | * corresponding to an AVERROR error code in case of failure
42 | */
43 | av_warn_unused_result
44 | int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
45 | int log_offset, void *log_ctx);
46 |
47 | /**
48 | * Unmap or free the buffer bufptr created by av_file_map().
49 | *
50 | * @param size size in bytes of bufptr, must be the same as returned
51 | * by av_file_map()
52 | */
53 | void av_file_unmap(uint8_t *bufptr, size_t size);
54 |
55 | /**
56 | * Wrapper to work around the lack of mkstemp() on mingw.
57 | * Also, tries to create file in /tmp first, if possible.
58 | * *prefix can be a character constant; *filename will be allocated internally.
59 | * @return file descriptor of opened file (or negative value corresponding to an
60 | * AVERROR code on error)
61 | * and opened file name in **filename.
62 | * @note On very old libcs it is necessary to set a secure umask before
63 | * calling this, av_tempfile() can't call umask itself as it is used in
64 | * libraries and could interfere with the calling application.
65 | */
66 | int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
67 |
68 | #endif /* AVUTIL_FILE_H */
69 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/lfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Lagged Fibonacci PRNG
3 | * Copyright (c) 2008 Michael Niedermayer
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 AVUTIL_LFG_H
23 | #define AVUTIL_LFG_H
24 |
25 | typedef struct AVLFG {
26 | unsigned int state[64];
27 | int index;
28 | } AVLFG;
29 |
30 | void av_lfg_init(AVLFG *c, unsigned int seed);
31 |
32 | /**
33 | * Get the next random unsigned 32-bit number using an ALFG.
34 | *
35 | * Please also consider a simple LCG like state= state*1664525+1013904223,
36 | * it may be good enough and faster for your specific use case.
37 | */
38 | static inline unsigned int av_lfg_get(AVLFG *c){
39 | c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63];
40 | return c->state[c->index++ & 63];
41 | }
42 |
43 | /**
44 | * Get the next random unsigned 32-bit number using a MLFG.
45 | *
46 | * Please also consider av_lfg_get() above, it is faster.
47 | */
48 | static inline unsigned int av_mlfg_get(AVLFG *c){
49 | unsigned int a= c->state[(c->index-55) & 63];
50 | unsigned int b= c->state[(c->index-24) & 63];
51 | return c->state[c->index++ & 63] = 2*a*b+a+b;
52 | }
53 |
54 | /**
55 | * Get the next two numbers generated by a Box-Muller Gaussian
56 | * generator using the random numbers issued by lfg.
57 | *
58 | * @param out array where the two generated numbers are placed
59 | */
60 | void av_bmg_get(AVLFG *lfg, double out[2]);
61 |
62 | #endif /* AVUTIL_LFG_H */
63 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/lzo.h:
--------------------------------------------------------------------------------
1 | /*
2 | * LZO 1x decompression
3 | * copyright (c) 2006 Reimar Doeffinger
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 AVUTIL_LZO_H
23 | #define AVUTIL_LZO_H
24 |
25 | /**
26 | * @defgroup lavu_lzo LZO
27 | * @ingroup lavu_crypto
28 | *
29 | * @{
30 | */
31 |
32 | #include
33 |
34 | /** @name Error flags returned by av_lzo1x_decode
35 | * @{ */
36 | /// end of the input buffer reached before decoding finished
37 | #define AV_LZO_INPUT_DEPLETED 1
38 | /// decoded data did not fit into output buffer
39 | #define AV_LZO_OUTPUT_FULL 2
40 | /// a reference to previously decoded data was wrong
41 | #define AV_LZO_INVALID_BACKPTR 4
42 | /// a non-specific error in the compressed bitstream
43 | #define AV_LZO_ERROR 8
44 | /** @} */
45 |
46 | #define AV_LZO_INPUT_PADDING 8
47 | #define AV_LZO_OUTPUT_PADDING 12
48 |
49 | /**
50 | * @brief Decodes LZO 1x compressed data.
51 | * @param out output buffer
52 | * @param outlen size of output buffer, number of bytes left are returned here
53 | * @param in input buffer
54 | * @param inlen size of input buffer, number of bytes left are returned here
55 | * @return 0 on success, otherwise a combination of the error flags above
56 | *
57 | * Make sure all buffers are appropriately padded, in must provide
58 | * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes.
59 | */
60 | int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | #endif /* AVUTIL_LZO_H */
67 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 | #endif /* AVUTIL_MACROS_H */
49 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/md5.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 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_MD5_H
22 | #define AVUTIL_MD5_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_md5 MD5
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_md5_size;
36 |
37 | struct AVMD5;
38 |
39 | /**
40 | * Allocate an AVMD5 context.
41 | */
42 | struct AVMD5 *av_md5_alloc(void);
43 |
44 | /**
45 | * Initialize MD5 hashing.
46 | *
47 | * @param ctx pointer to the function context (of size av_md5_size)
48 | */
49 | void av_md5_init(struct AVMD5 *ctx);
50 |
51 | /**
52 | * Update hash value.
53 | *
54 | * @param ctx hash function context
55 | * @param src input data to update hash with
56 | * @param len input data length
57 | */
58 | void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, int len);
59 |
60 | /**
61 | * Finish hashing and output digest value.
62 | *
63 | * @param ctx hash function context
64 | * @param dst buffer where output digest value is stored
65 | */
66 | void av_md5_final(struct AVMD5 *ctx, uint8_t *dst);
67 |
68 | /**
69 | * Hash an array of data.
70 | *
71 | * @param dst The output buffer to write the digest into
72 | * @param src The data to hash
73 | * @param len The length of the data, in bytes
74 | */
75 | void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len);
76 |
77 | /**
78 | * @}
79 | */
80 |
81 | #endif /* AVUTIL_MD5_H */
82 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 | } AVMotionVector;
49 |
50 | #endif /* AVUTIL_MOTION_VECTOR_H */
51 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/murmur3.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Reimar Döffinger
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_MURMUR3_H
22 | #define AVUTIL_MURMUR3_H
23 |
24 | #include
25 |
26 | struct AVMurMur3 *av_murmur3_alloc(void);
27 | void av_murmur3_init_seeded(struct AVMurMur3 *c, uint64_t seed);
28 | void av_murmur3_init(struct AVMurMur3 *c);
29 | void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len);
30 | void av_murmur3_final(struct AVMurMur3 *c, uint8_t dst[16]);
31 |
32 | #endif /* AVUTIL_MURMUR3_H */
33 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/replaygain.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * This file is part of FFmpeg.
4 | *
5 | * FFmpeg is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) any later version.
9 | *
10 | * FFmpeg is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with FFmpeg; if not, write to the Free Software
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 | */
19 |
20 | #ifndef AVUTIL_REPLAYGAIN_H
21 | #define AVUTIL_REPLAYGAIN_H
22 |
23 | #include
24 |
25 | /**
26 | * ReplayGain information (see
27 | * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).
28 | * The size of this struct is a part of the public ABI.
29 | */
30 | typedef struct AVReplayGain {
31 | /**
32 | * Track replay gain in microbels (divide by 100000 to get the value in dB).
33 | * Should be set to INT32_MIN when unknown.
34 | */
35 | int32_t track_gain;
36 | /**
37 | * Peak track amplitude, with 100000 representing full scale (but values
38 | * may overflow). 0 when unknown.
39 | */
40 | uint32_t track_peak;
41 | /**
42 | * Same as track_gain, but for the whole album.
43 | */
44 | int32_t album_gain;
45 | /**
46 | * Same as track_peak, but for the whole album,
47 | */
48 | uint32_t album_peak;
49 | } AVReplayGain;
50 |
51 | #endif /* AVUTIL_REPLAYGAIN_H */
52 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/ripemd.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Michael Niedermayer
3 | * Copyright (C) 2013 James Almer
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 AVUTIL_RIPEMD_H
23 | #define AVUTIL_RIPEMD_H
24 |
25 | #include
26 |
27 | #include "attributes.h"
28 | #include "version.h"
29 |
30 | /**
31 | * @defgroup lavu_ripemd RIPEMD
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_ripemd_size;
37 |
38 | struct AVRIPEMD;
39 |
40 | /**
41 | * Allocate an AVRIPEMD context.
42 | */
43 | struct AVRIPEMD *av_ripemd_alloc(void);
44 |
45 | /**
46 | * Initialize RIPEMD hashing.
47 | *
48 | * @param context pointer to the function context (of size av_ripemd_size)
49 | * @param bits number of bits in digest (128, 160, 256 or 320 bits)
50 | * @return zero if initialization succeeded, -1 otherwise
51 | */
52 | int av_ripemd_init(struct AVRIPEMD* context, int bits);
53 |
54 | /**
55 | * Update hash value.
56 | *
57 | * @param context hash function context
58 | * @param data input data to update hash with
59 | * @param len input data length
60 | */
61 | void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len);
62 |
63 | /**
64 | * Finish hashing and output digest value.
65 | *
66 | * @param context hash function context
67 | * @param digest buffer where output digest value is stored
68 | */
69 | void av_ripemd_final(struct AVRIPEMD* context, uint8_t *digest);
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | #endif /* AVUTIL_RIPEMD_H */
76 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/sha.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_SHA_H
22 | #define AVUTIL_SHA_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_sha SHA
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_sha_size;
36 |
37 | struct AVSHA;
38 |
39 | /**
40 | * Allocate an AVSHA context.
41 | */
42 | struct AVSHA *av_sha_alloc(void);
43 |
44 | /**
45 | * Initialize SHA-1 or SHA-2 hashing.
46 | *
47 | * @param context pointer to the function context (of size av_sha_size)
48 | * @param bits number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits)
49 | * @return zero if initialization succeeded, -1 otherwise
50 | */
51 | int av_sha_init(struct AVSHA* context, int bits);
52 |
53 | /**
54 | * Update hash value.
55 | *
56 | * @param context hash function context
57 | * @param data input data to update hash with
58 | * @param len input data length
59 | */
60 | void av_sha_update(struct AVSHA* context, const uint8_t* data, unsigned int len);
61 |
62 | /**
63 | * Finish hashing and output digest value.
64 | *
65 | * @param context hash function context
66 | * @param digest buffer where output digest value is stored
67 | */
68 | void av_sha_final(struct AVSHA* context, uint8_t *digest);
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | #endif /* AVUTIL_SHA_H */
75 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/sha512.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Michael Niedermayer
3 | * Copyright (C) 2013 James Almer
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 AVUTIL_SHA512_H
23 | #define AVUTIL_SHA512_H
24 |
25 | #include
26 |
27 | #include "attributes.h"
28 | #include "version.h"
29 |
30 | /**
31 | * @defgroup lavu_sha512 SHA512
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_sha512_size;
37 |
38 | struct AVSHA512;
39 |
40 | /**
41 | * Allocate an AVSHA512 context.
42 | */
43 | struct AVSHA512 *av_sha512_alloc(void);
44 |
45 | /**
46 | * Initialize SHA-2 512 hashing.
47 | *
48 | * @param context pointer to the function context (of size av_sha512_size)
49 | * @param bits number of bits in digest (224, 256, 384 or 512 bits)
50 | * @return zero if initialization succeeded, -1 otherwise
51 | */
52 | int av_sha512_init(struct AVSHA512* context, int bits);
53 |
54 | /**
55 | * Update hash value.
56 | *
57 | * @param context hash function context
58 | * @param data input data to update hash with
59 | * @param len input data length
60 | */
61 | void av_sha512_update(struct AVSHA512* context, const uint8_t* data, unsigned int len);
62 |
63 | /**
64 | * Finish hashing and output digest value.
65 | *
66 | * @param context hash function context
67 | * @param digest buffer where output digest value is stored
68 | */
69 | void av_sha512_final(struct AVSHA512* context, uint8_t *digest);
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | #endif /* AVUTIL_SHA512_H */
76 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/tea.h:
--------------------------------------------------------------------------------
1 | /*
2 | * A 32-bit implementation of the TEA algorithm
3 | * Copyright (c) 2015 Vesselin Bontchev
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 AVUTIL_TEA_H
23 | #define AVUTIL_TEA_H
24 |
25 | #include
26 |
27 | /**
28 | * @file
29 | * @brief Public header for libavutil TEA algorithm
30 | * @defgroup lavu_tea TEA
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_tea_size;
36 |
37 | struct AVTEA;
38 |
39 | /**
40 | * Allocate an AVTEA context
41 | * To free the struct: av_free(ptr)
42 | */
43 | struct AVTEA *av_tea_alloc(void);
44 |
45 | /**
46 | * Initialize an AVTEA context.
47 | *
48 | * @param ctx an AVTEA context
49 | * @param key a key of 16 bytes used for encryption/decryption
50 | * @param rounds the number of rounds in TEA (64 is the "standard")
51 | */
52 | void av_tea_init(struct AVTEA *ctx, const uint8_t key[16], int rounds);
53 |
54 | /**
55 | * Encrypt or decrypt a buffer using a previously initialized context.
56 | *
57 | * @param ctx an AVTEA context
58 | * @param dst destination array, can be equal to src
59 | * @param src source array, can be equal to dst
60 | * @param count number of 8 byte blocks
61 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used
62 | * @param decrypt 0 for encryption, 1 for decryption
63 | */
64 | void av_tea_crypt(struct AVTEA *ctx, uint8_t *dst, const uint8_t *src,
65 | int count, uint8_t *iv, int decrypt);
66 |
67 | /**
68 | * @}
69 | */
70 |
71 | #endif /* AVUTIL_TEA_H */
72 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/timestamp.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 | * timestamp utils, mostly useful for debugging/logging purposes
22 | */
23 |
24 | #ifndef AVUTIL_TIMESTAMP_H
25 | #define AVUTIL_TIMESTAMP_H
26 |
27 | #include "common.h"
28 |
29 | #if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) && !defined(PRId64)
30 | #error missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS
31 | #endif
32 |
33 | #define AV_TS_MAX_STRING_SIZE 32
34 |
35 | /**
36 | * Fill the provided buffer with a string containing a timestamp
37 | * representation.
38 | *
39 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE
40 | * @param ts the timestamp to represent
41 | * @return the buffer in input
42 | */
43 | static inline char *av_ts_make_string(char *buf, int64_t ts)
44 | {
45 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
46 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%"PRId64, ts);
47 | return buf;
48 | }
49 |
50 | /**
51 | * Convenience macro, the return value should be used only directly in
52 | * function arguments but never stand-alone.
53 | */
54 | #define av_ts2str(ts) av_ts_make_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts)
55 |
56 | /**
57 | * Fill the provided buffer with a string containing a timestamp time
58 | * representation.
59 | *
60 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE
61 | * @param ts the timestamp to represent
62 | * @param tb the timebase of the timestamp
63 | * @return the buffer in input
64 | */
65 | static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb)
66 | {
67 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
68 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts);
69 | return buf;
70 | }
71 |
72 | /**
73 | * Convenience macro, the return value should be used only directly in
74 | * function arguments but never stand-alone.
75 | */
76 | #define av_ts2timestr(ts, tb) av_ts_make_time_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts, tb)
77 |
78 | #endif /* AVUTIL_TIMESTAMP_H */
79 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/twofish.h:
--------------------------------------------------------------------------------
1 | /*
2 | * An implementation of the TwoFish algorithm
3 | * Copyright (c) 2015 Supraja Meedinti
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 AVUTIL_TWOFISH_H
23 | #define AVUTIL_TWOFISH_H
24 |
25 | #include
26 |
27 |
28 | /**
29 | * @file
30 | * @brief Public header for libavutil TWOFISH algorithm
31 | * @defgroup lavu_twofish TWOFISH
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_twofish_size;
37 |
38 | struct AVTWOFISH;
39 |
40 | /**
41 | * Allocate an AVTWOFISH context
42 | * To free the struct: av_free(ptr)
43 | */
44 | struct AVTWOFISH *av_twofish_alloc(void);
45 |
46 | /**
47 | * Initialize an AVTWOFISH context.
48 | *
49 | * @param ctx an AVTWOFISH context
50 | * @param key a key of size ranging from 1 to 32 bytes used for encryption/decryption
51 | * @param key_bits number of keybits: 128, 192, 256 If less than the required, padded with zeroes to nearest valid value; return value is 0 if key_bits is 128/192/256, -1 if less than 0, 1 otherwise
52 | */
53 | int av_twofish_init(struct AVTWOFISH *ctx, const uint8_t *key, int key_bits);
54 |
55 | /**
56 | * Encrypt or decrypt a buffer using a previously initialized context
57 | *
58 | * @param ctx an AVTWOFISH context
59 | * @param dst destination array, can be equal to src
60 | * @param src source array, can be equal to dst
61 | * @param count number of 16 byte blocks
62 | * @paran iv initialization vector for CBC mode, NULL for ECB mode
63 | * @param decrypt 0 for encryption, 1 for decryption
64 | */
65 | void av_twofish_crypt(struct AVTWOFISH *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);
66 |
67 | /**
68 | * @}
69 | */
70 | #endif /* AVUTIL_TWOFISH_H */
71 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/libavutil/xtea.h:
--------------------------------------------------------------------------------
1 | /*
2 | * A 32-bit implementation of the XTEA algorithm
3 | * Copyright (c) 2012 Samuel Pitoiset
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 AVUTIL_XTEA_H
23 | #define AVUTIL_XTEA_H
24 |
25 | #include
26 |
27 | /**
28 | * @file
29 | * @brief Public header for libavutil XTEA algorithm
30 | * @defgroup lavu_xtea XTEA
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | typedef struct AVXTEA {
36 | uint32_t key[16];
37 | } AVXTEA;
38 |
39 | /**
40 | * Allocate an AVXTEA context.
41 | */
42 | AVXTEA *av_xtea_alloc(void);
43 |
44 | /**
45 | * Initialize an AVXTEA context.
46 | *
47 | * @param ctx an AVXTEA context
48 | * @param key a key of 16 bytes used for encryption/decryption
49 | */
50 | void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);
51 |
52 | /**
53 | * Encrypt or decrypt a buffer using a previously initialized context.
54 | *
55 | * @param ctx an AVXTEA context
56 | * @param dst destination array, can be equal to src
57 | * @param src source array, can be equal to dst
58 | * @param count number of 8 byte blocks
59 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used
60 | * @param decrypt 0 for encryption, 1 for decryption
61 | */
62 | void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
63 | int count, uint8_t *iv, int decrypt);
64 |
65 | /**
66 | * @}
67 | */
68 |
69 | #endif /* AVUTIL_XTEA_H */
70 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/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 0
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 | #endif /* SWSCALE_VERSION_H */
50 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/x264/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | *.a
3 | *.diff
4 | *.orig
5 | *.rej
6 | *.dll*
7 | *.exe
8 | *.def
9 | *.lib
10 | *.pdb
11 | *.mo
12 | *.o
13 | *.patch
14 | *.pc
15 | *.pot
16 | *.so*
17 | *.dylib
18 | .*.swp
19 | .depend
20 | .DS_Store
21 | config.h
22 | config.mak
23 | config.log
24 | x264_config.h
25 | x264
26 | checkasm
27 |
28 | *.264
29 | *.h264
30 | *.2pass
31 | *.ffindex
32 | *.avs
33 | *.mkv
34 | *.flv
35 | *.mp4
36 | *.y4m
37 | *.yuv
38 | *.log
39 | *.mbtree
40 | *.temp
41 | *.pyc
42 | *.pgd
43 | *.pgc
44 |
45 | .digress_x264
46 | dataDec.txt
47 | log.dec
48 | common/oclobj.h
49 | x264_lookahead.clbin
50 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/include/x264/x264_config.h:
--------------------------------------------------------------------------------
1 | #define X264_BIT_DEPTH 8
2 | #define X264_GPL 1
3 | #define X264_INTERLACED 1
4 | #define X264_CHROMA_FORMAT 0
5 | #define X264_VERSION ""
6 | #define X264_POINTVER "0.148.x"
7 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/lib/libavutil.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/livepush/src/main/cpp/lib/libavutil.a
--------------------------------------------------------------------------------
/livepush/src/main/cpp/lib/libfaac.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/livepush/src/main/cpp/lib/libfaac.a
--------------------------------------------------------------------------------
/livepush/src/main/cpp/lib/libswscale.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/livepush/src/main/cpp/lib/libswscale.a
--------------------------------------------------------------------------------
/livepush/src/main/cpp/lib/libx264.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dengzhi00/Live_Rtmp2/c60c4bd766f97cd7f727cdd2a8091bf7055b186f/livepush/src/main/cpp/lib/libx264.a
--------------------------------------------------------------------------------
/livepush/src/main/cpp/librtmp/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH:= $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE:= rtmp
6 |
7 | LOCAL_C_INCLUDES := $(LOCAL_PATH)
8 |
9 | #定义宏遍历jni下所有文件及子目录文件
10 | define audio-all-cpp-files
11 | $(patsubst ./%,%, \
12 | $(shell cd $(LOCAL_PATH) ;\
13 | find $(1) -name "*.c*") \
14 | )
15 | endef
16 | LOCAL_SRC_FILES := $(call audio-all-cpp-files,.)
17 | #LOCAL_SRC_FILES := \
18 | amf.c \
19 | hashswf.c \
20 | log.c \
21 | parseurl.c \
22 | rtmp.c
23 | #LOCAL_SRC_FILES := librtmp.so
24 |
25 | LOCAL_CFLAGS := -Wall -O2 -DSYS=posix -DNO_CRYPTO
26 |
27 |
28 | include $(BUILD_STATIC_LIBRARY)
29 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/librtmp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #设置变量 cflags
2 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -mfloat-abi=softfp -mfpu=vfpv3-d16 -O2 -DSYS=posix -DNO_CRYPTO" )
3 |
4 | #设置源文件变量
5 | file(GLOB rtmp_source *.c)
6 |
7 | #编译 librtmp.a
8 | add_library( #模块名
9 | rtmp
10 | # 动态库
11 | STATIC
12 | #源文件
13 | ${rtmp_source} )
--------------------------------------------------------------------------------
/livepush/src/main/cpp/librtmp/bytes.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2005-2008 Team XBMC
3 | * http://www.xbmc.org
4 | * Copyright (C) 2008-2009 Andrej Stepanchuk
5 | * Copyright (C) 2009-2010 Howard Chu
6 | *
7 | * This file is part of librtmp.
8 | *
9 | * librtmp is free software; you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation; either version 2.1,
12 | * or (at your option) any later version.
13 | *
14 | * librtmp is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public License
20 | * along with librtmp see the file COPYING. If not, write to
21 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 | * Boston, MA 02110-1301, USA.
23 | * http://www.gnu.org/copyleft/lgpl.html
24 | */
25 |
26 | #ifndef __BYTES_H__
27 | #define __BYTES_H__
28 |
29 | #include
30 |
31 | #ifdef _WIN32
32 | /* Windows is little endian only */
33 | #define __LITTLE_ENDIAN 1234
34 | #define __BIG_ENDIAN 4321
35 | #define __BYTE_ORDER __LITTLE_ENDIAN
36 | #define __FLOAT_WORD_ORDER __BYTE_ORDER
37 |
38 | typedef unsigned char uint8_t;
39 |
40 | #else /* !_WIN32 */
41 |
42 | #include
43 |
44 | #if defined(BYTE_ORDER) && !defined(__BYTE_ORDER)
45 | #define __BYTE_ORDER BYTE_ORDER
46 | #endif
47 |
48 | #if defined(BIG_ENDIAN) && !defined(__BIG_ENDIAN)
49 | #define __BIG_ENDIAN BIG_ENDIAN
50 | #endif
51 |
52 | #if defined(LITTLE_ENDIAN) && !defined(__LITTLE_ENDIAN)
53 | #define __LITTLE_ENDIAN LITTLE_ENDIAN
54 | #endif
55 |
56 | #endif /* !_WIN32 */
57 |
58 | /* define default endianness */
59 | #ifndef __LITTLE_ENDIAN
60 | #define __LITTLE_ENDIAN 1234
61 | #endif
62 |
63 | #ifndef __BIG_ENDIAN
64 | #define __BIG_ENDIAN 4321
65 | #endif
66 |
67 | #ifndef __BYTE_ORDER
68 | #warning "Byte order not defined on your system, assuming little endian!"
69 | #define __BYTE_ORDER __LITTLE_ENDIAN
70 | #endif
71 |
72 | /* ok, we assume to have the same float word order and byte order if float word order is not defined */
73 | #ifndef __FLOAT_WORD_ORDER
74 | #warning "Float word order not defined, assuming the same as byte order!"
75 | #define __FLOAT_WORD_ORDER __BYTE_ORDER
76 | #endif
77 |
78 | #if !defined(__BYTE_ORDER) || !defined(__FLOAT_WORD_ORDER)
79 | #error "Undefined byte or float word order!"
80 | #endif
81 |
82 | #if __FLOAT_WORD_ORDER != __BIG_ENDIAN && __FLOAT_WORD_ORDER != __LITTLE_ENDIAN
83 | #error "Unknown/unsupported float word order!"
84 | #endif
85 |
86 | #if __BYTE_ORDER != __BIG_ENDIAN && __BYTE_ORDER != __LITTLE_ENDIAN
87 | #error "Unknown/unsupported byte order!"
88 | #endif
89 |
90 | #endif
91 |
92 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/librtmp/http.h:
--------------------------------------------------------------------------------
1 | #ifndef __RTMP_HTTP_H__
2 | #define __RTMP_HTTP_H__
3 | /*
4 | * Copyright (C) 2010 Howard Chu
5 | * Copyright (C) 2010 Antti Ajanki
6 | *
7 | * This file is part of librtmp.
8 | *
9 | * librtmp is free software; you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation; either version 2.1,
12 | * or (at your option) any later version.
13 | *
14 | * librtmp is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public License
20 | * along with librtmp see the file COPYING. If not, write to
21 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 | * Boston, MA 02110-1301, USA.
23 | * http://www.gnu.org/copyleft/lgpl.html
24 | */
25 |
26 | typedef enum {
27 | HTTPRES_OK, /* result OK */
28 | HTTPRES_OK_NOT_MODIFIED, /* not modified since last request */
29 | HTTPRES_NOT_FOUND, /* not found */
30 | HTTPRES_BAD_REQUEST, /* client error */
31 | HTTPRES_SERVER_ERROR, /* server reported an error */
32 | HTTPRES_REDIRECTED, /* resource has been moved */
33 | HTTPRES_LOST_CONNECTION /* connection lost while waiting for data */
34 | } HTTPResult;
35 |
36 | struct HTTP_ctx {
37 | char *date;
38 | int size;
39 | int status;
40 | void *data;
41 | };
42 |
43 | typedef size_t (HTTP_read_callback)(void *ptr, size_t size, size_t nmemb, void *stream);
44 |
45 | HTTPResult HTTP_get(struct HTTP_ctx *http, const char *url, HTTP_read_callback *cb);
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/livepush/src/main/cpp/librtmp/log.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008-2009 Andrej Stepanchuk
3 | * Copyright (C) 2009-2010 Howard Chu
4 | *
5 | * This file is part of librtmp.
6 | *
7 | * librtmp is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU Lesser General Public License as
9 | * published by the Free Software Foundation; either version 2.1,
10 | * or (at your option) any later version.
11 | *
12 | * librtmp 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
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public License
18 | * along with librtmp see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 | * Boston, MA 02110-1301, USA.
21 | * http://www.gnu.org/copyleft/lgpl.html
22 | */
23 |
24 | #ifndef __RTMP_LOG_H__
25 | #define __RTMP_LOG_H__
26 |
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif
34 | /* Enable this to get full debugging output */
35 | /* #define _DEBUG */
36 |
37 | #ifdef _DEBUG
38 | #undef NODEBUG
39 | #endif
40 |
41 | typedef enum
42 | { RTMP_LOGCRIT=0, RTMP_LOGERROR, RTMP_LOGWARNING, RTMP_LOGINFO,
43 | RTMP_LOGDEBUG, RTMP_LOGDEBUG2, RTMP_LOGALL
44 | } RTMP_LogLevel;
45 |
46 | extern RTMP_LogLevel RTMP_debuglevel;
47 |
48 | typedef void (RTMP_LogCallback)(int level, const char *fmt, va_list);
49 | void RTMP_LogSetCallback(RTMP_LogCallback *cb);
50 | void RTMP_LogSetOutput(FILE *file);
51 | #ifdef __GNUC__
52 | void RTMP_LogPrintf(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
53 | void RTMP_LogStatus(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
54 | void RTMP_Log(int level, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
55 | #else
56 | void RTMP_LogPrintf(const char *format, ...);
57 | void RTMP_LogStatus(const char *format, ...);
58 | void RTMP_Log(int level, const char *format, ...);
59 | #endif
60 | void RTMP_LogHex(int level, const uint8_t *data, unsigned long len);
61 | void RTMP_LogHexString(int level, const uint8_t *data, unsigned long len);
62 | void RTMP_LogSetLevel(RTMP_LogLevel lvl);
63 | RTMP_LogLevel RTMP_LogGetLevel(void);
64 |
65 | #ifdef __cplusplus
66 | }
67 | #endif
68 |
69 | #endif
70 |
--------------------------------------------------------------------------------
/livepush/src/main/java/com/dzm/live/OnRtmpConnectListener.java:
--------------------------------------------------------------------------------
1 | package com.dzm.live;
2 |
3 | /**
4 | * Created by 83642 on 2017/9/2.
5 | */
6 |
7 | public interface OnRtmpConnectListener {
8 |
9 | void rtmpConnect(String msg,int code);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/livepush/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LivePush
3 |
4 |
--------------------------------------------------------------------------------
/livepush/src/test/java/com/dzm/live/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.dzm.live;
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 | * @see Testing documentation
10 | */
11 | public class ExampleUnitTest {
12 | @Test
13 | public void addition_isCorrect() throws Exception {
14 | assertEquals(4, 2 + 2);
15 | }
16 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':livepush', ':chatsimple', ':livecollector', ':liveffmpeg'
2 |
--------------------------------------------------------------------------------