├── .gitignore
├── Filter
├── CMakeLists.txt
├── cmake-build-debug
│ ├── CMakeCache.txt
│ ├── CMakeFiles
│ │ ├── 3.14.5
│ │ │ ├── CMakeCCompiler.cmake
│ │ │ ├── CMakeCXXCompiler.cmake
│ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ ├── CMakeSystem.cmake
│ │ │ ├── CompilerIdC
│ │ │ │ └── CMakeCCompilerId.c
│ │ │ └── CompilerIdCXX
│ │ │ │ └── CMakeCXXCompilerId.cpp
│ │ ├── CMakeDirectoryInformation.cmake
│ │ ├── CMakeOutput.log
│ │ ├── Filter.dir
│ │ │ ├── CXX.includecache
│ │ │ ├── DependInfo.cmake
│ │ │ ├── build.make
│ │ │ ├── cmake_clean.cmake
│ │ │ ├── depend.internal
│ │ │ ├── depend.make
│ │ │ ├── flags.make
│ │ │ ├── link.txt
│ │ │ └── progress.make
│ │ ├── Makefile.cmake
│ │ ├── Makefile2
│ │ ├── TargetDirectories.txt
│ │ ├── clion-environment.txt
│ │ ├── clion-log.txt
│ │ ├── cmake.check_cache
│ │ ├── feature_tests.bin
│ │ ├── feature_tests.c
│ │ ├── feature_tests.cxx
│ │ └── progress.marks
│ ├── Filter
│ ├── Filter.cbp
│ ├── Makefile
│ └── cmake_install.cmake
├── filter.cpp
├── filter.h
└── main.cpp
├── LICENSE
├── README.md
├── SceenRecord-h264
├── CMakeLists.txt
├── ScreenRecord.cpp
├── ScreenRecord.h
├── cmake-build-debug
│ ├── CMakeCache.txt
│ ├── CMakeFiles
│ │ ├── 3.14.5
│ │ │ ├── CMakeCCompiler.cmake
│ │ │ ├── CMakeCXXCompiler.cmake
│ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ ├── CMakeSystem.cmake
│ │ │ ├── CompilerIdC
│ │ │ │ └── CMakeCCompilerId.c
│ │ │ └── CompilerIdCXX
│ │ │ │ └── CMakeCXXCompilerId.cpp
│ │ ├── CMakeDirectoryInformation.cmake
│ │ ├── CMakeOutput.log
│ │ ├── Makefile.cmake
│ │ ├── Makefile2
│ │ ├── SceenRecord_h264.dir
│ │ │ ├── CXX.includecache
│ │ │ ├── DependInfo.cmake
│ │ │ ├── build.make
│ │ │ ├── cmake_clean.cmake
│ │ │ ├── depend.internal
│ │ │ ├── depend.make
│ │ │ ├── flags.make
│ │ │ ├── link.txt
│ │ │ └── progress.make
│ │ ├── TargetDirectories.txt
│ │ ├── clion-environment.txt
│ │ ├── clion-log.txt
│ │ ├── cmake.check_cache
│ │ ├── feature_tests.bin
│ │ ├── feature_tests.c
│ │ ├── feature_tests.cxx
│ │ └── progress.marks
│ ├── Makefile
│ ├── SceenRecord_h264
│ ├── SceenRecord_h264.cbp
│ └── cmake_install.cmake
└── main.cpp
├── ScreenRecord
├── .gitignore
├── CMakeLists.txt
├── ScreenRecorder.cpp
├── ScreenRecorder.h
├── cmake-build-debug
│ └── CMakeFiles
│ │ ├── 3.14.5
│ │ ├── CMakeCCompiler.cmake
│ │ ├── CMakeCXXCompiler.cmake
│ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ ├── CMakeSystem.cmake
│ │ ├── CompilerIdC
│ │ │ └── CMakeCCompilerId.c
│ │ └── CompilerIdCXX
│ │ │ └── CMakeCXXCompilerId.cpp
│ │ ├── CMakeOutput.log
│ │ ├── clion-environment.txt
│ │ ├── feature_tests.bin
│ │ └── feature_tests.c
└── main.cpp
├── docs
├── PTS-TimeStamp.md
├── _config.yml
├── filter-complex.md
├── filter.md
├── how-to-analysiz.md
├── iconcat.md
├── ifade.md
├── index.md
├── isetpts.md
├── overlay.md
├── screenrecord-h264.md
└── screenrecord.md
├── iconcat
├── avf_concat.c
└── cmake-build-debug
│ └── CMakeFiles
│ └── clion-log.txt
├── ifade
├── cmake-build-debug
│ └── CMakeFiles
│ │ └── clion-log.txt
└── ifade.c
├── ifilter
├── CMakeLists.txt
├── filter.cpp
├── filter.h
└── main.cpp
├── isetpts
└── setpts.c
├── itransfer
├── transfer.c
└── transfer.h
└── pts-timestamp
├── CMakeLists.txt
├── cmake-build-debug
├── CMakeCache.txt
├── CMakeFiles
│ ├── 3.14.5
│ │ ├── CMakeCCompiler.cmake
│ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ ├── CMakeSystem.cmake
│ │ └── CompilerIdC
│ │ │ └── CMakeCCompilerId.c
│ ├── CMakeDirectoryInformation.cmake
│ ├── CMakeOutput.log
│ ├── Makefile.cmake
│ ├── Makefile2
│ ├── TargetDirectories.txt
│ ├── clion-environment.txt
│ ├── clion-log.txt
│ ├── cmake.check_cache
│ ├── feature_tests.bin
│ ├── feature_tests.c
│ ├── progress.marks
│ └── pts_timestamp.dir
│ │ ├── C.includecache
│ │ ├── DependInfo.cmake
│ │ ├── build.make
│ │ ├── cmake_clean.cmake
│ │ ├── depend.internal
│ │ ├── depend.make
│ │ ├── flags.make
│ │ ├── link.txt
│ │ └── progress.make
├── Makefile
├── cmake_install.cmake
├── pts_timestamp
└── pts_timestamp.cbp
├── dpts.c
├── dpts.h
└── main.c
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | *.dll
18 |
19 | # Fortran module files
20 | *.mod
21 | *.smod
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 | *.lib
28 |
29 | # Executables
30 | *.exe
31 | *.out
32 | *.app
33 |
--------------------------------------------------------------------------------
/Filter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(Filter)
3 |
4 | set(CMAKE_CXX_STANDARD 14)
5 |
6 | find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
7 | find_library(AVCODEC_LIBRARY avcodec)
8 |
9 | find_path(AVFILTER_INCLUDE_DIR libavfilter/avfilter.h)
10 | find_library(AVFILTER_LIBRARY avfilter)
11 |
12 | find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
13 | find_library(AVFORMAT_LIBRARY avformat)
14 |
15 | find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h)
16 | find_library(AVUTIL_LIBRARY avutil)
17 |
18 | find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
19 | find_library(AVDEVICE_LIBRARY avdevice)
20 |
21 | find_path(SWSCALE_INCLUDE_DIR libswscale/swscale.h)
22 | find_library(SWSCALE_LIBRARY swscale)
23 |
24 | add_executable(Filter main.cpp filter.cpp filter.h)
25 | INCLUDE_DIRECTORIES(
26 | /usr/local/include
27 | )
28 |
29 | LINK_DIRECTORIES(
30 | /usr/local/lib
31 | )
32 |
33 | target_include_directories(Filter PRIVATE ${AVCODEC_INCLUDE_DIR} ${AVFILTER_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR})
34 | target_link_libraries(Filter
35 | PRIVATE
36 | ${AVCODEC_LIBRARY}
37 | ${AVFILTER_LIBRARY}
38 | ${AVFORMAT_LIBRARY}
39 | ${AVUTIL_LIBRARY}
40 | ${AVDEVICE_LIBRARY}
41 | ${SWSCALE_LIBRARY}
42 | )
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/3.14.5/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Library/Developer/CommandLineTools/usr/bin/cc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "AppleClang")
4 | set(CMAKE_C_COMPILER_VERSION "10.0.1.10010046")
5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_C_COMPILER_WRAPPER "")
7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
12 |
13 | set(CMAKE_C_PLATFORM_ID "Darwin")
14 | set(CMAKE_C_SIMULATE_ID "")
15 | set(CMAKE_C_SIMULATE_VERSION "")
16 |
17 |
18 |
19 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
20 | set(CMAKE_C_COMPILER_AR "")
21 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
22 | set(CMAKE_C_COMPILER_RANLIB "")
23 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
24 | set(CMAKE_MT "")
25 | set(CMAKE_COMPILER_IS_GNUCC )
26 | set(CMAKE_C_COMPILER_LOADED 1)
27 | set(CMAKE_C_COMPILER_WORKS TRUE)
28 | set(CMAKE_C_ABI_COMPILED TRUE)
29 | set(CMAKE_COMPILER_IS_MINGW )
30 | set(CMAKE_COMPILER_IS_CYGWIN )
31 | if(CMAKE_COMPILER_IS_CYGWIN)
32 | set(CYGWIN 1)
33 | set(UNIX 1)
34 | endif()
35 |
36 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
37 |
38 | if(CMAKE_COMPILER_IS_MINGW)
39 | set(MINGW 1)
40 | endif()
41 | set(CMAKE_C_COMPILER_ID_RUN 1)
42 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
43 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
44 | set(CMAKE_C_LINKER_PREFERENCE 10)
45 |
46 | # Save compiler ABI information.
47 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
48 | set(CMAKE_C_COMPILER_ABI "")
49 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
50 |
51 | if(CMAKE_C_SIZEOF_DATA_PTR)
52 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
53 | endif()
54 |
55 | if(CMAKE_C_COMPILER_ABI)
56 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
57 | endif()
58 |
59 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
60 | set(CMAKE_LIBRARY_ARCHITECTURE "")
61 | endif()
62 |
63 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
64 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
65 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
66 | endif()
67 |
68 |
69 |
70 |
71 |
72 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
73 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
74 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
75 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
76 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/3.14.5/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/Library/Developer/CommandLineTools/usr/bin/c++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "AppleClang")
4 | set(CMAKE_CXX_COMPILER_VERSION "10.0.1.10010046")
5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_CXX_COMPILER_WRAPPER "")
7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98")
8 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17")
9 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
10 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
11 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
12 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
13 | set(CMAKE_CXX20_COMPILE_FEATURES "")
14 |
15 | set(CMAKE_CXX_PLATFORM_ID "Darwin")
16 | set(CMAKE_CXX_SIMULATE_ID "")
17 | set(CMAKE_CXX_SIMULATE_VERSION "")
18 |
19 |
20 |
21 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
22 | set(CMAKE_CXX_COMPILER_AR "")
23 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
24 | set(CMAKE_CXX_COMPILER_RANLIB "")
25 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
26 | set(CMAKE_MT "")
27 | set(CMAKE_COMPILER_IS_GNUCXX )
28 | set(CMAKE_CXX_COMPILER_LOADED 1)
29 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
30 | set(CMAKE_CXX_ABI_COMPILED TRUE)
31 | set(CMAKE_COMPILER_IS_MINGW )
32 | set(CMAKE_COMPILER_IS_CYGWIN )
33 | if(CMAKE_COMPILER_IS_CYGWIN)
34 | set(CYGWIN 1)
35 | set(UNIX 1)
36 | endif()
37 |
38 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
39 |
40 | if(CMAKE_COMPILER_IS_MINGW)
41 | set(MINGW 1)
42 | endif()
43 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
44 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
45 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
46 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
47 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
48 |
49 | # Save compiler ABI information.
50 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
51 | set(CMAKE_CXX_COMPILER_ABI "")
52 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
53 |
54 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
55 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
56 | endif()
57 |
58 | if(CMAKE_CXX_COMPILER_ABI)
59 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
60 | endif()
61 |
62 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
63 | set(CMAKE_LIBRARY_ARCHITECTURE "")
64 | endif()
65 |
66 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
67 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
68 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
69 | endif()
70 |
71 |
72 |
73 |
74 |
75 | set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/include/c++/v1;/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
76 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "c++")
77 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
78 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
79 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/Filter/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/Filter/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/3.14.5/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-18.7.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "18.7.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Darwin-18.7.0")
9 | set(CMAKE_SYSTEM_NAME "Darwin")
10 | set(CMAKE_SYSTEM_VERSION "18.7.0")
11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Relative path conversion top directories.
5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter")
6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug")
7 |
8 | # Force unix paths in dependencies.
9 | set(CMAKE_FORCE_UNIX_PATHS 1)
10 |
11 |
12 | # The C and CXX include file regular expressions for this directory.
13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
17 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Filter.dir/DependInfo.cmake:
--------------------------------------------------------------------------------
1 | # The set of languages for which implicit dependencies are needed:
2 | set(CMAKE_DEPENDS_LANGUAGES
3 | "CXX"
4 | )
5 | # The set of files for implicit dependencies of each language:
6 | set(CMAKE_DEPENDS_CHECK_CXX
7 | "/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/filter.cpp" "/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles/Filter.dir/filter.cpp.o"
8 | "/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/main.cpp" "/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles/Filter.dir/main.cpp.o"
9 | )
10 | set(CMAKE_CXX_COMPILER_ID "AppleClang")
11 |
12 | # The include file search paths:
13 | set(CMAKE_CXX_TARGET_INCLUDE_PATH
14 | "/usr/local/include"
15 | )
16 |
17 | # Targets to which this target links.
18 | set(CMAKE_TARGET_LINKED_INFO_FILES
19 | )
20 |
21 | # Fortran module output directory.
22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "")
23 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Filter.dir/build.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Delete rule output on recipe failure.
5 | .DELETE_ON_ERROR:
6 |
7 |
8 | #=============================================================================
9 | # Special targets provided by cmake.
10 |
11 | # Disable implicit rules so canonical targets will work.
12 | .SUFFIXES:
13 |
14 |
15 | # Remove some rules from gmake that .SUFFIXES does not remove.
16 | SUFFIXES =
17 |
18 | .SUFFIXES: .hpux_make_needs_suffix_list
19 |
20 |
21 | # Suppress display of executed commands.
22 | $(VERBOSE).SILENT:
23 |
24 |
25 | # A target that is always out of date.
26 | cmake_force:
27 |
28 | .PHONY : cmake_force
29 |
30 | #=============================================================================
31 | # Set environment variables for the build.
32 |
33 | # The shell in which to execute make rules.
34 | SHELL = /bin/sh
35 |
36 | # The CMake executable.
37 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
38 |
39 | # The command to remove a file.
40 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
41 |
42 | # Escaping for special characters.
43 | EQUALS = =
44 |
45 | # The top-level source directory on which CMake was run.
46 | CMAKE_SOURCE_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter
47 |
48 | # The top-level build directory on which CMake was run.
49 | CMAKE_BINARY_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug
50 |
51 | # Include any dependencies generated for this target.
52 | include CMakeFiles/Filter.dir/depend.make
53 |
54 | # Include the progress variables for this target.
55 | include CMakeFiles/Filter.dir/progress.make
56 |
57 | # Include the compile flags for this target's objects.
58 | include CMakeFiles/Filter.dir/flags.make
59 |
60 | CMakeFiles/Filter.dir/main.cpp.o: CMakeFiles/Filter.dir/flags.make
61 | CMakeFiles/Filter.dir/main.cpp.o: ../main.cpp
62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/Filter.dir/main.cpp.o"
63 | /Library/Developer/CommandLineTools/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/Filter.dir/main.cpp.o -c /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/main.cpp
64 |
65 | CMakeFiles/Filter.dir/main.cpp.i: cmake_force
66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/Filter.dir/main.cpp.i"
67 | /Library/Developer/CommandLineTools/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/main.cpp > CMakeFiles/Filter.dir/main.cpp.i
68 |
69 | CMakeFiles/Filter.dir/main.cpp.s: cmake_force
70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/Filter.dir/main.cpp.s"
71 | /Library/Developer/CommandLineTools/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/main.cpp -o CMakeFiles/Filter.dir/main.cpp.s
72 |
73 | CMakeFiles/Filter.dir/filter.cpp.o: CMakeFiles/Filter.dir/flags.make
74 | CMakeFiles/Filter.dir/filter.cpp.o: ../filter.cpp
75 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/Filter.dir/filter.cpp.o"
76 | /Library/Developer/CommandLineTools/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/Filter.dir/filter.cpp.o -c /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/filter.cpp
77 |
78 | CMakeFiles/Filter.dir/filter.cpp.i: cmake_force
79 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/Filter.dir/filter.cpp.i"
80 | /Library/Developer/CommandLineTools/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/filter.cpp > CMakeFiles/Filter.dir/filter.cpp.i
81 |
82 | CMakeFiles/Filter.dir/filter.cpp.s: cmake_force
83 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/Filter.dir/filter.cpp.s"
84 | /Library/Developer/CommandLineTools/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/filter.cpp -o CMakeFiles/Filter.dir/filter.cpp.s
85 |
86 | # Object files for target Filter
87 | Filter_OBJECTS = \
88 | "CMakeFiles/Filter.dir/main.cpp.o" \
89 | "CMakeFiles/Filter.dir/filter.cpp.o"
90 |
91 | # External object files for target Filter
92 | Filter_EXTERNAL_OBJECTS =
93 |
94 | Filter: CMakeFiles/Filter.dir/main.cpp.o
95 | Filter: CMakeFiles/Filter.dir/filter.cpp.o
96 | Filter: CMakeFiles/Filter.dir/build.make
97 | Filter: /usr/local/lib/libavcodec.dylib
98 | Filter: /usr/local/lib/libavfilter.dylib
99 | Filter: /usr/local/lib/libavformat.dylib
100 | Filter: /usr/local/lib/libavutil.dylib
101 | Filter: /usr/local/lib/libavdevice.dylib
102 | Filter: /usr/local/lib/libswscale.dylib
103 | Filter: CMakeFiles/Filter.dir/link.txt
104 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Linking CXX executable Filter"
105 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/Filter.dir/link.txt --verbose=$(VERBOSE)
106 |
107 | # Rule to build all files generated by this target.
108 | CMakeFiles/Filter.dir/build: Filter
109 |
110 | .PHONY : CMakeFiles/Filter.dir/build
111 |
112 | CMakeFiles/Filter.dir/clean:
113 | $(CMAKE_COMMAND) -P CMakeFiles/Filter.dir/cmake_clean.cmake
114 | .PHONY : CMakeFiles/Filter.dir/clean
115 |
116 | CMakeFiles/Filter.dir/depend:
117 | cd /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles/Filter.dir/DependInfo.cmake --color=$(COLOR)
118 | .PHONY : CMakeFiles/Filter.dir/depend
119 |
120 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Filter.dir/cmake_clean.cmake:
--------------------------------------------------------------------------------
1 | file(REMOVE_RECURSE
2 | "CMakeFiles/Filter.dir/main.cpp.o"
3 | "CMakeFiles/Filter.dir/filter.cpp.o"
4 | "Filter.pdb"
5 | "Filter"
6 | )
7 |
8 | # Per-language clean rules from dependency scanning.
9 | foreach(lang CXX)
10 | include(CMakeFiles/Filter.dir/cmake_clean_${lang}.cmake OPTIONAL)
11 | endforeach()
12 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Filter.dir/depend.internal:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/Filter.dir/filter.cpp.o
5 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/filter.cpp
6 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/filter.h
7 | /usr/local/include/libavcodec/avcodec.h
8 | /usr/local/include/libavcodec/avfft.h
9 | /usr/local/include/libavcodec/version.h
10 | /usr/local/include/libavdevice/avdevice.h
11 | /usr/local/include/libavfilter/avfilter.h
12 | /usr/local/include/libavfilter/buffersink.h
13 | /usr/local/include/libavfilter/buffersrc.h
14 | /usr/local/include/libavfilter/version.h
15 | /usr/local/include/libavformat/avformat.h
16 | /usr/local/include/libavformat/avio.h
17 | /usr/local/include/libavformat/version.h
18 | /usr/local/include/libavutil/attributes.h
19 | /usr/local/include/libavutil/avconfig.h
20 | /usr/local/include/libavutil/avutil.h
21 | /usr/local/include/libavutil/buffer.h
22 | /usr/local/include/libavutil/channel_layout.h
23 | /usr/local/include/libavutil/common.h
24 | /usr/local/include/libavutil/cpu.h
25 | /usr/local/include/libavutil/dict.h
26 | /usr/local/include/libavutil/error.h
27 | /usr/local/include/libavutil/file.h
28 | /usr/local/include/libavutil/frame.h
29 | /usr/local/include/libavutil/hwcontext.h
30 | /usr/local/include/libavutil/imgutils.h
31 | /usr/local/include/libavutil/intfloat.h
32 | /usr/local/include/libavutil/log.h
33 | /usr/local/include/libavutil/macros.h
34 | /usr/local/include/libavutil/mathematics.h
35 | /usr/local/include/libavutil/mem.h
36 | /usr/local/include/libavutil/opt.h
37 | /usr/local/include/libavutil/pixdesc.h
38 | /usr/local/include/libavutil/pixfmt.h
39 | /usr/local/include/libavutil/rational.h
40 | /usr/local/include/libavutil/samplefmt.h
41 | /usr/local/include/libavutil/time.h
42 | /usr/local/include/libavutil/version.h
43 | /usr/local/include/libswscale/swscale.h
44 | CMakeFiles/Filter.dir/main.cpp.o
45 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/filter.h
46 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/main.cpp
47 | /usr/local/include/libavcodec/avcodec.h
48 | /usr/local/include/libavcodec/avfft.h
49 | /usr/local/include/libavcodec/version.h
50 | /usr/local/include/libavdevice/avdevice.h
51 | /usr/local/include/libavfilter/avfilter.h
52 | /usr/local/include/libavfilter/buffersink.h
53 | /usr/local/include/libavfilter/buffersrc.h
54 | /usr/local/include/libavfilter/version.h
55 | /usr/local/include/libavformat/avformat.h
56 | /usr/local/include/libavformat/avio.h
57 | /usr/local/include/libavformat/version.h
58 | /usr/local/include/libavutil/attributes.h
59 | /usr/local/include/libavutil/avconfig.h
60 | /usr/local/include/libavutil/avutil.h
61 | /usr/local/include/libavutil/buffer.h
62 | /usr/local/include/libavutil/channel_layout.h
63 | /usr/local/include/libavutil/common.h
64 | /usr/local/include/libavutil/cpu.h
65 | /usr/local/include/libavutil/dict.h
66 | /usr/local/include/libavutil/error.h
67 | /usr/local/include/libavutil/file.h
68 | /usr/local/include/libavutil/frame.h
69 | /usr/local/include/libavutil/hwcontext.h
70 | /usr/local/include/libavutil/imgutils.h
71 | /usr/local/include/libavutil/intfloat.h
72 | /usr/local/include/libavutil/log.h
73 | /usr/local/include/libavutil/macros.h
74 | /usr/local/include/libavutil/mathematics.h
75 | /usr/local/include/libavutil/mem.h
76 | /usr/local/include/libavutil/opt.h
77 | /usr/local/include/libavutil/pixdesc.h
78 | /usr/local/include/libavutil/pixfmt.h
79 | /usr/local/include/libavutil/rational.h
80 | /usr/local/include/libavutil/samplefmt.h
81 | /usr/local/include/libavutil/time.h
82 | /usr/local/include/libavutil/version.h
83 | /usr/local/include/libswscale/swscale.h
84 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Filter.dir/depend.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/Filter.dir/filter.cpp.o: ../filter.cpp
5 | CMakeFiles/Filter.dir/filter.cpp.o: ../filter.h
6 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavcodec/avcodec.h
7 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavcodec/avfft.h
8 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavcodec/version.h
9 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavdevice/avdevice.h
10 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavfilter/avfilter.h
11 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavfilter/buffersink.h
12 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavfilter/buffersrc.h
13 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavfilter/version.h
14 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavformat/avformat.h
15 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavformat/avio.h
16 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavformat/version.h
17 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/attributes.h
18 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/avconfig.h
19 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/avutil.h
20 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/buffer.h
21 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/channel_layout.h
22 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/common.h
23 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/cpu.h
24 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/dict.h
25 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/error.h
26 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/file.h
27 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/frame.h
28 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/hwcontext.h
29 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/imgutils.h
30 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/intfloat.h
31 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/log.h
32 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/macros.h
33 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/mathematics.h
34 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/mem.h
35 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/opt.h
36 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/pixdesc.h
37 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/pixfmt.h
38 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/rational.h
39 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/samplefmt.h
40 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/time.h
41 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libavutil/version.h
42 | CMakeFiles/Filter.dir/filter.cpp.o: /usr/local/include/libswscale/swscale.h
43 |
44 | CMakeFiles/Filter.dir/main.cpp.o: ../filter.h
45 | CMakeFiles/Filter.dir/main.cpp.o: ../main.cpp
46 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavcodec/avcodec.h
47 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavcodec/avfft.h
48 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavcodec/version.h
49 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavdevice/avdevice.h
50 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavfilter/avfilter.h
51 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavfilter/buffersink.h
52 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavfilter/buffersrc.h
53 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavfilter/version.h
54 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavformat/avformat.h
55 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavformat/avio.h
56 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavformat/version.h
57 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/attributes.h
58 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/avconfig.h
59 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/avutil.h
60 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/buffer.h
61 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/channel_layout.h
62 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/common.h
63 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/cpu.h
64 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/dict.h
65 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/error.h
66 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/file.h
67 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/frame.h
68 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/hwcontext.h
69 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/imgutils.h
70 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/intfloat.h
71 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/log.h
72 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/macros.h
73 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/mathematics.h
74 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/mem.h
75 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/opt.h
76 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/pixdesc.h
77 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/pixfmt.h
78 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/rational.h
79 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/samplefmt.h
80 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/time.h
81 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libavutil/version.h
82 | CMakeFiles/Filter.dir/main.cpp.o: /usr/local/include/libswscale/swscale.h
83 |
84 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Filter.dir/flags.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # compile CXX with /Library/Developer/CommandLineTools/usr/bin/c++
5 | CXX_FLAGS = -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -std=gnu++14
6 |
7 | CXX_DEFINES =
8 |
9 | CXX_INCLUDES = -I/usr/local/include
10 |
11 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Filter.dir/link.txt:
--------------------------------------------------------------------------------
1 | /Library/Developer/CommandLineTools/usr/bin/c++ -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/Filter.dir/main.cpp.o CMakeFiles/Filter.dir/filter.cpp.o -o Filter /usr/local/lib/libavcodec.dylib /usr/local/lib/libavfilter.dylib /usr/local/lib/libavformat.dylib /usr/local/lib/libavutil.dylib /usr/local/lib/libavdevice.dylib /usr/local/lib/libswscale.dylib
2 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Filter.dir/progress.make:
--------------------------------------------------------------------------------
1 | CMAKE_PROGRESS_1 = 1
2 | CMAKE_PROGRESS_2 = 2
3 | CMAKE_PROGRESS_3 = 3
4 |
5 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Makefile.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # The generator used is:
5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
6 |
7 | # The top level Makefile was generated from the following files:
8 | set(CMAKE_MAKEFILE_DEPENDS
9 | "CMakeCache.txt"
10 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCInformation.cmake"
11 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCXXInformation.cmake"
12 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
13 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCommonLanguageInclude.cmake"
14 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
15 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeFindCodeBlocks.cmake"
16 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeGenericSystem.cmake"
17 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeInitializeConfigs.cmake"
18 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeLanguageInformation.cmake"
19 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeSystemSpecificInformation.cmake"
20 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeSystemSpecificInitialize.cmake"
21 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/AppleClang-C.cmake"
22 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/AppleClang-CXX.cmake"
23 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
24 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Clang.cmake"
25 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/GNU.cmake"
26 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Internal/CMakeCheckCompilerFlag.cmake"
27 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-AppleClang-C.cmake"
28 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-AppleClang-CXX.cmake"
29 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang-C.cmake"
30 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang-CXX.cmake"
31 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang.cmake"
32 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Darwin-Initialize.cmake"
33 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Darwin.cmake"
34 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/UnixPaths.cmake"
35 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/ProcessorCount.cmake"
36 | "../CMakeLists.txt"
37 | "CMakeFiles/3.14.5/CMakeCCompiler.cmake"
38 | "CMakeFiles/3.14.5/CMakeCXXCompiler.cmake"
39 | "CMakeFiles/3.14.5/CMakeSystem.cmake"
40 | )
41 |
42 | # The corresponding makefile is:
43 | set(CMAKE_MAKEFILE_OUTPUTS
44 | "Makefile"
45 | "CMakeFiles/cmake.check_cache"
46 | )
47 |
48 | # Byproducts of CMake generate step:
49 | set(CMAKE_MAKEFILE_PRODUCTS
50 | "CMakeFiles/CMakeDirectoryInformation.cmake"
51 | )
52 |
53 | # Dependency information for all targets:
54 | set(CMAKE_DEPEND_INFO_FILES
55 | "CMakeFiles/Filter.dir/DependInfo.cmake"
56 | )
57 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/Makefile2:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Default target executed when no arguments are given to make.
5 | default_target: all
6 |
7 | .PHONY : default_target
8 |
9 | # The main recursive all target
10 | all:
11 |
12 | .PHONY : all
13 |
14 | # The main recursive preinstall target
15 | preinstall:
16 |
17 | .PHONY : preinstall
18 |
19 | # The main recursive clean target
20 | clean:
21 |
22 | .PHONY : clean
23 |
24 | #=============================================================================
25 | # Special targets provided by cmake.
26 |
27 | # Disable implicit rules so canonical targets will work.
28 | .SUFFIXES:
29 |
30 |
31 | # Remove some rules from gmake that .SUFFIXES does not remove.
32 | SUFFIXES =
33 |
34 | .SUFFIXES: .hpux_make_needs_suffix_list
35 |
36 |
37 | # Suppress display of executed commands.
38 | $(VERBOSE).SILENT:
39 |
40 |
41 | # A target that is always out of date.
42 | cmake_force:
43 |
44 | .PHONY : cmake_force
45 |
46 | #=============================================================================
47 | # Set environment variables for the build.
48 |
49 | # The shell in which to execute make rules.
50 | SHELL = /bin/sh
51 |
52 | # The CMake executable.
53 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
54 |
55 | # The command to remove a file.
56 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
57 |
58 | # Escaping for special characters.
59 | EQUALS = =
60 |
61 | # The top-level source directory on which CMake was run.
62 | CMAKE_SOURCE_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter
63 |
64 | # The top-level build directory on which CMake was run.
65 | CMAKE_BINARY_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug
66 |
67 | #=============================================================================
68 | # Target rules for target CMakeFiles/Filter.dir
69 |
70 | # All Build rule for target.
71 | CMakeFiles/Filter.dir/all:
72 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/depend
73 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/build
74 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles --progress-num=1,2,3 "Built target Filter"
75 | .PHONY : CMakeFiles/Filter.dir/all
76 |
77 | # Include target in all.
78 | all: CMakeFiles/Filter.dir/all
79 |
80 | .PHONY : all
81 |
82 | # Build rule for subdir invocation for target.
83 | CMakeFiles/Filter.dir/rule: cmake_check_build_system
84 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles 3
85 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/Filter.dir/all
86 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles 0
87 | .PHONY : CMakeFiles/Filter.dir/rule
88 |
89 | # Convenience name for target.
90 | Filter: CMakeFiles/Filter.dir/rule
91 |
92 | .PHONY : Filter
93 |
94 | # clean rule for target.
95 | CMakeFiles/Filter.dir/clean:
96 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/clean
97 | .PHONY : CMakeFiles/Filter.dir/clean
98 |
99 | # clean rule for target.
100 | clean: CMakeFiles/Filter.dir/clean
101 |
102 | .PHONY : clean
103 |
104 | #=============================================================================
105 | # Special targets to cleanup operation of make.
106 |
107 | # Special rule to run CMake to check the build system integrity.
108 | # No rule that depends on this can have commands that come from listfiles
109 | # because they might be regenerated.
110 | cmake_check_build_system:
111 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
112 | .PHONY : cmake_check_build_system
113 |
114 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles/rebuild_cache.dir
2 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles/edit_cache.dir
3 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles/Filter.dir
4 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/clion-environment.txt:
--------------------------------------------------------------------------------
1 | ToolSet: 1.0 (local)Options:
2 |
3 | Options:
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/clion-log.txt:
--------------------------------------------------------------------------------
1 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter
2 | -- Configuring done
3 | -- Generating done
4 | -- Build files have been written to: /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug
5 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/feature_tests.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/Filter/cmake-build-debug/CMakeFiles/feature_tests.bin
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/feature_tests.c:
--------------------------------------------------------------------------------
1 |
2 | const char features[] = {"\n"
3 | "C_FEATURE:"
4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400
5 | "1"
6 | #else
7 | "0"
8 | #endif
9 | "c_function_prototypes\n"
10 | "C_FEATURE:"
11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
12 | "1"
13 | #else
14 | "0"
15 | #endif
16 | "c_restrict\n"
17 | "C_FEATURE:"
18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
19 | "1"
20 | #else
21 | "0"
22 | #endif
23 | "c_static_assert\n"
24 | "C_FEATURE:"
25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
26 | "1"
27 | #else
28 | "0"
29 | #endif
30 | "c_variadic_macros\n"
31 |
32 | };
33 |
34 | int main(int argc, char** argv) { (void)argv; return features[argc]; }
35 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/CMakeFiles/progress.marks:
--------------------------------------------------------------------------------
1 | 3
2 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/Filter:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/Filter/cmake-build-debug/Filter
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/Filter.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/Makefile:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Default target executed when no arguments are given to make.
5 | default_target: all
6 |
7 | .PHONY : default_target
8 |
9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism.
10 | .NOTPARALLEL:
11 |
12 |
13 | #=============================================================================
14 | # Special targets provided by cmake.
15 |
16 | # Disable implicit rules so canonical targets will work.
17 | .SUFFIXES:
18 |
19 |
20 | # Remove some rules from gmake that .SUFFIXES does not remove.
21 | SUFFIXES =
22 |
23 | .SUFFIXES: .hpux_make_needs_suffix_list
24 |
25 |
26 | # Suppress display of executed commands.
27 | $(VERBOSE).SILENT:
28 |
29 |
30 | # A target that is always out of date.
31 | cmake_force:
32 |
33 | .PHONY : cmake_force
34 |
35 | #=============================================================================
36 | # Set environment variables for the build.
37 |
38 | # The shell in which to execute make rules.
39 | SHELL = /bin/sh
40 |
41 | # The CMake executable.
42 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
43 |
44 | # The command to remove a file.
45 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
46 |
47 | # Escaping for special characters.
48 | EQUALS = =
49 |
50 | # The top-level source directory on which CMake was run.
51 | CMAKE_SOURCE_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter
52 |
53 | # The top-level build directory on which CMake was run.
54 | CMAKE_BINARY_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug
55 |
56 | #=============================================================================
57 | # Targets provided globally by CMake.
58 |
59 | # Special rule for the target rebuild_cache
60 | rebuild_cache:
61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
62 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
63 | .PHONY : rebuild_cache
64 |
65 | # Special rule for the target rebuild_cache
66 | rebuild_cache/fast: rebuild_cache
67 |
68 | .PHONY : rebuild_cache/fast
69 |
70 | # Special rule for the target edit_cache
71 | edit_cache:
72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
73 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
74 | .PHONY : edit_cache
75 |
76 | # Special rule for the target edit_cache
77 | edit_cache/fast: edit_cache
78 |
79 | .PHONY : edit_cache/fast
80 |
81 | # The main all target
82 | all: cmake_check_build_system
83 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles/progress.marks
84 | $(MAKE) -f CMakeFiles/Makefile2 all
85 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/CMakeFiles 0
86 | .PHONY : all
87 |
88 | # The main clean target
89 | clean:
90 | $(MAKE) -f CMakeFiles/Makefile2 clean
91 | .PHONY : clean
92 |
93 | # The main clean target
94 | clean/fast: clean
95 |
96 | .PHONY : clean/fast
97 |
98 | # Prepare targets for installation.
99 | preinstall: all
100 | $(MAKE) -f CMakeFiles/Makefile2 preinstall
101 | .PHONY : preinstall
102 |
103 | # Prepare targets for installation.
104 | preinstall/fast:
105 | $(MAKE) -f CMakeFiles/Makefile2 preinstall
106 | .PHONY : preinstall/fast
107 |
108 | # clear depends
109 | depend:
110 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
111 | .PHONY : depend
112 |
113 | #=============================================================================
114 | # Target rules for targets named Filter
115 |
116 | # Build rule for target.
117 | Filter: cmake_check_build_system
118 | $(MAKE) -f CMakeFiles/Makefile2 Filter
119 | .PHONY : Filter
120 |
121 | # fast build rule for target.
122 | Filter/fast:
123 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/build
124 | .PHONY : Filter/fast
125 |
126 | filter.o: filter.cpp.o
127 |
128 | .PHONY : filter.o
129 |
130 | # target to build an object file
131 | filter.cpp.o:
132 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/filter.cpp.o
133 | .PHONY : filter.cpp.o
134 |
135 | filter.i: filter.cpp.i
136 |
137 | .PHONY : filter.i
138 |
139 | # target to preprocess a source file
140 | filter.cpp.i:
141 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/filter.cpp.i
142 | .PHONY : filter.cpp.i
143 |
144 | filter.s: filter.cpp.s
145 |
146 | .PHONY : filter.s
147 |
148 | # target to generate assembly for a file
149 | filter.cpp.s:
150 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/filter.cpp.s
151 | .PHONY : filter.cpp.s
152 |
153 | main.o: main.cpp.o
154 |
155 | .PHONY : main.o
156 |
157 | # target to build an object file
158 | main.cpp.o:
159 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/main.cpp.o
160 | .PHONY : main.cpp.o
161 |
162 | main.i: main.cpp.i
163 |
164 | .PHONY : main.i
165 |
166 | # target to preprocess a source file
167 | main.cpp.i:
168 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/main.cpp.i
169 | .PHONY : main.cpp.i
170 |
171 | main.s: main.cpp.s
172 |
173 | .PHONY : main.s
174 |
175 | # target to generate assembly for a file
176 | main.cpp.s:
177 | $(MAKE) -f CMakeFiles/Filter.dir/build.make CMakeFiles/Filter.dir/main.cpp.s
178 | .PHONY : main.cpp.s
179 |
180 | # Help Target
181 | help:
182 | @echo "The following are some of the valid targets for this Makefile:"
183 | @echo "... all (the default if no target is provided)"
184 | @echo "... clean"
185 | @echo "... depend"
186 | @echo "... rebuild_cache"
187 | @echo "... edit_cache"
188 | @echo "... Filter"
189 | @echo "... filter.o"
190 | @echo "... filter.i"
191 | @echo "... filter.s"
192 | @echo "... main.o"
193 | @echo "... main.i"
194 | @echo "... main.s"
195 | .PHONY : help
196 |
197 |
198 |
199 | #=============================================================================
200 | # Special targets to cleanup operation of make.
201 |
202 | # Special rule to run CMake to check the build system integrity.
203 | # No rule that depends on this can have commands that come from listfiles
204 | # because they might be regenerated.
205 | cmake_check_build_system:
206 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
207 | .PHONY : cmake_check_build_system
208 |
209 |
--------------------------------------------------------------------------------
/Filter/cmake-build-debug/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Is this installation the result of a crosscompile?
31 | if(NOT DEFINED CMAKE_CROSSCOMPILING)
32 | set(CMAKE_CROSSCOMPILING "FALSE")
33 | endif()
34 |
35 | if(CMAKE_INSTALL_COMPONENT)
36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
37 | else()
38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
39 | endif()
40 |
41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
42 | "${CMAKE_INSTALL_MANIFEST_FILES}")
43 | file(WRITE "/Users/zhangtao/SourceCode/github/ffmpeg-examples/Filter/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
45 |
--------------------------------------------------------------------------------
/Filter/filter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by zhangtao on 2019/9/4.
3 | //
4 |
5 | #ifndef SCREENRECORD_H264_FILTER_H
6 | #define SCREENRECORD_H264_FILTER_H
7 |
8 | #include
9 |
10 | #ifdef __cplusplus
11 | extern "C"
12 | {
13 | #endif
14 | #include "libavcodec/avcodec.h"
15 | #include "libavcodec/avfft.h"
16 | #include "libavdevice/avdevice.h"
17 | #include "libavfilter/avfilter.h"
18 | #include "libavfilter/buffersink.h"
19 | #include "libavfilter/buffersrc.h"
20 | #include "libavformat/avformat.h"
21 | #include "libavformat/avio.h"
22 | #include "libavutil/opt.h"
23 | #include "libavutil/common.h"
24 | #include "libavutil/channel_layout.h"
25 | #include "libavutil/imgutils.h"
26 | #include "libavutil/mathematics.h"
27 | #include "libavutil/samplefmt.h"
28 | #include "libavutil/time.h"
29 | #include "libavutil/opt.h"
30 | #include "libavutil/pixdesc.h"
31 | #include "libavutil/file.h"
32 | #include "libswscale/swscale.h"
33 | #ifdef __cplusplus
34 | };
35 | #endif
36 |
37 | using namespace std;
38 |
39 | class filter {
40 |
41 | private:
42 | const char *out_file = "/tmp/out.mp4";
43 | const char *filter_descr = "movie=t.png[wm];[in][wm]overlay=10:20[out]";
44 | int VideoStreamIndx = -1;
45 |
46 | AVFormatContext *inFormatContext;
47 | AVFormatContext *outFormatContext;
48 |
49 | AVInputFormat *avInputFormat;
50 | AVOutputFormat *avOutputFormat;
51 |
52 | AVCodecContext *inCodecContext;
53 | AVCodecContext *outCodecContext;
54 |
55 | AVCodec *inCodec;
56 | AVCodec *outCodec;
57 |
58 | AVStream *outStream;
59 | AVStream *inStream;
60 |
61 | AVFilterGraph *filter_graph;
62 | AVFilterContext *buffersink_ctx;
63 | AVFilterContext *buffersrc_ctx;
64 |
65 | public:
66 |
67 | filter();
68 |
69 | ~filter();
70 |
71 | int openDevice();
72 |
73 | int init_filter();
74 |
75 | int init_outputfile();
76 |
77 | int CaptureVideoFrames();
78 |
79 | };
80 |
81 |
82 | #endif //SCREENRECORD_H264_FILTER_H
83 |
--------------------------------------------------------------------------------
/Filter/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "filter.h"
3 |
4 | int main() {
5 | int value = -1;
6 | filter sr;
7 | value = sr.openDevice();
8 | if (value) {
9 | cout << "Open Device Error. err: " << value;
10 | exit(-1);
11 | }
12 |
13 | value = sr.init_outputfile();
14 | if (value) {
15 | cout << "Open OutFile Error. err: " << value;
16 | exit(-1);
17 | }
18 |
19 | value = sr.init_filter();
20 | if (value) {
21 | cout << "Init Filter Graph Error. err: " << value;
22 | exit(-1);
23 | }
24 |
25 | value = sr.CaptureVideoFrames();
26 | if (value) {
27 | cout << "Capture Error. err: " << value;
28 | exit(-1);
29 | }
30 | return 0;
31 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 andy
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ffmpeg-examples
2 | Some examples base on ffmpeg apis
3 |
4 | Fully document please reference https://andy-zhangtao.github.io/ffmpeg-examples/
5 |
6 | * ScreenRecord
7 | * ScreenRecord-H264
8 | * Filter
9 | * PTS TimeStamp
10 | * isetpts
11 | * iconcat
12 | * ifade
13 |
--------------------------------------------------------------------------------
/SceenRecord-h264/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(SceenRecord_h264)
3 |
4 | set(CMAKE_CXX_STANDARD 14)
5 |
6 | find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
7 | find_library(AVCODEC_LIBRARY avcodec)
8 |
9 | find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
10 | find_library(AVFORMAT_LIBRARY avformat)
11 |
12 | find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h)
13 | find_library(AVUTIL_LIBRARY avutil)
14 |
15 | find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
16 | find_library(AVDEVICE_LIBRARY avdevice)
17 |
18 | find_path(SWSCALE_INCLUDE_DIR libswscale/swscale.h)
19 | find_library(SWSCALE_LIBRARY swscale)
20 |
21 | INCLUDE_DIRECTORIES(
22 | /usr/local/include
23 | )
24 |
25 | LINK_DIRECTORIES(
26 | /usr/local/lib
27 | )
28 |
29 | add_executable(SceenRecord_h264 main.cpp ScreenRecord.cpp ScreenRecord.h)
30 |
31 | target_include_directories(SceenRecord_h264 PRIVATE ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR})
32 | target_link_libraries(SceenRecord_h264
33 | PRIVATE
34 | ${AVCODEC_LIBRARY}
35 | ${AVFORMAT_LIBRARY}
36 | ${AVUTIL_LIBRARY}
37 | ${AVDEVICE_LIBRARY}
38 | ${SWSCALE_LIBRARY}
39 | )
--------------------------------------------------------------------------------
/SceenRecord-h264/ScreenRecord.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by zhangtao on 2019/9/3.
3 | //
4 |
5 | #ifndef SCEENRECORD_H264_SCREENRECORD_H
6 | #define SCEENRECORD_H264_SCREENRECORD_H
7 |
8 |
9 | #include
10 |
11 | #ifdef __cplusplus
12 | extern "C"
13 | {
14 | #endif
15 | #include "libavcodec/avcodec.h"
16 | #include "libavcodec/avfft.h"
17 | #include "libavdevice/avdevice.h"
18 | #include "libavfilter/avfilter.h"
19 | #include "libavfilter/buffersink.h"
20 | #include "libavfilter/buffersrc.h"
21 | #include "libavformat/avformat.h"
22 | #include "libavformat/avio.h"
23 | #include "libavutil/opt.h"
24 | #include "libavutil/common.h"
25 | #include "libavutil/channel_layout.h"
26 | #include "libavutil/imgutils.h"
27 | #include "libavutil/mathematics.h"
28 | #include "libavutil/samplefmt.h"
29 | #include "libavutil/time.h"
30 | #include "libavutil/opt.h"
31 | #include "libavutil/pixdesc.h"
32 | #include "libavutil/file.h"
33 | #include "libswscale/swscale.h"
34 | #ifdef __cplusplus
35 | };
36 | #endif
37 |
38 | typedef struct StreamContext {
39 | AVCodecContext *dec_ctx;
40 | AVCodecContext *enc_ctx;
41 | } StreamContext;
42 |
43 | class ScreenRecord {
44 | private:
45 | AVFormatContext *inFormatContext;
46 | AVFormatContext *outFormatContext;
47 |
48 | AVInputFormat *avInputFormat;
49 | AVOutputFormat *avOutputFormat;
50 |
51 | int VideoStreamIndx = -1;
52 |
53 | AVCodecContext *inCodecContext;
54 | AVCodecContext *outCodecContext;
55 |
56 | AVCodec *inCodec;
57 | AVCodec *outCodec;
58 |
59 | const char *out_file = "/tmp/out.mp4";
60 |
61 | StreamContext *stream_ctx;
62 | AVStream *outStream;
63 | AVStream *inStream;
64 | public:
65 |
66 | ScreenRecord();
67 |
68 | ~ScreenRecord();
69 |
70 | int openDevice();
71 |
72 | int init_outputfile();
73 |
74 | int CaptureVideoFrames();
75 |
76 | };
77 |
78 | #endif //SCEENRECORD_H264_SCREENRECORD_H
79 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/3.14.5/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Library/Developer/CommandLineTools/usr/bin/cc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "AppleClang")
4 | set(CMAKE_C_COMPILER_VERSION "10.0.1.10010046")
5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_C_COMPILER_WRAPPER "")
7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
12 |
13 | set(CMAKE_C_PLATFORM_ID "Darwin")
14 | set(CMAKE_C_SIMULATE_ID "")
15 | set(CMAKE_C_SIMULATE_VERSION "")
16 |
17 |
18 |
19 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
20 | set(CMAKE_C_COMPILER_AR "")
21 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
22 | set(CMAKE_C_COMPILER_RANLIB "")
23 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
24 | set(CMAKE_MT "")
25 | set(CMAKE_COMPILER_IS_GNUCC )
26 | set(CMAKE_C_COMPILER_LOADED 1)
27 | set(CMAKE_C_COMPILER_WORKS TRUE)
28 | set(CMAKE_C_ABI_COMPILED TRUE)
29 | set(CMAKE_COMPILER_IS_MINGW )
30 | set(CMAKE_COMPILER_IS_CYGWIN )
31 | if(CMAKE_COMPILER_IS_CYGWIN)
32 | set(CYGWIN 1)
33 | set(UNIX 1)
34 | endif()
35 |
36 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
37 |
38 | if(CMAKE_COMPILER_IS_MINGW)
39 | set(MINGW 1)
40 | endif()
41 | set(CMAKE_C_COMPILER_ID_RUN 1)
42 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
43 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
44 | set(CMAKE_C_LINKER_PREFERENCE 10)
45 |
46 | # Save compiler ABI information.
47 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
48 | set(CMAKE_C_COMPILER_ABI "")
49 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
50 |
51 | if(CMAKE_C_SIZEOF_DATA_PTR)
52 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
53 | endif()
54 |
55 | if(CMAKE_C_COMPILER_ABI)
56 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
57 | endif()
58 |
59 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
60 | set(CMAKE_LIBRARY_ARCHITECTURE "")
61 | endif()
62 |
63 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
64 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
65 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
66 | endif()
67 |
68 |
69 |
70 |
71 |
72 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
73 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
74 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
75 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
76 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/3.14.5/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/Library/Developer/CommandLineTools/usr/bin/c++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "AppleClang")
4 | set(CMAKE_CXX_COMPILER_VERSION "10.0.1.10010046")
5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_CXX_COMPILER_WRAPPER "")
7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98")
8 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17")
9 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
10 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
11 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
12 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
13 | set(CMAKE_CXX20_COMPILE_FEATURES "")
14 |
15 | set(CMAKE_CXX_PLATFORM_ID "Darwin")
16 | set(CMAKE_CXX_SIMULATE_ID "")
17 | set(CMAKE_CXX_SIMULATE_VERSION "")
18 |
19 |
20 |
21 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
22 | set(CMAKE_CXX_COMPILER_AR "")
23 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
24 | set(CMAKE_CXX_COMPILER_RANLIB "")
25 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
26 | set(CMAKE_MT "")
27 | set(CMAKE_COMPILER_IS_GNUCXX )
28 | set(CMAKE_CXX_COMPILER_LOADED 1)
29 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
30 | set(CMAKE_CXX_ABI_COMPILED TRUE)
31 | set(CMAKE_COMPILER_IS_MINGW )
32 | set(CMAKE_COMPILER_IS_CYGWIN )
33 | if(CMAKE_COMPILER_IS_CYGWIN)
34 | set(CYGWIN 1)
35 | set(UNIX 1)
36 | endif()
37 |
38 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
39 |
40 | if(CMAKE_COMPILER_IS_MINGW)
41 | set(MINGW 1)
42 | endif()
43 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
44 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
45 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
46 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
47 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
48 |
49 | # Save compiler ABI information.
50 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
51 | set(CMAKE_CXX_COMPILER_ABI "")
52 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
53 |
54 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
55 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
56 | endif()
57 |
58 | if(CMAKE_CXX_COMPILER_ABI)
59 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
60 | endif()
61 |
62 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
63 | set(CMAKE_LIBRARY_ARCHITECTURE "")
64 | endif()
65 |
66 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
67 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
68 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
69 | endif()
70 |
71 |
72 |
73 |
74 |
75 | set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/include/c++/v1;/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
76 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "c++")
77 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
78 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
79 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/SceenRecord-h264/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/SceenRecord-h264/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/3.14.5/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-18.7.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "18.7.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Darwin-18.7.0")
9 | set(CMAKE_SYSTEM_NAME "Darwin")
10 | set(CMAKE_SYSTEM_VERSION "18.7.0")
11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Relative path conversion top directories.
5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264")
6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug")
7 |
8 | # Force unix paths in dependencies.
9 | set(CMAKE_FORCE_UNIX_PATHS 1)
10 |
11 |
12 | # The C and CXX include file regular expressions for this directory.
13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
17 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/Makefile.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # The generator used is:
5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
6 |
7 | # The top level Makefile was generated from the following files:
8 | set(CMAKE_MAKEFILE_DEPENDS
9 | "CMakeCache.txt"
10 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCInformation.cmake"
11 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCXXInformation.cmake"
12 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
13 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCommonLanguageInclude.cmake"
14 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
15 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeFindCodeBlocks.cmake"
16 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeGenericSystem.cmake"
17 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeInitializeConfigs.cmake"
18 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeLanguageInformation.cmake"
19 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeSystemSpecificInformation.cmake"
20 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeSystemSpecificInitialize.cmake"
21 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/AppleClang-C.cmake"
22 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/AppleClang-CXX.cmake"
23 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
24 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Clang.cmake"
25 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/GNU.cmake"
26 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Internal/CMakeCheckCompilerFlag.cmake"
27 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-AppleClang-C.cmake"
28 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-AppleClang-CXX.cmake"
29 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang-C.cmake"
30 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang-CXX.cmake"
31 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang.cmake"
32 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Darwin-Initialize.cmake"
33 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Darwin.cmake"
34 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/UnixPaths.cmake"
35 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/ProcessorCount.cmake"
36 | "../CMakeLists.txt"
37 | "CMakeFiles/3.14.5/CMakeCCompiler.cmake"
38 | "CMakeFiles/3.14.5/CMakeCXXCompiler.cmake"
39 | "CMakeFiles/3.14.5/CMakeSystem.cmake"
40 | )
41 |
42 | # The corresponding makefile is:
43 | set(CMAKE_MAKEFILE_OUTPUTS
44 | "Makefile"
45 | "CMakeFiles/cmake.check_cache"
46 | )
47 |
48 | # Byproducts of CMake generate step:
49 | set(CMAKE_MAKEFILE_PRODUCTS
50 | "CMakeFiles/CMakeDirectoryInformation.cmake"
51 | )
52 |
53 | # Dependency information for all targets:
54 | set(CMAKE_DEPEND_INFO_FILES
55 | "CMakeFiles/SceenRecord_h264.dir/DependInfo.cmake"
56 | )
57 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/Makefile2:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Default target executed when no arguments are given to make.
5 | default_target: all
6 |
7 | .PHONY : default_target
8 |
9 | # The main recursive all target
10 | all:
11 |
12 | .PHONY : all
13 |
14 | # The main recursive preinstall target
15 | preinstall:
16 |
17 | .PHONY : preinstall
18 |
19 | # The main recursive clean target
20 | clean:
21 |
22 | .PHONY : clean
23 |
24 | #=============================================================================
25 | # Special targets provided by cmake.
26 |
27 | # Disable implicit rules so canonical targets will work.
28 | .SUFFIXES:
29 |
30 |
31 | # Remove some rules from gmake that .SUFFIXES does not remove.
32 | SUFFIXES =
33 |
34 | .SUFFIXES: .hpux_make_needs_suffix_list
35 |
36 |
37 | # Suppress display of executed commands.
38 | $(VERBOSE).SILENT:
39 |
40 |
41 | # A target that is always out of date.
42 | cmake_force:
43 |
44 | .PHONY : cmake_force
45 |
46 | #=============================================================================
47 | # Set environment variables for the build.
48 |
49 | # The shell in which to execute make rules.
50 | SHELL = /bin/sh
51 |
52 | # The CMake executable.
53 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
54 |
55 | # The command to remove a file.
56 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
57 |
58 | # Escaping for special characters.
59 | EQUALS = =
60 |
61 | # The top-level source directory on which CMake was run.
62 | CMAKE_SOURCE_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264
63 |
64 | # The top-level build directory on which CMake was run.
65 | CMAKE_BINARY_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug
66 |
67 | #=============================================================================
68 | # Target rules for target CMakeFiles/SceenRecord_h264.dir
69 |
70 | # All Build rule for target.
71 | CMakeFiles/SceenRecord_h264.dir/all:
72 | $(MAKE) -f CMakeFiles/SceenRecord_h264.dir/build.make CMakeFiles/SceenRecord_h264.dir/depend
73 | $(MAKE) -f CMakeFiles/SceenRecord_h264.dir/build.make CMakeFiles/SceenRecord_h264.dir/build
74 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug/CMakeFiles --progress-num=1,2,3 "Built target SceenRecord_h264"
75 | .PHONY : CMakeFiles/SceenRecord_h264.dir/all
76 |
77 | # Include target in all.
78 | all: CMakeFiles/SceenRecord_h264.dir/all
79 |
80 | .PHONY : all
81 |
82 | # Build rule for subdir invocation for target.
83 | CMakeFiles/SceenRecord_h264.dir/rule: cmake_check_build_system
84 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug/CMakeFiles 3
85 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/SceenRecord_h264.dir/all
86 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug/CMakeFiles 0
87 | .PHONY : CMakeFiles/SceenRecord_h264.dir/rule
88 |
89 | # Convenience name for target.
90 | SceenRecord_h264: CMakeFiles/SceenRecord_h264.dir/rule
91 |
92 | .PHONY : SceenRecord_h264
93 |
94 | # clean rule for target.
95 | CMakeFiles/SceenRecord_h264.dir/clean:
96 | $(MAKE) -f CMakeFiles/SceenRecord_h264.dir/build.make CMakeFiles/SceenRecord_h264.dir/clean
97 | .PHONY : CMakeFiles/SceenRecord_h264.dir/clean
98 |
99 | # clean rule for target.
100 | clean: CMakeFiles/SceenRecord_h264.dir/clean
101 |
102 | .PHONY : clean
103 |
104 | #=============================================================================
105 | # Special targets to cleanup operation of make.
106 |
107 | # Special rule to run CMake to check the build system integrity.
108 | # No rule that depends on this can have commands that come from listfiles
109 | # because they might be regenerated.
110 | cmake_check_build_system:
111 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
112 | .PHONY : cmake_check_build_system
113 |
114 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir/DependInfo.cmake:
--------------------------------------------------------------------------------
1 | # The set of languages for which implicit dependencies are needed:
2 | set(CMAKE_DEPENDS_LANGUAGES
3 | "CXX"
4 | )
5 | # The set of files for implicit dependencies of each language:
6 | set(CMAKE_DEPENDS_CHECK_CXX
7 | "/Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/ScreenRecord.cpp" "/Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o"
8 | "/Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/main.cpp" "/Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir/main.cpp.o"
9 | )
10 | set(CMAKE_CXX_COMPILER_ID "AppleClang")
11 |
12 | # The include file search paths:
13 | set(CMAKE_CXX_TARGET_INCLUDE_PATH
14 | "/usr/local/include"
15 | )
16 |
17 | # Targets to which this target links.
18 | set(CMAKE_TARGET_LINKED_INFO_FILES
19 | )
20 |
21 | # Fortran module output directory.
22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "")
23 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir/cmake_clean.cmake:
--------------------------------------------------------------------------------
1 | file(REMOVE_RECURSE
2 | "CMakeFiles/SceenRecord_h264.dir/main.cpp.o"
3 | "CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o"
4 | "SceenRecord_h264.pdb"
5 | "SceenRecord_h264"
6 | )
7 |
8 | # Per-language clean rules from dependency scanning.
9 | foreach(lang CXX)
10 | include(CMakeFiles/SceenRecord_h264.dir/cmake_clean_${lang}.cmake OPTIONAL)
11 | endforeach()
12 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir/depend.internal:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o
5 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/ScreenRecord.cpp
6 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/ScreenRecord.h
7 | /usr/local/include/libavcodec/avcodec.h
8 | /usr/local/include/libavcodec/avfft.h
9 | /usr/local/include/libavcodec/version.h
10 | /usr/local/include/libavdevice/avdevice.h
11 | /usr/local/include/libavfilter/avfilter.h
12 | /usr/local/include/libavfilter/buffersink.h
13 | /usr/local/include/libavfilter/buffersrc.h
14 | /usr/local/include/libavfilter/version.h
15 | /usr/local/include/libavformat/avformat.h
16 | /usr/local/include/libavformat/avio.h
17 | /usr/local/include/libavformat/version.h
18 | /usr/local/include/libavutil/attributes.h
19 | /usr/local/include/libavutil/avconfig.h
20 | /usr/local/include/libavutil/avutil.h
21 | /usr/local/include/libavutil/buffer.h
22 | /usr/local/include/libavutil/channel_layout.h
23 | /usr/local/include/libavutil/common.h
24 | /usr/local/include/libavutil/cpu.h
25 | /usr/local/include/libavutil/dict.h
26 | /usr/local/include/libavutil/error.h
27 | /usr/local/include/libavutil/file.h
28 | /usr/local/include/libavutil/frame.h
29 | /usr/local/include/libavutil/hwcontext.h
30 | /usr/local/include/libavutil/imgutils.h
31 | /usr/local/include/libavutil/intfloat.h
32 | /usr/local/include/libavutil/log.h
33 | /usr/local/include/libavutil/macros.h
34 | /usr/local/include/libavutil/mathematics.h
35 | /usr/local/include/libavutil/mem.h
36 | /usr/local/include/libavutil/opt.h
37 | /usr/local/include/libavutil/pixdesc.h
38 | /usr/local/include/libavutil/pixfmt.h
39 | /usr/local/include/libavutil/rational.h
40 | /usr/local/include/libavutil/samplefmt.h
41 | /usr/local/include/libavutil/time.h
42 | /usr/local/include/libavutil/version.h
43 | /usr/local/include/libswscale/swscale.h
44 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o
45 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/ScreenRecord.h
46 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/main.cpp
47 | /usr/local/include/libavcodec/avcodec.h
48 | /usr/local/include/libavcodec/avfft.h
49 | /usr/local/include/libavcodec/version.h
50 | /usr/local/include/libavdevice/avdevice.h
51 | /usr/local/include/libavfilter/avfilter.h
52 | /usr/local/include/libavfilter/buffersink.h
53 | /usr/local/include/libavfilter/buffersrc.h
54 | /usr/local/include/libavfilter/version.h
55 | /usr/local/include/libavformat/avformat.h
56 | /usr/local/include/libavformat/avio.h
57 | /usr/local/include/libavformat/version.h
58 | /usr/local/include/libavutil/attributes.h
59 | /usr/local/include/libavutil/avconfig.h
60 | /usr/local/include/libavutil/avutil.h
61 | /usr/local/include/libavutil/buffer.h
62 | /usr/local/include/libavutil/channel_layout.h
63 | /usr/local/include/libavutil/common.h
64 | /usr/local/include/libavutil/cpu.h
65 | /usr/local/include/libavutil/dict.h
66 | /usr/local/include/libavutil/error.h
67 | /usr/local/include/libavutil/file.h
68 | /usr/local/include/libavutil/frame.h
69 | /usr/local/include/libavutil/hwcontext.h
70 | /usr/local/include/libavutil/imgutils.h
71 | /usr/local/include/libavutil/intfloat.h
72 | /usr/local/include/libavutil/log.h
73 | /usr/local/include/libavutil/macros.h
74 | /usr/local/include/libavutil/mathematics.h
75 | /usr/local/include/libavutil/mem.h
76 | /usr/local/include/libavutil/opt.h
77 | /usr/local/include/libavutil/pixdesc.h
78 | /usr/local/include/libavutil/pixfmt.h
79 | /usr/local/include/libavutil/rational.h
80 | /usr/local/include/libavutil/samplefmt.h
81 | /usr/local/include/libavutil/time.h
82 | /usr/local/include/libavutil/version.h
83 | /usr/local/include/libswscale/swscale.h
84 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir/depend.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: ../ScreenRecord.cpp
5 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: ../ScreenRecord.h
6 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavcodec/avcodec.h
7 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavcodec/avfft.h
8 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavcodec/version.h
9 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavdevice/avdevice.h
10 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavfilter/avfilter.h
11 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavfilter/buffersink.h
12 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavfilter/buffersrc.h
13 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavfilter/version.h
14 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavformat/avformat.h
15 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavformat/avio.h
16 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavformat/version.h
17 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/attributes.h
18 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/avconfig.h
19 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/avutil.h
20 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/buffer.h
21 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/channel_layout.h
22 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/common.h
23 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/cpu.h
24 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/dict.h
25 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/error.h
26 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/file.h
27 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/frame.h
28 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/hwcontext.h
29 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/imgutils.h
30 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/intfloat.h
31 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/log.h
32 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/macros.h
33 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/mathematics.h
34 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/mem.h
35 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/opt.h
36 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/pixdesc.h
37 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/pixfmt.h
38 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/rational.h
39 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/samplefmt.h
40 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/time.h
41 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libavutil/version.h
42 | CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o: /usr/local/include/libswscale/swscale.h
43 |
44 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: ../ScreenRecord.h
45 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: ../main.cpp
46 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavcodec/avcodec.h
47 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavcodec/avfft.h
48 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavcodec/version.h
49 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavdevice/avdevice.h
50 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavfilter/avfilter.h
51 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavfilter/buffersink.h
52 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavfilter/buffersrc.h
53 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavfilter/version.h
54 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavformat/avformat.h
55 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavformat/avio.h
56 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavformat/version.h
57 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/attributes.h
58 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/avconfig.h
59 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/avutil.h
60 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/buffer.h
61 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/channel_layout.h
62 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/common.h
63 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/cpu.h
64 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/dict.h
65 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/error.h
66 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/file.h
67 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/frame.h
68 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/hwcontext.h
69 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/imgutils.h
70 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/intfloat.h
71 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/log.h
72 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/macros.h
73 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/mathematics.h
74 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/mem.h
75 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/opt.h
76 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/pixdesc.h
77 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/pixfmt.h
78 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/rational.h
79 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/samplefmt.h
80 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/time.h
81 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libavutil/version.h
82 | CMakeFiles/SceenRecord_h264.dir/main.cpp.o: /usr/local/include/libswscale/swscale.h
83 |
84 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir/flags.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # compile CXX with /Library/Developer/CommandLineTools/usr/bin/c++
5 | CXX_FLAGS = -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -std=gnu++14
6 |
7 | CXX_DEFINES =
8 |
9 | CXX_INCLUDES = -I/usr/local/include
10 |
11 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir/link.txt:
--------------------------------------------------------------------------------
1 | /Library/Developer/CommandLineTools/usr/bin/c++ -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/SceenRecord_h264.dir/main.cpp.o CMakeFiles/SceenRecord_h264.dir/ScreenRecord.cpp.o -o SceenRecord_h264 -L/usr/local/lib -Wl,-rpath,/usr/local/lib /usr/local/lib/libavcodec.dylib /usr/local/lib/libavformat.dylib /usr/local/lib/libavutil.dylib /usr/local/lib/libavdevice.dylib /usr/local/lib/libswscale.dylib
2 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir/progress.make:
--------------------------------------------------------------------------------
1 | CMAKE_PROGRESS_1 = 1
2 | CMAKE_PROGRESS_2 = 2
3 | CMAKE_PROGRESS_3 = 3
4 |
5 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug/CMakeFiles/rebuild_cache.dir
2 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug/CMakeFiles/edit_cache.dir
3 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug/CMakeFiles/SceenRecord_h264.dir
4 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/clion-environment.txt:
--------------------------------------------------------------------------------
1 | ToolSet: 1.0 (local)Options:
2 |
3 | Options:
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/clion-log.txt:
--------------------------------------------------------------------------------
1 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264
2 | -- Configuring done
3 | -- Generating done
4 | -- Build files have been written to: /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug
5 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/feature_tests.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/SceenRecord-h264/cmake-build-debug/CMakeFiles/feature_tests.bin
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/feature_tests.c:
--------------------------------------------------------------------------------
1 |
2 | const char features[] = {"\n"
3 | "C_FEATURE:"
4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400
5 | "1"
6 | #else
7 | "0"
8 | #endif
9 | "c_function_prototypes\n"
10 | "C_FEATURE:"
11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
12 | "1"
13 | #else
14 | "0"
15 | #endif
16 | "c_restrict\n"
17 | "C_FEATURE:"
18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
19 | "1"
20 | #else
21 | "0"
22 | #endif
23 | "c_static_assert\n"
24 | "C_FEATURE:"
25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
26 | "1"
27 | #else
28 | "0"
29 | #endif
30 | "c_variadic_macros\n"
31 |
32 | };
33 |
34 | int main(int argc, char** argv) { (void)argv; return features[argc]; }
35 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/CMakeFiles/progress.marks:
--------------------------------------------------------------------------------
1 | 3
2 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/SceenRecord_h264:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/SceenRecord-h264/cmake-build-debug/SceenRecord_h264
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/SceenRecord_h264.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/SceenRecord-h264/cmake-build-debug/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Is this installation the result of a crosscompile?
31 | if(NOT DEFINED CMAKE_CROSSCOMPILING)
32 | set(CMAKE_CROSSCOMPILING "FALSE")
33 | endif()
34 |
35 | if(CMAKE_INSTALL_COMPONENT)
36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
37 | else()
38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
39 | endif()
40 |
41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
42 | "${CMAKE_INSTALL_MANIFEST_FILES}")
43 | file(WRITE "/Users/zhangtao/SourceCode/github/ffmpeg-examples/SceenRecord-h264/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
45 |
--------------------------------------------------------------------------------
/SceenRecord-h264/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "ScreenRecord.h"
3 |
4 | using namespace std;
5 |
6 | int main() {
7 | int value = -1;
8 | ScreenRecord sr;
9 | value = sr.openDevice();
10 | if (value) {
11 | cout << "Open Device Error. err: " << value;
12 | exit(-1);
13 | }
14 |
15 | value = sr.init_outputfile();
16 | if (value) {
17 | cout << "Open OutFile Error. err: " << value;
18 | exit(-1);
19 | }
20 |
21 | value = sr.CaptureVideoFrames();
22 | if (value) {
23 | cout << "Capture Error. err: " << value;
24 | exit(-1);
25 | }
26 | return 0;
27 | }
--------------------------------------------------------------------------------
/ScreenRecord/.gitignore:
--------------------------------------------------------------------------------
1 | cmake-build-debug
2 |
--------------------------------------------------------------------------------
/ScreenRecord/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(ScreenRecord)
3 |
4 | set(CMAKE_CXX_STANDARD 14)
5 |
6 | find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
7 | find_library(AVCODEC_LIBRARY avcodec)
8 |
9 | find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
10 | find_library(AVFORMAT_LIBRARY avformat)
11 |
12 | find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h)
13 | find_library(AVUTIL_LIBRARY avutil)
14 |
15 | find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
16 | find_library(AVDEVICE_LIBRARY avdevice)
17 |
18 | find_path(SWSCALE_INCLUDE_DIR libswscale/swscale.h)
19 | find_library(SWSCALE_LIBRARY swscale)
20 |
21 | add_executable(ScreenRecord main.cpp ScreenRecorder.cpp ScreenRecorder.h)
22 | INCLUDE_DIRECTORIES(
23 | /usr/local/include
24 | )
25 |
26 | LINK_DIRECTORIES(
27 | /usr/local/lib
28 | )
29 |
30 | target_include_directories(ScreenRecord PRIVATE ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR})
31 | target_link_libraries(ScreenRecord
32 | PRIVATE
33 | ${AVCODEC_LIBRARY}
34 | ${AVFORMAT_LIBRARY}
35 | ${AVUTIL_LIBRARY}
36 | ${AVDEVICE_LIBRARY}
37 | ${SWSCALE_LIBRARY}
38 | )
--------------------------------------------------------------------------------
/ScreenRecord/ScreenRecorder.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by zhangtao on 2019/8/30.
3 | //
4 |
5 | #ifndef SCREENRECORD_SCREENRECORDER_H
6 | #define SCREENRECORD_SCREENRECORDER_H
7 |
8 |
9 | #include
10 |
11 | #ifdef __cplusplus
12 | extern "C"
13 | {
14 | #endif
15 | #include "libavcodec/avcodec.h"
16 | #include "libavcodec/avfft.h"
17 | #include "libavdevice/avdevice.h"
18 | #include "libavfilter/avfilter.h"
19 | #include "libavfilter/buffersink.h"
20 | #include "libavfilter/buffersrc.h"
21 | #include "libavformat/avformat.h"
22 | #include "libavformat/avio.h"
23 | #include "libavutil/opt.h"
24 | #include "libavutil/common.h"
25 | #include "libavutil/channel_layout.h"
26 | #include "libavutil/imgutils.h"
27 | #include "libavutil/mathematics.h"
28 | #include "libavutil/samplefmt.h"
29 | #include "libavutil/time.h"
30 | #include "libavutil/opt.h"
31 | #include "libavutil/pixdesc.h"
32 | #include "libavutil/file.h"
33 | #include "libswscale/swscale.h"
34 | #ifdef __cplusplus
35 | };
36 | #endif
37 |
38 | class ScreenRecorder {
39 | private:
40 | AVInputFormat *pAVInputFormat;
41 | AVOutputFormat *output_format;
42 |
43 | AVCodecContext *pAVCodecContext;
44 |
45 | AVFormatContext *pAVFormatContext;
46 |
47 | AVFrame *pAVFrame;
48 | AVFrame *outFrame;
49 |
50 | AVCodec *pAVCodec;
51 | AVCodec *outAVCodec;
52 |
53 | AVPacket *pAVPacket;
54 | AVPacket *outPacket;
55 |
56 | AVDictionary *options;
57 |
58 | AVOutputFormat *outAVOutputFormat;
59 | AVFormatContext *outAVFormatContext;
60 | AVCodecContext *outAVCodecContext;
61 |
62 | AVStream *video_st;
63 | AVFrame *outAVFrame;
64 |
65 | const char *dev_name;
66 | const char *output_file;
67 |
68 | double video_pts;
69 |
70 | int out_size;
71 | int codec_id;
72 | int value;
73 | int VideoStreamIndx;
74 |
75 | public:
76 |
77 | ScreenRecorder();
78 |
79 | ~ScreenRecorder();
80 |
81 | int openDevice();
82 |
83 | int init_outputfile();
84 |
85 | int CaptureVideoFrames();
86 |
87 | };
88 |
89 | #endif //SCREENRECORD_SCREENRECORDER_H
90 |
--------------------------------------------------------------------------------
/ScreenRecord/cmake-build-debug/CMakeFiles/3.14.5/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Library/Developer/CommandLineTools/usr/bin/cc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "AppleClang")
4 | set(CMAKE_C_COMPILER_VERSION "10.0.1.10010046")
5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_C_COMPILER_WRAPPER "")
7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
12 |
13 | set(CMAKE_C_PLATFORM_ID "Darwin")
14 | set(CMAKE_C_SIMULATE_ID "")
15 | set(CMAKE_C_SIMULATE_VERSION "")
16 |
17 |
18 |
19 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
20 | set(CMAKE_C_COMPILER_AR "")
21 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
22 | set(CMAKE_C_COMPILER_RANLIB "")
23 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
24 | set(CMAKE_MT "")
25 | set(CMAKE_COMPILER_IS_GNUCC )
26 | set(CMAKE_C_COMPILER_LOADED 1)
27 | set(CMAKE_C_COMPILER_WORKS TRUE)
28 | set(CMAKE_C_ABI_COMPILED TRUE)
29 | set(CMAKE_COMPILER_IS_MINGW )
30 | set(CMAKE_COMPILER_IS_CYGWIN )
31 | if(CMAKE_COMPILER_IS_CYGWIN)
32 | set(CYGWIN 1)
33 | set(UNIX 1)
34 | endif()
35 |
36 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
37 |
38 | if(CMAKE_COMPILER_IS_MINGW)
39 | set(MINGW 1)
40 | endif()
41 | set(CMAKE_C_COMPILER_ID_RUN 1)
42 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
43 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
44 | set(CMAKE_C_LINKER_PREFERENCE 10)
45 |
46 | # Save compiler ABI information.
47 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
48 | set(CMAKE_C_COMPILER_ABI "")
49 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
50 |
51 | if(CMAKE_C_SIZEOF_DATA_PTR)
52 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
53 | endif()
54 |
55 | if(CMAKE_C_COMPILER_ABI)
56 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
57 | endif()
58 |
59 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
60 | set(CMAKE_LIBRARY_ARCHITECTURE "")
61 | endif()
62 |
63 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
64 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
65 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
66 | endif()
67 |
68 |
69 |
70 |
71 |
72 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
73 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
74 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
75 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
76 |
--------------------------------------------------------------------------------
/ScreenRecord/cmake-build-debug/CMakeFiles/3.14.5/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/Library/Developer/CommandLineTools/usr/bin/c++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "AppleClang")
4 | set(CMAKE_CXX_COMPILER_VERSION "10.0.1.10010046")
5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_CXX_COMPILER_WRAPPER "")
7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98")
8 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17")
9 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
10 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
11 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
12 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
13 | set(CMAKE_CXX20_COMPILE_FEATURES "")
14 |
15 | set(CMAKE_CXX_PLATFORM_ID "Darwin")
16 | set(CMAKE_CXX_SIMULATE_ID "")
17 | set(CMAKE_CXX_SIMULATE_VERSION "")
18 |
19 |
20 |
21 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
22 | set(CMAKE_CXX_COMPILER_AR "")
23 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
24 | set(CMAKE_CXX_COMPILER_RANLIB "")
25 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
26 | set(CMAKE_MT "")
27 | set(CMAKE_COMPILER_IS_GNUCXX )
28 | set(CMAKE_CXX_COMPILER_LOADED 1)
29 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
30 | set(CMAKE_CXX_ABI_COMPILED TRUE)
31 | set(CMAKE_COMPILER_IS_MINGW )
32 | set(CMAKE_COMPILER_IS_CYGWIN )
33 | if(CMAKE_COMPILER_IS_CYGWIN)
34 | set(CYGWIN 1)
35 | set(UNIX 1)
36 | endif()
37 |
38 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
39 |
40 | if(CMAKE_COMPILER_IS_MINGW)
41 | set(MINGW 1)
42 | endif()
43 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
44 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
45 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
46 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
47 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
48 |
49 | # Save compiler ABI information.
50 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
51 | set(CMAKE_CXX_COMPILER_ABI "")
52 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
53 |
54 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
55 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
56 | endif()
57 |
58 | if(CMAKE_CXX_COMPILER_ABI)
59 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
60 | endif()
61 |
62 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
63 | set(CMAKE_LIBRARY_ARCHITECTURE "")
64 | endif()
65 |
66 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
67 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
68 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
69 | endif()
70 |
71 |
72 |
73 |
74 |
75 | set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/include/c++/v1;/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
76 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "c++")
77 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
78 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
79 |
--------------------------------------------------------------------------------
/ScreenRecord/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/ScreenRecord/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/ScreenRecord/cmake-build-debug/CMakeFiles/3.14.5/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-18.7.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "18.7.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Darwin-18.7.0")
9 | set(CMAKE_SYSTEM_NAME "Darwin")
10 | set(CMAKE_SYSTEM_VERSION "18.7.0")
11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/ScreenRecord/cmake-build-debug/CMakeFiles/clion-environment.txt:
--------------------------------------------------------------------------------
1 | ToolSet: 1.0 (local)Options:
2 |
3 | Options:
--------------------------------------------------------------------------------
/ScreenRecord/cmake-build-debug/CMakeFiles/feature_tests.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/ScreenRecord/cmake-build-debug/CMakeFiles/feature_tests.bin
--------------------------------------------------------------------------------
/ScreenRecord/cmake-build-debug/CMakeFiles/feature_tests.c:
--------------------------------------------------------------------------------
1 |
2 | const char features[] = {"\n"
3 | "C_FEATURE:"
4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400
5 | "1"
6 | #else
7 | "0"
8 | #endif
9 | "c_function_prototypes\n"
10 | "C_FEATURE:"
11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
12 | "1"
13 | #else
14 | "0"
15 | #endif
16 | "c_restrict\n"
17 | "C_FEATURE:"
18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
19 | "1"
20 | #else
21 | "0"
22 | #endif
23 | "c_static_assert\n"
24 | "C_FEATURE:"
25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
26 | "1"
27 | #else
28 | "0"
29 | #endif
30 | "c_variadic_macros\n"
31 |
32 | };
33 |
34 | int main(int argc, char** argv) { (void)argv; return features[argc]; }
35 |
--------------------------------------------------------------------------------
/ScreenRecord/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "ScreenRecorder.h"
3 |
4 | using namespace std;
5 |
6 | int main() {
7 |
8 | ScreenRecorder screen_record;
9 |
10 | screen_record.openDevice();
11 |
12 | cout << "open device success \n";
13 |
14 | screen_record.init_outputfile();
15 |
16 | cout << "init output file success \n";
17 |
18 | screen_record.CaptureVideoFrames();
19 | return 0;
20 | }
--------------------------------------------------------------------------------
/docs/PTS-TimeStamp.md:
--------------------------------------------------------------------------------
1 | # PTS / DTS / Timestamp
2 | > 计算I帧在视频中出现的时间点
3 |
4 | ## 名词解释
5 | 首先需要明确以下名词概念:
6 |
7 | + I/P/B 帧(具体差异请参看 https://www.jianshu.com/p/18af03556431 )
8 | I帧: 内部编码帧(关键帧)
9 | P帧: 前向预测帧(根据I帧计算差值)
10 | B帧: 双向预测帧(根据I帧和P帧计算差值)
11 | + PTS: 帧显示的时间刻度(在哪个时间点显示此帧)
12 | + DTS: 帧解码的时间刻度(在哪个时间点解码此帧)
13 | + Timestamp: 帧在视频内部的时间戳
14 | + Time_base: 视频表示时间的"刻度"
15 |
16 | ## 处理流程
17 | 视频内没有绝对时间,只有相对时间(相对视频起始位置)。例如在播放器中看到的时间进度条"00:00:05"表示的是当前看到的帧是在相对起始时间点(00:00:00)解码并渲染的。
18 |
19 | 而"00:00:05"只是为了让用户方便理解而展现出来的,在视频内部则是使用时间戳来保存的,"00:00:05"可能相对的时间戳则是"5000000µs"(不考虑四舍五入)。
20 |
21 | 那么时间戳又是怎么计算出来的呢?此时就需要通过PTS和Time_base来配合计算。
22 |
23 | 首先来看Time_base。 Time_base好比一把尺子,上面标满了刻度,例如(1,60)表示时间刻度就是1/60,每个时间单位就是1/60秒。 如果是(1,1000)就表示每个时间单位是1微秒。
24 |
25 | 上面说到pts是显示的时间刻度, 也就是占用了多少时间刻度。 换算成大白话就是pts占用了多少个刻度,而time_base表示每个刻度是多长。
26 |
27 | 然而这有什么用呢?Time_base最重要的作用是用来统一”时间节奏"的。 例如视频A编码时采用1/1000的time_base,则某个帧的pts保存为465000。 当对视频A进行解码时,换成了1/9000的time_base,此时时间刻度不一致了,就需要通过pts*encode_time_base来换算成解码时的timestamp,这样才能保证正确解码。
28 |
29 | ## 编码实现
30 | 上面是理论介绍,下面来看如何通过代码来计算timestamp和换算成time.
31 |
32 | 这次只需要显示每帧的pts,time_base,time因此不需要初始化output, 只要初始化input即可。
33 |
34 | ### 初始化输入源
35 |
36 | 按照前几篇介绍的初始化思路,只需要按照`打开文件`->`判断视频流`->`初始化解码器`这样的步骤就可以了。
37 |
38 | ```
39 | +------------------------+ +-------------------------+
40 | | avformat_open_input | ------------>|avformat_find_stream_info|
41 | +------------------------+ +-------------------------+
42 | |
43 | |
44 | |
45 | \|/
46 | +-----------------------------+ +-------------------------+
47 | |avcodec_parameters_to_context| <---------| avcodec_find_decoder |
48 | +-----------------------------+ +-------------------------+
49 | ```
50 |
51 | `avcodec_parameters_to_context`尤其需要关注,这个函数会根据输入源的编码信息来初始化用户指定的编码上下文。如果编码信息不匹配或者设置错误时,会出现莫名的解码错误。一般调用这个函数后,大多数的解码错误都能消失。
52 |
53 | ### 计算Time
54 |
55 | time_base是一个struct
56 |
57 | ```c
58 | typedef struct AVRational{
59 | int num; ///< Numerator
60 | int den; ///< Denominator
61 | } AVRational;
62 | ```
63 | num 表示的是分子,den表示分母。 对于time_base来说num就是1,den表示每一秒等分了多少份。 上面说过通过`pts*time_base`就可以得出时间戳,所以需要计算出每个时间刻度具体代表多少,所以通过`av_q2d`得出每个刻度具体值。
64 |
65 | 在循环读入解码后的帧数据之后,可以直接通过`iframe->pts`来读取当前帧的pts值,然后再乘以刻度值就可以得出当前时间戳`iframe->pts * av_q2d(_time_base)`。
66 |
67 | 伪代码如下:
68 |
69 | ```c
70 | while av_read_frame {
71 | avcodec_send_packet
72 | ...
73 | while avcodec_receive_frame {
74 | ...
75 | iframe->pts * av_q2d(_time_base)
76 | ...
77 | }
78 | }
79 | ```
80 |
81 |
--------------------------------------------------------------------------------
/docs/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/docs/filter-complex.md:
--------------------------------------------------------------------------------
1 | # Filter-Complex
2 | > 通过API实现可控的Filter调用链
3 |
4 | 虽然通过声明`[x][y]avfilter=a=x:b=y;avfilter=xxx`的方式可以创建一个可用的`Filter`调用链,并且在绝大多数场合下这种方式都是靠谱和实用的。 但如果想`精细化`的管理`AVFilter`调用链,例如根据某些条件来动态生成`AVFilter Graph`。这种声明方式就不太灵活(也可以通过if判断来动态组装字符串,如果你非常喜欢这种字符串声明方式,到此为止不在建议你往下阅读了)。
5 |
6 | 首先快速温习一下,如何创建一个`AVFilter Graph`。
7 |
8 | ```shell
9 | +-------+ +---------------------+ +---------------+
10 | |buffer | |Filter ..... Filter N| | buffersink |
11 | ----------> | |output|------>|input| |output|---> |input| |-------->
12 | +-------+ +---------------------+ +---------------+
13 | ```
14 |
15 |
16 | 创建三部曲:
17 |
18 | 1. 初始化`buffer`和`buffersink`。
19 | 2. 初始化其它filter
20 | 3. 设定Filter Graph的Input和Output。
21 |
22 | 其中`buffer`和`buffersink`分别代表`Graph`的起始和结束。
23 |
24 | 然后快速封装`args`也就是`movie=t.png[wm];[in][wm]overlay=10:20[out]`这样的filter-complex命令。 而且通过`avfilter_graph_parse_ptr`完成中间filter的初始化,
25 |
26 | 最后指定各个filter的input和output,一个graph就算搞定了。
27 |
28 |
29 | 好,下面来看如何通过API`精细化`生成`AVFilter Graph`。 生成下面的Graph:
30 |
31 | ```shell
32 | +-------+ +---------------------+ +---------------+
33 | |buffer | | Filter | | buffersink |
34 | ----------> | |output|------>|input| Fade |output|---> |input| |-------->
35 | +-------+ +---------------------+ +---------------+
36 | ```
37 |
38 |
39 | 首先初始化各个AVFilter。所有的AVFilter的初始化都可以简化为两步操作:
40 |
41 | + 通过`avfilter_get_by_name`查找指定的AVFilter
42 | + 通过`avfilter_graph_create_filter`初始化AVFilterContext
43 |
44 | 同`AVcodec`和`AVCodecContext`的关系一样, 所有的AVFilter的执行都依靠对应的AVFilterContext(在ffmpeg开发中,每个组件都会对应一个上下文管理器,由这个上下文管理器封装各种参数然后调用组件执行)。
45 |
46 | 通过`avfilter_get_by_name`生成AVFilter实例之后,紧跟着就需要调用`avfilter_graph_create_filter`初始化上下文管理器。
47 |
48 | 按照下面的流程,依次初始化三个AVFilter:
49 | ```C
50 | buffer_src = avfilter_get_by_name("buffer");
51 | ret = avfilter_graph_create_filter(&buffersrc_ctx, buffer_src, "in", args, NULL, filter_graph);
52 | ```
53 |
54 | 这里重点聊一下`avfilter_graph_create_filter`。 下面是函数原型:
55 |
56 | ```c
57 | int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt,
58 | const char *name, const char *args, void *opaque,
59 | AVFilterGraph *graph_ctx);
60 | ```
61 |
62 | filt_ctx表示这个AVFilter的上下文管理器。
63 |
64 | name表明的是AVFilter在Graph中的名称,这个名称叫啥不重要但必须唯一。 例如`Fade AVFilter`就可以叫做`fade1`,`fade2`或者`ifade`等等。
65 |
66 | args则是这个AVFilter的参数, 注意仅仅是这个AVFilter的参数,不是整个graph的参数。再拿`Fade`举例,args就可以是`t=in:st=3:d=3`。
67 |
68 | opaque一般给NULL就可以了。
69 |
70 |
71 | 初始完这三个AVFilter之后,就进入到本次文档的重点: `avfilter_link`.
72 |
73 | ```C
74 | int avfilter_link( AVFilterContext * src,
75 | unsigned srcpad,
76 | AVFilterContext * dst,
77 | unsigned dstpad
78 | )
79 | ```
80 |
81 | `avfilter_link`分别用来链接两个AVFilter(传说中的一手托两家)。 `src`和`dst`分别表示源Filter和目标Filter。 `srcpad`表示`src`第N个输出端, `dstpad`表示`dst`第N个输入端。 如果不好理解,直接看下面的图:
82 |
83 | ```
84 |
85 | +-------------+ +-------------+
86 | | src srcpad 1 -----> dstpad 3 dst |
87 | | srcpad 2 -----> dstpad 2 |
88 | | srcpad 3 -----> dstpad 1 |
89 | +-------------+ +-------------+
90 |
91 | ```
92 |
93 | 上图假设`src`和`dst`分别有三个输出端和三个输入端(不是所有avfilter都有这么多的输入输出端,像fade只有一个,但overlay就有多个)。
94 |
95 | 而`srcpad`和`dstpad`表示的就是输出/输入端的序号。假如将`buffer`第一个输出端对应`fade`第一个输入端。 那么就应该这么写:
96 |
97 | ```
98 | avfilter_link(buffersrc_ctx, 0, ifade_ctx, 0);
99 | ```
100 |
101 | 然后将`fade`的第一个输出端对应`buffersink`的输入端,就这么写:
102 |
103 | ```
104 | avfilter_link(ifade_ctx, 0, buffersink_ctx, 0);
105 | ```
106 |
107 | 而所谓的`精细化`就是在这里体现的,通过代码的逻辑判断,可以动态的组合不同的`AVFilter`生成不同的`Filter Graph`。并且还可以组合不同的输入/输出端。
108 |
109 | 本次代码示例可以参考`ifilter`。同时也可以参考 [ffmpeg-go-server](https://github.com/andy-zhangtao/ffmpeg-go-server/blob/master/filters/ifade/copy.c)(一个尝试为ffmpeg提供restful API的web server)。
--------------------------------------------------------------------------------
/docs/how-to-analysiz.md:
--------------------------------------------------------------------------------
1 | # 视频读取处理的简要流程
2 | > 读取/输出视频的简要流程和一些误区
3 |
4 | 在读取,处理视频文件时,以下四个结构体是非常重要的,所以放在片首提一下。
5 |
6 | + AVFormatContext
7 | > 媒体源的抽象描述,可以理解成视频/音频文件信息描述
8 |
9 | + AVInputFormat / AVOutputFormat
10 | > 容器的抽象描述
11 |
12 | + AVCodecContext / AVCodecParameters
13 | > 编解码的抽象描述,ffmpeg使用率最高的结构体(AVCodecContext被AVCodecParameters所取代)
14 |
15 | + AVStream
16 | > 每个音视频的抽象描述
17 |
18 | + AVCodec
19 | > 编解码器的抽象描述
20 |
21 | 四个结构体的包含关系大致如下:
22 |
23 | ```
24 | |AVFormatContext
25 | |
26 | |---------> AVInputFormat / AVOutputFormat
27 | |
28 | |---------> AVStream
29 | |-------> time_base (解码时不需要设置, 编码时需要用户设置)
30 | |
31 | |-------> AVCodecParameters|--------> codec id
32 | |
33 | |
34 | |AVCodec ------------通过 codec id 关联----------------------------+
35 | |
36 | |
37 | |-------------->AVCodecContext
38 | ```
39 |
40 | 读取/输出视频时,基本就是围绕这五个结构体来进行操作的。 而不同点在于,读取文件时,`ffmpeg`会通过读取容器metadata来完成`AVFormateContext`的初始化。输出文件时,我们需要根据实际情况自行封装`AVFormateContext`里面的数据。封装时的数据来源,一部分来自于实际情况(例如time_base,framerate等等),另外一部分则来自于数据源。
41 |
42 | 下面分别来描述读取和输出的差异。
43 |
44 | 先看读取的大致流程:
45 | ```shell
46 | |------------------------------------------------------loop---------------------------------------------------|
47 | | |-------------------------------------------------------------------- |
48 | | | | |
49 | avformat_open_input ----------> AVFormatContext ----------> stream ----avcodec_find_decoder----> codec -------avcodec_alloc_context3-----------> codecContent ---avcodec_open2-->
50 | | |
51 | |------------------------------------avcodec_parameters_to_context--------------------------|
52 |
53 | ```
54 | `avformat_open_input`会尝试根据指定文件的metadata完成`AVFormatContext`的部分初始化,如果视频源是包含header的,那么此时的`AVFormatContext`数据基本都齐了。如果是不包含header的容器格式(例如MPEG),`AVFormatContext`此时就没有`AVStream`的数据,需要单独使用`avformat_find_stream_info`来完成`AVStream`的初始化。
55 |
56 | 无论怎样,待`AVFormatContext`完成了初始化,就可以通过轮询`AVStream`来单独处理每一个`stream`数据,也就是上面的`loop`。下面单拎一条`stream`来聊。
57 |
58 | 解码视频只需要`AVCodecContext`就可以了,从包含图可以得知根据`AVCodec`可以生成`AVCodecContext`,而`avcodec_find_decoder`又可以生成对应的`codec`。所以大致的思路就清晰了,首先通过`inStream->codecpar(AVCodecParameters)->codec_id`和`avcodec_find_decoder`生成指定的解码器`AVCodec`, 然后通过`avcodec_alloc_context3`就可以生成可以解码视频源的`AVCodecContext`。
59 |
60 | 此时产生了第一个误区:生成的`AVCodecContext`就可以直接解码视频! **这是错误的**
61 |
62 | 现在的`AVCodecContext`只是一个通用`Codec`描述,没有视频源的特定信息(avcodec_parameters_to_context的代码有些长,我也没搞明白具体是哪些信息)。 所以需要调用`avcodec_parameters_to_context`将`inStream->codecpar`和`AVCodecContext`糅合到一起(俗称merge)。这时的`AVCodecContext`才能打开特定的视频文件。
63 |
64 | > 对于没有header的容器。 framerate 和 time_base 仍然需要特别设定。
65 | > fraterate 可以通过av_guess_frame_rate获取。 time_base可以直接使用AVStream的time_base;
66 |
67 | 最后就是使用`avcodec_open2`打开`AVCodecContext`并处于待机状态。
68 |
69 | 输出的流程和读取的流程相似,但又有不同。 读取读取参数较多,而输出更多的是封装参数。 下面是输出的大致流程:
70 |
71 |
72 | ```shell
73 | |----------------------------------avcodec_parameters_from_context-----------------|
74 | | |
75 | stream(enc)---avcodec_find_encoder ---> codec(enc)---avcodec_alloc_context3---> codecContent(enc)----avcodec_open2---->
76 | -----------
77 | |
78 | |
79 | |
80 | avformat_alloc_output_context2 -------> AVFormatContext --------avformat_new_stream--------> stream -------copy dec to enc---
81 | | |
82 | |---------------------loop--------------|
83 | ```
84 |
85 | 无论是读取还是输出,首要任务都是构建`AVFormateContext`。有所不同的是此时(输出),我们先构建一个模板,然后往里面填值,因此使用的是`avformat_alloc_output_context2`函数。
86 | >avformat_alloc_output_context2和avformat_open_input 都是用来生成AVFormatContext的。不同的是,一个生成模板往里面填值,另一个生成的是已经完成初始化的。
87 |
88 | 编码一个视频文件,需要的也只是一个`AVCodecContext`. 但此时离生成`AVCodecContext`还差很多东西。所以需要我们逐一进行准备,按照最上面的包含图,需要先生成一个`AVStream`。因此调用`avformat_new_stream`生成一个空`AVStream`。
89 |
90 | 有了`AVStream`之后,就需要将这个`Stream`与具体的`Codec`关联起来。 其次,根据需要我们指定`avcodec_find_encoder`生成一个标准的`AVCodec`,而后使用`avcodec_alloc_context3`生成对应的`AVCodecContext`。
91 |
92 | 第二个误区:生成的`AVCodecContext`就可以直接解码视频! **这是错误的**
93 |
94 | 现在生成的`AVCodecContext`不能直接使用,因为还有参数是标准参数没有适配。以下参数是经常容易出错的:
95 |
96 | ```
97 | width
98 | height
99 | framerate
100 | time_base
101 | sample_aspect_ratio
102 | pix_fmt
103 |
104 | time_base(AVSteam)
105 | ```
106 |
107 | 在对`codecpar`和`AVCodecContext`进行`反向`merge. 反向指的是从`AVCodecContext`读取参数填充到`codecpar`中所以才需要提前设置`AVCodecContext`中的参数。
108 |
109 | 最后调用`avcodec_open2`处于待输出状态。
110 |
111 | 上面是读取/输出的流程,下面来补充说一下如何从视频源读数据,再写到目标视频中。
112 |
113 | 真正读取视频数据涉及到的结构体是:
114 |
115 | + AVPacket
116 | > 可能包含一个或多个 frame。 如果包含多个,则读取第一个
117 |
118 | + AVFrame
119 | > 保存当前帧的数据格式
120 |
121 | 一个典型的读取处理代码,看起来应该是下面的样子:
122 |
123 | ```C
124 | while (1){
125 | av_read_frame (读取数据)
126 | ...
127 | avcodec_decode_video2 (对读到的数据进行解码)
128 | ...
129 | avcodec_encode_video2 (对数据进行编码)
130 | ...
131 | av_interleaved_write_frame (写到文件中)
132 | }
133 |
134 | av_write_trailer (写metadata)
135 | ```
136 |
137 | > avcodec_decode_video2 和 avcodec_encode_video2 是即将废弃的函数,替代函数的使用可参看前几篇文章
138 |
139 | 在这里也有几个误区:
140 |
141 | 第三个误区,AVPacket声明后就可用。 **这是错误的**
142 | > AVPacket 声明后需要手动设置{.data = NULL, .size = 0}.
143 |
144 | 第四个误区,AVPacket time_base直接设置 **经过验证,这也是错误的**
145 | > 直接设置不好使。 还是老老实实通过av_packet_rescale_ts来调整 AVPacket的time base吧。同理,在写文件之前也需要调用av_packet_rescale_ts来修改time base。
146 |
147 | 以上就是今天学习的结果,希望对以后解析/输出视频能有所帮助。
--------------------------------------------------------------------------------
/docs/iconcat.md:
--------------------------------------------------------------------------------
1 | # Insert Video Into Middle Of Other Video
2 | > 在视频A中的任意位置插入视频B
3 |
4 | 在上一篇中,我们通过调整PTS可以实现视频的加减速。这只是对同一个视频的调转,本次我们尝试对多个视频进行合并处理。
5 |
6 | ### Concat如何运行
7 | ffmpeg提供了一个`concat`滤镜来合并多个视频,例如:要合并视频Video A和Video B,通过调用
8 |
9 | ```shell
10 | ffmpeg -i va.mp4 -i vb.mp4 -filter_complex "[0][1]concat[out]" -map '[out]' -y output.mp4
11 | ```
12 |
13 | `concat`支持多个Input Source,上面的命令只合并了两个视频,通过生成`concat`流程图可以看到一些细节:
14 |
15 | ```shell
16 | echo "movie=va.mp4[0];movie=vb.mp4[1];[0][1]concat,nullsink" | graph2dot -o graph.tmp
17 | dot -Tpng graph.tmp -o graph.png
18 | ```
19 |
20 | 
21 |
22 | 这是`concat`典型用法,循环读取输入源,然后通过修改pts完成合并。
23 |
24 | `concat`是顺序修改,如果需要在video A中某个时间点插入video B,那么`concat`就无法完成了。 顺序合并是通过修改PTS实现,那么变序合并也可以通过修改PTS来实现,下面借助`concat`的逻辑来看看如何实现变序合并。
25 |
26 | ### 变序合并
27 |
28 | 为了方便说明问题,我们来看一下顺序和变序不同点到底在哪里。
29 |
30 | * 问题分析
31 |
32 | 我们仍然假设需要合并的两个视频分别是Video A和Video B, 需要将Video B插入在Video A中。AF表示Video A的帧, BF表示Video B的帧。
33 |
34 | **顺序合并**
35 | ```shell
36 | +---------------------------------------------------------------------------------------------------------------+
37 | | AF1 AF2 AF3 AF4 AF5 AF6 AF7 BF1 BF2 BF3 BF4 BF5 BF6 |
38 | | |--------------|--------------|--------------|--------------|--------------|--------------|---> |
39 | |Time 0 10 20 30 40 50 60 |
40 | |PTS 0 100 200 250 300 350 400 500 600 650 700 750 800 |
41 | +---------------------------------------------------------------------------------------------------------------+
42 | ```
43 |
44 | 顺序合并就是读取Video B的帧,然后将pts以Video A结束时的PTS为基准进行修改。
45 |
46 | **变序合并**
47 |
48 | ```shell
49 | +---------------------------------------------------------------------------------------------------------------+
50 | | AF1 AF2 AF3 AF4 BF1 BF2 BF3 BF4 BF5 BF6 AF5 AF6 AF7 |
51 | | |--------------|--------------|--------------|--------------|--------------|--------------|---> |
52 | |Time 0 10 20 30 40 50 60 |
53 | |PTS 0 100 200 250 300 350 400 500 600 650 700 750 800 |
54 | +---------------------------------------------------------------------------------------------------------------+
55 | ```
56 |
57 | 变序合并时先读取Video A的帧,当达到规定的PTS时,开始读取Video B的帧,然后以A`截断`时的PTS为基准重新计算PTS。当Video B所有的帧都处理完毕之后,在从`截断`处开始重新处理Video A的帧。
58 |
59 | 从上面两个图来看,问题好像不是很难解决。 只要达到`截断`的条件,就去处理另外一个视频,等待视频处理完毕之后。再返回来处理被`截断`的视频。
60 |
61 | 但在实现的道路上有如下三个问题需要解决:
62 |
63 | 1. 如何判断到达插入时间点
64 | 2. 如何判断视频处理完毕
65 | 3. 如何从断点处重新读取Frame
66 |
67 | 下面就需要逐个问题解决了。
68 |
69 | + 如何判断到达插入时间点
70 |
71 | 因为我们是需要在视频A中插入视频B,所以需要首先找到插入点。 而根据时间来判断插入点无疑是最简单的一种形式,计算时间就可以依靠前几篇中介绍的PTS知识了。
72 |
73 | 当从视频源中读取到每帧后,我们通过帧的PTS和Time-Base根据`pts * av_q2d(time_base)`转换成播放时间。 这样第一个问题就顺利解决。
74 |
75 | 当找到插入点后,我们需要暂存当前的位置,等待插入结束后,需要从断点处重新加载帧。
76 |
77 | + 如何判断视频处理完毕
78 |
79 | 执行插入本质就是读取视频B的数据帧,然后修改PTS值。但我们需要得知视频B已经处理完毕,这样才能返回到视频A的断点处继续处理。 所以如何获取到视频处理完毕就是第二个问题。
80 |
81 | 如果抛开ffmpeg来说,处理视频本质也是一个IO流(从视频文件中读取的IO流),当判断到IO流结束时(通过seek来判断EOF)时就是视频处理完毕的时候。 但ffmpeg将这一层屏蔽掉了,也就是在filter中是无法直接获取到IO流状态的。
82 |
83 | ffmpeg在屏蔽的同时,也提供了一种判断方式。filter在处理完每一帧之后,需要确认下一帧的状态(有下一帧/无下一帧),所以如果ffmpeg在读取到下一帧时返回了无下一帧,那就表示当前视频处理完毕。
84 |
85 | 通过`ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts)`来获取下一帧的状态,当返回的ret>0表示没有下一帧,这个时候就可以通过判断当前处理状态来决定是否关闭输出流。
86 |
87 | ```c++
88 | if 当前处理视频B
89 | 切换到视频A的断点
90 | else 当前处理视频A
91 | 关闭所有的输入流
92 | 关闭输出流
93 | ```
94 |
95 | + 如何从断点处重新读取Frame
96 |
97 | 这是最后一个待解决的问题了,当视频B的数据都处理完之后,就需要从视频A的断点处重新读取数据帧。上面说到对视频流的读取,本质就是对一个文件的IO流处理,而在IO时都会有一个指针来表示当前位置。
98 |
99 | 而`ff_inlink_acknowledge_status`有两个作用,一方面获取下一帧,另一方面是确认当前帧处理结束。 换言之,当调用`ff_inlink_acknowledge_status`之后,ffmpeg会将IO流的指针向后移动到下一帧的起始位置,如果移动失败,则表示没有下一帧了。 如果移动成功,那么下次`ff_inlink_consume_frame`读取帧时,就从这个位置开始读取。
100 |
101 | 因此`如何从断点处重新读取Frame`其实不是问题,只要断点处的帧被确认处理结束了,ffmpeg会自动的移到下一帧位置。当我们将输入源切换到视频A时,就`自动`从断点处开始读取帧了。
102 |
103 | * 伪代码实现
104 |
105 | 通过下面的伪代码简要描述上述的过程:
106 |
107 | ```c++
108 | 通过ff_outlink_get_status判断输出流状态
109 | if 输出流已关闭
110 | 退出
111 |
112 | for {
113 | 通过ff_inlink_consume_frame 获取下一帧
114 |
115 | 通过frame->pts * av_q2d(time_base)计算时间
116 |
117 | if 时间达到插入点
118 | 修改当前状态, 进入暂存状态。
119 |
120 | 通过push_frame处理每一帧
121 | }
122 |
123 | 通过ff_inlink_acknowledge_status确认帧状态
124 |
125 | if 当前是暂存状态
126 | 切换到视频B
127 |
128 | if 没有下一帧
129 | if 当前是视频B && 当前是暂存状态
130 | 关闭视频B
131 | 切换回视频A
132 |
133 | if 当前是视频A && 当前是暂存状态
134 | 关闭视频A
135 | 关闭输出流
136 |
137 | ```
138 |
139 | 大致就是这个处理流程, 完整代码可以参考`iconcat`里面的代码。
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # FFMPEG 入门学习
2 |
3 | * [ScreenRecord 实现mac下录屏功能](screenrecord.md)
4 | * [ScreenRecord 实现mac下录屏功能并进行H.264编码](screenrecord-h264.md)
5 | * [Filter 实现filter-complex功能](filter.md)
6 | * [通过pts计算time](PTS-TimeStamp.md)
7 | * [修改setpts调整局部视频速率](isetpts.md)
8 | * [编写一个AVFilter](ifade.md)
9 | * [重温读取/输出有感](how-to-analysiz.md)
10 | * [实现可控的Filter-Complex](filter-complex.md)
11 | * [Overlay坐标点的计算](overlay.md)
--------------------------------------------------------------------------------
/docs/isetpts.md:
--------------------------------------------------------------------------------
1 | # Speed Up/Down Part Of Video Via Setpts
2 | > 通过setpts实现调整视频部分的播放速率
3 |
4 | 在前面提到了PTS/DTS/Timestamp的关系,播放器在渲染视频时就是根据PTS来确定渲染和展示时间点的。 根据这个原理,我们就可以通过调整帧的PTS时间来实现视频加速/降速播放。
5 |
6 | #### 加速/降速的原理
7 | 我们都知道,当帧速率(frame rate)大于24时,也就是1秒播放24帧时,我们的视觉就会看到流程的视频。 在帧总量不变的情况下,如果将1/24变为1/48,那么在相同时间内多播放了一倍的帧,对于我们的视觉来说,就感觉播放速度加快了(因为本该20秒才能播放完的帧,在10秒内就播放完了,就相当加速了一倍)。同理,如果将1/24调整为1/12,就会看到慢动作。
8 |
9 | FFmpeg提供了`setpts`滤镜可以实现调整pts的效果。 典型的用法如下:
10 |
11 | ```shell
12 | ffmpeg -i ~/tmp/trailer.mp4 -filter:v "setpts=0.5*PTS" output.mp4
13 | ```
14 |
15 | `0.5*PTS`表示将帧的PTS值乘以0.5后作为新的PTS值。 比如说: 帧A当前的PTS是4000(根据以前的知识,根据PTS和Time_base可以计算出渲染的时间点)。 假设对应的时间点是: 00:00:05, 现在将PTS调整为0.5*PTS就变成了2000,那么对应的渲染时间点就变成了: 00:00:02.5。这样就实现了加速播放。
16 |
17 | 同理,如果是`2*PTS`就是降速播放。
18 |
19 | #### 局部调整
20 | `setpts`只能实现全部加速或者全部减速。 因为在其内部实现中,对每个帧都应用相同的计算规则,所以要么都调整要么都不调整。如果要实现局部调整,按照通用的解决方案,只能先切割视频,然后对单独视频进行加速/降速处理,然后再将视频连接起来。
21 |
22 | 但如果我们适当调整PTS值,也可以实现部分调整的效果。
23 |
24 | * 问题分析
25 |
26 | 假设存在一段30s的视频,帧分布如下:
27 |
28 | ```shell
29 | +------------------------------------------------------------------+
30 | | F1 F2 F3 F4 F5 F6 F7 |
31 | | |--------------|--------------|--------------|---> |
32 | |Time 0 10 20 30 |
33 | |PTS 0 100 200 250 300 350 400 |
34 | +------------------------------------------------------------------+
35 | ```
36 |
37 | `F1 - F7`表示7个I帧(30秒包含的帧比这个多多了,这里是为了方便描述问题)。 假设我们需要加速前15秒(后15秒播放速率不变)的视频,那么需要调整F1到F4(F4是第15秒时渲染的帧)如下:
38 |
39 | ```shell
40 | +------------------------------------------------------------------+
41 | | F1 F2 F3 F4 F5 F6 F7 |
42 | | |--------------|--------------|--------------|---> |
43 | |Time 0 10 20 30 |
44 | |PTS 0 100 200 250 300 350 400 |
45 | +------------------------------------------------------------------+
46 | ```
47 |
48 | 这样调整看似没问题,但仔细分析会发现在`10s-20s`之间会出现天窗,这是因为这段时间内的PTS没有任何帧需要渲染,直到第20秒的时候,才会开始继续渲染F5帧。显然这样不满足实际应用需求。
49 |
50 | 而发生问题的关键在于将`F2-F4`调整PTS之后,也需要实时调整`F5-F7`的PTS。 也就是正确的帧分布应该是下面的样子:
51 |
52 | ```shell
53 | +------------------------------------------------------------------+
54 | | F1 F2 F3 F4 F5 F6 F7 |
55 | | |--------------|--------------|--------------|---> |
56 | |Time 0 10 20 30 |
57 | |PTS 0 100 200 250 300 350 400 |
58 | +------------------------------------------------------------------+
59 | ```
60 | `F1-F4`以一个速率播放,而`F5-F7`以另外一个速率播放。这样就实现了部分加速的效果。
61 |
62 | * 代码实现
63 |
64 | 为了简化编码难度,我们以`setpts`的代码为基础进行修改。 在`setpts`代码中修改pts的代码是下面部分:
65 |
66 | ```c
67 | d = av_expr_eval(setpts->expr, setpts->var_values, NULL);
68 | frame->pts = D2TS(d);
69 | ```
70 |
71 | d是根据规则(0.5*PTS)计算出来的pts值. 然后将新的PTS赋值给当前帧,而后继续后面的编码处理。
72 |
73 | 所以在这里,我们做一些判断,为了简化其它无关步骤,先假设只修改前5秒的视频,所以需要先判断当前帧是否需要修改:
74 |
75 | ```c
76 | (frame->pts * av_q2d(inlink->time_base)) < 5.0
77 | ```
78 | 通过`pts*time_base`可以计算出当前时间点,通过这个判断,可以得出是否需要修改此帧的PTS值。 如果需要修改,那么仍然通过`frame->pts = D2TS(d)`来调整。 而处理不需要修改的帧才是重点,
79 |
80 | 按照上图所示意的PTS,F5应该继承F4调整前的PTS值,所以需要在调整F4之前需要保存旧的PTS。所以是下面的伪代码:
81 |
82 | ```
83 | 保存Old PTS
84 | if (当前时间 < 0.5) {
85 | 计算新的PTS并赋值给当前帧
86 | }else{
87 | 当前帧使用上个帧的PTS
88 | }
89 | ```
90 |
91 | 将伪代码实现后如下:
92 |
93 | ```c
94 | oldPts = frame->pts;
95 | if ((frame->pts * av_q2d(inlink->time_base)) < 5.0) {
96 | frame->pts = D2TS(d);
97 | setpts->_pts = frame->pts;
98 | } else {
99 | frame->pts = setpts->_pts;
100 | }
101 |
102 | setpts->_pts++;
103 | ```
104 |
105 | 完整代码请参考 `isetpts`中的代码。
--------------------------------------------------------------------------------
/docs/overlay.md:
--------------------------------------------------------------------------------
1 | # Overlay 坐标点的计算
2 |
3 | 这张图片是从别处抄来的,但可以很形象的来描述如何计算Overlay坐标点.
4 |
5 | 
6 |
7 | 根据`ffmpeg`官网描述, `overlay`只能用来叠加两个输入源。 第一个视频源(这个视频源将会被放到后面,充当背景)称之为`main`,第二个视频源(放在第一个视频前面,充当画中画的角色)称之为`overlaid`。 `overlay`的坐标系如上图所描述,最上角为(0,0),X轴向右递增,Y轴向下递增。
8 |
9 | Overlay坐标点的计算,重点算的是`overlaid`原点在`main`中的位置,也就是上图中,input2的原点位置在input1中的坐标点。
10 |
11 | 在计算坐标之前,先来看一下Overlay两种坐标表示方式:
12 |
13 | + x=*NNN*:y=*NNN*
14 | > NNN表示坐标点, 这种方式是通过X和Y指定坐标,例如: x=23:y=100 (input2原点在input1的 (23,100)位置)
15 |
16 | + *NNN*:*NNN*
17 | > NNN表示坐标点, 但不使用X和Y来表示。 同样23:100也表示input2原点在input1的 (23,100)位置
18 |
19 | 第二种是第一种的简化方式。
20 |
21 | 下面来看坐标如何计算。在Overlay Filter中,每个视频源都有两个属性: 高(Height)和宽(Weight). 因此对`main`和`overlaid`来说,其高和宽分别用`main_w`,`main_h`和`overlay_w`和`overlay_h`来表示,如果不想写这么长,也可以用`W`,`H`和`w`,`h`来简写替代。
22 |
23 | 了解表示方法之后,我们先来计算比较简单的四个位置: 左上角,左下角,右上角和右下角。
24 |
25 | + input2在左上角的情况
26 |
27 | 当我们期望input2出现在左上角时,此时input2的原点(左上角)坐标和input1的原点坐标是重合的,所以此时此刻input2的坐标是(0,0),如下图
28 |
29 | 
30 |
31 | + input2在右上角的情况
32 |
33 | 当我们期望input2出现在右上角的时候,参考一下开篇的坐标系,此时,input2的原点坐标中X点坐标不固定,但Y点坐标可以确定为0。 而X点的位置则可以通过 `input1的宽带 - input2的宽度`来确定。也就是 `main_w - overlay_w`。因此input2的原点坐标此时此刻就是(main_w - overlay_w, 0),如下图:
34 |
35 | 
36 |
37 | 如果为了好看,想让input2离右边有一些距离,可以让X轴再向做移动10个像素,此时原点坐标就是(main_w - overlay_w - 10, 0)
38 |
39 | + input2在左下角的情况
40 |
41 | 有了上面两个坐标计算过程,左下角就容易计算了。 此时input2的原点X坐标为0, Y点坐标为`main_h - overlay_h`,因此原点坐标就是(0, main_h - overlay_h)
42 |
43 | + input2在右下角的情况
44 |
45 | 右下角和左上角是互补关系, 此时的原点坐标应该是(main_w - overlay_w, main_h - overlay_h )
46 |
47 |
48 | 其它坐标位置的计算和上述四种坐标点的计算原理相同,例如要将input显示在屏幕中央,input原点坐标就是(main_w /2 - overlay_w / 2, main_h / 2 - overlay_h / 2).
--------------------------------------------------------------------------------
/docs/screenrecord-h264.md:
--------------------------------------------------------------------------------
1 | # Screen Record H.264
2 | >目前在网络传输视频/音频流都一般会采用H.264进行编码,所以尝试调用FFMPEG API完成Mac录屏功能,同时编码为H.264格式。
3 |
4 | 在上一篇文章中,通过调用FFmpeg API完成了Mac平台下的录屏功能。在本篇中,对上次的录屏进行优化,将采集到的视频流编码为H.264格式,同时设定FPS和分辨率。
5 |
6 | 因为是对上次录屏功能的优化,因此处理思路仍然分为三部分:
7 |
8 | 1. 打开输入设备(默认的屏幕设备)
9 | 2. 初始化输出设备(mp4文件)
10 | 3. 内容转码
11 |
12 | 和上次使用的API对比,本次主要增加了涉及到H.264参数设定和H.264 pts/dts 设定的API:
13 |
14 | 1. avcodec_parameters_from_context
15 | 2. av_rescale_q
16 |
17 | ## 初始化输入设备
18 |
19 | 仍然采用上篇中打开设备的方法:
20 |
21 | 1. 通过`av_find_input_format("avfoundation")`获取AVInputFormat。
22 | 2. 通过`avformat_open_input` 打开指定的屏幕设备。
23 |
24 | 然后FFmpeg会返回此设备中的数据流,而FFmpeg处理数据流一般都遵循:确定codec(编码 or 解码)->初始化codec上下文参数->打开codec,这三步。 针对输入设备也就是下面的顺序:
25 |
26 | ```shell
27 | avcodec_find_decoder -> avcodec_alloc_context3 -> avcodec_open2
28 | ```
29 |
30 | `AVInputFormat`会有多个数据流(视频流/音频流),所以首先找到需要处理的流:
31 | ```c++
32 | codecpar->codec_type == AVMEDIA_TYPE_VIDEO
33 | ```
34 |
35 | 然后依次调用`avcodec_find_decoder`,`avcodec_alloc_context3`和`avcodec_open2`来初始化codec。
36 |
37 | ## 初始化输出设备
38 |
39 | 最后是将视频数据编码为H.264,并封装到MP4容器中。所以文件名仍设定为`out.mp4`。
40 |
41 | 打开输出设备的方法和打开输入设备方法类似:
42 |
43 | ```c++
44 | avcodec_find_encoder -> avcodec_alloc_context3 -> avcodec_open2 -> avformat_write_header
45 | ```
46 |
47 | 最后的`avformat_write_header`不是必须的,只有当容器格式要求写Header时才会调用。与上篇中不同的时,明确指定输出CodecContext的编码器类型:
48 |
49 | ```c++
50 | outCodecContext->codec_id = AV_CODEC_ID_H264;
51 | outCodecContext->codec_type = AVMEDIA_TYPE_VIDEO;
52 | outCodecContext->pix_fmt = AV_PIX_FMT_YUV420P;
53 | outCodecContext->bit_rate = 400000; // 2500000
54 | outCodecContext->width = 1920;
55 | outCodecContext->height = 1080;
56 | ```
57 |
58 | 同时H.264对pts和dts有要求,因此需要设定timebase:
59 |
60 | ```c++
61 | outCodecContext->time_base = (AVRational) {1, 25};
62 | ```
63 |
64 | ## 转码
65 |
66 | 有了上次的经验之后,处理转码就会稍显简单。 处理流程大致为:
67 |
68 | ```shell
69 | while av_read_frame
70 | |
71 | +---> avcodec_send_packet
72 | |
73 | +----> while avcodec_receive_frame
74 | | 对每一数据帧进行解码
75 | | 通过`sws_scale`进行源帧和目标帧的数据转换
76 | |
77 | +----> avcodec_send_frame
78 | |
79 | +---> while avcodec_receive_packet
80 | |
81 | |
82 | +--->av_interleaved_write_frame (写入到输出设备)
83 | ```
84 |
85 | 转码最重要的环节就是在`avcodec_receive_frame`之后的逻辑。 上面说过H.264对pts有要求,因此这里需要对每一帧添加pts值。
86 | ```c++
87 | int64_t now = av_gettime();
88 | const AVRational codecTimebase = outStream->time_base;
89 | oframe->pts = av_rescale_q(now, (AVRational) {1, 1000000}, codecTimebase);
90 | ```
91 |
92 | 在最后写入到输出设备之前,仍需要修改pts值:
93 | ```c++
94 | if (opacket->pts != AV_NOPTS_VALUE)
95 | opacket->pts = av_rescale_q(opacket->pts, outCodecContext->time_base, outStream->time_base);
96 | ```
97 |
98 | 至此就完成了对视频进行H.264编码的过程。可以看到和上篇处理过程大致相同,唯一不同的地方就是针对H.264编码格式进行了一些特殊处理,除此之外大致流程完全一致。
99 |
100 |
--------------------------------------------------------------------------------
/docs/screenrecord.md:
--------------------------------------------------------------------------------
1 | ### Screen Record
2 | 调用FFMPEG Device API完成Mac录屏功能。
3 |
4 | 调用FFMPEG提供的API来完成录屏功能,大致的思路是:
5 |
6 | 1. 打开输入设备.
7 | 2. 打开输出设备.
8 | 3. 从输入设备读取视频流,然后经过解码->编码,写入到输出设备.
9 |
10 | ```
11 | +--------------------------------------------------------------+
12 | | +---------+ decode +------------+ |
13 | | | Input | ----------read -------->| Output | |
14 | | +---------+ encode +------------+ |
15 | +--------------------------------------------------------------+
16 |
17 | ```
18 |
19 | 因此主要使用的API就是:
20 |
21 | 1. avformat_open_input
22 | 2. avcodec_find_decoder
23 | 3. av_read_frame
24 | 4. avcodec_send_packet/avcodec_receive_frame
25 | 5. avcodec_send_frame/avcodec_receive_packet
26 |
27 | * 打开输入设备
28 |
29 | 如果使用FFmpeg提供的`-list_devices` 命令可以查询到当前支持的设备,其中分为两类:
30 | - AVFoundation video devices
31 | - AVFoundation audio devices
32 |
33 | AVFoundation 是Mac特有的基于时间的多媒体处理框架。本次是演示录屏功能,因此忽略掉audio设备,只考虑video设备。在`avfoundation.m`文件中没有发现可以程序化读取设备的API。FFmpeg官方也说明没有程序化读取设备的方式,通用方案是解析日志来获取设备(https://trac.ffmpeg.org/wiki/DirectShow#Howtoprogrammaticallyenumeratedevices),下一篇再研究如何通过日志获取当前支持的设备,本次就直接写死设备ID。
34 |
35 | 1. 获取指定格式的输入设备
36 |
37 | ```c++
38 | pAVInputFormat = av_find_input_format("avfoundation");
39 | ```
40 |
41 | 通过指定格式名称获取到AVInputFormat结构体。
42 |
43 | 2. 打开设备
44 |
45 | ```c++
46 | value = avformat_open_input(&pAVFormatContext, "1", pAVInputFormat, &options);
47 | if (value != 0) {
48 | cout << "\nerror in opening input device";
49 | exit(1);
50 | }
51 | ```
52 |
53 | "1"指代的是设备ID。 options是打开设备时输入参数,
54 |
55 | ```c++
56 | // 记录鼠标
57 | value = av_dict_set(&options, "capture_cursor", "1", 0);
58 | if (value < 0) {
59 | cout << "\nerror in setting capture_cursor values";
60 | exit(1);
61 | }
62 |
63 | // 记录鼠标点击事件
64 | value = av_dict_set(&options, "capture_mouse_clicks", "1", 0);
65 | if (value < 0) {
66 | cout << "\nerror in setting capture_mouse_clicks values";
67 | exit(1);
68 | }
69 |
70 | // 指定像素格式
71 | value = av_dict_set(&options, "pixel_format", "yuyv422", 0);
72 | if (value < 0) {
73 | cout << "\nerror in setting pixel_format values";
74 | exit(1);
75 | }
76 | ```
77 |
78 | 通过value值判断设备是否正确打开。 然后获取设备视频流ID(解码数据包时需要判断是否一致),再获取输入编码器(解码时需要)。
79 |
80 | * 打开输出设备
81 |
82 | 假设需要将从输入设备读取的数据保存成`mp4`格式的文件。
83 |
84 | 将视频流保存到文件中,只需要一个合适的编码器(用于生成符合MP4容器规范的帧)既可。 获取编码器大致分为两个步骤:
85 |
86 | 1. 构建编码器上下文(AVFormatContext)
87 | 2. 匹配合适的编码器(AVCodec)
88 |
89 | 构建编码器:
90 | ```c++
91 | // 根据output_file后缀名推测合适的编码器
92 | avformat_alloc_output_context2(&outAVFormatContext, NULL, NULL, output_file);
93 | if (!outAVFormatContext) {
94 | cout << "\nerror in allocating av format output context";
95 | exit(1);
96 | }
97 | ```
98 |
99 | 匹配编码器:
100 | ```c++
101 | output_format = av_guess_format(NULL, output_file, NULL);
102 | if (!output_format) {
103 | cout << "\nerror in guessing the video format. try with correct format";
104 | exit(1);
105 | }
106 |
107 | video_st = avformat_new_stream(outAVFormatContext, NULL);
108 | if (!video_st) {
109 | cout << "\nerror in creating a av format new stream";
110 | exit(1);
111 | }
112 | ```
113 |
114 | * 编解码
115 |
116 | 从输入设备读取的是原生的数据流,也就是经过设备编码之后的数据。 需要先将原生数据进行解码,变成程序`可读`的数据,在编码成输出设备可识别的数据。 所以这一步的流程是:
117 |
118 | 1. 解码输入设备数据
119 | 2. 转码
120 | 3. 编码写入输出设备
121 |
122 | 通过`av_read_frame`从输入设备读取数据:
123 | ```c++
124 | while (av_read_frame(pAVFormatContext, pAVPacket) >= 0) {
125 | ...
126 | }
127 | ```
128 |
129 | 对读取后的数据进行拆包,找到我们所感兴趣的数据
130 | ```c++
131 | // 最开始没有做这种判断,出现不可预期的错误。 在官网example中找到这句判断,但还不是很清楚其意义。应该和packet封装格式有关
132 | pAVPacket->stream_index == VideoStreamIndx
133 | ```
134 | 从FFmpeg 4.1开始,有了新的编解码函数。 为了长远考虑,直接使用新API。 使用`avcodec_send_packet`将输入设备的数据发往`解码器`进行解码,然后使用`avcodec_receive_frame`从`解码器`接受解码之后的数据帧。代码大概是下面的样子:
135 | ```c++
136 | value = avcodec_send_packet(pAVCodecContext, pAVPacket);
137 | if (value < 0) {
138 | fprintf(stderr, "Error sending a packet for decoding\n");
139 | exit(1);
140 | }
141 |
142 | while(1){
143 | value = avcodec_receive_frame(pAVCodecContext, pAVFrame);
144 | if (value == AVERROR(EAGAIN) || value == AVERROR_EOF) {
145 | break;
146 |
147 | } else if (value < 0) {
148 | fprintf(stderr, "Error during decoding\n");
149 | exit(1);
150 | }
151 |
152 | .... do something
153 | }
154 | ```
155 |
156 | 读取到数据帧后,就可以对每一帧进行`转码`:
157 | ```c++
158 | sws_scale(swsCtx_, pAVFrame->data, pAVFrame->linesize, 0, pAVCodecContext->height, outFrame->data,outFrame->linesize);
159 | ```
160 |
161 | 最后将转码后的帧封装成输出设备可设别的数据包格式。也就是解码的逆动作,使用`avcodec_send_frame`将每帧发往编码器进行编码,通过`avcodec_receive_packet`一直接受编码之后的数据包。处理逻辑大致是:
162 | ```c++
163 | value = avcodec_send_frame(outAVCodecContext, outFrame);
164 | if (value < 0) {
165 | fprintf(stderr, "Error sending a frame for encoding\n");
166 | exit(1);
167 | }
168 |
169 | while (value >= 0) {
170 | value = avcodec_receive_packet(outAVCodecContext, &outPacket);
171 | if (value == AVERROR(EAGAIN) || value == AVERROR_EOF) {
172 | break;
173 | } else if (value < 0) {
174 | fprintf(stderr, "Error during encoding\n");
175 | exit(1);
176 | }
177 |
178 | ... do something;
179 |
180 | av_packet_unref(&outPacket);
181 | }
182 | ```
183 |
184 | 以后就按照这种的处理逻辑,不停的从输入设备读取数据,然后经过解码->转码->编码,最后发送到输出设备。 这样就完成了录屏功能。
185 | 上面是大致处理思路,完整源代码可以参考 (https://github.com/andy-zhangtao/ffmpeg-examples/tree/master/ScreenRecord) .
--------------------------------------------------------------------------------
/iconcat/cmake-build-debug/CMakeFiles/clion-log.txt:
--------------------------------------------------------------------------------
1 | CMakeLists.txt not found in /Users/zhangtao/SourceCode/github/ffmpeg-examples/iconcat Select CMakeLists.txt file...
2 |
--------------------------------------------------------------------------------
/ifade/cmake-build-debug/CMakeFiles/clion-log.txt:
--------------------------------------------------------------------------------
1 | CMakeLists.txt not found in /Users/zhangtao/SourceCode/github/ffmpeg-examples/ifade Select CMakeLists.txt file...
2 |
--------------------------------------------------------------------------------
/ifilter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(ifilter)
3 |
4 | set(CMAKE_CXX_STANDARD 14)
5 |
6 | find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
7 | find_library(AVCODEC_LIBRARY avcodec)
8 |
9 | find_path(AVFILTER_INCLUDE_DIR libavfilter/avfilter.h)
10 | find_library(AVFILTER_LIBRARY avfilter)
11 |
12 | find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
13 | find_library(AVFORMAT_LIBRARY avformat)
14 |
15 | find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h)
16 | find_library(AVUTIL_LIBRARY avutil)
17 |
18 | find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
19 | find_library(AVDEVICE_LIBRARY avdevice)
20 |
21 | find_path(SWSCALE_INCLUDE_DIR libswscale/swscale.h)
22 | find_library(SWSCALE_LIBRARY swscale)
23 |
24 | add_executable(ifilter main.cpp filter.cpp)
25 |
26 | INCLUDE_DIRECTORIES(
27 | /usr/local/include
28 | )
29 |
30 | LINK_DIRECTORIES(
31 | /usr/local/lib
32 | )
33 |
34 | target_include_directories(ifilter PRIVATE ${AVCODEC_INCLUDE_DIR} ${AVFILTER_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR})
35 | target_link_libraries(ifilter
36 | PRIVATE
37 | ${AVCODEC_LIBRARY}
38 | ${AVFILTER_LIBRARY}
39 | ${AVFORMAT_LIBRARY}
40 | ${AVUTIL_LIBRARY}
41 | ${AVDEVICE_LIBRARY}
42 | ${SWSCALE_LIBRARY}
43 | )
--------------------------------------------------------------------------------
/ifilter/filter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by zhangtao on 2019/9/23.
3 | //
4 |
5 | #ifndef IFILTER_FILTER_H
6 | #define IFILTER_FILTER_H
7 |
8 | #include
9 |
10 | #ifdef __cplusplus
11 | extern "C"
12 | {
13 | #endif
14 | #include "libavcodec/avcodec.h"
15 | #include "libavcodec/avfft.h"
16 | #include "libavdevice/avdevice.h"
17 | #include "libavfilter/avfilter.h"
18 | #include "libavfilter/buffersink.h"
19 | #include "libavfilter/buffersrc.h"
20 | #include "libavformat/avformat.h"
21 | #include "libavformat/avio.h"
22 | #include "libavutil/opt.h"
23 | #include "libavutil/common.h"
24 | #include "libavutil/channel_layout.h"
25 | #include "libavutil/imgutils.h"
26 | #include "libavutil/mathematics.h"
27 | #include "libavutil/samplefmt.h"
28 | #include "libavutil/time.h"
29 | #include "libavutil/opt.h"
30 | #include "libavutil/pixdesc.h"
31 | #include "libavutil/file.h"
32 | #include "libswscale/swscale.h"
33 | #ifdef __cplusplus
34 | };
35 | #endif
36 |
37 | using namespace std;
38 |
39 | class filter {
40 |
41 | private:
42 | const char *out_file = "/tmp/out.mp4";
43 | const char *filter_descr = "movie=t.png[wm];[in][wm]overlay=10:20[out]";
44 | int VideoStreamIndx = -1;
45 |
46 | AVFormatContext *inFormatContext;
47 | AVFormatContext *outFormatContext;
48 |
49 | AVInputFormat *avInputFormat;
50 | AVOutputFormat *avOutputFormat;
51 |
52 | AVCodecContext *inCodecContext;
53 | AVCodecContext *outCodecContext;
54 |
55 | AVCodec *inCodec;
56 | AVCodec *outCodec;
57 |
58 | AVStream *outStream;
59 | AVStream *inStream;
60 |
61 | AVFilterGraph *filter_graph;
62 | AVFilterContext *buffersink_ctx;
63 | AVFilterContext *buffersrc_ctx;
64 |
65 | public:
66 |
67 | filter();
68 |
69 | ~filter();
70 |
71 | int openDevice();
72 |
73 | int init_filter();
74 |
75 | int init_outputfile();
76 |
77 | int CaptureVideoFrames();
78 |
79 | };
80 |
81 |
82 | #endif //IFILTER_FILTER_H
83 |
--------------------------------------------------------------------------------
/ifilter/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "filter.h"
3 |
4 | using namespace std;
5 | int main() {
6 | int value = -1;
7 | filter sr;
8 | value = sr.openDevice();
9 | if (value) {
10 | cout << "Open Device Error. err: " << value;
11 | exit(-1);
12 | }
13 |
14 | value = sr.init_outputfile();
15 | if (value) {
16 | cout << "Open OutFile Error. err: " << value;
17 | exit(-1);
18 | }
19 |
20 | value = sr.init_filter();
21 | if (value) {
22 | cout << "Init Filter Graph Error. err: " << value;
23 | exit(-1);
24 | }
25 |
26 | value = sr.CaptureVideoFrames();
27 | if (value) {
28 | cout << "Capture Error. err: " << value;
29 | exit(-1);
30 | }
31 | return 0;
32 | }
--------------------------------------------------------------------------------
/itransfer/transfer.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by zhangtao on 2019/9/27.
3 | //
4 |
5 | #ifndef FADETEMPLATE_COPY_H
6 | #define FADETEMPLATE_COPY_H
7 |
8 | #include "libavcodec/avcodec.h"
9 | #include "libavcodec/avfft.h"
10 | #include "libavdevice/avdevice.h"
11 | #include "libavfilter/avfilter.h"
12 | #include "libavfilter/buffersink.h"
13 | #include "libavfilter/buffersrc.h"
14 | #include "libavformat/avformat.h"
15 | #include "libavformat/avio.h"
16 | #include "libavutil/opt.h"
17 | #include "libavutil/common.h"
18 | #include "libavutil/channel_layout.h"
19 | #include "libavutil/imgutils.h"
20 | #include "libavutil/mathematics.h"
21 | #include "libavutil/samplefmt.h"
22 | #include "libavutil/time.h"
23 | #include "libavutil/opt.h"
24 | #include "libavutil/pixdesc.h"
25 | #include "libavutil/file.h"
26 | #include "libswscale/swscale.h"
27 | #include "libavutil/timestamp.h"
28 |
29 | AVFormatContext *inputFormatContext;
30 | AVFormatContext *outputFormatContext;
31 |
32 | typedef struct StreamContext {
33 | AVCodecContext *dec_ctx;
34 | AVCodecContext *enc_ctx;
35 | } StreamContext;
36 | static StreamContext *stream_ctx;
37 |
38 | int videoIdx;
39 |
40 | int copyOpenInput();
41 |
42 | int copyOpenOutput();
43 |
44 | int copy();
45 |
46 | #endif //FADETEMPLATE_COPY_H
47 |
--------------------------------------------------------------------------------
/pts-timestamp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(pts_timestamp C)
3 |
4 | set(CMAKE_C_STANDARD 99)
5 |
6 | find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
7 | find_library(AVCODEC_LIBRARY avcodec)
8 |
9 | find_path(AVFILTER_INCLUDE_DIR libavfilter/avfilter.h)
10 | find_library(AVFILTER_LIBRARY avfilter)
11 |
12 | find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
13 | find_library(AVFORMAT_LIBRARY avformat)
14 |
15 | find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h)
16 | find_library(AVUTIL_LIBRARY avutil)
17 |
18 | find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
19 | find_library(AVDEVICE_LIBRARY avdevice)
20 |
21 | find_path(SWSCALE_INCLUDE_DIR libswscale/swscale.h)
22 | find_library(SWSCALE_LIBRARY swscale)
23 |
24 | add_executable(pts_timestamp main.c dpts.c)
25 |
26 | INCLUDE_DIRECTORIES(
27 | /usr/local/include
28 | )
29 |
30 | LINK_DIRECTORIES(
31 | /usr/local/lib
32 | )
33 |
34 | target_include_directories(pts_timestamp PRIVATE ${AVCODEC_INCLUDE_DIR} ${AVFILTER_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR})
35 | target_link_libraries(pts_timestamp
36 | PRIVATE
37 | ${AVCODEC_LIBRARY}
38 | ${AVFILTER_LIBRARY}
39 | ${AVFORMAT_LIBRARY}
40 | ${AVUTIL_LIBRARY}
41 | ${AVDEVICE_LIBRARY}
42 | ${SWSCALE_LIBRARY}
43 | )
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/3.14.5/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Library/Developer/CommandLineTools/usr/bin/cc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "AppleClang")
4 | set(CMAKE_C_COMPILER_VERSION "10.0.1.10010046")
5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_C_COMPILER_WRAPPER "")
7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
12 |
13 | set(CMAKE_C_PLATFORM_ID "Darwin")
14 | set(CMAKE_C_SIMULATE_ID "")
15 | set(CMAKE_C_SIMULATE_VERSION "")
16 |
17 |
18 |
19 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
20 | set(CMAKE_C_COMPILER_AR "")
21 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
22 | set(CMAKE_C_COMPILER_RANLIB "")
23 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
24 | set(CMAKE_MT "")
25 | set(CMAKE_COMPILER_IS_GNUCC )
26 | set(CMAKE_C_COMPILER_LOADED 1)
27 | set(CMAKE_C_COMPILER_WORKS TRUE)
28 | set(CMAKE_C_ABI_COMPILED TRUE)
29 | set(CMAKE_COMPILER_IS_MINGW )
30 | set(CMAKE_COMPILER_IS_CYGWIN )
31 | if(CMAKE_COMPILER_IS_CYGWIN)
32 | set(CYGWIN 1)
33 | set(UNIX 1)
34 | endif()
35 |
36 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
37 |
38 | if(CMAKE_COMPILER_IS_MINGW)
39 | set(MINGW 1)
40 | endif()
41 | set(CMAKE_C_COMPILER_ID_RUN 1)
42 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
43 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
44 | set(CMAKE_C_LINKER_PREFERENCE 10)
45 |
46 | # Save compiler ABI information.
47 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
48 | set(CMAKE_C_COMPILER_ABI "")
49 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
50 |
51 | if(CMAKE_C_SIZEOF_DATA_PTR)
52 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
53 | endif()
54 |
55 | if(CMAKE_C_COMPILER_ABI)
56 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
57 | endif()
58 |
59 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
60 | set(CMAKE_LIBRARY_ARCHITECTURE "")
61 | endif()
62 |
63 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
64 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
65 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
66 | endif()
67 |
68 |
69 |
70 |
71 |
72 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
73 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
74 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
75 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
76 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/pts-timestamp/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/3.14.5/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-18.7.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "18.7.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Darwin-18.7.0")
9 | set(CMAKE_SYSTEM_NAME "Darwin")
10 | set(CMAKE_SYSTEM_VERSION "18.7.0")
11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Relative path conversion top directories.
5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp")
6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug")
7 |
8 | # Force unix paths in dependencies.
9 | set(CMAKE_FORCE_UNIX_PATHS 1)
10 |
11 |
12 | # The C and CXX include file regular expressions for this directory.
13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
17 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/Makefile.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # The generator used is:
5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
6 |
7 | # The top level Makefile was generated from the following files:
8 | set(CMAKE_MAKEFILE_DEPENDS
9 | "CMakeCache.txt"
10 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCInformation.cmake"
11 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
12 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCommonLanguageInclude.cmake"
13 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
14 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeFindCodeBlocks.cmake"
15 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeGenericSystem.cmake"
16 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeInitializeConfigs.cmake"
17 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeLanguageInformation.cmake"
18 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeSystemSpecificInformation.cmake"
19 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeSystemSpecificInitialize.cmake"
20 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/AppleClang-C.cmake"
21 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
22 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Clang.cmake"
23 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/GNU.cmake"
24 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Internal/CMakeCheckCompilerFlag.cmake"
25 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-AppleClang-C.cmake"
26 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang-C.cmake"
27 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang.cmake"
28 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Darwin-Initialize.cmake"
29 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Darwin.cmake"
30 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/UnixPaths.cmake"
31 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/ProcessorCount.cmake"
32 | "../CMakeLists.txt"
33 | "CMakeFiles/3.14.5/CMakeCCompiler.cmake"
34 | "CMakeFiles/3.14.5/CMakeSystem.cmake"
35 | )
36 |
37 | # The corresponding makefile is:
38 | set(CMAKE_MAKEFILE_OUTPUTS
39 | "Makefile"
40 | "CMakeFiles/cmake.check_cache"
41 | )
42 |
43 | # Byproducts of CMake generate step:
44 | set(CMAKE_MAKEFILE_PRODUCTS
45 | "CMakeFiles/CMakeDirectoryInformation.cmake"
46 | )
47 |
48 | # Dependency information for all targets:
49 | set(CMAKE_DEPEND_INFO_FILES
50 | "CMakeFiles/pts_timestamp.dir/DependInfo.cmake"
51 | )
52 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/Makefile2:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Default target executed when no arguments are given to make.
5 | default_target: all
6 |
7 | .PHONY : default_target
8 |
9 | # The main recursive all target
10 | all:
11 |
12 | .PHONY : all
13 |
14 | # The main recursive preinstall target
15 | preinstall:
16 |
17 | .PHONY : preinstall
18 |
19 | # The main recursive clean target
20 | clean:
21 |
22 | .PHONY : clean
23 |
24 | #=============================================================================
25 | # Special targets provided by cmake.
26 |
27 | # Disable implicit rules so canonical targets will work.
28 | .SUFFIXES:
29 |
30 |
31 | # Remove some rules from gmake that .SUFFIXES does not remove.
32 | SUFFIXES =
33 |
34 | .SUFFIXES: .hpux_make_needs_suffix_list
35 |
36 |
37 | # Suppress display of executed commands.
38 | $(VERBOSE).SILENT:
39 |
40 |
41 | # A target that is always out of date.
42 | cmake_force:
43 |
44 | .PHONY : cmake_force
45 |
46 | #=============================================================================
47 | # Set environment variables for the build.
48 |
49 | # The shell in which to execute make rules.
50 | SHELL = /bin/sh
51 |
52 | # The CMake executable.
53 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
54 |
55 | # The command to remove a file.
56 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
57 |
58 | # Escaping for special characters.
59 | EQUALS = =
60 |
61 | # The top-level source directory on which CMake was run.
62 | CMAKE_SOURCE_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp
63 |
64 | # The top-level build directory on which CMake was run.
65 | CMAKE_BINARY_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug
66 |
67 | #=============================================================================
68 | # Target rules for target CMakeFiles/pts_timestamp.dir
69 |
70 | # All Build rule for target.
71 | CMakeFiles/pts_timestamp.dir/all:
72 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/depend
73 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/build
74 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles --progress-num=1,2,3 "Built target pts_timestamp"
75 | .PHONY : CMakeFiles/pts_timestamp.dir/all
76 |
77 | # Include target in all.
78 | all: CMakeFiles/pts_timestamp.dir/all
79 |
80 | .PHONY : all
81 |
82 | # Build rule for subdir invocation for target.
83 | CMakeFiles/pts_timestamp.dir/rule: cmake_check_build_system
84 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles 3
85 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/pts_timestamp.dir/all
86 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles 0
87 | .PHONY : CMakeFiles/pts_timestamp.dir/rule
88 |
89 | # Convenience name for target.
90 | pts_timestamp: CMakeFiles/pts_timestamp.dir/rule
91 |
92 | .PHONY : pts_timestamp
93 |
94 | # clean rule for target.
95 | CMakeFiles/pts_timestamp.dir/clean:
96 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/clean
97 | .PHONY : CMakeFiles/pts_timestamp.dir/clean
98 |
99 | # clean rule for target.
100 | clean: CMakeFiles/pts_timestamp.dir/clean
101 |
102 | .PHONY : clean
103 |
104 | #=============================================================================
105 | # Special targets to cleanup operation of make.
106 |
107 | # Special rule to run CMake to check the build system integrity.
108 | # No rule that depends on this can have commands that come from listfiles
109 | # because they might be regenerated.
110 | cmake_check_build_system:
111 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
112 | .PHONY : cmake_check_build_system
113 |
114 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles/rebuild_cache.dir
2 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles/edit_cache.dir
3 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir
4 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/clion-environment.txt:
--------------------------------------------------------------------------------
1 | ToolSet: 1.0 (local)Options:
2 |
3 | Options:
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/clion-log.txt:
--------------------------------------------------------------------------------
1 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp
2 | -- Configuring done
3 | -- Generating done
4 | -- Build files have been written to: /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug
5 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/feature_tests.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/pts-timestamp/cmake-build-debug/CMakeFiles/feature_tests.bin
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/feature_tests.c:
--------------------------------------------------------------------------------
1 |
2 | const char features[] = {"\n"
3 | "C_FEATURE:"
4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400
5 | "1"
6 | #else
7 | "0"
8 | #endif
9 | "c_function_prototypes\n"
10 | "C_FEATURE:"
11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
12 | "1"
13 | #else
14 | "0"
15 | #endif
16 | "c_restrict\n"
17 | "C_FEATURE:"
18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
19 | "1"
20 | #else
21 | "0"
22 | #endif
23 | "c_static_assert\n"
24 | "C_FEATURE:"
25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
26 | "1"
27 | #else
28 | "0"
29 | #endif
30 | "c_variadic_macros\n"
31 |
32 | };
33 |
34 | int main(int argc, char** argv) { (void)argv; return features[argc]; }
35 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/progress.marks:
--------------------------------------------------------------------------------
1 | 3
2 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/DependInfo.cmake:
--------------------------------------------------------------------------------
1 | # The set of languages for which implicit dependencies are needed:
2 | set(CMAKE_DEPENDS_LANGUAGES
3 | "C"
4 | )
5 | # The set of files for implicit dependencies of each language:
6 | set(CMAKE_DEPENDS_CHECK_C
7 | "/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/dpts.c" "/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/dpts.c.o"
8 | "/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/main.c" "/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/main.c.o"
9 | )
10 | set(CMAKE_C_COMPILER_ID "AppleClang")
11 |
12 | # The include file search paths:
13 | set(CMAKE_C_TARGET_INCLUDE_PATH
14 | "/usr/local/include"
15 | )
16 |
17 | # Targets to which this target links.
18 | set(CMAKE_TARGET_LINKED_INFO_FILES
19 | )
20 |
21 | # Fortran module output directory.
22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "")
23 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/build.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Delete rule output on recipe failure.
5 | .DELETE_ON_ERROR:
6 |
7 |
8 | #=============================================================================
9 | # Special targets provided by cmake.
10 |
11 | # Disable implicit rules so canonical targets will work.
12 | .SUFFIXES:
13 |
14 |
15 | # Remove some rules from gmake that .SUFFIXES does not remove.
16 | SUFFIXES =
17 |
18 | .SUFFIXES: .hpux_make_needs_suffix_list
19 |
20 |
21 | # Suppress display of executed commands.
22 | $(VERBOSE).SILENT:
23 |
24 |
25 | # A target that is always out of date.
26 | cmake_force:
27 |
28 | .PHONY : cmake_force
29 |
30 | #=============================================================================
31 | # Set environment variables for the build.
32 |
33 | # The shell in which to execute make rules.
34 | SHELL = /bin/sh
35 |
36 | # The CMake executable.
37 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
38 |
39 | # The command to remove a file.
40 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
41 |
42 | # Escaping for special characters.
43 | EQUALS = =
44 |
45 | # The top-level source directory on which CMake was run.
46 | CMAKE_SOURCE_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp
47 |
48 | # The top-level build directory on which CMake was run.
49 | CMAKE_BINARY_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug
50 |
51 | # Include any dependencies generated for this target.
52 | include CMakeFiles/pts_timestamp.dir/depend.make
53 |
54 | # Include the progress variables for this target.
55 | include CMakeFiles/pts_timestamp.dir/progress.make
56 |
57 | # Include the compile flags for this target's objects.
58 | include CMakeFiles/pts_timestamp.dir/flags.make
59 |
60 | CMakeFiles/pts_timestamp.dir/main.c.o: CMakeFiles/pts_timestamp.dir/flags.make
61 | CMakeFiles/pts_timestamp.dir/main.c.o: ../main.c
62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/pts_timestamp.dir/main.c.o"
63 | /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/pts_timestamp.dir/main.c.o -c /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/main.c
64 |
65 | CMakeFiles/pts_timestamp.dir/main.c.i: cmake_force
66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/pts_timestamp.dir/main.c.i"
67 | /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/main.c > CMakeFiles/pts_timestamp.dir/main.c.i
68 |
69 | CMakeFiles/pts_timestamp.dir/main.c.s: cmake_force
70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/pts_timestamp.dir/main.c.s"
71 | /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/main.c -o CMakeFiles/pts_timestamp.dir/main.c.s
72 |
73 | CMakeFiles/pts_timestamp.dir/dpts.c.o: CMakeFiles/pts_timestamp.dir/flags.make
74 | CMakeFiles/pts_timestamp.dir/dpts.c.o: ../dpts.c
75 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building C object CMakeFiles/pts_timestamp.dir/dpts.c.o"
76 | /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/pts_timestamp.dir/dpts.c.o -c /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/dpts.c
77 |
78 | CMakeFiles/pts_timestamp.dir/dpts.c.i: cmake_force
79 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/pts_timestamp.dir/dpts.c.i"
80 | /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/dpts.c > CMakeFiles/pts_timestamp.dir/dpts.c.i
81 |
82 | CMakeFiles/pts_timestamp.dir/dpts.c.s: cmake_force
83 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/pts_timestamp.dir/dpts.c.s"
84 | /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/dpts.c -o CMakeFiles/pts_timestamp.dir/dpts.c.s
85 |
86 | # Object files for target pts_timestamp
87 | pts_timestamp_OBJECTS = \
88 | "CMakeFiles/pts_timestamp.dir/main.c.o" \
89 | "CMakeFiles/pts_timestamp.dir/dpts.c.o"
90 |
91 | # External object files for target pts_timestamp
92 | pts_timestamp_EXTERNAL_OBJECTS =
93 |
94 | pts_timestamp: CMakeFiles/pts_timestamp.dir/main.c.o
95 | pts_timestamp: CMakeFiles/pts_timestamp.dir/dpts.c.o
96 | pts_timestamp: CMakeFiles/pts_timestamp.dir/build.make
97 | pts_timestamp: /usr/local/lib/libavcodec.dylib
98 | pts_timestamp: /usr/local/lib/libavfilter.dylib
99 | pts_timestamp: /usr/local/lib/libavformat.dylib
100 | pts_timestamp: /usr/local/lib/libavutil.dylib
101 | pts_timestamp: /usr/local/lib/libavdevice.dylib
102 | pts_timestamp: /usr/local/lib/libswscale.dylib
103 | pts_timestamp: CMakeFiles/pts_timestamp.dir/link.txt
104 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Linking C executable pts_timestamp"
105 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/pts_timestamp.dir/link.txt --verbose=$(VERBOSE)
106 |
107 | # Rule to build all files generated by this target.
108 | CMakeFiles/pts_timestamp.dir/build: pts_timestamp
109 |
110 | .PHONY : CMakeFiles/pts_timestamp.dir/build
111 |
112 | CMakeFiles/pts_timestamp.dir/clean:
113 | $(CMAKE_COMMAND) -P CMakeFiles/pts_timestamp.dir/cmake_clean.cmake
114 | .PHONY : CMakeFiles/pts_timestamp.dir/clean
115 |
116 | CMakeFiles/pts_timestamp.dir/depend:
117 | cd /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/DependInfo.cmake --color=$(COLOR)
118 | .PHONY : CMakeFiles/pts_timestamp.dir/depend
119 |
120 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/cmake_clean.cmake:
--------------------------------------------------------------------------------
1 | file(REMOVE_RECURSE
2 | "CMakeFiles/pts_timestamp.dir/main.c.o"
3 | "CMakeFiles/pts_timestamp.dir/dpts.c.o"
4 | "pts_timestamp.pdb"
5 | "pts_timestamp"
6 | )
7 |
8 | # Per-language clean rules from dependency scanning.
9 | foreach(lang C)
10 | include(CMakeFiles/pts_timestamp.dir/cmake_clean_${lang}.cmake OPTIONAL)
11 | endforeach()
12 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/depend.internal:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/pts_timestamp.dir/dpts.c.o
5 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/dpts.c
6 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/dpts.h
7 | /usr/local/include/libavcodec/avcodec.h
8 | /usr/local/include/libavcodec/avfft.h
9 | /usr/local/include/libavcodec/version.h
10 | /usr/local/include/libavdevice/avdevice.h
11 | /usr/local/include/libavfilter/avfilter.h
12 | /usr/local/include/libavfilter/buffersink.h
13 | /usr/local/include/libavfilter/buffersrc.h
14 | /usr/local/include/libavfilter/version.h
15 | /usr/local/include/libavformat/avformat.h
16 | /usr/local/include/libavformat/avio.h
17 | /usr/local/include/libavformat/version.h
18 | /usr/local/include/libavutil/attributes.h
19 | /usr/local/include/libavutil/avconfig.h
20 | /usr/local/include/libavutil/avutil.h
21 | /usr/local/include/libavutil/buffer.h
22 | /usr/local/include/libavutil/channel_layout.h
23 | /usr/local/include/libavutil/common.h
24 | /usr/local/include/libavutil/cpu.h
25 | /usr/local/include/libavutil/dict.h
26 | /usr/local/include/libavutil/error.h
27 | /usr/local/include/libavutil/file.h
28 | /usr/local/include/libavutil/frame.h
29 | /usr/local/include/libavutil/hwcontext.h
30 | /usr/local/include/libavutil/imgutils.h
31 | /usr/local/include/libavutil/intfloat.h
32 | /usr/local/include/libavutil/log.h
33 | /usr/local/include/libavutil/macros.h
34 | /usr/local/include/libavutil/mathematics.h
35 | /usr/local/include/libavutil/mem.h
36 | /usr/local/include/libavutil/opt.h
37 | /usr/local/include/libavutil/pixdesc.h
38 | /usr/local/include/libavutil/pixfmt.h
39 | /usr/local/include/libavutil/rational.h
40 | /usr/local/include/libavutil/samplefmt.h
41 | /usr/local/include/libavutil/time.h
42 | /usr/local/include/libavutil/version.h
43 | /usr/local/include/libswscale/swscale.h
44 | CMakeFiles/pts_timestamp.dir/main.c.o
45 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/dpts.h
46 | /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/main.c
47 | /usr/local/include/libavcodec/avcodec.h
48 | /usr/local/include/libavcodec/avfft.h
49 | /usr/local/include/libavcodec/version.h
50 | /usr/local/include/libavdevice/avdevice.h
51 | /usr/local/include/libavfilter/avfilter.h
52 | /usr/local/include/libavfilter/buffersink.h
53 | /usr/local/include/libavfilter/buffersrc.h
54 | /usr/local/include/libavfilter/version.h
55 | /usr/local/include/libavformat/avformat.h
56 | /usr/local/include/libavformat/avio.h
57 | /usr/local/include/libavformat/version.h
58 | /usr/local/include/libavutil/attributes.h
59 | /usr/local/include/libavutil/avconfig.h
60 | /usr/local/include/libavutil/avutil.h
61 | /usr/local/include/libavutil/buffer.h
62 | /usr/local/include/libavutil/channel_layout.h
63 | /usr/local/include/libavutil/common.h
64 | /usr/local/include/libavutil/cpu.h
65 | /usr/local/include/libavutil/dict.h
66 | /usr/local/include/libavutil/error.h
67 | /usr/local/include/libavutil/file.h
68 | /usr/local/include/libavutil/frame.h
69 | /usr/local/include/libavutil/hwcontext.h
70 | /usr/local/include/libavutil/imgutils.h
71 | /usr/local/include/libavutil/intfloat.h
72 | /usr/local/include/libavutil/log.h
73 | /usr/local/include/libavutil/macros.h
74 | /usr/local/include/libavutil/mathematics.h
75 | /usr/local/include/libavutil/mem.h
76 | /usr/local/include/libavutil/opt.h
77 | /usr/local/include/libavutil/pixdesc.h
78 | /usr/local/include/libavutil/pixfmt.h
79 | /usr/local/include/libavutil/rational.h
80 | /usr/local/include/libavutil/samplefmt.h
81 | /usr/local/include/libavutil/time.h
82 | /usr/local/include/libavutil/version.h
83 | /usr/local/include/libswscale/swscale.h
84 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/depend.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/pts_timestamp.dir/dpts.c.o: ../dpts.c
5 | CMakeFiles/pts_timestamp.dir/dpts.c.o: ../dpts.h
6 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavcodec/avcodec.h
7 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavcodec/avfft.h
8 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavcodec/version.h
9 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavdevice/avdevice.h
10 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavfilter/avfilter.h
11 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavfilter/buffersink.h
12 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavfilter/buffersrc.h
13 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavfilter/version.h
14 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavformat/avformat.h
15 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavformat/avio.h
16 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavformat/version.h
17 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/attributes.h
18 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/avconfig.h
19 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/avutil.h
20 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/buffer.h
21 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/channel_layout.h
22 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/common.h
23 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/cpu.h
24 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/dict.h
25 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/error.h
26 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/file.h
27 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/frame.h
28 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/hwcontext.h
29 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/imgutils.h
30 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/intfloat.h
31 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/log.h
32 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/macros.h
33 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/mathematics.h
34 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/mem.h
35 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/opt.h
36 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/pixdesc.h
37 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/pixfmt.h
38 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/rational.h
39 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/samplefmt.h
40 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/time.h
41 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libavutil/version.h
42 | CMakeFiles/pts_timestamp.dir/dpts.c.o: /usr/local/include/libswscale/swscale.h
43 |
44 | CMakeFiles/pts_timestamp.dir/main.c.o: ../dpts.h
45 | CMakeFiles/pts_timestamp.dir/main.c.o: ../main.c
46 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavcodec/avcodec.h
47 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavcodec/avfft.h
48 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavcodec/version.h
49 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavdevice/avdevice.h
50 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavfilter/avfilter.h
51 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavfilter/buffersink.h
52 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavfilter/buffersrc.h
53 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavfilter/version.h
54 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavformat/avformat.h
55 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavformat/avio.h
56 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavformat/version.h
57 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/attributes.h
58 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/avconfig.h
59 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/avutil.h
60 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/buffer.h
61 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/channel_layout.h
62 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/common.h
63 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/cpu.h
64 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/dict.h
65 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/error.h
66 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/file.h
67 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/frame.h
68 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/hwcontext.h
69 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/imgutils.h
70 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/intfloat.h
71 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/log.h
72 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/macros.h
73 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/mathematics.h
74 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/mem.h
75 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/opt.h
76 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/pixdesc.h
77 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/pixfmt.h
78 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/rational.h
79 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/samplefmt.h
80 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/time.h
81 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libavutil/version.h
82 | CMakeFiles/pts_timestamp.dir/main.c.o: /usr/local/include/libswscale/swscale.h
83 |
84 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/flags.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # compile C with /Library/Developer/CommandLineTools/usr/bin/cc
5 | C_FLAGS = -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -std=gnu99
6 |
7 | C_DEFINES =
8 |
9 | C_INCLUDES = -I/usr/local/include
10 |
11 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/link.txt:
--------------------------------------------------------------------------------
1 | /Library/Developer/CommandLineTools/usr/bin/cc -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/pts_timestamp.dir/main.c.o CMakeFiles/pts_timestamp.dir/dpts.c.o -o pts_timestamp /usr/local/lib/libavcodec.dylib /usr/local/lib/libavfilter.dylib /usr/local/lib/libavformat.dylib /usr/local/lib/libavutil.dylib /usr/local/lib/libavdevice.dylib /usr/local/lib/libswscale.dylib
2 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/CMakeFiles/pts_timestamp.dir/progress.make:
--------------------------------------------------------------------------------
1 | CMAKE_PROGRESS_1 = 1
2 | CMAKE_PROGRESS_2 = 2
3 | CMAKE_PROGRESS_3 = 3
4 |
5 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/Makefile:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Default target executed when no arguments are given to make.
5 | default_target: all
6 |
7 | .PHONY : default_target
8 |
9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism.
10 | .NOTPARALLEL:
11 |
12 |
13 | #=============================================================================
14 | # Special targets provided by cmake.
15 |
16 | # Disable implicit rules so canonical targets will work.
17 | .SUFFIXES:
18 |
19 |
20 | # Remove some rules from gmake that .SUFFIXES does not remove.
21 | SUFFIXES =
22 |
23 | .SUFFIXES: .hpux_make_needs_suffix_list
24 |
25 |
26 | # Suppress display of executed commands.
27 | $(VERBOSE).SILENT:
28 |
29 |
30 | # A target that is always out of date.
31 | cmake_force:
32 |
33 | .PHONY : cmake_force
34 |
35 | #=============================================================================
36 | # Set environment variables for the build.
37 |
38 | # The shell in which to execute make rules.
39 | SHELL = /bin/sh
40 |
41 | # The CMake executable.
42 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
43 |
44 | # The command to remove a file.
45 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
46 |
47 | # Escaping for special characters.
48 | EQUALS = =
49 |
50 | # The top-level source directory on which CMake was run.
51 | CMAKE_SOURCE_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp
52 |
53 | # The top-level build directory on which CMake was run.
54 | CMAKE_BINARY_DIR = /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug
55 |
56 | #=============================================================================
57 | # Targets provided globally by CMake.
58 |
59 | # Special rule for the target rebuild_cache
60 | rebuild_cache:
61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
62 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
63 | .PHONY : rebuild_cache
64 |
65 | # Special rule for the target rebuild_cache
66 | rebuild_cache/fast: rebuild_cache
67 |
68 | .PHONY : rebuild_cache/fast
69 |
70 | # Special rule for the target edit_cache
71 | edit_cache:
72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
73 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
74 | .PHONY : edit_cache
75 |
76 | # Special rule for the target edit_cache
77 | edit_cache/fast: edit_cache
78 |
79 | .PHONY : edit_cache/fast
80 |
81 | # The main all target
82 | all: cmake_check_build_system
83 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles/progress.marks
84 | $(MAKE) -f CMakeFiles/Makefile2 all
85 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/CMakeFiles 0
86 | .PHONY : all
87 |
88 | # The main clean target
89 | clean:
90 | $(MAKE) -f CMakeFiles/Makefile2 clean
91 | .PHONY : clean
92 |
93 | # The main clean target
94 | clean/fast: clean
95 |
96 | .PHONY : clean/fast
97 |
98 | # Prepare targets for installation.
99 | preinstall: all
100 | $(MAKE) -f CMakeFiles/Makefile2 preinstall
101 | .PHONY : preinstall
102 |
103 | # Prepare targets for installation.
104 | preinstall/fast:
105 | $(MAKE) -f CMakeFiles/Makefile2 preinstall
106 | .PHONY : preinstall/fast
107 |
108 | # clear depends
109 | depend:
110 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
111 | .PHONY : depend
112 |
113 | #=============================================================================
114 | # Target rules for targets named pts_timestamp
115 |
116 | # Build rule for target.
117 | pts_timestamp: cmake_check_build_system
118 | $(MAKE) -f CMakeFiles/Makefile2 pts_timestamp
119 | .PHONY : pts_timestamp
120 |
121 | # fast build rule for target.
122 | pts_timestamp/fast:
123 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/build
124 | .PHONY : pts_timestamp/fast
125 |
126 | dpts.o: dpts.c.o
127 |
128 | .PHONY : dpts.o
129 |
130 | # target to build an object file
131 | dpts.c.o:
132 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/dpts.c.o
133 | .PHONY : dpts.c.o
134 |
135 | dpts.i: dpts.c.i
136 |
137 | .PHONY : dpts.i
138 |
139 | # target to preprocess a source file
140 | dpts.c.i:
141 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/dpts.c.i
142 | .PHONY : dpts.c.i
143 |
144 | dpts.s: dpts.c.s
145 |
146 | .PHONY : dpts.s
147 |
148 | # target to generate assembly for a file
149 | dpts.c.s:
150 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/dpts.c.s
151 | .PHONY : dpts.c.s
152 |
153 | main.o: main.c.o
154 |
155 | .PHONY : main.o
156 |
157 | # target to build an object file
158 | main.c.o:
159 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/main.c.o
160 | .PHONY : main.c.o
161 |
162 | main.i: main.c.i
163 |
164 | .PHONY : main.i
165 |
166 | # target to preprocess a source file
167 | main.c.i:
168 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/main.c.i
169 | .PHONY : main.c.i
170 |
171 | main.s: main.c.s
172 |
173 | .PHONY : main.s
174 |
175 | # target to generate assembly for a file
176 | main.c.s:
177 | $(MAKE) -f CMakeFiles/pts_timestamp.dir/build.make CMakeFiles/pts_timestamp.dir/main.c.s
178 | .PHONY : main.c.s
179 |
180 | # Help Target
181 | help:
182 | @echo "The following are some of the valid targets for this Makefile:"
183 | @echo "... all (the default if no target is provided)"
184 | @echo "... clean"
185 | @echo "... depend"
186 | @echo "... rebuild_cache"
187 | @echo "... edit_cache"
188 | @echo "... pts_timestamp"
189 | @echo "... dpts.o"
190 | @echo "... dpts.i"
191 | @echo "... dpts.s"
192 | @echo "... main.o"
193 | @echo "... main.i"
194 | @echo "... main.s"
195 | .PHONY : help
196 |
197 |
198 |
199 | #=============================================================================
200 | # Special targets to cleanup operation of make.
201 |
202 | # Special rule to run CMake to check the build system integrity.
203 | # No rule that depends on this can have commands that come from listfiles
204 | # because they might be regenerated.
205 | cmake_check_build_system:
206 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
207 | .PHONY : cmake_check_build_system
208 |
209 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Is this installation the result of a crosscompile?
31 | if(NOT DEFINED CMAKE_CROSSCOMPILING)
32 | set(CMAKE_CROSSCOMPILING "FALSE")
33 | endif()
34 |
35 | if(CMAKE_INSTALL_COMPONENT)
36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
37 | else()
38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
39 | endif()
40 |
41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
42 | "${CMAKE_INSTALL_MANIFEST_FILES}")
43 | file(WRITE "/Users/zhangtao/SourceCode/github/ffmpeg-examples/pts-timestamp/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
45 |
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/pts_timestamp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andy-zhangtao/ffmpeg-examples/de48378d06c79eb3fb0a3a43d6d278f5a7404f35/pts-timestamp/cmake-build-debug/pts_timestamp
--------------------------------------------------------------------------------
/pts-timestamp/cmake-build-debug/pts_timestamp.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/pts-timestamp/dpts.c:
--------------------------------------------------------------------------------
1 | //
2 | // Created by zhangtao on 2019/9/16.
3 | //
4 | #include
5 | #include "dpts.h"
6 |
7 | int VideoStreamIndx = -1;
8 | const char *out_file = "/Users/zhangtao/tmp/small.mp4";
9 |
10 | int init() {
11 | av_register_all();
12 | avfilter_register_all();
13 | avcodec_register_all();
14 | avdevice_register_all();
15 |
16 | inFormatContext = NULL;
17 | inCodecContext = NULL;
18 | inCodec = NULL;
19 |
20 | printf("\nall required functions are registered successfully");
21 | return 0;
22 | }
23 |
24 | int initInput() {
25 | int value = -1;
26 |
27 | value = avformat_open_input(&inFormatContext, out_file, NULL, NULL);
28 | if (value) {
29 | printf("\nAlloc InputFormatContext Error. %s", av_err2str(value));
30 | exit(1);
31 | }
32 |
33 | if ((value = avformat_find_stream_info(inFormatContext, NULL)) < 0) {
34 | av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
35 | return value;
36 | }
37 |
38 | AVRational _time_base;
39 |
40 | for (int i = 0; i < inFormatContext->nb_streams; i++) // find video stream posistion/index.
41 | {
42 |
43 | if (inFormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
44 | AVCodec *dec = avcodec_find_decoder(inFormatContext->streams[i]->codecpar->codec_id);
45 | printf("%d\n", dec->id);
46 |
47 | inCodecContext = avcodec_alloc_context3(dec);
48 | if (!inCodecContext) {
49 | printf("\nCan not find in stream codec");
50 | exit(1);
51 | }
52 |
53 | inCodecContext->flags |= AV_CODEC_FLAG_TRUNCATED;
54 | inCodecContext->pix_fmt = AV_PIX_FMT_YVYU422;
55 | _time_base = inFormatContext->streams[i]->time_base;
56 |
57 | value = avcodec_parameters_to_context(inCodecContext, inFormatContext->streams[i]->codecpar);
58 | if (value < 0) {
59 | av_log(NULL, AV_LOG_ERROR, "Failed to copy decoder parameters to input decoder context "
60 | "for stream #%u\n", i);
61 | return value;
62 | }
63 |
64 | inCodecContext->framerate = av_guess_frame_rate(inFormatContext, inFormatContext->streams[i], NULL);
65 |
66 | VideoStreamIndx = i;
67 | break;
68 | }
69 | }
70 |
71 | if (VideoStreamIndx == -1) {
72 | printf("Can not find video stream \n");
73 | exit(1);
74 | }
75 |
76 |
77 | value = avcodec_open2(inCodecContext, inCodec, NULL);
78 | if (value < 0) {
79 | printf("\n%d\n", __LINE__);
80 | printf("unable to open the av codec. error: ", av_err2str(value));
81 | exit(1);
82 | }
83 |
84 | inCodecContext->time_base = _time_base;
85 | printf("%d %d\n", inCodecContext->time_base.num, inCodecContext->time_base.den);
86 |
87 | av_dump_format(inFormatContext, 0, out_file, 0);
88 |
89 | printf("%"PRId64" %f \n", inFormatContext->duration, av_q2d(inCodecContext->time_base));
90 |
91 | return 0;
92 | }
93 |
94 | int analysis() {
95 |
96 | AVPacket *ipacket = NULL;
97 | ipacket = av_packet_alloc();
98 |
99 | AVFrame *iframe = NULL;
100 | iframe = av_frame_alloc();
101 |
102 | int i = 0;
103 | int value = -1;
104 |
105 | AVRational _time_base = inFormatContext->streams[VideoStreamIndx]->time_base;
106 |
107 | while (av_read_frame(inFormatContext, ipacket) >= 0) {
108 |
109 | if (ipacket->stream_index == VideoStreamIndx) {
110 | i++;
111 | value = avcodec_send_packet(inCodecContext, ipacket);
112 | if (value < 0) {
113 | fprintf(stderr, "Error sending a packet for decoding\n");
114 | exit(1);
115 | }
116 |
117 | while (value >= 0) {
118 | value = avcodec_receive_frame(inCodecContext, iframe);
119 | if (value == AVERROR(EAGAIN) || value == AVERROR_EOF) {
120 | break;
121 | } else if (value < 0) {
122 | fprintf(stderr, "Error during decoding\n");
123 | exit(1);
124 | }
125 |
126 | printf("receive frame %d pts: %ld timestamp: %f \n",
127 | inCodecContext->frame_number,
128 | iframe->pts,
129 | iframe->pts * av_q2d(_time_base)
130 | );
131 | }
132 | }
133 | }
134 |
135 | return 0;
136 | }
--------------------------------------------------------------------------------
/pts-timestamp/dpts.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by zhangtao on 2019/9/16.
3 | //
4 |
5 | #ifndef DPTS_DPTS_H
6 | #define DPTS_DPTS_H
7 |
8 | #include "libavcodec/avcodec.h"
9 | #include "libavcodec/avfft.h"
10 | #include "libavdevice/avdevice.h"
11 | #include "libavfilter/avfilter.h"
12 | #include "libavfilter/buffersink.h"
13 | #include "libavfilter/buffersrc.h"
14 | #include "libavformat/avformat.h"
15 | #include "libavformat/avio.h"
16 | #include "libavutil/opt.h"
17 | #include "libavutil/common.h"
18 | #include "libavutil/channel_layout.h"
19 | #include "libavutil/imgutils.h"
20 | #include "libavutil/mathematics.h"
21 | #include "libavutil/samplefmt.h"
22 | #include "libavutil/time.h"
23 | #include "libavutil/opt.h"
24 | #include "libavutil/pixdesc.h"
25 | #include "libavutil/file.h"
26 | #include "libswscale/swscale.h"
27 |
28 |
29 |
30 | AVFormatContext *inFormatContext;
31 | AVCodecContext *inCodecContext;
32 | AVCodec *inCodec;
33 |
34 | int init();
35 | int initInput();
36 | int analysis();
37 |
38 | #endif //DPTS_DPTS_H
39 |
--------------------------------------------------------------------------------
/pts-timestamp/main.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include "dpts.h"
3 |
4 | int main() {
5 | int value = -1;
6 |
7 | value = init();
8 | if (value)
9 | printf("Init Error");
10 |
11 | value = initInput();
12 | if (value)
13 | printf("Init Input Error");
14 |
15 | value = analysis();
16 | if (value)
17 | printf("analysis Error");
18 | return 0;
19 | }
--------------------------------------------------------------------------------