├── .gitignore ├── AVCamera.sln ├── CMakeLists.txt ├── LICENSE ├── README.md ├── gui ├── mfc │ ├── Camera.cpp │ ├── Camera.h │ ├── Camera.rc │ ├── Camera.vcxproj │ ├── Camera.vcxproj.filters │ ├── ChildView.cpp │ ├── ChildView.h │ ├── MainFrm.cpp │ ├── MainFrm.h │ ├── Resource.h │ ├── res │ │ ├── Camera.ico │ │ ├── Camera.rc2 │ │ ├── Toolbar.bmp │ │ ├── Toolbar256.bmp │ │ ├── buttons.bmp │ │ ├── filelarge.bmp │ │ ├── filesmall.bmp │ │ ├── main.bmp │ │ ├── ribbon.mfcribbon-ms │ │ ├── writelarge.bmp │ │ └── writesmall.bmp │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── qt5 │ ├── CMakeLists.txt │ ├── avcamera.qrc │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.hpp │ ├── mainwindow.ui │ ├── qvideowidget.cpp │ ├── qvideowidget.hpp │ └── win32.ico ├── third_party ├── include │ ├── ffmpeg │ │ ├── libavcodec │ │ │ ├── avcodec.h │ │ │ ├── avfft.h │ │ │ ├── dv_profile.h │ │ │ ├── dxva2.h │ │ │ ├── old_codec_ids.h │ │ │ ├── vaapi.h │ │ │ ├── vda.h │ │ │ ├── vdpau.h │ │ │ ├── version.h │ │ │ ├── vorbis_parser.h │ │ │ └── xvmc.h │ │ ├── libavdevice │ │ │ ├── avdevice.h │ │ │ └── version.h │ │ ├── libavfilter │ │ │ ├── asrc_abuffer.h │ │ │ ├── avcodec.h │ │ │ ├── avfilter.h │ │ │ ├── avfiltergraph.h │ │ │ ├── buffersink.h │ │ │ ├── buffersrc.h │ │ │ └── version.h │ │ ├── libavformat │ │ │ ├── avformat.h │ │ │ ├── avio.h │ │ │ └── version.h │ │ ├── libavutil │ │ │ ├── adler32.h │ │ │ ├── aes.h │ │ │ ├── attributes.h │ │ │ ├── audio_fifo.h │ │ │ ├── audioconvert.h │ │ │ ├── avassert.h │ │ │ ├── avconfig.h │ │ │ ├── avstring.h │ │ │ ├── avutil.h │ │ │ ├── base64.h │ │ │ ├── blowfish.h │ │ │ ├── bprint.h │ │ │ ├── bswap.h │ │ │ ├── buffer.h │ │ │ ├── cast5.h │ │ │ ├── channel_layout.h │ │ │ ├── common.h │ │ │ ├── cpu.h │ │ │ ├── crc.h │ │ │ ├── dict.h │ │ │ ├── display.h │ │ │ ├── downmix_info.h │ │ │ ├── error.h │ │ │ ├── eval.h │ │ │ ├── ffversion.h │ │ │ ├── fifo.h │ │ │ ├── file.h │ │ │ ├── frame.h │ │ │ ├── hash.h │ │ │ ├── hmac.h │ │ │ ├── imgutils.h │ │ │ ├── intfloat.h │ │ │ ├── intreadwrite.h │ │ │ ├── lfg.h │ │ │ ├── log.h │ │ │ ├── lzo.h │ │ │ ├── macros.h │ │ │ ├── mathematics.h │ │ │ ├── md5.h │ │ │ ├── mem.h │ │ │ ├── motion_vector.h │ │ │ ├── murmur3.h │ │ │ ├── old_pix_fmts.h │ │ │ ├── opt.h │ │ │ ├── parseutils.h │ │ │ ├── pixdesc.h │ │ │ ├── pixelutils.h │ │ │ ├── pixfmt.h │ │ │ ├── random_seed.h │ │ │ ├── rational.h │ │ │ ├── replaygain.h │ │ │ ├── ripemd.h │ │ │ ├── samplefmt.h │ │ │ ├── sha.h │ │ │ ├── sha512.h │ │ │ ├── stereo3d.h │ │ │ ├── threadmessage.h │ │ │ ├── time.h │ │ │ ├── timecode.h │ │ │ ├── timestamp.h │ │ │ ├── version.h │ │ │ └── xtea.h │ │ ├── libpostproc │ │ │ ├── postprocess.h │ │ │ └── version.h │ │ ├── libswresample │ │ │ ├── swresample.h │ │ │ └── version.h │ │ └── libswscale │ │ │ ├── swscale.h │ │ │ └── version.h │ └── opencv │ │ ├── opencv │ │ ├── cv.h │ │ ├── cv.hpp │ │ ├── cvaux.h │ │ ├── cvaux.hpp │ │ ├── cvwimage.h │ │ ├── cxcore.h │ │ ├── cxcore.hpp │ │ ├── cxeigen.hpp │ │ ├── cxmisc.h │ │ ├── highgui.h │ │ └── ml.h │ │ └── opencv2 │ │ ├── calib3d │ │ └── calib3d.hpp │ │ ├── contrib │ │ ├── contrib.hpp │ │ ├── detection_based_tracker.hpp │ │ ├── hybridtracker.hpp │ │ ├── openfabmap.hpp │ │ └── retina.hpp │ │ ├── core │ │ ├── affine.hpp │ │ ├── core.hpp │ │ ├── core_c.h │ │ ├── cuda_devptrs.hpp │ │ ├── devmem2d.hpp │ │ ├── eigen.hpp │ │ ├── gpumat.hpp │ │ ├── internal.hpp │ │ ├── mat.hpp │ │ ├── opengl_interop.hpp │ │ ├── opengl_interop_deprecated.hpp │ │ ├── operations.hpp │ │ ├── types_c.h │ │ ├── version.hpp │ │ └── wimage.hpp │ │ ├── features2d │ │ └── features2d.hpp │ │ ├── flann │ │ ├── all_indices.h │ │ ├── allocator.h │ │ ├── any.h │ │ ├── autotuned_index.h │ │ ├── composite_index.h │ │ ├── config.h │ │ ├── defines.h │ │ ├── dist.h │ │ ├── dummy.h │ │ ├── dynamic_bitset.h │ │ ├── flann.hpp │ │ ├── flann_base.hpp │ │ ├── general.h │ │ ├── ground_truth.h │ │ ├── hdf5.h │ │ ├── heap.h │ │ ├── hierarchical_clustering_index.h │ │ ├── index_testing.h │ │ ├── kdtree_index.h │ │ ├── kdtree_single_index.h │ │ ├── kmeans_index.h │ │ ├── linear_index.h │ │ ├── logger.h │ │ ├── lsh_index.h │ │ ├── lsh_table.h │ │ ├── matrix.h │ │ ├── miniflann.hpp │ │ ├── nn_index.h │ │ ├── object_factory.h │ │ ├── params.h │ │ ├── random.h │ │ ├── result_set.h │ │ ├── sampling.h │ │ ├── saving.h │ │ ├── simplex_downhill.h │ │ └── timer.h │ │ ├── gpu │ │ ├── device │ │ │ ├── block.hpp │ │ │ ├── border_interpolate.hpp │ │ │ ├── color.hpp │ │ │ ├── common.hpp │ │ │ ├── datamov_utils.hpp │ │ │ ├── detail │ │ │ │ ├── color_detail.hpp │ │ │ │ ├── reduce.hpp │ │ │ │ ├── reduce_key_val.hpp │ │ │ │ ├── transform_detail.hpp │ │ │ │ ├── type_traits_detail.hpp │ │ │ │ └── vec_distance_detail.hpp │ │ │ ├── dynamic_smem.hpp │ │ │ ├── emulation.hpp │ │ │ ├── filters.hpp │ │ │ ├── funcattrib.hpp │ │ │ ├── functional.hpp │ │ │ ├── limits.hpp │ │ │ ├── reduce.hpp │ │ │ ├── saturate_cast.hpp │ │ │ ├── scan.hpp │ │ │ ├── simd_functions.hpp │ │ │ ├── static_check.hpp │ │ │ ├── transform.hpp │ │ │ ├── type_traits.hpp │ │ │ ├── utility.hpp │ │ │ ├── vec_distance.hpp │ │ │ ├── vec_math.hpp │ │ │ ├── vec_traits.hpp │ │ │ ├── warp.hpp │ │ │ ├── warp_reduce.hpp │ │ │ └── warp_shuffle.hpp │ │ ├── devmem2d.hpp │ │ ├── gpu.hpp │ │ ├── gpumat.hpp │ │ └── stream_accessor.hpp │ │ ├── highgui │ │ ├── cap_ios.h │ │ ├── highgui.hpp │ │ ├── highgui_c.h │ │ └── ios.h │ │ ├── imgproc │ │ ├── imgproc.hpp │ │ ├── imgproc_c.h │ │ └── types_c.h │ │ ├── legacy │ │ ├── blobtrack.hpp │ │ ├── compat.hpp │ │ ├── legacy.hpp │ │ └── streams.hpp │ │ ├── ml │ │ └── ml.hpp │ │ ├── nonfree │ │ ├── features2d.hpp │ │ ├── gpu.hpp │ │ ├── nonfree.hpp │ │ └── ocl.hpp │ │ ├── objdetect │ │ └── objdetect.hpp │ │ ├── ocl │ │ ├── matrix_operations.hpp │ │ └── ocl.hpp │ │ ├── opencv.hpp │ │ ├── opencv_modules.hpp │ │ ├── photo │ │ ├── photo.hpp │ │ └── photo_c.h │ │ ├── stitching │ │ ├── detail │ │ │ ├── autocalib.hpp │ │ │ ├── blenders.hpp │ │ │ ├── camera.hpp │ │ │ ├── exposure_compensate.hpp │ │ │ ├── matchers.hpp │ │ │ ├── motion_estimators.hpp │ │ │ ├── seam_finders.hpp │ │ │ ├── util.hpp │ │ │ ├── util_inl.hpp │ │ │ ├── warpers.hpp │ │ │ └── warpers_inl.hpp │ │ ├── stitcher.hpp │ │ └── warpers.hpp │ │ ├── superres │ │ ├── optical_flow.hpp │ │ └── superres.hpp │ │ ├── ts │ │ ├── gpu_perf.hpp │ │ ├── gpu_test.hpp │ │ ├── ts.hpp │ │ ├── ts_gtest.h │ │ └── ts_perf.hpp │ │ ├── video │ │ ├── background_segm.hpp │ │ ├── tracking.hpp │ │ └── video.hpp │ │ └── videostab │ │ ├── deblurring.hpp │ │ ├── fast_marching.hpp │ │ ├── fast_marching_inl.hpp │ │ ├── frame_source.hpp │ │ ├── global_motion.hpp │ │ ├── inpainting.hpp │ │ ├── log.hpp │ │ ├── motion_stabilizing.hpp │ │ ├── optical_flow.hpp │ │ ├── stabilizer.hpp │ │ └── videostab.hpp └── lib │ ├── ffmpeg │ ├── avcodec-56.dll │ ├── avcodec.lib │ ├── avdevice-56.dll │ ├── avdevice.lib │ ├── avfilter-5.dll │ ├── avfilter.lib │ ├── avformat-56.dll │ ├── avformat.lib │ ├── avutil-54.dll │ ├── avutil.lib │ ├── postproc-53.dll │ ├── postproc.lib │ ├── swresample-1.dll │ ├── swresample.lib │ ├── swscale-3.dll │ └── swscale.lib │ └── opencv │ ├── opencv_calib3d249.dll │ ├── opencv_calib3d249.lib │ ├── opencv_calib3d249d.dll │ ├── opencv_calib3d249d.lib │ ├── opencv_contrib249.dll │ ├── opencv_contrib249.lib │ ├── opencv_contrib249d.dll │ ├── opencv_contrib249d.lib │ ├── opencv_core249.dll │ ├── opencv_core249.lib │ ├── opencv_core249d.dll │ ├── opencv_core249d.lib │ ├── opencv_features2d249.dll │ ├── opencv_features2d249.lib │ ├── opencv_features2d249d.dll │ ├── opencv_features2d249d.lib │ ├── opencv_ffmpeg249.dll │ ├── opencv_flann249.dll │ ├── opencv_flann249.lib │ ├── opencv_flann249d.dll │ ├── opencv_flann249d.lib │ ├── opencv_gpu249.dll │ ├── opencv_gpu249.lib │ ├── opencv_gpu249d.dll │ ├── opencv_gpu249d.lib │ ├── opencv_highgui249.dll │ ├── opencv_highgui249.lib │ ├── opencv_highgui249d.dll │ ├── opencv_highgui249d.lib │ ├── opencv_imgproc249.dll │ ├── opencv_imgproc249.lib │ ├── opencv_imgproc249d.dll │ ├── opencv_imgproc249d.lib │ ├── opencv_legacy249.dll │ ├── opencv_legacy249.lib │ ├── opencv_legacy249d.dll │ ├── opencv_legacy249d.lib │ ├── opencv_ml249.dll │ ├── opencv_ml249.lib │ ├── opencv_ml249d.dll │ ├── opencv_ml249d.lib │ ├── opencv_nonfree249.dll │ ├── opencv_nonfree249.lib │ ├── opencv_nonfree249d.dll │ ├── opencv_nonfree249d.lib │ ├── opencv_objdetect249.dll │ ├── opencv_objdetect249.lib │ ├── opencv_objdetect249d.dll │ ├── opencv_objdetect249d.lib │ ├── opencv_ocl249.dll │ ├── opencv_ocl249.lib │ ├── opencv_ocl249d.dll │ ├── opencv_ocl249d.lib │ ├── opencv_photo249.dll │ ├── opencv_photo249.lib │ ├── opencv_photo249d.dll │ ├── opencv_photo249d.lib │ ├── opencv_stitching249.dll │ ├── opencv_stitching249.lib │ ├── opencv_stitching249d.dll │ ├── opencv_stitching249d.lib │ ├── opencv_superres249.dll │ ├── opencv_superres249.lib │ ├── opencv_superres249d.dll │ ├── opencv_superres249d.lib │ ├── opencv_ts249.lib │ ├── opencv_ts249d.lib │ ├── opencv_video249.dll │ ├── opencv_video249.lib │ ├── opencv_video249d.dll │ ├── opencv_video249d.lib │ ├── opencv_videostab249.dll │ ├── opencv_videostab249.lib │ ├── opencv_videostab249d.dll │ └── opencv_videostab249d.lib └── videomgr ├── CMakeLists.txt ├── VideoMgr.vcxproj ├── VideoMgr.vcxproj.filters ├── face_cascade.dat ├── include ├── camera.hpp ├── filter.hpp ├── filters │ ├── blurfilter.hpp │ ├── detectionface.hpp │ ├── facefilter.hpp │ └── showdatetimefilter.hpp ├── h264writer.hpp └── util.hpp ├── resources ├── haarcascade_eye_tree_eyeglasses.xml └── haarcascade_frontalface_alt2.xml └── src ├── camera.cpp ├── filters ├── blurfilter.cpp ├── detectionface.cpp ├── facefilter.cpp └── showdatetimefilter.cpp └── h264writer.cpp /AVCamera.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Camera", "gui\mfc\Camera.vcxproj", "{352F6AE7-9A80-472F-8049-0EFEC51B26EE}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "videomgr", "videomgr\videomgr.vcxproj", "{E32ED04E-E600-4CDF-84C4-60BAA5391612}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {352F6AE7-9A80-472F-8049-0EFEC51B26EE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {352F6AE7-9A80-472F-8049-0EFEC51B26EE}.Debug|Win32.Build.0 = Debug|Win32 18 | {352F6AE7-9A80-472F-8049-0EFEC51B26EE}.Release|Win32.ActiveCfg = Release|Win32 19 | {352F6AE7-9A80-472F-8049-0EFEC51B26EE}.Release|Win32.Build.0 = Release|Win32 20 | {E32ED04E-E600-4CDF-84C4-60BAA5391612}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {E32ED04E-E600-4CDF-84C4-60BAA5391612}.Debug|Win32.Build.0 = Debug|Win32 22 | {E32ED04E-E600-4CDF-84C4-60BAA5391612}.Release|Win32.ActiveCfg = Release|Win32 23 | {E32ED04E-E600-4CDF-84C4-60BAA5391612}.Release|Win32.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8.3) 3 | 4 | if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") 5 | set(CMAKE_COMPILER_IS_CLANGXX 1) 6 | elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") 7 | if(UNIX) 8 | set(CMAKE_COMPILER_IS_UNIX_ICC 1) 9 | else() 10 | # CMAKE_COMPILER_IS_WIN_ICC 的 c++11 模式命令行参数不一样 11 | set(CMAKE_COMPILER_IS_WIN_ICC 1) 12 | endif() 13 | endif() 14 | 15 | if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX OR CMAKE_COMPILER_IS_UNIX_ICC) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 17 | endif() 18 | 19 | 20 | add_subdirectory(videomgr) 21 | 22 | add_subdirectory(gui/qt5) 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | AVCamera 2 | ======== 3 | # 介绍 4 | 一款家用跨平台安全防盗监控软件,无需额外购买昂贵的CCD监控摄像头,只需普通电脑视频聊天用的CMOS摄像头即可。 5 | 本软件特色在于可以根据画面变化量自动判断是否该帧是否应该写入视频文件,节省大量无用画面未动的帧带来的磁盘空间压力。 6 | 7 | # 开发环境 8 | Windows vs2010 9 | Linux kdevelop 10 | 11 | # 使用语言 12 | 与视频处理相关的代码全部采用C++完成,与界面显示相关的代码采用C++的MFC框架和QT框架两UI库套实作。 13 | 14 | # 依赖库 15 | ffmpeg 2.4 主要处理视频解码编码的部分 16 | OpenCV 2.4.9 主要处理图像的部分 17 | Boost 主要用于信号机制等 18 | 为了方便VSer们编译,我已经将这两个库内置在解决方案目录的include和lib目录下了。 19 | 20 | # 工程介绍 21 | VideoMgr 底层录像库 22 | 23 | gui/qt QT GUI 24 | 25 | gui/win MFC GUI -------------------------------------------------------------------------------- /gui/mfc/Camera.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef __AFXWIN_H__ 4 | #error "include 'stdafx.h' before including this file for PCH" 5 | #endif 6 | 7 | #include "resource.h" // main symbols 8 | 9 | 10 | // CCameraApp: 11 | // See Camera.cpp for the implementation of this class 12 | // 13 | 14 | class CCameraApp : public CWinAppEx 15 | { 16 | public: 17 | CCameraApp(); 18 | 19 | 20 | // Overrides 21 | public: 22 | virtual BOOL InitInstance(); 23 | virtual int ExitInstance(); 24 | 25 | // Implementation 26 | 27 | public: 28 | UINT m_nAppLook; 29 | virtual void PreLoadState(); 30 | virtual void LoadCustomState(); 31 | virtual void SaveCustomState(); 32 | 33 | afx_msg void OnAppAbout(); 34 | DECLARE_MESSAGE_MAP() 35 | }; 36 | 37 | extern CCameraApp theApp; 38 | -------------------------------------------------------------------------------- /gui/mfc/ChildView.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Camera.h" 3 | #include "ChildView.h" 4 | 5 | #include 6 | 7 | #ifdef _DEBUG 8 | #define new DEBUG_NEW 9 | #endif 10 | 11 | 12 | // CChildView 13 | 14 | CChildView::CChildView() 15 | { 16 | } 17 | 18 | VideoMgr::Camera& CChildView::Camera() 19 | { 20 | return _camera; 21 | } 22 | 23 | CChildView::~CChildView() 24 | { 25 | } 26 | 27 | 28 | BEGIN_MESSAGE_MAP(CChildView, CWnd) 29 | ON_WM_DESTROY() 30 | ON_WM_SIZE() 31 | END_MESSAGE_MAP() 32 | 33 | 34 | 35 | // CChildView message handlers 36 | 37 | BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs) 38 | { 39 | if (!CWnd::PreCreateWindow(cs)) 40 | return FALSE; 41 | 42 | cs.dwExStyle |= WS_EX_CLIENTEDGE; 43 | cs.style &= ~WS_BORDER; 44 | cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS, 45 | ::LoadCursor(NULL, IDC_ARROW), reinterpret_cast(COLOR_WINDOW+1), NULL); 46 | 47 | return TRUE; 48 | } 49 | 50 | void CChildView::UpdateVideoFrame() 51 | { 52 | if (_camera._status == VideoMgr::CameraSatus::EXITED) return; 53 | int width = 640, height = 480, channel = 3; 54 | if (_img.IsNull()) 55 | { 56 | _img.Create(width, height, channel * 8); 57 | } 58 | else 59 | { 60 | if (_img.GetWidth() != width || _img.GetHeight() != height || _img.GetBPP() == channel) 61 | { 62 | _img.Destroy(); 63 | _img.Create(width, height, channel * 8); 64 | } 65 | } 66 | 67 | cv::Mat mat; 68 | _camera.get_curr_frame( mat ); 69 | if( mat.data == nullptr || _img.IsNull() ) return; 70 | 71 | //convert Mat to CImage 72 | uchar* ps; 73 | uchar* pimg = (uchar*)_img.GetBits(); 74 | int step = _img.GetPitch(); 75 | 76 | for( int i = 0; i < mat.rows; ++i ) 77 | { 78 | ps = ( mat.ptr( i ) ); 79 | for( int j = 0; j < mat.cols; ++j ) 80 | { 81 | memcpy( pimg + i*step, ps, mat.cols * 3 ); 82 | } 83 | } 84 | 85 | if (_img.IsNull()) return; 86 | CClientDC dc(this); 87 | _img.Draw(dc.GetSafeHdc(), _dst_rect, Gdiplus::InterpolationModeBilinear); 88 | } 89 | 90 | void CChildView::UpdateStatus(VideoMgr::CameraSatus status) 91 | { 92 | switch (status) 93 | { 94 | case VideoMgr::CREATED: 95 | case VideoMgr::STOPPED: 96 | 97 | break; 98 | case VideoMgr::PAUSED: 99 | 100 | break; 101 | case VideoMgr::RECORDING: 102 | 103 | break; 104 | } 105 | } 106 | 107 | 108 | void CChildView::OnDestroy() 109 | { 110 | _camera.exit(); 111 | Sleep(1000); 112 | // TODO: Add your message handler code here 113 | CWnd::OnDestroy(); 114 | } 115 | 116 | 117 | void CChildView::OnSize(UINT nType, int cx, int cy) 118 | { 119 | CWnd::OnSize(nType, cx, cy); 120 | // TODO: Add your message handler code here 121 | GetClientRect(&_dst_rect); 122 | } 123 | -------------------------------------------------------------------------------- /gui/mfc/ChildView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // CChildView window 4 | 5 | class CChildView : public CWnd 6 | { 7 | // Construction 8 | public: 9 | CChildView(); 10 | 11 | // Attributes 12 | public: 13 | VideoMgr::Camera& Camera(); 14 | 15 | // Operations 16 | public: 17 | 18 | // Overrides 19 | protected: 20 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 21 | 22 | // Implementation 23 | public: 24 | virtual ~CChildView(); 25 | void UpdateVideoFrame(); 26 | void UpdateStatus(VideoMgr::CameraSatus status); 27 | 28 | // Generated message map functions 29 | protected: 30 | afx_msg void OnDestroy(); 31 | DECLARE_MESSAGE_MAP() 32 | 33 | private: 34 | VideoMgr::Camera _camera; 35 | CImage _img; 36 | RECT _dst_rect; 37 | 38 | public: 39 | afx_msg void OnSize(UINT nType, int cx, int cy); 40 | }; 41 | 42 | -------------------------------------------------------------------------------- /gui/mfc/MainFrm.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "stdafx.h" 3 | #include "ChildView.h" 4 | 5 | class CMainFrame : public CFrameWndEx 6 | { 7 | 8 | public: 9 | CMainFrame(); 10 | protected: 11 | DECLARE_DYNAMIC(CMainFrame) 12 | 13 | // Attributes 14 | public: 15 | 16 | // Operations 17 | public: 18 | 19 | // Overrides 20 | public: 21 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 22 | virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo); 23 | 24 | // Implementation 25 | public: 26 | virtual ~CMainFrame(); 27 | #ifdef _DEBUG 28 | virtual void AssertValid() const; 29 | virtual void Dump(CDumpContext& dc) const; 30 | #endif 31 | 32 | protected: // control bar embedded members 33 | CMFCRibbonBar m_wndRibbonBar; 34 | CMFCRibbonApplicationButton m_MainButton; 35 | CMFCToolBarImages m_PanelImages; 36 | CMFCRibbonStatusBar m_wndStatusBar; 37 | CChildView m_wndView; 38 | 39 | // Generated message map functions 40 | protected: 41 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 42 | afx_msg void OnSetFocus(CWnd *pOldWnd); 43 | afx_msg void OnApplicationLook(UINT id); 44 | afx_msg void OnUpdateApplicationLook(CCmdUI* pCmdUI); 45 | DECLARE_MESSAGE_MAP() 46 | }; 47 | 48 | 49 | -------------------------------------------------------------------------------- /gui/mfc/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Camera.rc 4 | // 5 | #define IDR_PASTE_MENU 151 6 | #define IDR_WINDOWS_MENU 152 7 | #define IDD_ABOUTBOX 100 8 | #define IDP_OLE_INIT_FAILED 100 9 | #define ID_WRITE_PASTEASHYPERLINK 32770 10 | #define IDB_WRITESMALL 110 11 | #define IDB_WRITELARGE 111 12 | #define IDB_MAIN 112 13 | #define IDB_BUTTONS 113 14 | #define IDB_FILELARGE 114 15 | #define IDB_FILESMALL 115 16 | #define IDR_POPUP_EDIT 119 17 | #define ID_STATUSBAR_PANE1 120 18 | #define ID_STATUSBAR_PANE2 121 19 | #define IDS_STATUS_PANE1 122 20 | #define IDS_STATUS_PANE2 123 21 | #define IDR_MAINFRAME 128 22 | #define IDR_MAINFRAME_256 129 23 | #define IDR_CameraTYPE 130 24 | #define IDR_THEME_MENU 200 25 | #define ID_SET_STYLE 201 26 | #define ID_VIEW_APPLOOK_WIN_2000 205 27 | #define ID_VIEW_APPLOOK_OFF_XP 206 28 | #define ID_VIEW_APPLOOK_WIN_XP 207 29 | #define ID_VIEW_APPLOOK_OFF_2003 208 30 | #define ID_VIEW_APPLOOK_VS_2005 209 31 | #define ID_VIEW_APPLOOK_VS_2008 210 32 | #define ID_VIEW_APPLOOK_OFF_2007_BLUE 215 33 | #define ID_VIEW_APPLOOK_OFF_2007_BLACK 216 34 | #define ID_VIEW_APPLOOK_OFF_2007_SILVER 217 35 | #define ID_VIEW_APPLOOK_OFF_2007_AQUA 218 36 | #define ID_VIEW_APPLOOK_WINDOWS_7 219 37 | #define IDS_EDIT_MENU 306 38 | #define IDR_RIBBON 307 39 | 40 | // Next default values for new objects 41 | // 42 | #ifdef APSTUDIO_INVOKED 43 | #ifndef APSTUDIO_READONLY_SYMBOLS 44 | #define _APS_NEXT_RESOURCE_VALUE 310 45 | #define _APS_NEXT_CONTROL_VALUE 1000 46 | #define _APS_NEXT_SYMED_VALUE 310 47 | #define _APS_NEXT_COMMAND_VALUE 32771 48 | #endif 49 | #endif 50 | -------------------------------------------------------------------------------- /gui/mfc/res/Camera.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/Camera.ico -------------------------------------------------------------------------------- /gui/mfc/res/Camera.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/Camera.rc2 -------------------------------------------------------------------------------- /gui/mfc/res/Toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/Toolbar.bmp -------------------------------------------------------------------------------- /gui/mfc/res/Toolbar256.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/Toolbar256.bmp -------------------------------------------------------------------------------- /gui/mfc/res/buttons.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/buttons.bmp -------------------------------------------------------------------------------- /gui/mfc/res/filelarge.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/filelarge.bmp -------------------------------------------------------------------------------- /gui/mfc/res/filesmall.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/filesmall.bmp -------------------------------------------------------------------------------- /gui/mfc/res/main.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/main.bmp -------------------------------------------------------------------------------- /gui/mfc/res/writelarge.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/writelarge.bmp -------------------------------------------------------------------------------- /gui/mfc/res/writesmall.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/gui/mfc/res/writesmall.bmp -------------------------------------------------------------------------------- /gui/mfc/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | 4 | -------------------------------------------------------------------------------- /gui/mfc/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef VC_EXTRALEAN 4 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 5 | #endif 6 | 7 | #include "targetver.h" 8 | 9 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit 10 | 11 | // turns off MFC's hiding of some common and often safely ignored warning messages 12 | #define _AFX_ALL_WARNINGS 13 | 14 | #include // MFC core and standard components 15 | #include // MFC extensions 16 | 17 | 18 | #include // MFC Automation classes 19 | 20 | 21 | 22 | #ifndef _AFX_NO_OLE_SUPPORT 23 | #include // MFC support for Internet Explorer 4 Common Controls 24 | #endif 25 | #ifndef _AFX_NO_AFXCMN_SUPPORT 26 | #include // MFC support for Windows Common Controls 27 | #endif // _AFX_NO_AFXCMN_SUPPORT 28 | 29 | #include // MFC support for ribbons and control bars 30 | 31 | #include 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "camera.hpp" 39 | #include "filter.hpp" 40 | 41 | #pragma comment(lib,"VideoMgr.lib") 42 | 43 | #if defined(_WIN32) || defined(_WIN64) 44 | //opencv library 45 | #ifdef _DEBUG 46 | #pragma comment (lib, "opencv_core249d.lib") 47 | #pragma comment (lib, "opencv_imgproc249d.lib") 48 | #pragma comment (lib, "opencv_highgui249d.lib") 49 | #pragma comment (lib, "opencv_objdetect249d.lib") 50 | #pragma comment (lib, "opencv_ocl249d.lib") 51 | #pragma comment (lib, "opencv_gpu249d.lib") 52 | #endif 53 | 54 | #ifdef NDEBUG 55 | #pragma comment (lib, "opencv_core249.lib") 56 | #pragma comment (lib, "opencv_imgproc249.lib") 57 | #pragma comment (lib, "opencv_highgui249.lib") 58 | #pragma comment (lib, "opencv_objdetect249.lib") 59 | #pragma comment (lib, "opencv_ocl249.lib") 60 | #pragma comment (lib, "opencv_gpu249.lib") 61 | #endif 62 | 63 | //ffmpeg library 64 | #pragma comment (lib, "avcodec.lib") 65 | #pragma comment (lib, "avformat.lib") 66 | #pragma comment (lib, "avutil.lib") 67 | #pragma comment (lib, "swscale.lib") 68 | #endif 69 | 70 | 71 | 72 | #ifdef _UNICODE 73 | #if defined _M_IX86 74 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 75 | #elif defined _M_X64 76 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 77 | #else 78 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 79 | #endif 80 | #endif 81 | 82 | 83 | -------------------------------------------------------------------------------- /gui/mfc/targetver.h: -------------------------------------------------------------------------------- 1 | // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface 2 | // (the "Fluent UI") and is provided only as referential material to supplement the 3 | // Microsoft Foundation Classes Reference and related electronic documentation 4 | // included with the MFC C++ library software. 5 | // License terms to copy, use or distribute the Fluent UI are available separately. 6 | // To learn more about our Fluent UI licensing program, please visit 7 | // http://go.microsoft.com/fwlink/?LinkId=238214. 8 | // 9 | // Copyright (C) Microsoft Corporation 10 | // All rights reserved. 11 | 12 | #pragma once 13 | 14 | // Including SDKDDKVer.h defines the highest available Windows platform. 15 | 16 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 17 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 18 | 19 | #include 20 | -------------------------------------------------------------------------------- /gui/qt5/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 2 | set(CMAKE_AUTOMOC ON) 3 | 4 | cmake_policy(SET CMP0020 NEW) 5 | add_definitions(-DQT_NO_KEYWORDS) 6 | 7 | find_package(Qt5Widgets REQUIRED) 8 | 9 | file(GLOB HDRS include/*.h*) 10 | file(GLOB SRCS *.cpp *.h*) 11 | file(GLOB UIS *.ui) 12 | 13 | qt5_wrap_ui(UI_SRCS ${UIS}) 14 | qt5_add_resources(RC_SRCS avcamera.qrc) 15 | 16 | set(SRCS ${SRCS} ${UI_SRCS} ${RC_SRCS}) 17 | 18 | add_executable(avcamera WIN32 MACOSX_BUNDLE ${SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/../win32/win32.rc) 19 | target_link_libraries(avcamera Qt5::Widgets videomgr) 20 | -------------------------------------------------------------------------------- /gui/qt5/avcamera.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | win32.ico 4 | 5 | 6 | -------------------------------------------------------------------------------- /gui/qt5/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | int main(int argc, char* argv[]) 9 | { 10 | QApplication app(argc, argv); 11 | 12 | app.setWindowIcon(QIcon(":/icon/AVCamera.ico")); 13 | 14 | MainWindow w; 15 | w.show(); 16 | 17 | return app.exec(); 18 | } 19 | -------------------------------------------------------------------------------- /gui/qt5/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include "mainwindow.hpp" 7 | 8 | Q_DECLARE_METATYPE(QImage); 9 | Q_DECLARE_METATYPE(QSharedPointer); 10 | 11 | 12 | MainWindow::MainWindow(QWidget *parent) 13 | : QMainWindow(parent) 14 | { 15 | ui.setupUi(this); 16 | 17 | // ui.video_frame->setAttribute(Qt::WA_PaintOnScreen); 18 | // ui.video_frame->setAttribute(Qt::WA_StaticContents); 19 | 20 | connect(this, &MainWindow::video_updated, this, &MainWindow::onvideo_updated, Qt::QueuedConnection); 21 | 22 | _camera.refresh_sign.connect(boost::bind(&MainWindow::video_updated, this)); 23 | 24 | } 25 | 26 | MainWindow::~MainWindow() 27 | { 28 | _camera.stop(); 29 | _camera.exit(); 30 | } 31 | 32 | void MainWindow::changeEvent(QEvent *e) 33 | { 34 | QMainWindow::changeEvent(e); 35 | switch (e->type()) 36 | { 37 | case QEvent::LanguageChange: 38 | ui.retranslateUi(this); 39 | break; 40 | default: 41 | break; 42 | } 43 | } 44 | 45 | void MainWindow::on_startButton_clicked() 46 | { 47 | _camera.start("test.mp4", 720, 400, 1815484); 48 | } 49 | 50 | void MainWindow::on_stopButton_clicked() 51 | { 52 | _camera.stop(); 53 | } 54 | 55 | void MainWindow::on_pauseButton_clicked() 56 | { 57 | _camera.pause(); 58 | } 59 | 60 | void MainWindow::onvideo_updated() 61 | { 62 | cv::Mat mat; 63 | _camera.get_curr_frame(mat); 64 | if(mat.data == nullptr) return; 65 | 66 | QImage img((uchar*) mat.data, mat.cols, mat.rows, mat.step, QImage::Format_RGB888); 67 | 68 | ui.video_frame->m_video_image = img.convertToFormat(QImage::Format_ARGB32); 69 | 70 | ui.video_frame->update(); 71 | } 72 | -------------------------------------------------------------------------------- /gui/qt5/mainwindow.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "ui_mainwindow.h" 4 | #include "camera.hpp" 5 | 6 | class MainWindow : public QMainWindow 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | explicit MainWindow(QWidget *parent = 0); 12 | ~MainWindow(); 13 | 14 | protected: 15 | void changeEvent(QEvent *e); 16 | 17 | private Q_SLOTS: 18 | void on_startButton_clicked(); 19 | 20 | void on_stopButton_clicked(); 21 | 22 | void on_pauseButton_clicked(); 23 | 24 | void onvideo_updated(); 25 | 26 | Q_SIGNALS: 27 | void video_updated(); 28 | 29 | private: 30 | Ui::MainWindow ui; 31 | VideoMgr::Camera _camera; 32 | }; 33 | -------------------------------------------------------------------------------- /gui/qt5/qvideowidget.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "qvideowidget.hpp" 4 | 5 | QVideoWidget::QVideoWidget(QWidget* parent) 6 | : QWidget(parent) 7 | { 8 | 9 | } 10 | 11 | void QVideoWidget::paintEvent(QPaintEvent* e) 12 | { 13 | QPainter dc(this); 14 | 15 | auto _size = size(); 16 | QRect r; 17 | 18 | r.setTop(0); 19 | r.setBottom(_size.height()); 20 | r.setLeft(0); 21 | r.setRight(_size.width()); 22 | 23 | dc.drawImage(r, m_video_image); 24 | 25 | e->accept(); 26 | } 27 | -------------------------------------------------------------------------------- /gui/qt5/qvideowidget.hpp: -------------------------------------------------------------------------------- 1 | #ifndef QVIDEOWIDGET_H 2 | #define QVIDEOWIDGET_H 3 | 4 | #include 5 | 6 | class QVideoWidget : public QWidget 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | QVideoWidget(QWidget* parent); 12 | 13 | QImage m_video_image; 14 | 15 | private: 16 | 17 | virtual void paintEvent(QPaintEvent*); 18 | }; 19 | 20 | #endif // QVIDEOWIDGET_H 21 | -------------------------------------------------------------------------------- /gui/qt5/win32.ico: -------------------------------------------------------------------------------- 1 | ../win32/res/win32.ico -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavcodec/dxva2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DXVA2 HW acceleration 3 | * 4 | * copyright (c) 2009 Laurent Aimar 5 | * 6 | * This file is part of FFmpeg. 7 | * 8 | * FFmpeg is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * FFmpeg is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with FFmpeg; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef AVCODEC_DXVA_H 24 | #define AVCODEC_DXVA_H 25 | 26 | /** 27 | * @file 28 | * @ingroup lavc_codec_hwaccel_dxva2 29 | * Public libavcodec DXVA2 header. 30 | */ 31 | 32 | #if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600 33 | #undef _WIN32_WINNT 34 | #define _WIN32_WINNT 0x0600 35 | #endif 36 | 37 | #include 38 | #include 39 | #include 40 | 41 | /** 42 | * @defgroup lavc_codec_hwaccel_dxva2 DXVA2 43 | * @ingroup lavc_codec_hwaccel 44 | * 45 | * @{ 46 | */ 47 | 48 | #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards 49 | #define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for DXVA2 and old Intel GPUs with ClearVideo interface 50 | 51 | /** 52 | * This structure is used to provides the necessary configurations and data 53 | * to the DXVA2 FFmpeg HWAccel implementation. 54 | * 55 | * The application must make it available as AVCodecContext.hwaccel_context. 56 | */ 57 | struct dxva_context { 58 | /** 59 | * DXVA2 decoder object 60 | */ 61 | IDirectXVideoDecoder *decoder; 62 | 63 | /** 64 | * DXVA2 configuration used to create the decoder 65 | */ 66 | const DXVA2_ConfigPictureDecode *cfg; 67 | 68 | /** 69 | * The number of surface in the surface array 70 | */ 71 | unsigned surface_count; 72 | 73 | /** 74 | * The array of Direct3D surfaces used to create the decoder 75 | */ 76 | LPDIRECT3DSURFACE9 *surface; 77 | 78 | /** 79 | * A bit field configuring the workarounds needed for using the decoder 80 | */ 81 | uint64_t workaround; 82 | 83 | /** 84 | * Private to the FFmpeg AVHWAccel implementation 85 | */ 86 | unsigned report_id; 87 | }; 88 | 89 | /** 90 | * @} 91 | */ 92 | 93 | #endif /* AVCODEC_DXVA_H */ 94 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavcodec/vorbis_parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of FFmpeg. 4 | * 5 | * FFmpeg is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * FFmpeg is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with FFmpeg; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | /** 21 | * @file 22 | * A public API for Vorbis parsing 23 | * 24 | * Determines the duration for each packet. 25 | */ 26 | 27 | #ifndef AVCODEC_VORBIS_PARSE_H 28 | #define AVCODEC_VORBIS_PARSE_H 29 | 30 | #include 31 | 32 | typedef struct AVVorbisParseContext AVVorbisParseContext; 33 | 34 | /** 35 | * Allocate and initialize the Vorbis parser using headers in the extradata. 36 | * 37 | * @param avctx codec context 38 | * @param s Vorbis parser context 39 | */ 40 | AVVorbisParseContext *av_vorbis_parse_init(const uint8_t *extradata, 41 | int extradata_size); 42 | 43 | /** 44 | * Free the parser and everything associated with it. 45 | */ 46 | void av_vorbis_parse_free(AVVorbisParseContext **s); 47 | 48 | #define VORBIS_FLAG_HEADER 0x00000001 49 | #define VORBIS_FLAG_COMMENT 0x00000002 50 | 51 | /** 52 | * Get the duration for a Vorbis packet. 53 | * 54 | * If @p flags is @c NULL, 55 | * special frames are considered invalid. 56 | * 57 | * @param s Vorbis parser context 58 | * @param buf buffer containing a Vorbis frame 59 | * @param buf_size size of the buffer 60 | * @param flags flags for special frames 61 | */ 62 | int av_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf, 63 | int buf_size, int *flags); 64 | 65 | /** 66 | * Get the duration for a Vorbis packet. 67 | * 68 | * @param s Vorbis parser context 69 | * @param buf buffer containing a Vorbis frame 70 | * @param buf_size size of the buffer 71 | */ 72 | int av_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf, 73 | int buf_size); 74 | 75 | void av_vorbis_parse_reset(AVVorbisParseContext *s); 76 | 77 | #endif /* AVCODEC_VORBIS_PARSE_H */ 78 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavdevice/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVDEVICE_VERSION_H 20 | #define AVDEVICE_VERSION_H 21 | 22 | /** 23 | * @file 24 | * @ingroup lavd 25 | * Libavdevice version macros 26 | */ 27 | 28 | #include "libavutil/version.h" 29 | 30 | #define LIBAVDEVICE_VERSION_MAJOR 56 31 | #define LIBAVDEVICE_VERSION_MINOR 3 32 | #define LIBAVDEVICE_VERSION_MICRO 100 33 | 34 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ 35 | LIBAVDEVICE_VERSION_MINOR, \ 36 | LIBAVDEVICE_VERSION_MICRO) 37 | #define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \ 38 | LIBAVDEVICE_VERSION_MINOR, \ 39 | LIBAVDEVICE_VERSION_MICRO) 40 | #define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT 41 | 42 | #define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION) 43 | 44 | /** 45 | * FF_API_* defines may be placed below to indicate public API that will be 46 | * dropped at a future version bump. The defines themselves are not part of 47 | * the public API and may change, break or disappear at any time. 48 | */ 49 | 50 | #endif /* AVDEVICE_VERSION_H */ 51 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavfilter/avcodec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVFILTER_AVCODEC_H 20 | #define AVFILTER_AVCODEC_H 21 | 22 | /** 23 | * @file 24 | * libavcodec/libavfilter gluing utilities 25 | * 26 | * This should be included in an application ONLY if the installed 27 | * libavfilter has been compiled with libavcodec support, otherwise 28 | * symbols defined below will not be available. 29 | */ 30 | 31 | #include "avfilter.h" 32 | 33 | #if FF_API_AVFILTERBUFFER 34 | /** 35 | * Create and return a picref reference from the data and properties 36 | * contained in frame. 37 | * 38 | * @param perms permissions to assign to the new buffer reference 39 | * @deprecated avfilter APIs work natively with AVFrame instead. 40 | */ 41 | attribute_deprecated 42 | AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms); 43 | 44 | 45 | /** 46 | * Create and return a picref reference from the data and properties 47 | * contained in frame. 48 | * 49 | * @param perms permissions to assign to the new buffer reference 50 | * @deprecated avfilter APIs work natively with AVFrame instead. 51 | */ 52 | attribute_deprecated 53 | AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame, 54 | int perms); 55 | 56 | /** 57 | * Create and return a buffer reference from the data and properties 58 | * contained in frame. 59 | * 60 | * @param perms permissions to assign to the new buffer reference 61 | * @deprecated avfilter APIs work natively with AVFrame instead. 62 | */ 63 | attribute_deprecated 64 | AVFilterBufferRef *avfilter_get_buffer_ref_from_frame(enum AVMediaType type, 65 | const AVFrame *frame, 66 | int perms); 67 | #endif 68 | 69 | #endif /* AVFILTER_AVCODEC_H */ 70 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavfilter/avfiltergraph.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Filter graphs 3 | * copyright (c) 2007 Bobby Bingham 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVFILTER_AVFILTERGRAPH_H 23 | #define AVFILTER_AVFILTERGRAPH_H 24 | 25 | #include "avfilter.h" 26 | #include "libavutil/log.h" 27 | 28 | #endif /* AVFILTER_AVFILTERGRAPH_H */ 29 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavfilter/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVFILTER_VERSION_H 22 | #define AVFILTER_VERSION_H 23 | 24 | /** 25 | * @file 26 | * @ingroup lavfi 27 | * Libavfilter version macros 28 | */ 29 | 30 | #include "libavutil/version.h" 31 | 32 | #define LIBAVFILTER_VERSION_MAJOR 5 33 | #define LIBAVFILTER_VERSION_MINOR 2 34 | #define LIBAVFILTER_VERSION_MICRO 103 35 | 36 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ 37 | LIBAVFILTER_VERSION_MINOR, \ 38 | LIBAVFILTER_VERSION_MICRO) 39 | #define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, \ 40 | LIBAVFILTER_VERSION_MINOR, \ 41 | LIBAVFILTER_VERSION_MICRO) 42 | #define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT 43 | 44 | #define LIBAVFILTER_IDENT "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION) 45 | 46 | /** 47 | * FF_API_* defines may be placed below to indicate public API that will be 48 | * dropped at a future version bump. The defines themselves are not part of 49 | * the public API and may change, break or disappear at any time. 50 | */ 51 | 52 | #ifndef FF_API_AVFILTERPAD_PUBLIC 53 | #define FF_API_AVFILTERPAD_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 6) 54 | #endif 55 | #ifndef FF_API_FOO_COUNT 56 | #define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 6) 57 | #endif 58 | #ifndef FF_API_AVFILTERBUFFER 59 | #define FF_API_AVFILTERBUFFER (LIBAVFILTER_VERSION_MAJOR < 6) 60 | #endif 61 | #ifndef FF_API_OLD_FILTER_OPTS 62 | #define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 6) 63 | #endif 64 | #ifndef FF_API_AVFILTER_OPEN 65 | #define FF_API_AVFILTER_OPEN (LIBAVFILTER_VERSION_MAJOR < 6) 66 | #endif 67 | #ifndef FF_API_AVFILTER_INIT_FILTER 68 | #define FF_API_AVFILTER_INIT_FILTER (LIBAVFILTER_VERSION_MAJOR < 6) 69 | #endif 70 | #ifndef FF_API_OLD_FILTER_REGISTER 71 | #define FF_API_OLD_FILTER_REGISTER (LIBAVFILTER_VERSION_MAJOR < 6) 72 | #endif 73 | #ifndef FF_API_OLD_GRAPH_PARSE 74 | #define FF_API_OLD_GRAPH_PARSE (LIBAVFILTER_VERSION_MAJOR < 5) 75 | #endif 76 | #ifndef FF_API_NOCONST_GET_NAME 77 | #define FF_API_NOCONST_GET_NAME (LIBAVFILTER_VERSION_MAJOR < 6) 78 | #endif 79 | 80 | #endif /* AVFILTER_VERSION_H */ 81 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavformat/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVFORMAT_VERSION_H 22 | #define AVFORMAT_VERSION_H 23 | 24 | /** 25 | * @file 26 | * @ingroup libavf 27 | * Libavformat version macros 28 | */ 29 | 30 | #include "libavutil/version.h" 31 | 32 | #define LIBAVFORMAT_VERSION_MAJOR 56 33 | #define LIBAVFORMAT_VERSION_MINOR 15 34 | #define LIBAVFORMAT_VERSION_MICRO 100 35 | 36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ 37 | LIBAVFORMAT_VERSION_MINOR, \ 38 | LIBAVFORMAT_VERSION_MICRO) 39 | #define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \ 40 | LIBAVFORMAT_VERSION_MINOR, \ 41 | LIBAVFORMAT_VERSION_MICRO) 42 | #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT 43 | 44 | #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) 45 | 46 | /** 47 | * FF_API_* defines may be placed below to indicate public API that will be 48 | * dropped at a future version bump. The defines themselves are not part of 49 | * the public API and may change, break or disappear at any time. 50 | */ 51 | #ifndef FF_API_LAVF_BITEXACT 52 | #define FF_API_LAVF_BITEXACT (LIBAVFORMAT_VERSION_MAJOR < 57) 53 | #endif 54 | #ifndef FF_API_LAVF_FRAC 55 | #define FF_API_LAVF_FRAC (LIBAVFORMAT_VERSION_MAJOR < 57) 56 | #endif 57 | #ifndef FF_API_LAVF_CODEC_TB 58 | #define FF_API_LAVF_CODEC_TB (LIBAVFORMAT_VERSION_MAJOR < 57) 59 | #endif 60 | #ifndef FF_API_URL_FEOF 61 | #define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57) 62 | #endif 63 | 64 | #ifndef FF_API_R_FRAME_RATE 65 | #define FF_API_R_FRAME_RATE 1 66 | #endif 67 | #endif /* AVFORMAT_VERSION_H */ 68 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/adler32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Mans Rullgard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_ADLER32_H 22 | #define AVUTIL_ADLER32_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | /** 28 | * @file 29 | * Public header for libavutil Adler32 hasher 30 | * 31 | * @defgroup lavu_adler32 Adler32 32 | * @ingroup lavu_crypto 33 | * @{ 34 | */ 35 | 36 | /** 37 | * Calculate the Adler32 checksum of a buffer. 38 | * 39 | * Passing the return value to a subsequent av_adler32_update() call 40 | * allows the checksum of multiple buffers to be calculated as though 41 | * they were concatenated. 42 | * 43 | * @param adler initial checksum value 44 | * @param buf pointer to input buffer 45 | * @param len size of input buffer 46 | * @return updated checksum 47 | */ 48 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, 49 | unsigned int len) av_pure; 50 | 51 | /** 52 | * @} 53 | */ 54 | 55 | #endif /* AVUTIL_ADLER32_H */ 56 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2007 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_AES_H 22 | #define AVUTIL_AES_H 23 | 24 | #include 25 | 26 | #include "attributes.h" 27 | #include "version.h" 28 | 29 | /** 30 | * @defgroup lavu_aes AES 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | extern const int av_aes_size; 36 | 37 | struct AVAES; 38 | 39 | /** 40 | * Allocate an AVAES context. 41 | */ 42 | struct AVAES *av_aes_alloc(void); 43 | 44 | /** 45 | * Initialize an AVAES context. 46 | * @param key_bits 128, 192 or 256 47 | * @param decrypt 0 for encryption, 1 for decryption 48 | */ 49 | int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt); 50 | 51 | /** 52 | * Encrypt or decrypt a buffer using a previously initialized context. 53 | * @param count number of 16 byte blocks 54 | * @param dst destination array, can be equal to src 55 | * @param src source array, can be equal to dst 56 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 57 | * @param decrypt 0 for encryption, 1 for decryption 58 | */ 59 | void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | #endif /* AVUTIL_AES_H */ 66 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/audioconvert.h: -------------------------------------------------------------------------------- 1 | 2 | #include "version.h" 3 | 4 | #if FF_API_AUDIOCONVERT 5 | #include "channel_layout.h" 6 | #endif 7 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/avassert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2010 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /** 22 | * @file 23 | * simple assert() macros that are a bit more flexible than ISO C assert(). 24 | * @author Michael Niedermayer 25 | */ 26 | 27 | #ifndef AVUTIL_AVASSERT_H 28 | #define AVUTIL_AVASSERT_H 29 | 30 | #include 31 | #include "avutil.h" 32 | #include "log.h" 33 | 34 | /** 35 | * assert() equivalent, that is always enabled. 36 | */ 37 | #define av_assert0(cond) do { \ 38 | if (!(cond)) { \ 39 | av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n", \ 40 | AV_STRINGIFY(cond), __FILE__, __LINE__); \ 41 | abort(); \ 42 | } \ 43 | } while (0) 44 | 45 | 46 | /** 47 | * assert() equivalent, that does not lie in speed critical code. 48 | * These asserts() thus can be enabled without fearing speedloss. 49 | */ 50 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0 51 | #define av_assert1(cond) av_assert0(cond) 52 | #else 53 | #define av_assert1(cond) ((void)0) 54 | #endif 55 | 56 | 57 | /** 58 | * assert() equivalent, that does lie in speed critical code. 59 | */ 60 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1 61 | #define av_assert2(cond) av_assert0(cond) 62 | #else 63 | #define av_assert2(cond) ((void)0) 64 | #endif 65 | 66 | #endif /* AVUTIL_AVASSERT_H */ 67 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/avconfig.h: -------------------------------------------------------------------------------- 1 | /* Generated by ffconf */ 2 | #ifndef AVUTIL_AVCONFIG_H 3 | #define AVUTIL_AVCONFIG_H 4 | #define AV_HAVE_BIGENDIAN 0 5 | #define AV_HAVE_FAST_UNALIGNED 1 6 | #define AV_HAVE_INCOMPATIBLE_LIBAV_ABI 0 7 | #endif /* AVUTIL_AVCONFIG_H */ 8 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_BASE64_H 22 | #define AVUTIL_BASE64_H 23 | 24 | #include 25 | 26 | /** 27 | * @defgroup lavu_base64 Base64 28 | * @ingroup lavu_crypto 29 | * @{ 30 | */ 31 | 32 | 33 | /** 34 | * Decode a base64-encoded string. 35 | * 36 | * @param out buffer for decoded data 37 | * @param in null-terminated input string 38 | * @param out_size size in bytes of the out buffer, must be at 39 | * least 3/4 of the length of in 40 | * @return number of bytes written, or a negative value in case of 41 | * invalid input 42 | */ 43 | int av_base64_decode(uint8_t *out, const char *in, int out_size); 44 | 45 | /** 46 | * Encode data to base64 and null-terminate. 47 | * 48 | * @param out buffer for encoded data 49 | * @param out_size size in bytes of the out buffer (including the 50 | * null terminator), must be at least AV_BASE64_SIZE(in_size) 51 | * @param in input buffer containing the data to encode 52 | * @param in_size size in bytes of the in buffer 53 | * @return out or NULL in case of error 54 | */ 55 | char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size); 56 | 57 | /** 58 | * Calculate the output size needed to base64-encode x bytes to a 59 | * null-terminated string. 60 | */ 61 | #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1) 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | #endif /* AVUTIL_BASE64_H */ 68 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/blowfish.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Blowfish algorithm 3 | * Copyright (c) 2012 Samuel Pitoiset 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_BLOWFISH_H 23 | #define AVUTIL_BLOWFISH_H 24 | 25 | #include 26 | 27 | /** 28 | * @defgroup lavu_blowfish Blowfish 29 | * @ingroup lavu_crypto 30 | * @{ 31 | */ 32 | 33 | #define AV_BF_ROUNDS 16 34 | 35 | typedef struct AVBlowfish { 36 | uint32_t p[AV_BF_ROUNDS + 2]; 37 | uint32_t s[4][256]; 38 | } AVBlowfish; 39 | 40 | /** 41 | * Initialize an AVBlowfish context. 42 | * 43 | * @param ctx an AVBlowfish context 44 | * @param key a key 45 | * @param key_len length of the key 46 | */ 47 | void av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len); 48 | 49 | /** 50 | * Encrypt or decrypt a buffer using a previously initialized context. 51 | * 52 | * @param ctx an AVBlowfish context 53 | * @param xl left four bytes halves of input to be encrypted 54 | * @param xr right four bytes halves of input to be encrypted 55 | * @param decrypt 0 for encryption, 1 for decryption 56 | */ 57 | void av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr, 58 | int decrypt); 59 | 60 | /** 61 | * Encrypt or decrypt a buffer using a previously initialized context. 62 | * 63 | * @param ctx an AVBlowfish context 64 | * @param dst destination array, can be equal to src 65 | * @param src source array, can be equal to dst 66 | * @param count number of 8 byte blocks 67 | * @param iv initialization vector for CBC mode, if NULL ECB will be used 68 | * @param decrypt 0 for encryption, 1 for decryption 69 | */ 70 | void av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src, 71 | int count, uint8_t *iv, int decrypt); 72 | 73 | /** 74 | * @} 75 | */ 76 | 77 | #endif /* AVUTIL_BLOWFISH_H */ 78 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/cast5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * An implementation of the CAST128 algorithm as mentioned in RFC2144 3 | * Copyright (c) 2014 Supraja Meedinti 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_CAST5_H 23 | #define AVUTIL_CAST5_H 24 | 25 | #include 26 | 27 | 28 | /** 29 | * @file 30 | * @brief Public header for libavutil CAST5 algorithm 31 | * @defgroup lavu_cast5 CAST5 32 | * @ingroup lavu_crypto 33 | * @{ 34 | */ 35 | 36 | extern const int av_cast5_size; 37 | 38 | struct AVCAST5; 39 | 40 | /** 41 | * Allocate an AVCAST5 context 42 | * To free the struct: av_free(ptr) 43 | */ 44 | struct AVCAST5 *av_cast5_alloc(void); 45 | /** 46 | * Initialize an AVCAST5 context. 47 | * 48 | * @param ctx an AVCAST5 context 49 | * @param key a key of 5,6,...16 bytes used for encryption/decryption 50 | * @param key_bits number of keybits: possible are 40,48,...,128 51 | */ 52 | int av_cast5_init(struct AVCAST5 *ctx, const uint8_t *key, int key_bits); 53 | 54 | /** 55 | * Encrypt or decrypt a buffer using a previously initialized context 56 | * 57 | * @param ctx an AVCAST5 context 58 | * @param dst destination array, can be equal to src 59 | * @param src source array, can be equal to dst 60 | * @param count number of 8 byte blocks 61 | * @param decrypt 0 for encryption, 1 for decryption 62 | */ 63 | void av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count,int decrypt); 64 | /** 65 | * @} 66 | */ 67 | #endif /* AVUTIL_CAST5_H */ 68 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/crc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_CRC_H 22 | #define AVUTIL_CRC_H 23 | 24 | #include 25 | #include 26 | #include "attributes.h" 27 | 28 | /** 29 | * @defgroup lavu_crc32 CRC32 30 | * @ingroup lavu_crypto 31 | * @{ 32 | */ 33 | 34 | typedef uint32_t AVCRC; 35 | 36 | typedef enum { 37 | AV_CRC_8_ATM, 38 | AV_CRC_16_ANSI, 39 | AV_CRC_16_CCITT, 40 | AV_CRC_32_IEEE, 41 | AV_CRC_32_IEEE_LE, /*< reversed bitorder version of AV_CRC_32_IEEE */ 42 | AV_CRC_16_ANSI_LE, /*< reversed bitorder version of AV_CRC_16_ANSI */ 43 | AV_CRC_24_IEEE = 12, 44 | AV_CRC_MAX, /*< Not part of public API! Do not use outside libavutil. */ 45 | }AVCRCId; 46 | 47 | /** 48 | * Initialize a CRC table. 49 | * @param ctx must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024 50 | * @param le If 1, the lowest bit represents the coefficient for the highest 51 | * exponent of the corresponding polynomial (both for poly and 52 | * actual CRC). 53 | * If 0, you must swap the CRC parameter and the result of av_crc 54 | * if you need the standard representation (can be simplified in 55 | * most cases to e.g. bswap16): 56 | * av_bswap32(crc << (32-bits)) 57 | * @param bits number of bits for the CRC 58 | * @param poly generator polynomial without the x**bits coefficient, in the 59 | * representation as specified by le 60 | * @param ctx_size size of ctx in bytes 61 | * @return <0 on failure 62 | */ 63 | int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size); 64 | 65 | /** 66 | * Get an initialized standard CRC table. 67 | * @param crc_id ID of a standard CRC 68 | * @return a pointer to the CRC table or NULL on failure 69 | */ 70 | const AVCRC *av_crc_get_table(AVCRCId crc_id); 71 | 72 | /** 73 | * Calculate the CRC of a block. 74 | * @param crc CRC of previous blocks if any or initial value for CRC 75 | * @return CRC updated with the data from the given block 76 | * 77 | * @see av_crc_init() "le" parameter 78 | */ 79 | uint32_t av_crc(const AVCRC *ctx, uint32_t crc, 80 | const uint8_t *buffer, size_t length) av_pure; 81 | 82 | /** 83 | * @} 84 | */ 85 | 86 | #endif /* AVUTIL_CRC_H */ 87 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/ffversion.h: -------------------------------------------------------------------------------- 1 | #ifndef AVUTIL_FFVERSION_H 2 | #define AVUTIL_FFVERSION_H 3 | #define FFMPEG_VERSION "N-67886-g08d81d0" 4 | #endif /* AVUTIL_FFVERSION_H */ 5 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_FILE_H 20 | #define AVUTIL_FILE_H 21 | 22 | #include 23 | 24 | #include "avutil.h" 25 | 26 | /** 27 | * @file 28 | * Misc file utilities. 29 | */ 30 | 31 | /** 32 | * Read the file with name filename, and put its content in a newly 33 | * allocated buffer or map it with mmap() when available. 34 | * In case of success set *bufptr to the read or mmapped buffer, and 35 | * *size to the size in bytes of the buffer in *bufptr. 36 | * The returned buffer must be released with av_file_unmap(). 37 | * 38 | * @param log_offset loglevel offset used for logging 39 | * @param log_ctx context used for logging 40 | * @return a non negative number in case of success, a negative value 41 | * corresponding to an AVERROR error code in case of failure 42 | */ 43 | int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, 44 | int log_offset, void *log_ctx); 45 | 46 | /** 47 | * Unmap or free the buffer bufptr created by av_file_map(). 48 | * 49 | * @param size size in bytes of bufptr, must be the same as returned 50 | * by av_file_map() 51 | */ 52 | void av_file_unmap(uint8_t *bufptr, size_t size); 53 | 54 | /** 55 | * Wrapper to work around the lack of mkstemp() on mingw. 56 | * Also, tries to create file in /tmp first, if possible. 57 | * *prefix can be a character constant; *filename will be allocated internally. 58 | * @return file descriptor of opened file (or -1 on error) 59 | * and opened file name in **filename. 60 | * @note On very old libcs it is necessary to set a secure umask before 61 | * calling this, av_tempfile() can't call umask itself as it is used in 62 | * libraries and could interfere with the calling application. 63 | */ 64 | int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx); 65 | 66 | #endif /* AVUTIL_FILE_H */ 67 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/intfloat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Mans Rullgard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_INTFLOAT_H 22 | #define AVUTIL_INTFLOAT_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | union av_intfloat32 { 28 | uint32_t i; 29 | float f; 30 | }; 31 | 32 | union av_intfloat64 { 33 | uint64_t i; 34 | double f; 35 | }; 36 | 37 | /** 38 | * Reinterpret a 32-bit integer as a float. 39 | */ 40 | static av_always_inline float av_int2float(uint32_t i) 41 | { 42 | union av_intfloat32 v; 43 | v.i = i; 44 | return v.f; 45 | } 46 | 47 | /** 48 | * Reinterpret a float as a 32-bit integer. 49 | */ 50 | static av_always_inline uint32_t av_float2int(float f) 51 | { 52 | union av_intfloat32 v; 53 | v.f = f; 54 | return v.i; 55 | } 56 | 57 | /** 58 | * Reinterpret a 64-bit integer as a double. 59 | */ 60 | static av_always_inline double av_int2double(uint64_t i) 61 | { 62 | union av_intfloat64 v; 63 | v.i = i; 64 | return v.f; 65 | } 66 | 67 | /** 68 | * Reinterpret a double as a 64-bit integer. 69 | */ 70 | static av_always_inline uint64_t av_double2int(double f) 71 | { 72 | union av_intfloat64 v; 73 | v.f = f; 74 | return v.i; 75 | } 76 | 77 | #endif /* AVUTIL_INTFLOAT_H */ 78 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/lfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Lagged Fibonacci PRNG 3 | * Copyright (c) 2008 Michael Niedermayer 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_LFG_H 23 | #define AVUTIL_LFG_H 24 | 25 | typedef struct AVLFG { 26 | unsigned int state[64]; 27 | int index; 28 | } AVLFG; 29 | 30 | void av_lfg_init(AVLFG *c, unsigned int seed); 31 | 32 | /** 33 | * Get the next random unsigned 32-bit number using an ALFG. 34 | * 35 | * Please also consider a simple LCG like state= state*1664525+1013904223, 36 | * it may be good enough and faster for your specific use case. 37 | */ 38 | static inline unsigned int av_lfg_get(AVLFG *c){ 39 | c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63]; 40 | return c->state[c->index++ & 63]; 41 | } 42 | 43 | /** 44 | * Get the next random unsigned 32-bit number using a MLFG. 45 | * 46 | * Please also consider av_lfg_get() above, it is faster. 47 | */ 48 | static inline unsigned int av_mlfg_get(AVLFG *c){ 49 | unsigned int a= c->state[(c->index-55) & 63]; 50 | unsigned int b= c->state[(c->index-24) & 63]; 51 | return c->state[c->index++ & 63] = 2*a*b+a+b; 52 | } 53 | 54 | /** 55 | * Get the next two numbers generated by a Box-Muller Gaussian 56 | * generator using the random numbers issued by lfg. 57 | * 58 | * @param out array where the two generated numbers are placed 59 | */ 60 | void av_bmg_get(AVLFG *lfg, double out[2]); 61 | 62 | #endif /* AVUTIL_LFG_H */ 63 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/lzo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LZO 1x decompression 3 | * copyright (c) 2006 Reimar Doeffinger 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_LZO_H 23 | #define AVUTIL_LZO_H 24 | 25 | /** 26 | * @defgroup lavu_lzo LZO 27 | * @ingroup lavu_crypto 28 | * 29 | * @{ 30 | */ 31 | 32 | #include 33 | 34 | /** @name Error flags returned by av_lzo1x_decode 35 | * @{ */ 36 | /// end of the input buffer reached before decoding finished 37 | #define AV_LZO_INPUT_DEPLETED 1 38 | /// decoded data did not fit into output buffer 39 | #define AV_LZO_OUTPUT_FULL 2 40 | /// a reference to previously decoded data was wrong 41 | #define AV_LZO_INVALID_BACKPTR 4 42 | /// a non-specific error in the compressed bitstream 43 | #define AV_LZO_ERROR 8 44 | /** @} */ 45 | 46 | #define AV_LZO_INPUT_PADDING 8 47 | #define AV_LZO_OUTPUT_PADDING 12 48 | 49 | /** 50 | * @brief Decodes LZO 1x compressed data. 51 | * @param out output buffer 52 | * @param outlen size of output buffer, number of bytes left are returned here 53 | * @param in input buffer 54 | * @param inlen size of input buffer, number of bytes left are returned here 55 | * @return 0 on success, otherwise a combination of the error flags above 56 | * 57 | * Make sure all buffers are appropriately padded, in must provide 58 | * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes. 59 | */ 60 | int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen); 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | #endif /* AVUTIL_LZO_H */ 67 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/macros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | /** 20 | * @file 21 | * @ingroup lavu 22 | * Utility Preprocessor macros 23 | */ 24 | 25 | #ifndef AVUTIL_MACROS_H 26 | #define AVUTIL_MACROS_H 27 | 28 | /** 29 | * @addtogroup preproc_misc Preprocessor String Macros 30 | * 31 | * String manipulation macros 32 | * 33 | * @{ 34 | */ 35 | 36 | #define AV_STRINGIFY(s) AV_TOSTRING(s) 37 | #define AV_TOSTRING(s) #s 38 | 39 | #define AV_GLUE(a, b) a ## b 40 | #define AV_JOIN(a, b) AV_GLUE(a, b) 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | #define AV_PRAGMA(s) _Pragma(#s) 47 | 48 | #endif /* AVUTIL_MACROS_H */ 49 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_MD5_H 22 | #define AVUTIL_MD5_H 23 | 24 | #include 25 | 26 | #include "attributes.h" 27 | #include "version.h" 28 | 29 | /** 30 | * @defgroup lavu_md5 MD5 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | extern const int av_md5_size; 36 | 37 | struct AVMD5; 38 | 39 | /** 40 | * Allocate an AVMD5 context. 41 | */ 42 | struct AVMD5 *av_md5_alloc(void); 43 | 44 | /** 45 | * Initialize MD5 hashing. 46 | * 47 | * @param ctx pointer to the function context (of size av_md5_size) 48 | */ 49 | void av_md5_init(struct AVMD5 *ctx); 50 | 51 | /** 52 | * Update hash value. 53 | * 54 | * @param ctx hash function context 55 | * @param src input data to update hash with 56 | * @param len input data length 57 | */ 58 | void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, int len); 59 | 60 | /** 61 | * Finish hashing and output digest value. 62 | * 63 | * @param ctx hash function context 64 | * @param dst buffer where output digest value is stored 65 | */ 66 | void av_md5_final(struct AVMD5 *ctx, uint8_t *dst); 67 | 68 | /** 69 | * Hash an array of data. 70 | * 71 | * @param dst The output buffer to write the digest into 72 | * @param src The data to hash 73 | * @param len The length of the data, in bytes 74 | */ 75 | void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len); 76 | 77 | /** 78 | * @} 79 | */ 80 | 81 | #endif /* AVUTIL_MD5_H */ 82 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/motion_vector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_MOTION_VECTOR_H 20 | #define AVUTIL_MOTION_VECTOR_H 21 | 22 | #include 23 | 24 | typedef struct AVMotionVector { 25 | /** 26 | * Where the current macroblock comes from; negative value when it comes 27 | * from the past, positive value when it comes from the future. 28 | * XXX: set exact relative ref frame reference instead of a +/- 1 "direction". 29 | */ 30 | int32_t source; 31 | /** 32 | * Width and height of the block. 33 | */ 34 | uint8_t w, h; 35 | /** 36 | * Absolute source position. Can be outside the frame area. 37 | */ 38 | int16_t src_x, src_y; 39 | /** 40 | * Absolute destination position. Can be outside the frame area. 41 | */ 42 | int16_t dst_x, dst_y; 43 | /** 44 | * Extra flag information. 45 | * Currently unused. 46 | */ 47 | uint64_t flags; 48 | } AVMotionVector; 49 | 50 | #endif /* AVUTIL_MOTION_VECTOR_H */ 51 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/murmur3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Reimar Döffinger 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_MURMUR3_H 22 | #define AVUTIL_MURMUR3_H 23 | 24 | #include 25 | 26 | struct AVMurMur3 *av_murmur3_alloc(void); 27 | void av_murmur3_init_seeded(struct AVMurMur3 *c, uint64_t seed); 28 | void av_murmur3_init(struct AVMurMur3 *c); 29 | void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len); 30 | void av_murmur3_final(struct AVMurMur3 *c, uint8_t dst[16]); 31 | 32 | #endif /* AVUTIL_MURMUR3_H */ 33 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/pixelutils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_PIXELUTILS_H 20 | #define AVUTIL_PIXELUTILS_H 21 | 22 | #include 23 | #include 24 | #include "common.h" 25 | 26 | /** 27 | * Sum of abs(src1[x] - src2[x]) 28 | */ 29 | typedef int (*av_pixelutils_sad_fn)(const uint8_t *src1, ptrdiff_t stride1, 30 | const uint8_t *src2, ptrdiff_t stride2); 31 | 32 | /** 33 | * Get a potentially optimized pointer to a Sum-of-absolute-differences 34 | * function (see the av_pixelutils_sad_fn prototype). 35 | * 36 | * @param w_bits 1< 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_RANDOM_SEED_H 22 | #define AVUTIL_RANDOM_SEED_H 23 | 24 | #include 25 | /** 26 | * @addtogroup lavu_crypto 27 | * @{ 28 | */ 29 | 30 | /** 31 | * Get a seed to use in conjunction with random functions. 32 | * This function tries to provide a good seed at a best effort bases. 33 | * Its possible to call this function multiple times if more bits are needed. 34 | * It can be quite slow, which is why it should only be used as seed for a faster 35 | * PRNG. The quality of the seed depends on the platform. 36 | */ 37 | uint32_t av_get_random_seed(void); 38 | 39 | /** 40 | * @} 41 | */ 42 | 43 | #endif /* AVUTIL_RANDOM_SEED_H */ 44 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/replaygain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of FFmpeg. 4 | * 5 | * FFmpeg is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * FFmpeg is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with FFmpeg; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef AVUTIL_REPLAYGAIN_H 21 | #define AVUTIL_REPLAYGAIN_H 22 | 23 | #include 24 | 25 | /** 26 | * ReplayGain information (see 27 | * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification). 28 | * The size of this struct is a part of the public ABI. 29 | */ 30 | typedef struct AVReplayGain { 31 | /** 32 | * Track replay gain in microbels (divide by 100000 to get the value in dB). 33 | * Should be set to INT32_MIN when unknown. 34 | */ 35 | int32_t track_gain; 36 | /** 37 | * Peak track amplitude, with 100000 representing full scale (but values 38 | * may overflow). 0 when unknown. 39 | */ 40 | uint32_t track_peak; 41 | /** 42 | * Same as track_gain, but for the whole album. 43 | */ 44 | int32_t album_gain; 45 | /** 46 | * Same as track_peak, but for the whole album, 47 | */ 48 | uint32_t album_peak; 49 | } AVReplayGain; 50 | 51 | #endif /* AVUTIL_REPLAYGAIN_H */ 52 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/ripemd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Michael Niedermayer 3 | * Copyright (C) 2013 James Almer 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_RIPEMD_H 23 | #define AVUTIL_RIPEMD_H 24 | 25 | #include 26 | 27 | #include "attributes.h" 28 | #include "version.h" 29 | 30 | /** 31 | * @defgroup lavu_ripemd RIPEMD 32 | * @ingroup lavu_crypto 33 | * @{ 34 | */ 35 | 36 | extern const int av_ripemd_size; 37 | 38 | struct AVRIPEMD; 39 | 40 | /** 41 | * Allocate an AVRIPEMD context. 42 | */ 43 | struct AVRIPEMD *av_ripemd_alloc(void); 44 | 45 | /** 46 | * Initialize RIPEMD hashing. 47 | * 48 | * @param context pointer to the function context (of size av_ripemd_size) 49 | * @param bits number of bits in digest (128, 160, 256 or 320 bits) 50 | * @return zero if initialization succeeded, -1 otherwise 51 | */ 52 | int av_ripemd_init(struct AVRIPEMD* context, int bits); 53 | 54 | /** 55 | * Update hash value. 56 | * 57 | * @param context hash function context 58 | * @param data input data to update hash with 59 | * @param len input data length 60 | */ 61 | void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len); 62 | 63 | /** 64 | * Finish hashing and output digest value. 65 | * 66 | * @param context hash function context 67 | * @param digest buffer where output digest value is stored 68 | */ 69 | void av_ripemd_final(struct AVRIPEMD* context, uint8_t *digest); 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | #endif /* AVUTIL_RIPEMD_H */ 76 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/sha.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_SHA_H 22 | #define AVUTIL_SHA_H 23 | 24 | #include 25 | 26 | #include "attributes.h" 27 | #include "version.h" 28 | 29 | /** 30 | * @defgroup lavu_sha SHA 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | extern const int av_sha_size; 36 | 37 | struct AVSHA; 38 | 39 | /** 40 | * Allocate an AVSHA context. 41 | */ 42 | struct AVSHA *av_sha_alloc(void); 43 | 44 | /** 45 | * Initialize SHA-1 or SHA-2 hashing. 46 | * 47 | * @param context pointer to the function context (of size av_sha_size) 48 | * @param bits number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits) 49 | * @return zero if initialization succeeded, -1 otherwise 50 | */ 51 | int av_sha_init(struct AVSHA* context, int bits); 52 | 53 | /** 54 | * Update hash value. 55 | * 56 | * @param context hash function context 57 | * @param data input data to update hash with 58 | * @param len input data length 59 | */ 60 | void av_sha_update(struct AVSHA* context, const uint8_t* data, unsigned int len); 61 | 62 | /** 63 | * Finish hashing and output digest value. 64 | * 65 | * @param context hash function context 66 | * @param digest buffer where output digest value is stored 67 | */ 68 | void av_sha_final(struct AVSHA* context, uint8_t *digest); 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | #endif /* AVUTIL_SHA_H */ 75 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/sha512.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Michael Niedermayer 3 | * Copyright (C) 2013 James Almer 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_SHA512_H 23 | #define AVUTIL_SHA512_H 24 | 25 | #include 26 | 27 | #include "attributes.h" 28 | #include "version.h" 29 | 30 | /** 31 | * @defgroup lavu_sha512 SHA512 32 | * @ingroup lavu_crypto 33 | * @{ 34 | */ 35 | 36 | extern const int av_sha512_size; 37 | 38 | struct AVSHA512; 39 | 40 | /** 41 | * Allocate an AVSHA512 context. 42 | */ 43 | struct AVSHA512 *av_sha512_alloc(void); 44 | 45 | /** 46 | * Initialize SHA-2 512 hashing. 47 | * 48 | * @param context pointer to the function context (of size av_sha512_size) 49 | * @param bits number of bits in digest (224, 256, 384 or 512 bits) 50 | * @return zero if initialization succeeded, -1 otherwise 51 | */ 52 | int av_sha512_init(struct AVSHA512* context, int bits); 53 | 54 | /** 55 | * Update hash value. 56 | * 57 | * @param context hash function context 58 | * @param data input data to update hash with 59 | * @param len input data length 60 | */ 61 | void av_sha512_update(struct AVSHA512* context, const uint8_t* data, unsigned int len); 62 | 63 | /** 64 | * Finish hashing and output digest value. 65 | * 66 | * @param context hash function context 67 | * @param digest buffer where output digest value is stored 68 | */ 69 | void av_sha512_final(struct AVSHA512* context, uint8_t *digest); 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | #endif /* AVUTIL_SHA512_H */ 76 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2003 Fabrice Bellard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_TIME_H 22 | #define AVUTIL_TIME_H 23 | 24 | #include 25 | 26 | /** 27 | * Get the current time in microseconds. 28 | */ 29 | int64_t av_gettime(void); 30 | 31 | /** 32 | * Get the current time in microseconds since some unspecified starting point. 33 | * On platforms that support it, the time comes from a monotonic clock 34 | * This property makes this time source ideal for measuring relative time. 35 | * The returned values may not be monotonic on platforms where a monotonic 36 | * clock is not available. 37 | */ 38 | int64_t av_gettime_relative(void); 39 | 40 | /** 41 | * Indicates with a boolean result if the av_gettime_relative() time source 42 | * is monotonic. 43 | */ 44 | int av_gettime_relative_is_monotonic(void); 45 | 46 | /** 47 | * Sleep for a period of time. Although the duration is expressed in 48 | * microseconds, the actual delay may be rounded to the precision of the 49 | * system timer. 50 | * 51 | * @param usec Number of microseconds to sleep. 52 | * @return zero on success or (negative) error code. 53 | */ 54 | int av_usleep(unsigned usec); 55 | 56 | #endif /* AVUTIL_TIME_H */ 57 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/timestamp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | /** 20 | * @file 21 | * timestamp utils, mostly useful for debugging/logging purposes 22 | */ 23 | 24 | #ifndef AVUTIL_TIMESTAMP_H 25 | #define AVUTIL_TIMESTAMP_H 26 | 27 | #include "common.h" 28 | 29 | #if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) && !defined(PRId64) 30 | #error missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS 31 | #endif 32 | 33 | #define AV_TS_MAX_STRING_SIZE 32 34 | 35 | /** 36 | * Fill the provided buffer with a string containing a timestamp 37 | * representation. 38 | * 39 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE 40 | * @param ts the timestamp to represent 41 | * @return the buffer in input 42 | */ 43 | static inline char *av_ts_make_string(char *buf, int64_t ts) 44 | { 45 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS"); 46 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%"PRId64, ts); 47 | return buf; 48 | } 49 | 50 | /** 51 | * Convenience macro, the return value should be used only directly in 52 | * function arguments but never stand-alone. 53 | */ 54 | #define av_ts2str(ts) av_ts_make_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts) 55 | 56 | /** 57 | * Fill the provided buffer with a string containing a timestamp time 58 | * representation. 59 | * 60 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE 61 | * @param ts the timestamp to represent 62 | * @param tb the timebase of the timestamp 63 | * @return the buffer in input 64 | */ 65 | static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb) 66 | { 67 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS"); 68 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts); 69 | return buf; 70 | } 71 | 72 | /** 73 | * Convenience macro, the return value should be used only directly in 74 | * function arguments but never stand-alone. 75 | */ 76 | #define av_ts2timestr(ts, tb) av_ts_make_time_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts, tb) 77 | 78 | #endif /* AVUTIL_TIMESTAMP_H */ 79 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libavutil/xtea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A 32-bit implementation of the XTEA algorithm 3 | * Copyright (c) 2012 Samuel Pitoiset 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_XTEA_H 23 | #define AVUTIL_XTEA_H 24 | 25 | #include 26 | 27 | /** 28 | * @file 29 | * @brief Public header for libavutil XTEA algorithm 30 | * @defgroup lavu_xtea XTEA 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | typedef struct AVXTEA { 36 | uint32_t key[16]; 37 | } AVXTEA; 38 | 39 | /** 40 | * Initialize an AVXTEA context. 41 | * 42 | * @param ctx an AVXTEA context 43 | * @param key a key of 16 bytes used for encryption/decryption 44 | */ 45 | void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]); 46 | 47 | /** 48 | * Encrypt or decrypt a buffer using a previously initialized context. 49 | * 50 | * @param ctx an AVXTEA context 51 | * @param dst destination array, can be equal to src 52 | * @param src source array, can be equal to dst 53 | * @param count number of 8 byte blocks 54 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 55 | * @param decrypt 0 for encryption, 1 for decryption 56 | */ 57 | void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src, 58 | int count, uint8_t *iv, int decrypt); 59 | 60 | /** 61 | * @} 62 | */ 63 | 64 | #endif /* AVUTIL_XTEA_H */ 65 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libpostproc/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef POSTPROC_POSTPROCESS_VERSION_H 22 | #define POSTPROC_POSTPROCESS_VERSION_H 23 | 24 | /** 25 | * @file 26 | * Libpostproc version macros 27 | */ 28 | 29 | #include "libavutil/avutil.h" 30 | 31 | #define LIBPOSTPROC_VERSION_MAJOR 53 32 | #define LIBPOSTPROC_VERSION_MINOR 3 33 | #define LIBPOSTPROC_VERSION_MICRO 100 34 | 35 | #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ 36 | LIBPOSTPROC_VERSION_MINOR, \ 37 | LIBPOSTPROC_VERSION_MICRO) 38 | #define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \ 39 | LIBPOSTPROC_VERSION_MINOR, \ 40 | LIBPOSTPROC_VERSION_MICRO) 41 | #define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT 42 | 43 | #define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION) 44 | 45 | #endif /* POSTPROC_POSTPROCESS_VERSION_H */ 46 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libswresample/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of libswresample 5 | * 6 | * libswresample is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * libswresample is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with libswresample; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef SWR_VERSION_H 22 | #define SWR_VERSION_H 23 | 24 | /** 25 | * @file 26 | * Libswresample version macros 27 | */ 28 | 29 | #include "libavutil/avutil.h" 30 | 31 | #define LIBSWRESAMPLE_VERSION_MAJOR 1 32 | #define LIBSWRESAMPLE_VERSION_MINOR 1 33 | #define LIBSWRESAMPLE_VERSION_MICRO 100 34 | 35 | #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ 36 | LIBSWRESAMPLE_VERSION_MINOR, \ 37 | LIBSWRESAMPLE_VERSION_MICRO) 38 | #define LIBSWRESAMPLE_VERSION AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \ 39 | LIBSWRESAMPLE_VERSION_MINOR, \ 40 | LIBSWRESAMPLE_VERSION_MICRO) 41 | #define LIBSWRESAMPLE_BUILD LIBSWRESAMPLE_VERSION_INT 42 | 43 | #define LIBSWRESAMPLE_IDENT "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION) 44 | 45 | #endif /* SWR_VERSION_H */ 46 | -------------------------------------------------------------------------------- /third_party/include/ffmpeg/libswscale/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef SWSCALE_VERSION_H 20 | #define SWSCALE_VERSION_H 21 | 22 | /** 23 | * @file 24 | * swscale version macros 25 | */ 26 | 27 | #include "libavutil/version.h" 28 | 29 | #define LIBSWSCALE_VERSION_MAJOR 3 30 | #define LIBSWSCALE_VERSION_MINOR 1 31 | #define LIBSWSCALE_VERSION_MICRO 101 32 | 33 | #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ 34 | LIBSWSCALE_VERSION_MINOR, \ 35 | LIBSWSCALE_VERSION_MICRO) 36 | #define LIBSWSCALE_VERSION AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \ 37 | LIBSWSCALE_VERSION_MINOR, \ 38 | LIBSWSCALE_VERSION_MICRO) 39 | #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT 40 | 41 | #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION) 42 | 43 | /** 44 | * FF_API_* defines may be placed below to indicate public API that will be 45 | * dropped at a future version bump. The defines themselves are not part of 46 | * the public API and may change, break or disappear at any time. 47 | */ 48 | 49 | #ifndef FF_API_SWS_CPU_CAPS 50 | #define FF_API_SWS_CPU_CAPS (LIBSWSCALE_VERSION_MAJOR < 4) 51 | #endif 52 | #ifndef FF_API_ARCH_BFIN 53 | #define FF_API_ARCH_BFIN (LIBSWSCALE_VERSION_MAJOR < 4) 54 | #endif 55 | 56 | #endif /* SWSCALE_VERSION_H */ 57 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/cv.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_OLD_CV_HPP__ 44 | #define __OPENCV_OLD_CV_HPP__ 45 | 46 | //#if defined(__GNUC__) 47 | //#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module" 48 | //#endif 49 | 50 | #include 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/cvaux.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000, Intel Corporation, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of Intel Corporation may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the Intel Corporation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef __OPENCV_OLD_AUX_H__ 43 | #define __OPENCV_OLD_AUX_H__ 44 | 45 | //#if defined(__GNUC__) 46 | //#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module" 47 | //#endif 48 | 49 | #include "opencv2/core/core_c.h" 50 | #include "opencv2/core/core.hpp" 51 | #include "opencv2/imgproc/imgproc_c.h" 52 | #include "opencv2/imgproc/imgproc.hpp" 53 | #include "opencv2/video/tracking.hpp" 54 | #include "opencv2/video/background_segm.hpp" 55 | #include "opencv2/features2d/features2d.hpp" 56 | #include "opencv2/calib3d/calib3d.hpp" 57 | #include "opencv2/objdetect/objdetect.hpp" 58 | #include "opencv2/legacy/legacy.hpp" 59 | #include "opencv2/legacy/compat.hpp" 60 | #include "opencv2/legacy/blobtrack.hpp" 61 | #include "opencv2/contrib/contrib.hpp" 62 | 63 | #endif 64 | 65 | /* End of file. */ 66 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/cvaux.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000, Intel Corporation, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of Intel Corporation may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the Intel Corporation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef __OPENCV_OLD_AUX_HPP__ 43 | #define __OPENCV_OLD_AUX_HPP__ 44 | 45 | //#if defined(__GNUC__) 46 | //#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module" 47 | //#endif 48 | 49 | #include 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/cvwimage.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 3 | // 4 | // By downloading, copying, installing or using the software you agree to 5 | // this license. If you do not agree to this license, do not download, 6 | // install, copy or use the software. 7 | // 8 | // License Agreement 9 | // For Open Source Computer Vision Library 10 | // 11 | // Copyright (C) 2008, Google, all rights reserved. 12 | // Third party copyrights are property of their respective owners. 13 | // 14 | // Redistribution and use in source and binary forms, with or without 15 | // modification, are permitted provided that the following conditions are met: 16 | // 17 | // * Redistribution's of source code must retain the above copyright notice, 18 | // this list of conditions and the following disclaimer. 19 | // 20 | // * Redistribution's in binary form must reproduce the above copyright notice, 21 | // this list of conditions and the following disclaimer in the documentation 22 | // and/or other materials provided with the distribution. 23 | // 24 | // * The name of Intel Corporation or contributors may not be used to endorse 25 | // or promote products derived from this software without specific 26 | // prior written permission. 27 | // 28 | // This software is provided by the copyright holders and contributors "as is" 29 | // and any express or implied warranties, including, but not limited to, the 30 | // implied warranties of merchantability and fitness for a particular purpose 31 | // are disclaimed. In no event shall the Intel Corporation or contributors be 32 | // liable for any direct, indirect, incidental, special, exemplary, or 33 | // consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | 40 | 41 | #ifndef __OPENCV_OLD_WIMAGE_HPP__ 42 | #define __OPENCV_OLD_WIMAGE_HPP__ 43 | 44 | #include "opencv2/core/wimage.hpp" 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/cxcore.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_OLD_CXCORE_H__ 44 | #define __OPENCV_OLD_CXCORE_H__ 45 | 46 | //#if defined(__GNUC__) 47 | //#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module" 48 | //#endif 49 | 50 | #include "opencv2/core/core_c.h" 51 | #include "opencv2/core/core.hpp" 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/cxcore.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_OLD_CXCORE_HPP__ 44 | #define __OPENCV_OLD_CXCORE_HPP__ 45 | 46 | //#if defined(__GNUC__) 47 | //#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module" 48 | //#endif 49 | 50 | #include 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/cxeigen.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_OLD_EIGEN_HPP__ 44 | #define __OPENCV_OLD_EIGEN_HPP__ 45 | 46 | #include "opencv2/core/eigen.hpp" 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/cxmisc.h: -------------------------------------------------------------------------------- 1 | #ifndef __OPENCV_OLD_CXMISC_H__ 2 | #define __OPENCV_OLD_CXMISC_H__ 3 | 4 | #include "opencv2/core/internal.hpp" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/highgui.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000, Intel Corporation, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of Intel Corporation may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the Intel Corporation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef __OPENCV_OLD_HIGHGUI_H__ 43 | #define __OPENCV_OLD_HIGHGUI_H__ 44 | 45 | #include "opencv2/core/core_c.h" 46 | #include "opencv2/core/core.hpp" 47 | #include "opencv2/highgui/highgui_c.h" 48 | #include "opencv2/highgui/highgui.hpp" 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv/ml.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // 12 | // Copyright (C) 2000, Intel Corporation, all rights reserved. 13 | // Third party copyrights are property of their respective owners. 14 | // 15 | // Redistribution and use in source and binary forms, with or without modification, 16 | // are permitted provided that the following conditions are met: 17 | // 18 | // * Redistribution's of source code must retain the above copyright notice, 19 | // this list of conditions and the following disclaimer. 20 | // 21 | // * Redistribution's in binary form must reproduce the above copyright notice, 22 | // this list of conditions and the following disclaimer in the documentation 23 | // and/or other materials provided with the distribution. 24 | // 25 | // * The name of Intel Corporation may not be used to endorse or promote products 26 | // derived from this software without specific prior written permission. 27 | // 28 | // This software is provided by the copyright holders and contributors "as is" and 29 | // any express or implied warranties, including, but not limited to, the implied 30 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 31 | // In no event shall the Intel Corporation or contributors be liable for any direct, 32 | // indirect, incidental, special, exemplary, or consequential damages 33 | // (including, but not limited to, procurement of substitute goods or services; 34 | // loss of use, data, or profits; or business interruption) however caused 35 | // and on any theory of liability, whether in contract, strict liability, 36 | // or tort (including negligence or otherwise) arising in any way out of 37 | // the use of this software, even if advised of the possibility of such damage. 38 | // 39 | //M*/ 40 | 41 | #ifndef __OPENCV_OLD_ML_H__ 42 | #define __OPENCV_OLD_ML_H__ 43 | 44 | #include "opencv2/core/core_c.h" 45 | #include "opencv2/core/core.hpp" 46 | #include "opencv2/ml/ml.hpp" 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/core/devmem2d.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #include "opencv2/core/cuda_devptrs.hpp" 44 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/flann/config.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #ifndef OPENCV_FLANN_CONFIG_H_ 31 | #define OPENCV_FLANN_CONFIG_H_ 32 | 33 | #ifdef FLANN_VERSION_ 34 | #undef FLANN_VERSION_ 35 | #endif 36 | #define FLANN_VERSION_ "1.6.10" 37 | 38 | #endif /* OPENCV_FLANN_CONFIG_H_ */ 39 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/flann/dummy.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OPENCV_FLANN_DUMMY_H_ 3 | #define OPENCV_FLANN_DUMMY_H_ 4 | 5 | namespace cvflann 6 | { 7 | 8 | #if (defined WIN32 || defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS 9 | __declspec(dllexport) 10 | #endif 11 | void dummyfunc(); 12 | 13 | } 14 | 15 | 16 | #endif /* OPENCV_FLANN_DUMMY_H_ */ 17 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/flann/general.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_GENERAL_H_ 32 | #define OPENCV_FLANN_GENERAL_H_ 33 | 34 | #include "defines.h" 35 | #include 36 | #include 37 | 38 | namespace cvflann 39 | { 40 | 41 | class FLANNException : public std::runtime_error 42 | { 43 | public: 44 | FLANNException(const char* message) : std::runtime_error(message) { } 45 | 46 | FLANNException(const std::string& message) : std::runtime_error(message) { } 47 | }; 48 | 49 | } 50 | 51 | 52 | #endif /* OPENCV_FLANN_GENERAL_H_ */ 53 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/flann/object_factory.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_OBJECT_FACTORY_H_ 32 | #define OPENCV_FLANN_OBJECT_FACTORY_H_ 33 | 34 | #include 35 | 36 | namespace cvflann 37 | { 38 | 39 | class CreatorNotFound 40 | { 41 | }; 42 | 43 | template 46 | class ObjectFactory 47 | { 48 | typedef ObjectFactory ThisClass; 49 | typedef std::map ObjectRegistry; 50 | 51 | // singleton class, private constructor 52 | ObjectFactory() {} 53 | 54 | public: 55 | 56 | bool subscribe(UniqueIdType id, ObjectCreator creator) 57 | { 58 | if (object_registry.find(id) != object_registry.end()) return false; 59 | 60 | object_registry[id] = creator; 61 | return true; 62 | } 63 | 64 | bool unregister(UniqueIdType id) 65 | { 66 | return object_registry.erase(id) == 1; 67 | } 68 | 69 | ObjectCreator create(UniqueIdType id) 70 | { 71 | typename ObjectRegistry::const_iterator iter = object_registry.find(id); 72 | 73 | if (iter == object_registry.end()) { 74 | throw CreatorNotFound(); 75 | } 76 | 77 | return iter->second; 78 | } 79 | 80 | static ThisClass& instance() 81 | { 82 | static ThisClass the_factory; 83 | return the_factory; 84 | } 85 | private: 86 | ObjectRegistry object_registry; 87 | }; 88 | 89 | } 90 | 91 | #endif /* OPENCV_FLANN_OBJECT_FACTORY_H_ */ 92 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/flann/sampling.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #ifndef OPENCV_FLANN_SAMPLING_H_ 31 | #define OPENCV_FLANN_SAMPLING_H_ 32 | 33 | #include "matrix.h" 34 | #include "random.h" 35 | 36 | namespace cvflann 37 | { 38 | 39 | template 40 | Matrix random_sample(Matrix& srcMatrix, long size, bool remove = false) 41 | { 42 | Matrix newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols); 43 | 44 | T* src,* dest; 45 | for (long i=0; i 63 | Matrix random_sample(const Matrix& srcMatrix, size_t size) 64 | { 65 | UniqueRandom rand((int)srcMatrix.rows); 66 | Matrix newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols); 67 | 68 | T* src,* dest; 69 | for (size_t i=0; i 35 | 36 | 37 | namespace cvflann 38 | { 39 | 40 | /** 41 | * A start-stop timer class. 42 | * 43 | * Can be used to time portions of code. 44 | */ 45 | class StartStopTimer 46 | { 47 | clock_t startTime; 48 | 49 | public: 50 | /** 51 | * Value of the timer. 52 | */ 53 | double value; 54 | 55 | 56 | /** 57 | * Constructor. 58 | */ 59 | StartStopTimer() 60 | { 61 | reset(); 62 | } 63 | 64 | /** 65 | * Starts the timer. 66 | */ 67 | void start() 68 | { 69 | startTime = clock(); 70 | } 71 | 72 | /** 73 | * Stops the timer and updates timer value. 74 | */ 75 | void stop() 76 | { 77 | clock_t stopTime = clock(); 78 | value += ( (double)stopTime - startTime) / CLOCKS_PER_SEC; 79 | } 80 | 81 | /** 82 | * Resets the timer value to 0. 83 | */ 84 | void reset() 85 | { 86 | value = 0; 87 | } 88 | 89 | }; 90 | 91 | } 92 | 93 | #endif // FLANN_TIMER_H 94 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/gpu/device/static_check.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_GPU_GPU_DEVICE_STATIC_CHECK_HPP__ 44 | #define __OPENCV_GPU_GPU_DEVICE_STATIC_CHECK_HPP__ 45 | 46 | #if defined(__CUDACC__) 47 | #define __OPENCV_GPU_HOST_DEVICE__ __host__ __device__ __forceinline__ 48 | #else 49 | #define __OPENCV_GPU_HOST_DEVICE__ 50 | #endif 51 | 52 | namespace cv { namespace gpu 53 | { 54 | namespace device 55 | { 56 | template struct Static {}; 57 | 58 | template<> struct Static 59 | { 60 | __OPENCV_GPU_HOST_DEVICE__ static void check() {}; 61 | }; 62 | } 63 | }} 64 | 65 | #undef __OPENCV_GPU_HOST_DEVICE__ 66 | 67 | #endif /* __OPENCV_GPU_GPU_DEVICE_STATIC_CHECK_HPP__ */ 68 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/gpu/device/warp_reduce.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef OPENCV_GPU_WARP_REDUCE_HPP__ 44 | #define OPENCV_GPU_WARP_REDUCE_HPP__ 45 | 46 | namespace cv { namespace gpu { namespace device 47 | { 48 | template 49 | __device__ __forceinline__ T warp_reduce(volatile T *ptr , const unsigned int tid = threadIdx.x) 50 | { 51 | const unsigned int lane = tid & 31; // index of thread in warp (0..31) 52 | 53 | if (lane < 16) 54 | { 55 | T partial = ptr[tid]; 56 | 57 | ptr[tid] = partial = partial + ptr[tid + 16]; 58 | ptr[tid] = partial = partial + ptr[tid + 8]; 59 | ptr[tid] = partial = partial + ptr[tid + 4]; 60 | ptr[tid] = partial = partial + ptr[tid + 2]; 61 | ptr[tid] = partial = partial + ptr[tid + 1]; 62 | } 63 | 64 | return ptr[tid - lane]; 65 | } 66 | }}} // namespace cv { namespace gpu { namespace device { 67 | 68 | #endif /* OPENCV_GPU_WARP_REDUCE_HPP__ */ 69 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/gpu/devmem2d.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #include "opencv2/core/cuda_devptrs.hpp" 44 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/gpu/gpumat.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #include "opencv2/core/gpumat.hpp" 44 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/gpu/stream_accessor.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_GPU_STREAM_ACCESSOR_HPP__ 44 | #define __OPENCV_GPU_STREAM_ACCESSOR_HPP__ 45 | 46 | #include "opencv2/gpu/gpu.hpp" 47 | #include "cuda_runtime_api.h" 48 | 49 | namespace cv 50 | { 51 | namespace gpu 52 | { 53 | // This is only header file that depends on Cuda. All other headers are independent. 54 | // So if you use OpenCV binaries you do noot need to install Cuda Toolkit. 55 | // But of you wanna use GPU by yourself, may get cuda stream instance using the class below. 56 | // In this case you have to install Cuda Toolkit. 57 | struct StreamAccessor 58 | { 59 | CV_EXPORTS static cudaStream_t getStream(const Stream& stream); 60 | }; 61 | } 62 | } 63 | 64 | #endif /* __OPENCV_GPU_STREAM_ACCESSOR_HPP__ */ 65 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/highgui/ios.h: -------------------------------------------------------------------------------- 1 | 2 | /*M/////////////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 5 | // 6 | // By downloading, copying, installing or using the software you agree to this license. 7 | // If you do not agree to this license, do not download, install, 8 | // copy or use the software. 9 | // 10 | // 11 | // License Agreement 12 | // For Open Source Computer Vision Library 13 | // 14 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 15 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #include "opencv2/core/core.hpp" 45 | #import "opencv2/highgui/cap_ios.h" 46 | 47 | UIImage* MatToUIImage(const cv::Mat& image); 48 | void UIImageToMat(const UIImage* image, 49 | cv::Mat& m, bool alphaExist = false); 50 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/nonfree/nonfree.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2012, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_NONFREE_HPP__ 44 | #define __OPENCV_NONFREE_HPP__ 45 | 46 | #include "opencv2/nonfree/features2d.hpp" 47 | 48 | namespace cv 49 | { 50 | 51 | CV_EXPORTS_W bool initModule_nonfree(); 52 | 53 | } 54 | 55 | #endif 56 | 57 | /* End of file. */ 58 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/opencv.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2010, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_ALL_HPP__ 44 | #define __OPENCV_ALL_HPP__ 45 | 46 | #include "opencv2/core/core_c.h" 47 | #include "opencv2/core/core.hpp" 48 | #include "opencv2/flann/miniflann.hpp" 49 | #include "opencv2/imgproc/imgproc_c.h" 50 | #include "opencv2/imgproc/imgproc.hpp" 51 | #include "opencv2/photo/photo.hpp" 52 | #include "opencv2/video/video.hpp" 53 | #include "opencv2/features2d/features2d.hpp" 54 | #include "opencv2/objdetect/objdetect.hpp" 55 | #include "opencv2/calib3d/calib3d.hpp" 56 | #include "opencv2/ml/ml.hpp" 57 | #include "opencv2/highgui/highgui_c.h" 58 | #include "opencv2/highgui/highgui.hpp" 59 | #include "opencv2/contrib/contrib.hpp" 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/opencv_modules.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ** File generated automatically, do not modify ** 3 | * 4 | * This file defines the list of modules available in current build configuration 5 | * 6 | * 7 | */ 8 | 9 | #define HAVE_OPENCV_CALIB3D 10 | #define HAVE_OPENCV_CONTRIB 11 | #define HAVE_OPENCV_CORE 12 | #define HAVE_OPENCV_FEATURES2D 13 | #define HAVE_OPENCV_FLANN 14 | #define HAVE_OPENCV_GPU 15 | #define HAVE_OPENCV_HIGHGUI 16 | #define HAVE_OPENCV_IMGPROC 17 | #define HAVE_OPENCV_LEGACY 18 | #define HAVE_OPENCV_ML 19 | #define HAVE_OPENCV_NONFREE 20 | #define HAVE_OPENCV_OBJDETECT 21 | #define HAVE_OPENCV_OCL 22 | #define HAVE_OPENCV_PHOTO 23 | #define HAVE_OPENCV_STITCHING 24 | #define HAVE_OPENCV_SUPERRES 25 | #define HAVE_OPENCV_TS 26 | #define HAVE_OPENCV_VIDEO 27 | #define HAVE_OPENCV_VIDEOSTAB 28 | 29 | 30 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/photo/photo_c.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2008-2012, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_PHOTO_C_H__ 44 | #define __OPENCV_PHOTO_C_H__ 45 | 46 | #include "opencv2/core/core_c.h" 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | /* Inpainting algorithms */ 53 | enum 54 | { 55 | CV_INPAINT_NS =0, 56 | CV_INPAINT_TELEA =1 57 | }; 58 | 59 | 60 | /* Inpaints the selected region in the image */ 61 | CVAPI(void) cvInpaint( const CvArr* src, const CvArr* inpaint_mask, 62 | CvArr* dst, double inpaintRange, int flags ); 63 | 64 | 65 | #ifdef __cplusplus 66 | } //extern "C" 67 | #endif 68 | 69 | #endif //__OPENCV_PHOTO_C_H__ 70 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/stitching/detail/autocalib.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_STITCHING_AUTOCALIB_HPP__ 44 | #define __OPENCV_STITCHING_AUTOCALIB_HPP__ 45 | 46 | #include "opencv2/core/core.hpp" 47 | #include "matchers.hpp" 48 | 49 | namespace cv { 50 | namespace detail { 51 | 52 | // See "Construction of Panoramic Image Mosaics with Global and Local Alignment" 53 | // by Heung-Yeung Shum and Richard Szeliski. 54 | void CV_EXPORTS focalsFromHomography(const Mat &H, double &f0, double &f1, bool &f0_ok, bool &f1_ok); 55 | 56 | void CV_EXPORTS estimateFocal(const std::vector &features, 57 | const std::vector &pairwise_matches, 58 | std::vector &focals); 59 | 60 | bool CV_EXPORTS calibrateRotatingCamera(const std::vector &Hs, Mat &K); 61 | 62 | } // namespace detail 63 | } // namespace cv 64 | 65 | #endif // __OPENCV_STITCHING_AUTOCALIB_HPP__ 66 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/stitching/detail/camera.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_STITCHING_CAMERA_HPP__ 44 | #define __OPENCV_STITCHING_CAMERA_HPP__ 45 | 46 | #include "opencv2/core/core.hpp" 47 | 48 | namespace cv { 49 | namespace detail { 50 | 51 | struct CV_EXPORTS CameraParams 52 | { 53 | CameraParams(); 54 | CameraParams(const CameraParams& other); 55 | const CameraParams& operator =(const CameraParams& other); 56 | Mat K() const; 57 | 58 | double focal; // Focal length 59 | double aspect; // Aspect ratio 60 | double ppx; // Principal point X 61 | double ppy; // Principal point Y 62 | Mat R; // Rotation 63 | Mat t; // Translation 64 | }; 65 | 66 | } // namespace detail 67 | } // namespace cv 68 | 69 | #endif // #ifndef __OPENCV_STITCHING_CAMERA_HPP__ 70 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/video/video.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEO_HPP__ 44 | #define __OPENCV_VIDEO_HPP__ 45 | 46 | #include "opencv2/video/tracking.hpp" 47 | #include "opencv2/video/background_segm.hpp" 48 | 49 | #ifdef __cplusplus 50 | namespace cv 51 | { 52 | 53 | CV_EXPORTS bool initModule_video(void); 54 | 55 | } 56 | #endif 57 | 58 | #endif //__OPENCV_VIDEO_HPP__ 59 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/videostab/log.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_LOG_HPP__ 44 | #define __OPENCV_VIDEOSTAB_LOG_HPP__ 45 | 46 | #include "opencv2/core/core.hpp" 47 | 48 | namespace cv 49 | { 50 | namespace videostab 51 | { 52 | 53 | class CV_EXPORTS ILog 54 | { 55 | public: 56 | virtual ~ILog() {} 57 | virtual void print(const char *format, ...) = 0; 58 | }; 59 | 60 | class CV_EXPORTS NullLog : public ILog 61 | { 62 | public: 63 | virtual void print(const char * /*format*/, ...) {} 64 | }; 65 | 66 | class CV_EXPORTS LogToStdout : public ILog 67 | { 68 | public: 69 | virtual void print(const char *format, ...); 70 | }; 71 | 72 | } // namespace videostab 73 | } // namespace cv 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /third_party/include/opencv/opencv2/videostab/videostab.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_HPP__ 44 | #define __OPENCV_VIDEOSTAB_HPP__ 45 | 46 | #include "opencv2/videostab/stabilizer.hpp" 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avcodec-56.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avcodec-56.dll -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avcodec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avcodec.lib -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avdevice-56.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avdevice-56.dll -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avdevice.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avdevice.lib -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avfilter-5.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avfilter-5.dll -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avfilter.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avfilter.lib -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avformat-56.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avformat-56.dll -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avformat.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avformat.lib -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avutil-54.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avutil-54.dll -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/avutil.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/avutil.lib -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/postproc-53.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/postproc-53.dll -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/postproc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/postproc.lib -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/swresample-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/swresample-1.dll -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/swresample.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/swresample.lib -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/swscale-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/swscale-3.dll -------------------------------------------------------------------------------- /third_party/lib/ffmpeg/swscale.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/ffmpeg/swscale.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_calib3d249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_calib3d249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_calib3d249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_calib3d249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_calib3d249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_calib3d249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_calib3d249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_calib3d249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_contrib249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_contrib249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_contrib249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_contrib249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_contrib249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_contrib249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_contrib249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_contrib249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_core249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_core249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_core249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_core249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_core249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_core249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_core249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_core249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_features2d249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_features2d249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_features2d249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_features2d249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_features2d249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_features2d249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_features2d249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_features2d249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ffmpeg249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ffmpeg249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_flann249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_flann249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_flann249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_flann249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_flann249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_flann249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_flann249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_flann249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_gpu249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_gpu249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_gpu249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_gpu249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_gpu249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_gpu249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_gpu249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_gpu249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_highgui249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_highgui249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_highgui249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_highgui249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_highgui249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_highgui249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_highgui249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_highgui249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_imgproc249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_imgproc249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_imgproc249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_imgproc249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_imgproc249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_imgproc249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_imgproc249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_imgproc249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_legacy249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_legacy249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_legacy249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_legacy249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_legacy249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_legacy249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_legacy249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_legacy249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ml249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ml249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ml249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ml249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ml249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ml249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ml249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ml249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_nonfree249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_nonfree249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_nonfree249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_nonfree249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_nonfree249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_nonfree249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_nonfree249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_nonfree249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_objdetect249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_objdetect249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_objdetect249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_objdetect249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_objdetect249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_objdetect249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_objdetect249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_objdetect249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ocl249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ocl249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ocl249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ocl249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ocl249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ocl249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ocl249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ocl249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_photo249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_photo249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_photo249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_photo249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_photo249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_photo249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_photo249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_photo249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_stitching249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_stitching249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_stitching249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_stitching249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_stitching249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_stitching249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_stitching249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_stitching249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_superres249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_superres249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_superres249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_superres249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_superres249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_superres249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_superres249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_superres249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ts249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ts249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_ts249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_ts249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_video249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_video249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_video249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_video249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_video249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_video249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_video249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_video249d.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_videostab249.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_videostab249.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_videostab249.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_videostab249.lib -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_videostab249d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_videostab249d.dll -------------------------------------------------------------------------------- /third_party/lib/opencv/opencv_videostab249d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/third_party/lib/opencv/opencv_videostab249d.lib -------------------------------------------------------------------------------- /videomgr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | find_package(Threads REQUIRED) 3 | find_package(OpenCV REQUIRED) 4 | find_package(Boost REQUIRED COMPONENTS system thread) 5 | 6 | find_library(AVUTIL_LIBRARY NAMES avutil) 7 | find_library(AVFORMAT_LIBRARY NAMES avformat) 8 | find_library(AVCODEC_LIBRARY NAMES avcodec) 9 | find_library(AVFILTER_LIBRARY NAMES avfilter) 10 | find_library(SWSCALE_LIBRARY NAMES swscale) 11 | 12 | add_library(videomgr STATIC src/camera.cpp src/filter.cpp src/h264writer.cpp) 13 | 14 | target_include_directories(videomgr PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) 15 | target_include_directories(videomgr PUBLIC ${OpenCV_INCLUDE_DIRS}) 16 | 17 | target_link_libraries(videomgr ${OpenCV_LIBS}) 18 | target_link_libraries(videomgr ${AVUTIL_LIBRARY} ${AVFORMAT_LIBRARY} ${AVCODEC_LIBRARY} ${AVFILTER_LIBRARY} ${SWSCALE_LIBRARY}) 19 | target_link_libraries(videomgr ${CMAKE_THREAD_LIBS_INIT}) 20 | target_link_libraries(videomgr ${Boost_LIBRARIES}) 21 | -------------------------------------------------------------------------------- /videomgr/VideoMgr.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {879cf66a-417b-4f06-a7c1-4a4c05adcfe5} 18 | 19 | 20 | {971e3d8e-e2c3-4407-aa72-ff63d7af58f1} 21 | 22 | 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files\filters 38 | 39 | 40 | Header Files\filters 41 | 42 | 43 | Header Files\filters 44 | 45 | 46 | Header Files\filters 47 | 48 | 49 | 50 | 51 | Source Files 52 | 53 | 54 | Source Files 55 | 56 | 57 | Source Files\filters 58 | 59 | 60 | Source Files\filters 61 | 62 | 63 | Source Files\filters 64 | 65 | 66 | Source Files\filters 67 | 68 | 69 | -------------------------------------------------------------------------------- /videomgr/include/camera.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "h264writer.hpp" 4 | #include "filter.hpp" 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | namespace VideoMgr 16 | { 17 | enum CameraSatus 18 | { 19 | CREATED = 0, 20 | RECORDING = 1, 21 | PAUSED = 2, 22 | STOPPED = 4, 23 | EXITED = 8, 24 | }; 25 | class Camera 26 | { 27 | public: 28 | Camera(); 29 | ~Camera(); 30 | 31 | int start(std::string file, int width, int height, int bit_rate); //start recording 32 | int pause(); //pause recording 33 | int stop(); //stop recording 34 | int exit(); 35 | void get_curr_frame(cv::Mat& frame); 36 | std::vector>& Filters(); 37 | 38 | private: 39 | void thread_task(); //do not use 40 | public: 41 | std::function refresh_callback; 42 | CameraSatus _status; 43 | private: 44 | cv::Mat _last_frame; 45 | std::thread _camera_thread; 46 | std::shared_ptr _video; 47 | std::shared_ptr _h264; 48 | std::vector> _filters; 49 | std::atomic _last_status; 50 | std::string _file; 51 | }; 52 | 53 | } 54 | -------------------------------------------------------------------------------- /videomgr/include/filter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace VideoMgr 6 | { 7 | class Filter 8 | { 9 | public: 10 | Filter(){}; 11 | virtual ~Filter(){}; 12 | 13 | virtual void process_frame(cv::Mat& frame) = 0; 14 | }; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /videomgr/include/filters/blurfilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "filter.hpp" 4 | #include 5 | 6 | namespace VideoMgr 7 | { 8 | class BlurFilter : public Filter 9 | { 10 | public: 11 | BlurFilter(double ksize = 30); 12 | virtual ~BlurFilter(){} 13 | 14 | virtual void process_frame(cv::Mat& frame) override; 15 | 16 | void set_ksize(double ksize){ _ksize = ksize; } 17 | double get_ksize(){ return _ksize; } 18 | private: 19 | double _ksize; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /videomgr/include/filters/detectionface.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class DetectionFace 12 | { 13 | public: 14 | DetectionFace( bool useCPU = true ); 15 | ~DetectionFace(); 16 | 17 | bool detect(cv::Mat& img, std::vector& faces); 18 | 19 | protected: 20 | bool detectCPU(cv::Mat& img, std::vector& faces); 21 | bool detectGPUOcl(cv::Mat& img, std::vector& faces); 22 | bool detectGPUCuda(cv::Mat& img, std::vector& faces); 23 | 24 | private: 25 | cv::CascadeClassifier* _cpu_cascade; 26 | cv::gpu::CascadeClassifier_GPU* _gpu_cuda_cascade; 27 | cv::ocl::OclCascadeClassifier* _gpu_ocl_cascade; 28 | bool _useCPU; 29 | const std::string _cascadeFileName; 30 | }; -------------------------------------------------------------------------------- /videomgr/include/filters/facefilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "filter.hpp" 4 | #include "detectionface.hpp" 5 | 6 | #include 7 | #include 8 | 9 | namespace VideoMgr 10 | { 11 | class FaceFilter : public Filter 12 | { 13 | public: 14 | FaceFilter(); 15 | virtual ~FaceFilter(){} 16 | 17 | virtual void process_frame(cv::Mat& frame) override; 18 | 19 | private: 20 | DetectionFace _detection_face; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /videomgr/include/filters/showdatetimefilter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "filter.hpp" 4 | #include 5 | 6 | namespace VideoMgr 7 | { 8 | class ShowDateTimeFilter : public Filter 9 | { 10 | public: 11 | ShowDateTimeFilter(double x = 0.001, double y = 0.001); 12 | virtual ~ShowDateTimeFilter(){} 13 | 14 | virtual void process_frame(cv::Mat& frame) override; 15 | 16 | void set_x(double x){ _x = x; } 17 | double get_x(){ return _x; } 18 | void set_y(double y){ _y = y; } 19 | double get_y(){ return _y; } 20 | 21 | private: 22 | double _x; 23 | double _y; 24 | }; 25 | } -------------------------------------------------------------------------------- /videomgr/include/h264writer.hpp: -------------------------------------------------------------------------------- 1 | // VideoMgr.h 2 | 3 | #pragma once 4 | #include 5 | 6 | extern "C" 7 | { 8 | #include 9 | #include 10 | #include 11 | } 12 | 13 | 14 | namespace VideoMgr { 15 | 16 | class H264Writer 17 | { 18 | public: 19 | H264Writer(); 20 | ~H264Writer(); 21 | bool create( std::string file, int width, int height, int bit_rate ); 22 | bool operator << ( cv::Mat& mat ); 23 | bool write( cv::Mat& mat, int64 duration ); 24 | void close(); 25 | 26 | private: 27 | bool write_header(); 28 | bool write_trailer(); 29 | 30 | private: 31 | std::string _filename; 32 | int _width; 33 | int _height; 34 | int _bit_rate; 35 | 36 | int64 _video_pts; 37 | 38 | AVFormatContext* _context; 39 | AVOutputFormat* _format; 40 | AVStream* _vstream; 41 | AVCodecContext* _vcodec; 42 | 43 | SwsContext* _rgb_scaler; 44 | 45 | AVFrame* _output_video_frame; 46 | }; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /videomgr/include/util.hpp: -------------------------------------------------------------------------------- 1 | 2 | #if defined(_WIN32) || defined(_WIN64) 3 | #include 4 | #include 5 | #else 6 | #include 7 | #include 8 | #endif 9 | 10 | unsigned long get_now_time() 11 | { 12 | #if defined(_WIN32) || defined(_WIN64) 13 | return static_cast(std::time(nullptr)); 14 | #else 15 | timeval now; 16 | gettimeofday(&now, NULL); 17 | return now.tv_usec/1000 + now.tv_sec*1000; 18 | #endif 19 | } 20 | 21 | void custom_sleep(unsigned long millisecond) 22 | { 23 | #if defined(_WIN32) || defined(_WIN64) 24 | std::this_thread::sleep_for( std::chrono::milliseconds( millisecond ) ); 25 | #else 26 | usleep(millisecond*1000); 27 | #endif 28 | } 29 | -------------------------------------------------------------------------------- /videomgr/src/filters/blurfilter.cpp: -------------------------------------------------------------------------------- 1 | #include "filters/blurfilter.hpp" 2 | #include "opencv2/imgproc/imgproc.hpp" 3 | 4 | VideoMgr::BlurFilter::BlurFilter(double ksize /*= 30*/) 5 | : _ksize(ksize) 6 | { 7 | } 8 | 9 | void VideoMgr::BlurFilter::process_frame(cv::Mat& frame) 10 | { 11 | cv::blur(frame, frame, cv::Size((int)_ksize, (int)_ksize), cv::Point(-1, -1)); 12 | } 13 | -------------------------------------------------------------------------------- /videomgr/src/filters/facefilter.cpp: -------------------------------------------------------------------------------- 1 | #include "filters/facefilter.hpp" 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | VideoMgr::FaceFilter::FaceFilter() 10 | /*: _face_cascade_path("resources/haarcascade_frontalface_alt2.xml"), 11 | _eye_cascade_path("resources/haarcascade_eye_tree_eyeglasses.xml")*/ 12 | { 13 | /*bool ret = _face_cascade.load(_face_cascade_path); 14 | ret = _eyes_cascade.load(_eye_cascade_path);*/ 15 | } 16 | 17 | void VideoMgr::FaceFilter::process_frame(cv::Mat& frame) 18 | { 19 | /*std::vector faces; 20 | cv::Mat frame_gray; 21 | 22 | cv::cvtColor(frame, frame_gray, CV_BGR2GRAY); 23 | cv::equalizeHist(frame_gray, frame_gray); 24 | 25 | _face_cascade.detectMultiScale(frame_gray, faces, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING | CV_HAAR_FIND_BIGGEST_OBJECT, cv::Size(30, 30)); 26 | 27 | for (std::size_t i = 0; i < faces.size(); i++) 28 | { 29 | cv::Point center(faces[i].x + faces[i].width*0.5, faces[i].y + faces[i].height*0.5); 30 | ellipse(frame, center, cv::Size(faces[i].width*0.5, faces[i].height*0.5), 0, 0, 360, cv::Scalar(255, 0, 255), 4, 8, 0); 31 | 32 | cv::Mat faceROI = frame_gray(faces[i]); 33 | std::vector eyes; 34 | 35 | _eyes_cascade.detectMultiScale(faceROI, eyes, 1.1, 2, 0); 36 | 37 | for (std::size_t j = 0; j < (eyes.size() >= 2 ? 2 : eyes.size()); j++) 38 | { 39 | cv::Point center(faces[i].x + eyes[j].x + eyes[j].width*0.5, faces[i].y + eyes[j].y + eyes[j].height*0.5); 40 | int radius = cvRound((eyes[j].width + eyes[j].height)*0.25); 41 | cv::circle(frame, center, radius, cv::Scalar(255, 0, 0), 4, 8, 0); 42 | } 43 | }*/ 44 | if (frame.empty()) return; 45 | std::vector faces; 46 | _detection_face.detect(frame, faces); 47 | for (std::size_t i = 0; i < faces.size(); i++) 48 | { 49 | cv::Point center(faces[i].x + faces[i].width*0.5, faces[i].y + faces[i].height*0.5); 50 | ellipse(frame, center, cv::Size(faces[i].width*0.5, faces[i].height*0.5), 0, 0, 360, cv::Scalar(255, 0, 255), 4, 8, 0); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /videomgr/src/filters/showdatetimefilter.cpp: -------------------------------------------------------------------------------- 1 | #include "filters/showdatetimefilter.hpp" 2 | #include 3 | 4 | VideoMgr::ShowDateTimeFilter::ShowDateTimeFilter(double x /*= 0.1*/, double y /*= 0.1*/) 5 | : _x(x), _y(y) 6 | { 7 | } 8 | 9 | void VideoMgr::ShowDateTimeFilter::process_frame(cv::Mat& frame) 10 | { 11 | time_t tt = time(NULL); 12 | tm* t = localtime(&tt); 13 | char timestr[30]; 14 | sprintf(timestr, "%d-%02d-%02d %02d:%02d:%02d", 15 | t->tm_year + 1900, 16 | t->tm_mon + 1, 17 | t->tm_mday, 18 | t->tm_hour, 19 | t->tm_min, 20 | t->tm_sec); 21 | cv::putText(frame, std::string(timestr), cv::Point((int)(_x*frame.cols), (int)(_y*frame.rows)), cv::FONT_HERSHEY_PLAIN, 1.5, cv::Scalar(0, 255, 0)); 22 | } 23 | -------------------------------------------------------------------------------- /videomgr/src/h264writer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avplayer/AVCamera/12f7fb07a999dd81a51f95fbc3507e6591dece46/videomgr/src/h264writer.cpp --------------------------------------------------------------------------------