├── .github └── workflows │ └── cmake.yml ├── .gitignore ├── CMakeLists.txt ├── DrawVideo.cc ├── DrawVideo.h ├── Duilib ├── CMakeLists.txt ├── Control │ ├── UIActiveX.cpp │ ├── UIActiveX.h │ ├── UIAnimation.cpp │ ├── UIAnimation.h │ ├── UIButton.cpp │ ├── UIButton.h │ ├── UIColorPalette.cpp │ ├── UIColorPalette.h │ ├── UICombo.cpp │ ├── UICombo.h │ ├── UIComboBox.cpp │ ├── UIComboBox.h │ ├── UIDateTime.cpp │ ├── UIDateTime.h │ ├── UIEdit.cpp │ ├── UIEdit.h │ ├── UIFadeButton.cpp │ ├── UIFadeButton.h │ ├── UIFlash.cpp │ ├── UIFlash.h │ ├── UIGifAnim.cpp │ ├── UIGifAnim.h │ ├── UIGifAnimEx.cpp │ ├── UIGifAnimEx.h │ ├── UIGroupBox.cpp │ ├── UIGroupBox.h │ ├── UIHotKey.cpp │ ├── UIHotKey.h │ ├── UIIPAddress.cpp │ ├── UIIPAddress.h │ ├── UIIPAddressEx.cpp │ ├── UIIPAddressEx.h │ ├── UILabel.cpp │ ├── UILabel.h │ ├── UIList.cpp │ ├── UIList.h │ ├── UIListEx.cpp │ ├── UIListEx.h │ ├── UIMenu.cpp │ ├── UIMenu.h │ ├── UIOption.cpp │ ├── UIOption.h │ ├── UIProgress.cpp │ ├── UIProgress.h │ ├── UIRichEdit.cpp │ ├── UIRichEdit.h │ ├── UIRing.cpp │ ├── UIRing.h │ ├── UIRollText.cpp │ ├── UIRollText.h │ ├── UIScrollBar.cpp │ ├── UIScrollBar.h │ ├── UISlider.cpp │ ├── UISlider.h │ ├── UIText.cpp │ ├── UIText.h │ ├── UITreeView.cpp │ ├── UITreeView.h │ ├── UIWebBrowser.cpp │ └── UIWebBrowser.h ├── Core │ ├── ControlFactory.cpp │ ├── ControlFactory.h │ ├── UIBase.cpp │ ├── UIBase.h │ ├── UIContainer.cpp │ ├── UIContainer.h │ ├── UIControl.cpp │ ├── UIControl.h │ ├── UIDefine.h │ ├── UIDlgBuilder.cpp │ ├── UIDlgBuilder.h │ ├── UIManager.cpp │ ├── UIManager.h │ ├── UIMarkup.cpp │ ├── UIMarkup.h │ ├── UIRender.cpp │ ├── UIRender.h │ ├── UIResourceManager.cpp │ └── UIResourceManager.h ├── DuiLib.vcxproj ├── DuiLib.vcxproj.filters ├── Layout │ ├── UIAnimationTabLayout.cpp │ ├── UIAnimationTabLayout.h │ ├── UIChildLayout.cpp │ ├── UIChildLayout.h │ ├── UIHorizontalLayout.cpp │ ├── UIHorizontalLayout.h │ ├── UITabLayout.cpp │ ├── UITabLayout.h │ ├── UITileLayout.cpp │ ├── UITileLayout.h │ ├── UIVerticalLayout.cpp │ └── UIVerticalLayout.h ├── StdAfx.cpp ├── StdAfx.h ├── UIlib.cpp ├── UIlib.h ├── Utils │ ├── DPI.cpp │ ├── DPI.h │ ├── DragDropImpl.cpp │ ├── DragDropImpl.h │ ├── Flash11.tlb │ ├── FlashEventHandler.h │ ├── TrayIcon.cpp │ ├── TrayIcon.h │ ├── UIDelegate.cpp │ ├── UIDelegate.h │ ├── UIShadow.cpp │ ├── UIShadow.h │ ├── Utils.cpp │ ├── Utils.h │ ├── VersionHelpers.h │ ├── WebBrowserEventHandler.h │ ├── WinImplBase.cpp │ ├── WinImplBase.h │ ├── ZipApi.h │ ├── downloadmgr.h │ ├── flash11.tlh │ ├── observer_impl_base.h │ ├── stb_image.h │ ├── unzip.cpp │ ├── unzip.h │ ├── zip.cpp │ └── zip.h ├── duilib.vcxproj.user └── 属性列表.html ├── FFPlayer.cpp ├── FFPlayer.h ├── Ini.cpp ├── Ini.h ├── QPlayer.cpp ├── QPlayer.h ├── QPlayer.rc ├── QPlayer.sln ├── QPlayer.vcxproj ├── QPlayer.vcxproj.filters ├── README.md ├── UICombox.cpp ├── UICombox.h ├── UIWnd.h ├── VideoWnd.cpp ├── VideoWnd.h ├── audio ├── AudioPlay.cpp ├── AudioPlay.h ├── AudioRec.cpp ├── AudioRec.h ├── IVolume.h ├── VolumeCtrl.cpp ├── VolumeCtrl.h ├── VolumeInXXX.cpp ├── VolumeInXXX.h ├── VolumeOutWave.cpp ├── VolumeOutWave.h ├── WaveBase.cpp ├── WaveBase.h ├── WaveIn.cpp ├── WaveIn.h ├── WaveOut.cpp └── WaveOut.h ├── dlna ├── OnvifDevice.cpp ├── OnvifDevice.h ├── UPnP技术总结.docx ├── UpnpRender.cpp ├── UpnpRender.h ├── UpnpServer.cpp ├── UpnpServer.h ├── hstring.cpp ├── hstring.h ├── httplib.cc ├── httplib.h ├── httplib.md ├── pugiconfig.hpp ├── pugixml.cpp ├── pugixml.hpp ├── pugixml.md ├── 一文读懂UPNP-UPNP超详细介绍.docx └── 基于DLNA实现iOS,Android投屏.md ├── doc ├── FFmpeg RTP 100ms以下超低音频流推送设置.md ├── FFmpeg超低延迟视频推流笔记.md └── ffmpeg解码降低延迟记录.md ├── ffmpeg ├── LICENSE.txt ├── README.txt ├── bin │ ├── avcodec-57.dll │ ├── avdevice-57.dll │ ├── avfilter-6.dll │ ├── avformat-57.dll │ ├── avutil-55.dll │ ├── ffmpeg.exe │ ├── ffplay.exe │ ├── ffprobe.exe │ ├── libcrypto-1_1.dll │ ├── libssl-1_1.dll │ ├── postproc-54.dll │ ├── swresample-2.dll │ └── swscale-4.dll ├── doc │ ├── bootstrap.min.css │ ├── default.css │ ├── developer.html │ ├── faq.html │ ├── fate.html │ ├── ffmpeg-all.html │ ├── ffmpeg-bitstream-filters.html │ ├── ffmpeg-codecs.html │ ├── ffmpeg-devices.html │ ├── ffmpeg-filters.html │ ├── ffmpeg-formats.html │ ├── ffmpeg-protocols.html │ ├── ffmpeg-resampler.html │ ├── ffmpeg-scaler.html │ ├── ffmpeg-utils.html │ ├── ffmpeg.html │ ├── ffplay-all.html │ ├── ffplay.html │ ├── ffprobe-all.html │ ├── ffprobe.html │ ├── general.html │ ├── git-howto.html │ ├── libavcodec.html │ ├── libavdevice.html │ ├── libavfilter.html │ ├── libavformat.html │ ├── libavutil.html │ ├── libswresample.html │ ├── libswscale.html │ ├── mailing-list-faq.html │ ├── nut.html │ ├── platform.html │ └── style.min.css ├── examples │ ├── Makefile │ ├── README │ ├── avio_dir_cmd.c │ ├── avio_reading.c │ ├── decode_audio.c │ ├── decode_video.c │ ├── demuxing_decoding.c │ ├── encode_audio.c │ ├── encode_video.c │ ├── extract_mvs.c │ ├── filter_audio.c │ ├── filtering_audio.c │ ├── filtering_video.c │ ├── http_multiclient.c │ ├── hw_decode.c │ ├── metadata.c │ ├── muxing.c │ ├── qsvdec.c │ ├── remuxing.c │ ├── resampling_audio.c │ ├── scaling_video.c │ ├── transcode_aac.c │ └── transcoding.c ├── include │ ├── libavcodec │ │ ├── avcodec.h │ │ ├── avdct.h │ │ ├── avfft.h │ │ ├── d3d11va.h │ │ ├── dirac.h │ │ ├── dv_profile.h │ │ ├── dxva2.h │ │ ├── jni.h │ │ ├── mediacodec.h │ │ ├── qsv.h │ │ ├── vaapi.h │ │ ├── vda.h │ │ ├── vdpau.h │ │ ├── version.h │ │ ├── videotoolbox.h │ │ ├── vorbis_parser.h │ │ └── xvmc.h │ ├── libavdevice │ │ ├── avdevice.h │ │ └── version.h │ ├── libavfilter │ │ ├── avfilter.h │ │ ├── avfiltergraph.h │ │ ├── buffersink.h │ │ ├── buffersrc.h │ │ └── version.h │ ├── libavformat │ │ ├── avformat.h │ │ ├── avio.h │ │ └── version.h │ ├── libavutil │ │ ├── adler32.h │ │ ├── aes.h │ │ ├── aes_ctr.h │ │ ├── attributes.h │ │ ├── audio_fifo.h │ │ ├── avassert.h │ │ ├── avconfig.h │ │ ├── avstring.h │ │ ├── avutil.h │ │ ├── base64.h │ │ ├── blowfish.h │ │ ├── bprint.h │ │ ├── bswap.h │ │ ├── buffer.h │ │ ├── camellia.h │ │ ├── cast5.h │ │ ├── channel_layout.h │ │ ├── common.h │ │ ├── cpu.h │ │ ├── crc.h │ │ ├── des.h │ │ ├── dict.h │ │ ├── display.h │ │ ├── downmix_info.h │ │ ├── error.h │ │ ├── eval.h │ │ ├── ffversion.h │ │ ├── fifo.h │ │ ├── file.h │ │ ├── frame.h │ │ ├── hash.h │ │ ├── hmac.h │ │ ├── hwcontext.h │ │ ├── hwcontext_cuda.h │ │ ├── hwcontext_d3d11va.h │ │ ├── hwcontext_drm.h │ │ ├── hwcontext_dxva2.h │ │ ├── hwcontext_qsv.h │ │ ├── hwcontext_vaapi.h │ │ ├── hwcontext_vdpau.h │ │ ├── hwcontext_videotoolbox.h │ │ ├── imgutils.h │ │ ├── intfloat.h │ │ ├── intreadwrite.h │ │ ├── lfg.h │ │ ├── log.h │ │ ├── lzo.h │ │ ├── macros.h │ │ ├── mastering_display_metadata.h │ │ ├── mathematics.h │ │ ├── md5.h │ │ ├── mem.h │ │ ├── motion_vector.h │ │ ├── murmur3.h │ │ ├── opt.h │ │ ├── parseutils.h │ │ ├── pixdesc.h │ │ ├── pixelutils.h │ │ ├── pixfmt.h │ │ ├── random_seed.h │ │ ├── rational.h │ │ ├── rc4.h │ │ ├── replaygain.h │ │ ├── ripemd.h │ │ ├── samplefmt.h │ │ ├── sha.h │ │ ├── sha512.h │ │ ├── spherical.h │ │ ├── stereo3d.h │ │ ├── tea.h │ │ ├── threadmessage.h │ │ ├── time.h │ │ ├── timecode.h │ │ ├── timestamp.h │ │ ├── tree.h │ │ ├── twofish.h │ │ ├── version.h │ │ └── xtea.h │ ├── libpostproc │ │ ├── postprocess.h │ │ └── version.h │ ├── libswresample │ │ ├── swresample.h │ │ └── version.h │ ├── libswscale │ │ ├── swscale.h │ │ └── version.h │ └── openssl │ │ ├── __DECC_INCLUDE_EPILOGUE.H │ │ ├── __DECC_INCLUDE_PROLOGUE.H │ │ ├── aes.h │ │ ├── applink.c │ │ ├── asn1.h │ │ ├── asn1_mac.h │ │ ├── asn1err.h │ │ ├── asn1t.h │ │ ├── async.h │ │ ├── asyncerr.h │ │ ├── bio.h │ │ ├── bioerr.h │ │ ├── blowfish.h │ │ ├── bn.h │ │ ├── bnerr.h │ │ ├── buffer.h │ │ ├── buffererr.h │ │ ├── camellia.h │ │ ├── cast.h │ │ ├── cmac.h │ │ ├── cms.h │ │ ├── cmserr.h │ │ ├── comp.h │ │ ├── comperr.h │ │ ├── conf.h │ │ ├── conf_api.h │ │ ├── conferr.h │ │ ├── crypto.h │ │ ├── cryptoerr.h │ │ ├── ct.h │ │ ├── cterr.h │ │ ├── des.h │ │ ├── dh.h │ │ ├── dherr.h │ │ ├── dsa.h │ │ ├── dsaerr.h │ │ ├── dtls1.h │ │ ├── e_os2.h │ │ ├── ebcdic.h │ │ ├── ec.h │ │ ├── ecdh.h │ │ ├── ecdsa.h │ │ ├── ecerr.h │ │ ├── engine.h │ │ ├── engineerr.h │ │ ├── err.h │ │ ├── evp.h │ │ ├── evperr.h │ │ ├── hmac.h │ │ ├── idea.h │ │ ├── kdf.h │ │ ├── kdferr.h │ │ ├── lhash.h │ │ ├── md2.h │ │ ├── md4.h │ │ ├── md5.h │ │ ├── mdc2.h │ │ ├── modes.h │ │ ├── obj_mac.h │ │ ├── objects.h │ │ ├── objectserr.h │ │ ├── ocsp.h │ │ ├── ocsperr.h │ │ ├── opensslconf.h │ │ ├── opensslv.h │ │ ├── ossl_typ.h │ │ ├── pem.h │ │ ├── pem2.h │ │ ├── pemerr.h │ │ ├── pkcs12.h │ │ ├── pkcs12err.h │ │ ├── pkcs7.h │ │ ├── pkcs7err.h │ │ ├── rand.h │ │ ├── rand_drbg.h │ │ ├── randerr.h │ │ ├── rc2.h │ │ ├── rc4.h │ │ ├── rc5.h │ │ ├── ripemd.h │ │ ├── rsa.h │ │ ├── rsaerr.h │ │ ├── safestack.h │ │ ├── seed.h │ │ ├── sha.h │ │ ├── srp.h │ │ ├── srtp.h │ │ ├── ssl.h │ │ ├── ssl2.h │ │ ├── ssl3.h │ │ ├── sslerr.h │ │ ├── stack.h │ │ ├── store.h │ │ ├── storeerr.h │ │ ├── symhacks.h │ │ ├── tls1.h │ │ ├── ts.h │ │ ├── tserr.h │ │ ├── txt_db.h │ │ ├── ui.h │ │ ├── uierr.h │ │ ├── whrlpool.h │ │ ├── x509.h │ │ ├── x509_vfy.h │ │ ├── x509err.h │ │ ├── x509v3.h │ │ └── x509v3err.h ├── lib │ ├── avcodec-57.def │ ├── avcodec.lib │ ├── avdevice-57.def │ ├── avdevice.lib │ ├── avfilter-6.def │ ├── avfilter.lib │ ├── avformat-57.def │ ├── avformat.lib │ ├── avutil-55.def │ ├── avutil.lib │ ├── libavcodec.dll.a │ ├── libavdevice.dll.a │ ├── libavfilter.dll.a │ ├── libavformat.dll.a │ ├── libavutil.dll.a │ ├── libcrypto32.lib │ ├── libpostproc.dll.a │ ├── libssl32.lib │ ├── libswresample.dll.a │ ├── libswscale.dll.a │ ├── postproc-54.def │ ├── postproc.lib │ ├── swresample-2.def │ ├── swresample.lib │ ├── swscale-4.def │ └── swscale.lib └── presets │ ├── ffprobe.xsd │ ├── libvpx-1080p.ffpreset │ ├── libvpx-1080p50_60.ffpreset │ ├── libvpx-360p.ffpreset │ ├── libvpx-720p.ffpreset │ └── libvpx-720p50_60.ffpreset ├── ffmpeg教程.pdf ├── main.cpp ├── player.ico ├── resource.h └── skin.zip /.github/workflows/cmake.yml: -------------------------------------------------------------------------------- 1 | name: CMake 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | env: 10 | # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) 11 | BUILD_TYPE: Release 12 | 13 | jobs: 14 | build: 15 | # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. 16 | # You can convert this to a matrix build if you need cross-platform coverage. 17 | # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix 18 | runs-on: windows-latest 19 | 20 | steps: 21 | - uses: actions/checkout@v3 22 | 23 | - name: Configure CMake 24 | # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. 25 | # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type 26 | run: cmake -A Win32 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} 27 | 28 | - name: Build 29 | # Build your program with the given configuration 30 | run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} 31 | 32 | 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.vs -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(QPlayer) 4 | 5 | # this line is for UNICODE release,which is required by DuiDesigner 6 | add_definitions(-DUNICODE -D_UNICODE) 7 | 8 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg/bin) 9 | link_directories(${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg/lib) 10 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg/include) 11 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") 12 | 13 | # add each CMake file 14 | add_definitions(-DUILIB_STATIC) 15 | add_subdirectory(duilib) 16 | include_directories(. Duilib) 17 | 18 | aux_source_directory(. source_files) 19 | aux_source_directory(audio source_files) 20 | aux_source_directory(dlna source_files) 21 | 22 | add_executable(QPlayer ${source_files} QPlayer.rc) 23 | set_target_properties(QPlayer PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS") 24 | add_dependencies(QPlayer duilib) 25 | 26 | target_link_libraries(QPlayer duilib avformat avcodec avutil swscale swresample) 27 | #add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD 28 | # COMMAND ${CMAKE_COMMAND} -E copy_if_different 29 | # ${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg/bin/*.dll $) -------------------------------------------------------------------------------- /DrawVideo.h: -------------------------------------------------------------------------------- 1 | //绘制图像类 2 | //JC 2013-07-31 3 | #ifndef AVLIB_DRAWVIDEO_H_ 4 | #define AVLIB_DRAWVIDEO_H_ 5 | #include 6 | class CDrawVideo 7 | { 8 | //Attributes 9 | protected: 10 | HWND m_hWnd; 11 | HDRAWDIB m_hDib; 12 | BITMAPINFO bih; 13 | RECT m_rect; 14 | BOOL m_bUseGDI; 15 | BOOL m_bFit; 16 | // 背景色 17 | COLORREF m_clrBK; 18 | public: 19 | CDrawVideo(); 20 | ~CDrawVideo(); 21 | 22 | void SetFitMode(BOOL bFit); 23 | void SetBkColor(COLORREF color){ m_clrBK = color; } 24 | 25 | BOOL Init(HWND hWnd); 26 | void Release(){} 27 | 28 | //绘制RGB数据 数据长度为width*height*3 29 | void Draw(BYTE *pBuf,int width, int height, LPCTSTR szText=NULL); 30 | }; 31 | 32 | #endif //AVLIB_DRAWVIDEO_H_ -------------------------------------------------------------------------------- /Duilib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # cmake file for duilib 2 | #Author Qi Gao(monkgau@gmail.com) 3 | #Created: 2012/09/16 4 | 5 | aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} Root_src) 6 | aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Control Control_src) 7 | aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Core Core_src) 8 | aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Layout Layout_src) 9 | aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Utils Utils_src) 10 | 11 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 12 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Control) 13 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Core) 14 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Layout) 15 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Utils) 16 | 17 | set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) 18 | add_library(duilib STATIC ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src}) 19 | 20 | 21 | add_definitions(-DUILIB_STATIC) 22 | target_link_libraries(duilib comctl32) 23 | set_target_properties(duilib PROPERTIES OUTPUT_NAME "duilib") 24 | -------------------------------------------------------------------------------- /Duilib/Control/UIActiveX.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIActiveX.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIActiveX.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIACTIVEX_H__ 2 | #define __UIACTIVEX_H__ 3 | 4 | #pragma once 5 | 6 | struct IOleObject; 7 | 8 | 9 | namespace DuiLib { 10 | ///////////////////////////////////////////////////////////////////////////////////// 11 | // 12 | 13 | class CActiveXCtrl; 14 | 15 | template< class T > 16 | class CSafeRelease 17 | { 18 | public: 19 | CSafeRelease(T* p) : m_p(p) { }; 20 | ~CSafeRelease() { if( m_p != NULL ) m_p->Release(); }; 21 | T* Detach() { T* t = m_p; m_p = NULL; return t; }; 22 | T* m_p; 23 | }; 24 | 25 | ///////////////////////////////////////////////////////////////////////////////////// 26 | // 27 | 28 | class UILIB_API CActiveXUI : public CControlUI, public IMessageFilterUI 29 | { 30 | DECLARE_DUICONTROL(CActiveXUI) 31 | 32 | friend class CActiveXCtrl; 33 | public: 34 | CActiveXUI(); 35 | virtual ~CActiveXUI(); 36 | 37 | LPCTSTR GetClass() const; 38 | LPVOID GetInterface(LPCTSTR pstrName); 39 | 40 | HWND GetHostWindow() const; 41 | 42 | virtual bool IsDelayCreate() const; 43 | virtual void SetDelayCreate(bool bDelayCreate = true); 44 | virtual bool IsMFC() const; 45 | virtual void SetMFC(bool bMFC = false); 46 | 47 | bool CreateControl(const CLSID clsid); 48 | bool CreateControl(LPCTSTR pstrCLSID); 49 | HRESULT GetControl(const IID iid, LPVOID* ppRet); 50 | CLSID GetClisd() const; 51 | CDuiString GetModuleName() const; 52 | void SetModuleName(LPCTSTR pstrText); 53 | 54 | void SetVisible(bool bVisible = true); 55 | void SetInternVisible(bool bVisible = true); 56 | void SetPos(RECT rc, bool bNeedInvalidate = true); 57 | void Move(SIZE szOffset, bool bNeedInvalidate = true); 58 | bool DoPaint(HDC hDC, const RECT& rcPaint, CControlUI* pStopControl); 59 | 60 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 61 | 62 | LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled); 63 | 64 | protected: 65 | virtual void ReleaseControl(); 66 | virtual bool DoCreateControl(); 67 | 68 | protected: 69 | CLSID m_clsid; 70 | CDuiString m_sModuleName; 71 | bool m_bCreated; 72 | bool m_bDelayCreate; 73 | bool m_bMFC; 74 | IOleObject* m_pUnk; 75 | CActiveXCtrl* m_pControl; 76 | HWND m_hwndHost; 77 | }; 78 | 79 | } // namespace DuiLib 80 | 81 | #endif // __UIACTIVEX_H__ 82 | -------------------------------------------------------------------------------- /Duilib/Control/UIAnimation.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIANIMATION_H__ 2 | #define __UIANIMATION_H__ 3 | 4 | #include "UIButton.h" 5 | #pragma once 6 | 7 | namespace DuiLib { 8 | 9 | class UILIB_API IUIAnimation 10 | { 11 | public: 12 | virtual ~IUIAnimation() { NULL; } 13 | 14 | virtual BOOL StartAnimation(int nElapse, int nTotalFrame, int nAnimationID = 0, BOOL bLoop = FALSE) = 0; 15 | virtual void StopAnimation(int nAnimationID = 0) = 0; 16 | virtual BOOL IsAnimationRunning(int nAnimationID) = 0; 17 | virtual int GetCurrentFrame(int nAnimationID = 0) = 0; 18 | virtual BOOL SetCurrentFrame(int nFrame, int nAnimationID = 0) = 0; 19 | 20 | virtual void OnAnimationStep(int nTotalFrame, int nCurFrame, int nAnimationID) = 0; 21 | virtual void OnAnimationStart(int nAnimationID, BOOL bFirstLoop) = 0; 22 | virtual void OnAnimationStop(int nAnimationID) = 0; 23 | 24 | virtual void OnAnimationElapse(int nAnimationID) = 0; 25 | }; 26 | 27 | class UILIB_API CAnimationData 28 | { 29 | public: 30 | CAnimationData(int nElipse, int nFrame, int nID, BOOL bLoop) 31 | { 32 | m_bFirstLoop = TRUE; 33 | m_nCurFrame = 0; 34 | m_nElapse = nElipse; 35 | m_nTotalFrame = nFrame; 36 | m_bLoop = bLoop; 37 | m_nAnimationID = nID; 38 | } 39 | 40 | //protected: 41 | public: 42 | friend class CDUIAnimation; 43 | 44 | int m_nAnimationID; 45 | int m_nElapse; 46 | 47 | int m_nTotalFrame; 48 | int m_nCurFrame; 49 | 50 | BOOL m_bLoop; 51 | BOOL m_bFirstLoop; 52 | }; 53 | 54 | class UILIB_API CUIAnimation: public IUIAnimation 55 | { 56 | struct Imp; 57 | public: 58 | CUIAnimation(CControlUI* pOwner); 59 | ~CUIAnimation(); 60 | 61 | virtual BOOL StartAnimation(int nElapse, int nTotalFrame, int nAnimationID = 0, BOOL bLoop = FALSE); 62 | virtual void StopAnimation(int nAnimationID = 0); 63 | virtual BOOL IsAnimationRunning(int nAnimationID); 64 | virtual int GetCurrentFrame(int nAnimationID = 0); 65 | virtual BOOL SetCurrentFrame(int nFrame, int nAnimationID = 0); 66 | 67 | virtual void OnAnimationStart(int nAnimationID, BOOL bFirstLoop) {}; 68 | virtual void OnAnimationStep(int nTotalFrame, int nCurFrame, int nAnimationID) {}; 69 | virtual void OnAnimationStop(int nAnimationID) {}; 70 | 71 | virtual void OnAnimationElapse(int nAnimationID); 72 | 73 | protected: 74 | CAnimationData* GetAnimationDataByID(int nAnimationID); 75 | 76 | protected: 77 | CControlUI* m_pControl; 78 | Imp * m_pImp; 79 | }; 80 | 81 | } // namespace DuiLib 82 | 83 | #endif // __UIANIMATION_H__ -------------------------------------------------------------------------------- /Duilib/Control/UIColorPalette.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIColorPalette.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIColorPalette.h: -------------------------------------------------------------------------------- 1 | #ifndef UI_PALLET_H 2 | #define UI_PALLET_H 3 | #pragma once 4 | 5 | namespace DuiLib { 6 | ///////////////////////////////////////////////////////////////////////////////////// 7 | // 8 | class UILIB_API CColorPaletteUI : public CControlUI 9 | { 10 | DECLARE_DUICONTROL(CColorPaletteUI) 11 | public: 12 | CColorPaletteUI(); 13 | virtual ~CColorPaletteUI(); 14 | 15 | //获取最终被选择的颜色,可以直接用于设置duilib背景色 16 | DWORD GetSelectColor(); 17 | void SetSelectColor(DWORD dwColor); 18 | 19 | virtual LPCTSTR GetClass() const; 20 | virtual LPVOID GetInterface(LPCTSTR pstrName); 21 | virtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 22 | 23 | //设置/获取 Pallet(调色板主界面)的高度 24 | void SetPalletHeight(int nHeight); 25 | int GetPalletHeight() const; 26 | 27 | //设置/获取 下方Bar(亮度选择栏)的高度 28 | void SetBarHeight(int nHeight); 29 | int GetBarHeight() const; 30 | //设置/获取 选择图标的路径 31 | void SetThumbImage(LPCTSTR pszImage); 32 | LPCTSTR GetThumbImage() const; 33 | 34 | virtual void SetPos(RECT rc, bool bNeedInvalidate = true); 35 | virtual void DoInit(); 36 | virtual void DoEvent(TEventUI& event); 37 | virtual void PaintBkColor(HDC hDC); 38 | virtual void PaintPallet(HDC hDC); 39 | 40 | protected: 41 | //更新数据 42 | void UpdatePalletData(); 43 | void UpdateBarData(); 44 | 45 | private: 46 | HDC m_MemDc; 47 | HBITMAP m_hMemBitmap; 48 | BITMAP m_bmInfo; 49 | BYTE *m_pBits; 50 | UINT m_uButtonState; 51 | bool m_bIsInBar; 52 | bool m_bIsInPallet; 53 | int m_nCurH; 54 | int m_nCurS; 55 | int m_nCurB; 56 | 57 | int m_nPalletHeight; 58 | int m_nBarHeight; 59 | CDuiPoint m_ptLastPalletMouse; 60 | CDuiPoint m_ptLastBarMouse; 61 | CDuiString m_strThumbImage; 62 | }; 63 | } 64 | 65 | #endif // UI_PALLET_H -------------------------------------------------------------------------------- /Duilib/Control/UICombo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UICombo.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIComboBox.h: -------------------------------------------------------------------------------- 1 | #ifndef __UICOMBOBOX_H__ 2 | #define __UICOMBOBOX_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | /// 扩展下拉列表框 9 | /// 增加arrowimage属性,一张图片平均分成5份,Normal/Hot/Pushed/Focused/Disabled(必须有source属性) 10 | /// 11 | class UILIB_API CComboBoxUI : public CComboUI 12 | { 13 | DECLARE_DUICONTROL(CComboBoxUI) 14 | public: 15 | CComboBoxUI(); 16 | LPCTSTR GetClass() const; 17 | 18 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 19 | 20 | void PaintText(HDC hDC); 21 | void PaintStatusImage(HDC hDC); 22 | 23 | protected: 24 | CDuiString m_sArrowImage; 25 | int m_nArrowWidth; 26 | }; 27 | } 28 | 29 | #endif // __UICOMBOBOX_H__ 30 | -------------------------------------------------------------------------------- /Duilib/Control/UIDateTime.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIDATETIME_H__ 2 | #define __UIDATETIME_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class CDateTimeWnd; 9 | 10 | /// 时间选择控件 11 | class UILIB_API CDateTimeUI : public CLabelUI 12 | { 13 | DECLARE_DUICONTROL(CDateTimeUI) 14 | friend class CDateTimeWnd; 15 | public: 16 | CDateTimeUI(); 17 | LPCTSTR GetClass() const; 18 | LPVOID GetInterface(LPCTSTR pstrName); 19 | 20 | SYSTEMTIME& GetTime(); 21 | void SetTime(SYSTEMTIME* pst); 22 | 23 | void SetReadOnly(bool bReadOnly); 24 | bool IsReadOnly() const; 25 | 26 | void UpdateText(); 27 | 28 | void DoEvent(TEventUI& event); 29 | 30 | protected: 31 | SYSTEMTIME m_sysTime; 32 | int m_nDTUpdateFlag; 33 | bool m_bReadOnly; 34 | 35 | CDateTimeWnd* m_pWindow; 36 | }; 37 | } 38 | #endif // __UIDATETIME_H__ -------------------------------------------------------------------------------- /Duilib/Control/UIFadeButton.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIFADEBUTTON_H__ 2 | #define __UIFADEBUTTON_H__ 3 | 4 | #include "UIAnimation.h" 5 | #pragma once 6 | 7 | namespace DuiLib { 8 | 9 | class UILIB_API CFadeButtonUI : public CButtonUI, public CUIAnimation 10 | { 11 | DECLARE_DUICONTROL(CFadeButtonUI) 12 | public: 13 | CFadeButtonUI(); 14 | virtual ~CFadeButtonUI(); 15 | 16 | LPCTSTR GetClass() const; 17 | LPVOID GetInterface(LPCTSTR pstrName); 18 | void SetNormalImage(LPCTSTR pStrImage); 19 | 20 | void DoEvent(TEventUI& event); 21 | void OnTimer( int nTimerID ); 22 | void PaintStatusImage(HDC hDC); 23 | 24 | virtual void OnAnimationStart(INT nAnimationID, BOOL bFirstLoop) {} 25 | virtual void OnAnimationStep(INT nTotalFrame, INT nCurFrame, INT nAnimationID); 26 | virtual void OnAnimationStop(INT nAnimationID) {} 27 | 28 | protected: 29 | CDuiString m_sOldImage; 30 | CDuiString m_sNewImage; 31 | CDuiString m_sLastImage; 32 | BYTE m_bFadeAlpha; 33 | BOOL m_bMouseHove; 34 | BOOL m_bMouseLeave; 35 | enum{ 36 | FADE_IN_ID = 8, 37 | FADE_OUT_ID = 9, 38 | FADE_ELLAPSE = 10, 39 | FADE_FRAME_COUNT = 30, 40 | }; 41 | }; 42 | 43 | } // namespace DuiLib 44 | 45 | #endif // __UIFADEBUTTON_H__ -------------------------------------------------------------------------------- /Duilib/Control/UIFlash.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIFlash.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIFlash.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIFLASH_H__ 2 | #define __UIFLASH_H__ 3 | #pragma once 4 | 5 | // \Utils\Flash11.tlb 为Flash11接口文件,部分方法在低版本不存在,使用需注意 6 | // #import "PROGID:ShockwaveFlash.ShockwaveFlash" \ 7 | // raw_interfaces_only, /* Don't add raw_ to method names */ \ 8 | // named_guids, /* Named guids and declspecs */ \ 9 | // rename("IDispatchEx","IMyDispatchEx") /* fix conflicting with IDispatchEx ant dispex.h */ 10 | // using namespace ShockwaveFlashObjects; 11 | #include "Utils/FlashEventHandler.h" 12 | #include "Utils/flash11.tlh" 13 | 14 | class CActiveXCtrl; 15 | 16 | namespace DuiLib 17 | { 18 | class UILIB_API CFlashUI 19 | : public CActiveXUI 20 | // , public IOleInPlaceSiteWindowless // 透明模式绘图,需要实现这个接口 21 | , public _IShockwaveFlashEvents 22 | , public ITranslateAccelerator 23 | { 24 | DECLARE_DUICONTROL(CFlashUI) 25 | public: 26 | CFlashUI(void); 27 | ~CFlashUI(void); 28 | 29 | void SetFlashEventHandler(CFlashEventHandler* pHandler); 30 | virtual bool DoCreateControl(); 31 | IShockwaveFlash* m_pFlash; 32 | 33 | private: 34 | virtual LPCTSTR GetClass() const; 35 | virtual LPVOID GetInterface( LPCTSTR pstrName ); 36 | 37 | virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount( __RPC__out UINT *pctinfo ); 38 | virtual HRESULT STDMETHODCALLTYPE GetTypeInfo( UINT iTInfo, LCID lcid, __RPC__deref_out_opt ITypeInfo **ppTInfo ); 39 | virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames( __RPC__in REFIID riid, __RPC__in_ecount_full(cNames ) LPOLESTR *rgszNames, UINT cNames, LCID lcid, __RPC__out_ecount_full(cNames) DISPID *rgDispId); 40 | virtual HRESULT STDMETHODCALLTYPE Invoke( DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr ); 41 | 42 | virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void **ppvObject ); 43 | virtual ULONG STDMETHODCALLTYPE AddRef( void ); 44 | virtual ULONG STDMETHODCALLTYPE Release( void ); 45 | 46 | HRESULT OnReadyStateChange (long newState); 47 | HRESULT OnProgress(long percentDone ); 48 | HRESULT FSCommand (_bstr_t command, _bstr_t args); 49 | HRESULT FlashCall (_bstr_t request ); 50 | 51 | virtual void ReleaseControl(); 52 | HRESULT RegisterEventHandler(BOOL inAdvise); 53 | 54 | // ITranslateAccelerator 55 | // Duilib消息分发给WebBrowser 56 | virtual LRESULT TranslateAccelerator( MSG *pMsg ); 57 | 58 | private: 59 | LONG m_dwRef; 60 | DWORD m_dwCookie; 61 | CFlashEventHandler* m_pFlashEventHandler; 62 | }; 63 | } 64 | 65 | #endif // __UIFLASH_H__ 66 | -------------------------------------------------------------------------------- /Duilib/Control/UIGifAnim.h: -------------------------------------------------------------------------------- 1 | #ifndef GifAnimUI_h__ 2 | #define GifAnimUI_h__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CGifAnimUI : public CControlUI 9 | { 10 | enum 11 | { 12 | EVENT_TIEM_ID = 100, 13 | }; 14 | DECLARE_DUICONTROL(CGifAnimUI) 15 | public: 16 | CGifAnimUI(void); 17 | ~CGifAnimUI(void); 18 | 19 | LPCTSTR GetClass() const; 20 | LPVOID GetInterface(LPCTSTR pstrName); 21 | void DoInit(); 22 | bool DoPaint(HDC hDC, const RECT& rcPaint, CControlUI* pStopControl); 23 | void DoEvent(TEventUI& event); 24 | void SetVisible(bool bVisible = true ); 25 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 26 | void SetBkImage(LPCTSTR pStrImage); 27 | LPCTSTR GetBkImage(); 28 | 29 | void SetAutoPlay(bool bIsAuto = true ); 30 | bool IsAutoPlay() const; 31 | void SetAutoSize(bool bIsAuto = true ); 32 | bool IsAutoSize() const; 33 | void PlayGif(); 34 | void PauseGif(); 35 | void StopGif(); 36 | 37 | private: 38 | void InitGifImage(); 39 | void DeleteGif(); 40 | void OnTimer( UINT_PTR idEvent ); 41 | void DrawFrame( HDC hDC ); // 绘制GIF每帧 42 | 43 | private: 44 | Gdiplus::Image *m_pGifImage; 45 | UINT m_nFrameCount; // gif图片总帧数 46 | UINT m_nFramePosition; // 当前放到第几帧 47 | Gdiplus::PropertyItem* m_pPropertyItem; // 帧与帧之间间隔时间 48 | 49 | CDuiString m_sBkImage; 50 | bool m_bIsAutoPlay; // 是否自动播放gif 51 | bool m_bIsAutoSize; // 是否自动根据图片设置大小 52 | bool m_bIsPlaying; 53 | }; 54 | } 55 | 56 | #endif // GifAnimUI_h__ 57 | -------------------------------------------------------------------------------- /Duilib/Control/UIGifAnimEx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIGifAnimEx.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIGifAnimEx.h: -------------------------------------------------------------------------------- 1 | #ifndef GifAnimUIEX_h__ 2 | #define GifAnimUIEX_h__ 3 | #pragma once 4 | /* write by wangji 2016.03.16 5 | ** 解决多个gif控件在gdi+环境下占用CPU过高的问题,本类采用ximage替代 6 | ** 注意:使用的时候在预编译头文件中包含UIlib.h前先定义宏USE_XIMAGE_EFFECT 7 | ** #define USE_XIMAGE_EFFECT 8 | ** #include "UIlib.h" 9 | */ 10 | #ifdef USE_XIMAGE_EFFECT 11 | namespace DuiLib 12 | { 13 | class CLabelUI; 14 | 15 | class UILIB_API CGifAnimExUI : public CLabelUI 16 | { 17 | DECLARE_DUICONTROL(CGifAnimExUI) 18 | public: 19 | CGifAnimExUI(void); 20 | ~CGifAnimExUI(void); 21 | public: 22 | virtual LPCTSTR GetClass() const; 23 | virtual LPVOID GetInterface(LPCTSTR pstrName); 24 | virtual void Init(); 25 | virtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 26 | virtual void SetVisible(bool bVisible = true); 27 | virtual void SetInternVisible(bool bVisible = true); 28 | virtual bool DoPaint(HDC hDC, const RECT& rcPaint, CControlUI* pStopControl); 29 | virtual void DoEvent(TEventUI& event); 30 | public: 31 | void StartAnim(); 32 | void StopAnim(); 33 | protected: 34 | struct Imp; 35 | Imp* m_pImp; 36 | }; 37 | } 38 | #endif //USE_XIMAGE_EFFECT 39 | #endif // GifAnimUIEx_h__ 40 | -------------------------------------------------------------------------------- /Duilib/Control/UIGroupBox.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIGroupBox.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIGroupBox.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIGROUPBOX_H__ 2 | #define __UIGROUPBOX_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | 9 | class UILIB_API CGroupBoxUI : public CVerticalLayoutUI 10 | { 11 | DECLARE_DUICONTROL(CGroupBoxUI) 12 | public: 13 | CGroupBoxUI(); 14 | ~CGroupBoxUI(); 15 | LPCTSTR GetClass() const; 16 | LPVOID GetInterface(LPCTSTR pstrName); 17 | void SetTextColor(DWORD dwTextColor); 18 | DWORD GetTextColor() const; 19 | void SetDisabledTextColor(DWORD dwTextColor); 20 | DWORD GetDisabledTextColor() const; 21 | void SetFont(int index); 22 | int GetFont() const; 23 | 24 | protected: 25 | //Paint 26 | virtual void PaintText(HDC hDC); 27 | virtual void PaintBorder(HDC hDC); 28 | virtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 29 | 30 | private: 31 | SIZE CalcrectSize(SIZE szAvailable); 32 | 33 | protected: 34 | DWORD m_dwTextColor; 35 | DWORD m_dwDisabledTextColor; 36 | int m_iFont; 37 | UINT m_uTextStyle; 38 | }; 39 | } 40 | #endif // __UIGROUPBOX_H__ -------------------------------------------------------------------------------- /Duilib/Control/UIHotKey.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIHotKey.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIIPAddress.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIIPAddress.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIIPAddress.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIIPADDRESS_H__ 2 | #define __UIIPADDRESS_H__ 3 | 4 | #pragma once 5 | 6 | //给该控件添加一个属性dtstyle 7 | 8 | namespace DuiLib 9 | { 10 | class CIPAddressWnd; 11 | 12 | /// 时间选择控件 13 | class UILIB_API CIPAddressUI : public CLabelUI 14 | { 15 | DECLARE_DUICONTROL(CIPAddressUI) 16 | 17 | friend class CIPAddressWnd; 18 | public: 19 | CIPAddressUI(); 20 | LPCTSTR GetClass() const; 21 | LPVOID GetInterface(LPCTSTR pstrName); 22 | 23 | DWORD GetIP(); 24 | void SetIP(DWORD dwIP); 25 | 26 | void SetReadOnly(bool bReadOnly); 27 | bool IsReadOnly() const; 28 | 29 | void UpdateText(); 30 | 31 | void DoEvent(TEventUI& event); 32 | 33 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 34 | 35 | protected: 36 | DWORD m_dwIP; 37 | bool m_bReadOnly; 38 | int m_nIPUpdateFlag; 39 | 40 | CIPAddressWnd* m_pWindow; 41 | }; 42 | } 43 | #endif // __UIIPADDRESS_H__ -------------------------------------------------------------------------------- /Duilib/Control/UIIPAddressEx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIIPAddressEx.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIIPAddressEx.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIIPADDRESSEX_H__ 2 | #define __UIIPADDRESSEX_H__ 3 | 4 | #pragma once 5 | 6 | //给该控件添加一个属性dtstyle 7 | 8 | namespace DuiLib 9 | { 10 | 11 | /// IP输入控件 12 | class UILIB_API CIPAddressExUI : public CEditUI 13 | { 14 | DECLARE_DUICONTROL(CIPAddressExUI) 15 | public: 16 | CIPAddressExUI(); 17 | LPCTSTR GetClass() const; 18 | LPVOID GetInterface(LPCTSTR pstrName); 19 | UINT GetControlFlags() const; 20 | void DoEvent(TEventUI& event); 21 | void PaintText(HDC hDC); 22 | 23 | void SetIP(LPCWSTR lpIP); 24 | CDuiString GetIP(); 25 | 26 | private: 27 | void CharToInt(); 28 | void GetNumInput(TCHAR chKey); 29 | void UpdateText(); 30 | void IncNum(); 31 | void DecNum(); 32 | 33 | protected: 34 | int m_nFirst; 35 | int m_nSecond; 36 | int m_nThird; 37 | int m_nFourth; 38 | int m_nActiveSection; 39 | 40 | TCHAR m_chNum; 41 | CDuiString m_strNum; 42 | }; 43 | } 44 | #endif // __UIIPADDRESSEX_H__ -------------------------------------------------------------------------------- /Duilib/Control/UILabel.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UILabel.cpp -------------------------------------------------------------------------------- /Duilib/Control/UILabel.h: -------------------------------------------------------------------------------- 1 | #ifndef __UILABEL_H__ 2 | #define __UILABEL_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CLabelUI : public CControlUI 9 | { 10 | DECLARE_DUICONTROL(CLabelUI) 11 | public: 12 | CLabelUI(); 13 | ~CLabelUI(); 14 | 15 | LPCTSTR GetClass() const; 16 | LPVOID GetInterface(LPCTSTR pstrName); 17 | UINT GetControlFlags() const; 18 | 19 | void SetTextStyle(UINT uStyle); 20 | UINT GetTextStyle() const; 21 | void SetTextColor(DWORD dwTextColor); 22 | DWORD GetTextColor() const; 23 | void SetDisabledTextColor(DWORD dwTextColor); 24 | DWORD GetDisabledTextColor() const; 25 | void SetFont(int index); 26 | int GetFont() const; 27 | RECT GetTextPadding() const; 28 | void SetTextPadding(RECT rc); 29 | bool IsShowHtml(); 30 | void SetShowHtml(bool bShowHtml = true); 31 | 32 | SIZE EstimateSize(SIZE szAvailable); 33 | void DoEvent(TEventUI& event); 34 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 35 | 36 | void PaintText(HDC hDC); 37 | 38 | virtual bool GetAutoCalcWidth() const; 39 | virtual void SetAutoCalcWidth(bool bAutoCalcWidth); 40 | virtual bool GetAutoCalcHeight() const; 41 | virtual void SetAutoCalcHeight(bool bAutoCalcHeight); 42 | virtual void SetText(LPCTSTR pstrText); 43 | 44 | protected: 45 | DWORD m_dwTextColor; 46 | DWORD m_dwDisabledTextColor; 47 | int m_iFont; 48 | UINT m_uTextStyle; 49 | RECT m_rcTextPadding; 50 | bool m_bShowHtml; 51 | bool m_bAutoCalcWidth; 52 | bool m_bAutoCalcHeight; 53 | 54 | SIZE m_szAvailableLast; 55 | SIZE m_cxyFixedLast; 56 | bool m_bNeedEstimateSize; 57 | }; 58 | } 59 | 60 | #endif // __UILABEL_H__ -------------------------------------------------------------------------------- /Duilib/Control/UIList.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIList.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIListEx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIListEx.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIMenu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIMenu.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIProgress.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIPROGRESS_H__ 2 | #define __UIPROGRESS_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CProgressUI : public CLabelUI 9 | { 10 | DECLARE_DUICONTROL(CProgressUI) 11 | public: 12 | CProgressUI(); 13 | 14 | LPCTSTR GetClass() const; 15 | LPVOID GetInterface(LPCTSTR pstrName); 16 | 17 | bool IsShowText(); 18 | void SetShowText(bool bShowText = true); 19 | bool IsHorizontal(); 20 | void SetHorizontal(bool bHorizontal = true); 21 | bool IsStretchForeImage(); 22 | void SetStretchForeImage(bool bStretchForeImage = true); 23 | int GetMinValue() const; 24 | void SetMinValue(int nMin); 25 | int GetMaxValue() const; 26 | void SetMaxValue(int nMax); 27 | int GetValue() const; 28 | void SetValue(int nValue); 29 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 30 | void PaintForeColor(HDC hDC); 31 | void PaintForeImage(HDC hDC); 32 | virtual void UpdateText(); 33 | 34 | protected: 35 | bool m_bShowText; 36 | bool m_bHorizontal; 37 | bool m_bStretchForeImage; 38 | int m_nMax; 39 | int m_nMin; 40 | int m_nValue; 41 | 42 | CDuiString m_sForeImageModify; 43 | }; 44 | 45 | } // namespace DuiLib 46 | 47 | #endif // __UIPROGRESS_H__ 48 | -------------------------------------------------------------------------------- /Duilib/Control/UIRichEdit.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIRichEdit.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIRing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIRing.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIRing.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIROTATE_H__ 2 | #define __UIROTATE_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class CRingUI : public CLabelUI 9 | { 10 | enum 11 | { 12 | RING_TIMERID = 100, 13 | }; 14 | DECLARE_DUICONTROL(CRingUI) 15 | public: 16 | CRingUI(); 17 | ~CRingUI(); 18 | 19 | LPCTSTR GetClass() const; 20 | LPVOID GetInterface(LPCTSTR pstrName); 21 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 22 | void SetBkImage(LPCTSTR pStrImage); 23 | virtual void DoEvent(TEventUI& event); 24 | virtual void PaintBkImage(HDC hDC); 25 | 26 | private: 27 | void InitImage(); 28 | void DeleteImage(); 29 | 30 | public: 31 | float m_fCurAngle; 32 | Gdiplus::Image* m_pBkimage; 33 | }; 34 | } 35 | 36 | #endif // __UIROTATE_H__ -------------------------------------------------------------------------------- /Duilib/Control/UIRollText.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIRollText.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIRollText.h: -------------------------------------------------------------------------------- 1 | #ifndef __UITEXTSCROLLH__ 2 | #define __UITEXTSCROLLH__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | #define ROLLTEXT_LEFT 0 9 | #define ROLLTEXT_RIGHT 1 10 | #define ROLLTEXT_UP 2 11 | #define ROLLTEXT_DOWN 3 12 | 13 | #define ROLLTEXT_TIMERID 20 14 | #define ROLLTEXT_TIMERID_SPAN 50U 15 | 16 | #define ROLLTEXT_ROLL_END 21 17 | #define ROLLTEXT_ROLL_END_SPAN 1000*6U 18 | 19 | class UILIB_API CRollTextUI : public CLabelUI 20 | { 21 | DECLARE_DUICONTROL(CRollTextUI) 22 | public: 23 | CRollTextUI(void); 24 | ~CRollTextUI(void); 25 | 26 | public: 27 | LPCTSTR GetClass() const; 28 | LPVOID GetInterface(LPCTSTR pstrName); 29 | 30 | public: 31 | virtual void PaintText(HDC hDC); 32 | virtual void DoEvent(TEventUI& event); 33 | virtual void SetPos(RECT rc); 34 | virtual void SetText(LPCTSTR pstrText); 35 | 36 | public: 37 | void BeginRoll(int nDirect = ROLLTEXT_RIGHT, LONG lTimeSpan = ROLLTEXT_TIMERID_SPAN, LONG lMaxTimeLimited = 60); 38 | void EndRoll(); 39 | 40 | private: 41 | int m_nStep; 42 | int m_nScrollPos; 43 | BOOL m_bUseRoll; 44 | int m_nRollDirection; 45 | int m_nText_W_H; 46 | }; 47 | 48 | } // namespace DuiLib 49 | 50 | #endif // __UITEXTSCROLLH__ -------------------------------------------------------------------------------- /Duilib/Control/UISlider.h: -------------------------------------------------------------------------------- 1 | #ifndef __UISLIDER_H__ 2 | #define __UISLIDER_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CSliderUI : public CProgressUI 9 | { 10 | DECLARE_DUICONTROL(CSliderUI) 11 | public: 12 | CSliderUI(); 13 | 14 | LPCTSTR GetClass() const; 15 | UINT GetControlFlags() const; 16 | LPVOID GetInterface(LPCTSTR pstrName); 17 | 18 | void SetEnabled(bool bEnable = true); 19 | 20 | int GetChangeStep(); 21 | void SetChangeStep(int step); 22 | void SetThumbSize(SIZE szXY); 23 | RECT GetThumbRect() const; 24 | LPCTSTR GetThumbImage() const; 25 | void SetThumbImage(LPCTSTR pStrImage); 26 | LPCTSTR GetThumbHotImage() const; 27 | void SetThumbHotImage(LPCTSTR pStrImage); 28 | LPCTSTR GetThumbPushedImage() const; 29 | void SetThumbPushedImage(LPCTSTR pStrImage); 30 | 31 | void DoEvent(TEventUI& event); 32 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 33 | void PaintForeImage(HDC hDC); 34 | 35 | void SetValue(int nValue); 36 | void SetCanSendMove(bool bCanSend); 37 | bool GetCanSendMove() const; 38 | protected: 39 | SIZE m_szThumb; 40 | UINT m_uButtonState; 41 | int m_nStep; 42 | 43 | CDuiString m_sThumbImage; 44 | CDuiString m_sThumbHotImage; 45 | CDuiString m_sThumbPushedImage; 46 | 47 | CDuiString m_sImageModify; 48 | bool m_bSendMove; 49 | }; 50 | } 51 | 52 | #endif // __UISLIDER_H__ -------------------------------------------------------------------------------- /Duilib/Control/UIText.h: -------------------------------------------------------------------------------- 1 | #ifndef __UITEXT_H__ 2 | #define __UITEXT_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CTextUI : public CLabelUI 9 | { 10 | DECLARE_DUICONTROL(CTextUI) 11 | public: 12 | CTextUI(); 13 | ~CTextUI(); 14 | 15 | LPCTSTR GetClass() const; 16 | UINT GetControlFlags() const; 17 | LPVOID GetInterface(LPCTSTR pstrName); 18 | 19 | CDuiString* GetLinkContent(int iIndex); 20 | 21 | void DoEvent(TEventUI& event); 22 | SIZE EstimateSize(SIZE szAvailable); 23 | 24 | void PaintText(HDC hDC); 25 | 26 | protected: 27 | enum { MAX_LINK = 8 }; 28 | int m_nLinks; 29 | RECT m_rcLinks[MAX_LINK]; 30 | CDuiString m_sLinks[MAX_LINK]; 31 | int m_nHoverLink; 32 | }; 33 | 34 | } // namespace DuiLib 35 | 36 | #endif //__UITEXT_H__ -------------------------------------------------------------------------------- /Duilib/Control/UITreeView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UITreeView.cpp -------------------------------------------------------------------------------- /Duilib/Control/UIWebBrowser.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Control/UIWebBrowser.cpp -------------------------------------------------------------------------------- /Duilib/Core/ControlFactory.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | namespace DuiLib 4 | { 5 | typedef CControlUI* (*CreateClass)(); 6 | typedef std::map MAP_DUI_CTRATECLASS; 7 | 8 | class UILIB_API CControlFactory 9 | { 10 | public: 11 | CControlUI* CreateControl(CDuiString strClassName); 12 | void RegistControl(CDuiString strClassName, CreateClass pFunc); 13 | 14 | static CControlFactory* GetInstance(); 15 | void Release(); 16 | 17 | private: 18 | CControlFactory(); 19 | virtual ~CControlFactory(); 20 | 21 | private: 22 | MAP_DUI_CTRATECLASS m_mapControl; 23 | }; 24 | 25 | #define DECLARE_DUICONTROL(class_name)\ 26 | public:\ 27 | static CControlUI* CreateControl(); 28 | 29 | #define IMPLEMENT_DUICONTROL(class_name)\ 30 | CControlUI* class_name::CreateControl()\ 31 | { return new class_name; } 32 | 33 | #define REGIST_DUICONTROL(class_name)\ 34 | CControlFactory::GetInstance()->RegistControl(_T(#class_name), (CreateClass)class_name::CreateControl); 35 | 36 | #define INNER_REGISTER_DUICONTROL(class_name)\ 37 | RegistControl(_T(#class_name), (CreateClass)class_name::CreateControl); 38 | } -------------------------------------------------------------------------------- /Duilib/Core/UIBase.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Core/UIBase.cpp -------------------------------------------------------------------------------- /Duilib/Core/UIContainer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Core/UIContainer.cpp -------------------------------------------------------------------------------- /Duilib/Core/UIControl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Core/UIControl.cpp -------------------------------------------------------------------------------- /Duilib/Core/UIDlgBuilder.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Core/UIDlgBuilder.cpp -------------------------------------------------------------------------------- /Duilib/Core/UIDlgBuilder.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIDLGBUILDER_H__ 2 | #define __UIDLGBUILDER_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib { 7 | 8 | class IDialogBuilderCallback 9 | { 10 | public: 11 | virtual CControlUI* CreateControl(LPCTSTR pstrClass) = 0; 12 | }; 13 | 14 | 15 | class UILIB_API CDialogBuilder 16 | { 17 | public: 18 | CDialogBuilder(); 19 | CControlUI* Create(STRINGorID xml, LPCTSTR type = NULL, IDialogBuilderCallback* pCallback = NULL, 20 | CPaintManagerUI* pManager = NULL, CControlUI* pParent = NULL); 21 | CControlUI* Create(IDialogBuilderCallback* pCallback = NULL, CPaintManagerUI* pManager = NULL, 22 | CControlUI* pParent = NULL); 23 | 24 | CMarkup* GetMarkup(); 25 | 26 | void GetLastErrorMessage(LPTSTR pstrMessage, SIZE_T cchMax) const; 27 | void GetLastErrorLocation(LPTSTR pstrSource, SIZE_T cchMax) const; 28 | void SetInstance(HINSTANCE instance){ m_instance = instance;}; 29 | private: 30 | CControlUI* _Parse(CMarkupNode* parent, CControlUI* pParent = NULL, CPaintManagerUI* pManager = NULL); 31 | 32 | CMarkup m_xml; 33 | IDialogBuilderCallback* m_pCallback; 34 | LPCTSTR m_pstrtype; 35 | HINSTANCE m_instance; 36 | }; 37 | 38 | } // namespace DuiLib 39 | 40 | #endif // __UIDLGBUILDER_H__ 41 | -------------------------------------------------------------------------------- /Duilib/Core/UIManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Core/UIManager.cpp -------------------------------------------------------------------------------- /Duilib/Core/UIMarkup.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Core/UIMarkup.cpp -------------------------------------------------------------------------------- /Duilib/Core/UIRender.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Core/UIRender.cpp -------------------------------------------------------------------------------- /Duilib/Core/UIResourceManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Core/UIResourceManager.cpp -------------------------------------------------------------------------------- /Duilib/Core/UIResourceManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIRESOURCEMANAGER_H__ 2 | #define __UIRESOURCEMANAGER_H__ 3 | #pragma once 4 | 5 | namespace DuiLib { 6 | // 控件文字查询接口 7 | class UILIB_API IQueryControlText 8 | { 9 | public: 10 | virtual LPCTSTR QueryControlText(LPCTSTR lpstrId, LPCTSTR lpstrType) = 0; 11 | }; 12 | 13 | class UILIB_API CResourceManager 14 | { 15 | private: 16 | CResourceManager(void); 17 | ~CResourceManager(void); 18 | 19 | public: 20 | static CResourceManager* GetInstance() 21 | { 22 | static CResourceManager * p = new CResourceManager; 23 | return p; 24 | }; 25 | void Release(void) { delete this; } 26 | 27 | public: 28 | BOOL LoadResource(STRINGorID xml, LPCTSTR type = NULL); 29 | BOOL LoadResource(CMarkupNode Root); 30 | void ResetResourceMap(); 31 | LPCTSTR GetImagePath(LPCTSTR lpstrId); 32 | LPCTSTR GetXmlPath(LPCTSTR lpstrId); 33 | 34 | public: 35 | void SetLanguage(LPCTSTR pstrLanguage) { m_sLauguage = pstrLanguage; } 36 | LPCTSTR GetLanguage() { return m_sLauguage; } 37 | BOOL LoadLanguage(LPCTSTR pstrXml); 38 | 39 | public: 40 | void SetTextQueryInterface(IQueryControlText* pInterface) { m_pQuerypInterface = pInterface; } 41 | CDuiString GetText(LPCTSTR lpstrId, LPCTSTR lpstrType = NULL); 42 | void ReloadText(); 43 | void ResetTextMap(); 44 | 45 | private: 46 | CStdStringPtrMap m_mTextResourceHashMap; 47 | IQueryControlText* m_pQuerypInterface; 48 | CStdStringPtrMap m_mImageHashMap; 49 | CStdStringPtrMap m_mXmlHashMap; 50 | CMarkup m_xml; 51 | CDuiString m_sLauguage; 52 | CStdStringPtrMap m_mTextHashMap; 53 | }; 54 | 55 | } // namespace DuiLib 56 | 57 | #endif // __UIRESOURCEMANAGER_H__ -------------------------------------------------------------------------------- /Duilib/Layout/UIAnimationTabLayout.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIANIMATIONTABLAYOUT_H__ 2 | #define __UIANIMATIONTABLAYOUT_H__ 3 | 4 | namespace DuiLib 5 | { 6 | class UILIB_API CAnimationTabLayoutUI : public CTabLayoutUI, public CUIAnimation 7 | { 8 | DECLARE_DUICONTROL(CAnimationTabLayoutUI) 9 | public: 10 | CAnimationTabLayoutUI(); 11 | 12 | LPCTSTR GetClass() const; 13 | LPVOID GetInterface(LPCTSTR pstrName); 14 | 15 | bool SelectItem( int iIndex ); 16 | void AnimationSwitch(); 17 | void DoEvent(TEventUI& event); 18 | void OnTimer( int nTimerID ); 19 | 20 | virtual void OnAnimationStart(INT nAnimationID, BOOL bFirstLoop) {} 21 | virtual void OnAnimationStep(INT nTotalFrame, INT nCurFrame, INT nAnimationID); 22 | virtual void OnAnimationStop(INT nAnimationID); 23 | 24 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 25 | 26 | protected: 27 | bool m_bIsVerticalDirection; 28 | int m_nPositiveDirection; 29 | RECT m_rcCurPos; 30 | RECT m_rcItemOld; 31 | CControlUI* m_pCurrentControl; 32 | bool m_bControlVisibleFlag; 33 | enum 34 | { 35 | TAB_ANIMATION_ID = 1, 36 | 37 | TAB_ANIMATION_ELLAPSE = 10, 38 | TAB_ANIMATION_FRAME_COUNT = 15, 39 | }; 40 | }; 41 | } 42 | #endif // __UIANIMATIONTABLAYOUT_H__ -------------------------------------------------------------------------------- /Duilib/Layout/UIChildLayout.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "UIChildLayout.h" 3 | 4 | namespace DuiLib 5 | { 6 | IMPLEMENT_DUICONTROL(CChildLayoutUI) 7 | 8 | CChildLayoutUI::CChildLayoutUI() 9 | { 10 | 11 | } 12 | 13 | void CChildLayoutUI::Init() 14 | { 15 | if (!m_pstrXMLFile.IsEmpty()) 16 | { 17 | CDialogBuilder builder; 18 | CContainerUI* pChildWindow = static_cast(builder.Create(m_pstrXMLFile.GetData(), (UINT)0, NULL, m_pManager)); 19 | if (pChildWindow) 20 | { 21 | this->Add(pChildWindow); 22 | } 23 | else 24 | { 25 | this->RemoveAll(); 26 | } 27 | } 28 | } 29 | 30 | void CChildLayoutUI::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue ) 31 | { 32 | if( _tcsicmp(pstrName, _T("xmlfile")) == 0 ) 33 | SetChildLayoutXML(pstrValue); 34 | else 35 | CContainerUI::SetAttribute(pstrName,pstrValue); 36 | } 37 | 38 | void CChildLayoutUI::SetChildLayoutXML( DuiLib::CDuiString pXML ) 39 | { 40 | m_pstrXMLFile=pXML; 41 | } 42 | 43 | DuiLib::CDuiString CChildLayoutUI::GetChildLayoutXML() 44 | { 45 | return m_pstrXMLFile; 46 | } 47 | 48 | LPVOID CChildLayoutUI::GetInterface( LPCTSTR pstrName ) 49 | { 50 | if( _tcsicmp(pstrName, DUI_CTR_CHILDLAYOUT) == 0 ) return static_cast(this); 51 | return CControlUI::GetInterface(pstrName); 52 | } 53 | 54 | LPCTSTR CChildLayoutUI::GetClass() const 55 | { 56 | return _T("ChildLayoutUI"); 57 | } 58 | } // namespace DuiLib 59 | -------------------------------------------------------------------------------- /Duilib/Layout/UIChildLayout.h: -------------------------------------------------------------------------------- 1 | #ifndef __UICHILDLAYOUT_H__ 2 | #define __UICHILDLAYOUT_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CChildLayoutUI : public CContainerUI 9 | { 10 | DECLARE_DUICONTROL(CChildLayoutUI) 11 | public: 12 | CChildLayoutUI(); 13 | 14 | void Init(); 15 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 16 | void SetChildLayoutXML(CDuiString pXML); 17 | CDuiString GetChildLayoutXML(); 18 | virtual LPVOID GetInterface(LPCTSTR pstrName); 19 | virtual LPCTSTR GetClass() const; 20 | 21 | private: 22 | CDuiString m_pstrXMLFile; 23 | }; 24 | } // namespace DuiLib 25 | #endif // __UICHILDLAYOUT_H__ 26 | -------------------------------------------------------------------------------- /Duilib/Layout/UIHorizontalLayout.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIHORIZONTALLAYOUT_H__ 2 | #define __UIHORIZONTALLAYOUT_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CHorizontalLayoutUI : public CContainerUI 9 | { 10 | DECLARE_DUICONTROL(CHorizontalLayoutUI) 11 | public: 12 | CHorizontalLayoutUI(); 13 | 14 | LPCTSTR GetClass() const; 15 | LPVOID GetInterface(LPCTSTR pstrName); 16 | UINT GetControlFlags() const; 17 | 18 | void SetSepWidth(int iWidth); 19 | int GetSepWidth() const; 20 | void SetSepImmMode(bool bImmediately); 21 | bool IsSepImmMode() const; 22 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 23 | void DoEvent(TEventUI& event); 24 | 25 | void SetPos(RECT rc, bool bNeedInvalidate = true); 26 | void DoPostPaint(HDC hDC, const RECT& rcPaint); 27 | 28 | RECT GetThumbRect(bool bUseNew = false) const; 29 | 30 | protected: 31 | int m_iSepWidth; 32 | UINT m_uButtonState; 33 | POINT ptLastMouse; 34 | RECT m_rcNewPos; 35 | bool m_bImmMode; 36 | }; 37 | } 38 | #endif // __UIHORIZONTALLAYOUT_H__ 39 | -------------------------------------------------------------------------------- /Duilib/Layout/UITabLayout.h: -------------------------------------------------------------------------------- 1 | #ifndef __UITABLAYOUT_H__ 2 | #define __UITABLAYOUT_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CTabLayoutUI : public CContainerUI 9 | { 10 | DECLARE_DUICONTROL(CTabLayoutUI) 11 | public: 12 | CTabLayoutUI(); 13 | 14 | LPCTSTR GetClass() const; 15 | LPVOID GetInterface(LPCTSTR pstrName); 16 | 17 | bool Add(CControlUI* pControl); 18 | bool AddAt(CControlUI* pControl, int iIndex); 19 | bool Remove(CControlUI* pControl); 20 | void RemoveAll(); 21 | int GetCurSel() const; 22 | virtual bool SelectItem(int iIndex); 23 | virtual bool SelectItem(CControlUI* pControl); 24 | 25 | void SetPos(RECT rc, bool bNeedInvalidate = true); 26 | 27 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 28 | 29 | protected: 30 | int m_iCurSel; 31 | }; 32 | } 33 | #endif // __UITABLAYOUT_H__ 34 | -------------------------------------------------------------------------------- /Duilib/Layout/UITileLayout.h: -------------------------------------------------------------------------------- 1 | #ifndef __UITILELAYOUT_H__ 2 | #define __UITILELAYOUT_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CTileLayoutUI : public CContainerUI 9 | { 10 | DECLARE_DUICONTROL(CTileLayoutUI) 11 | public: 12 | CTileLayoutUI(); 13 | 14 | LPCTSTR GetClass() const; 15 | LPVOID GetInterface(LPCTSTR pstrName); 16 | 17 | void SetPos(RECT rc, bool bNeedInvalidate = true); 18 | 19 | SIZE GetItemSize() const; 20 | void SetItemSize(SIZE szItem); 21 | int GetColumns() const; 22 | void SetColumns(int nCols); 23 | 24 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 25 | 26 | protected: 27 | SIZE m_szItem; 28 | int m_nColumns; 29 | }; 30 | } 31 | #endif // __UITILELAYOUT_H__ 32 | -------------------------------------------------------------------------------- /Duilib/Layout/UIVerticalLayout.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIVERTICALLAYOUT_H__ 2 | #define __UIVERTICALLAYOUT_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib 7 | { 8 | class UILIB_API CVerticalLayoutUI : public CContainerUI 9 | { 10 | DECLARE_DUICONTROL(CVerticalLayoutUI) 11 | public: 12 | CVerticalLayoutUI(); 13 | 14 | LPCTSTR GetClass() const; 15 | LPVOID GetInterface(LPCTSTR pstrName); 16 | UINT GetControlFlags() const; 17 | 18 | void SetSepHeight(int iHeight); 19 | int GetSepHeight() const; 20 | void SetSepImmMode(bool bImmediately); 21 | bool IsSepImmMode() const; 22 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue); 23 | void DoEvent(TEventUI& event); 24 | 25 | void SetPos(RECT rc, bool bNeedInvalidate = true); 26 | void DoPostPaint(HDC hDC, const RECT& rcPaint); 27 | 28 | RECT GetThumbRect(bool bUseNew = false) const; 29 | 30 | protected: 31 | int m_iSepHeight; 32 | UINT m_uButtonState; 33 | POINT ptLastMouse; 34 | RECT m_rcNewPos; 35 | bool m_bImmMode; 36 | }; 37 | } 38 | #endif // __UIVERTICALLAYOUT_H__ 39 | -------------------------------------------------------------------------------- /Duilib/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // UIlib.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "StdAfx.h" 6 | 7 | #pragma comment( lib, "winmm.lib" ) 8 | #pragma comment( lib, "comctl32.lib" ) -------------------------------------------------------------------------------- /Duilib/StdAfx.h: -------------------------------------------------------------------------------- 1 | // StdAfx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__E30B2003_188B_4EB4_AB99_3F3734D6CE6C__INCLUDED_) 7 | #define AFX_STDAFX_H__E30B2003_188B_4EB4_AB99_3F3734D6CE6C__INCLUDED_ 8 | 9 | #pragma once 10 | 11 | #ifdef __GNUC__ 12 | // 怎么都没找到min,max的头文件-_- 13 | #ifndef min 14 | #define min(a,b) (((a) < (b)) ? (a) : (b)) 15 | #endif 16 | #ifndef max 17 | #define max(a,b) (((a) > (b)) ? (a) : (b)) 18 | #endif 19 | #endif 20 | 21 | #ifndef __FILET__ 22 | #define __DUILIB_STR2WSTR(str) L##str 23 | #define _DUILIB_STR2WSTR(str) __DUILIB_STR2WSTR(str) 24 | #ifdef _UNICODE 25 | #define __FILET__ _DUILIB_STR2WSTR(__FILE__) 26 | #define __FUNCTIONT__ _DUILIB_STR2WSTR(__FUNCTION__) 27 | #else 28 | #define __FILET__ __FILE__ 29 | #define __FUNCTIONT__ __FUNCTION__ 30 | #endif 31 | #endif 32 | 33 | #define _CRT_SECURE_NO_DEPRECATE 34 | 35 | // Remove pointless warning messages 36 | #ifdef _MSC_VER 37 | #pragma warning (disable : 4511) // copy operator could not be generated 38 | #pragma warning (disable : 4512) // assignment operator could not be generated 39 | #pragma warning (disable : 4702) // unreachable code (bugs in Microsoft's STL) 40 | #pragma warning (disable : 4786) // identifier was truncated 41 | #pragma warning (disable : 4996) // function or variable may be unsafe (deprecated) 42 | #ifndef _CRT_SECURE_NO_WARNINGS 43 | #define _CRT_SECURE_NO_WARNINGS // eliminate deprecation warnings for VS2005 44 | #endif 45 | #endif // _MSC_VER 46 | #ifdef __BORLANDC__ 47 | #pragma option -w-8027 // function not expanded inline 48 | #endif 49 | 50 | // Required for VS 2008 (fails on XP and Win2000 without this fix) 51 | #ifndef _WIN32_WINNT 52 | #define _WIN32_WINNT _WIN32_WINNT_WINXP//0x0501 53 | #endif 54 | 55 | //#define USE_XIMAGE_EFFECT //使用ximage的gif控件CGifAnimExUI开关,提升性能,默认不使用 56 | 57 | #include "UIlib.h" 58 | 59 | #include 60 | 61 | #define lengthof(x) (sizeof(x)/sizeof(*x)) 62 | #define MAX max 63 | #define MIN min 64 | #define CLAMP(x,a,b) (MIN(b,MAX(a,x))) 65 | 66 | //{{AFX_INSERT_LOCATION}} 67 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 68 | 69 | #endif // !defined(AFX_STDAFX_H__E30B2003_188B_4EB4_AB99_3F3734D6CE6C__INCLUDED_) 70 | -------------------------------------------------------------------------------- /Duilib/UIlib.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010-2011, duilib develop team(www.duilib.com). 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or 5 | // without modification, are permitted provided that the 6 | // following conditions are met. 7 | // 8 | // Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // 11 | // Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following 13 | // disclaimer in the documentation and/or other materials 14 | // provided with the distribution. 15 | // 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 17 | // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 18 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 21 | // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 23 | // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // 31 | // DirectUI - UI Library 32 | // 33 | // Written by Bjarke Viksoe (bjarke@viksoe.dk) 34 | // Copyright (c) 2006-2007 Bjarke Viksoe. 35 | // 36 | // This code may be used in compiled form in any way you desire. These 37 | // source files may be redistributed by any means PROVIDING it is 38 | // not sold for profit without the authors written consent, and 39 | // providing that this notice and the authors name is included. 40 | // 41 | // This file is provided "as is" with no expressed or implied warranty. 42 | // The author accepts no liability if it causes any damage to you or your 43 | // computer whatsoever. It's free, so don't hassle me about it. 44 | // 45 | // Beware of bugs. 46 | // 47 | // 48 | 49 | 50 | #include "StdAfx.h" 51 | #include "UIlib.h" 52 | 53 | BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID /*lpReserved*/) 54 | { 55 | switch( dwReason ) { 56 | case DLL_PROCESS_ATTACH: 57 | case DLL_THREAD_ATTACH: 58 | case DLL_THREAD_DETACH: 59 | case DLL_PROCESS_DETACH: 60 | ::DisableThreadLibraryCalls((HMODULE)hModule); 61 | break; 62 | } 63 | return TRUE; 64 | } 65 | 66 | -------------------------------------------------------------------------------- /Duilib/Utils/DPI.h: -------------------------------------------------------------------------------- 1 | #ifndef __DPI_H__ 2 | #define __DPI_H__ 3 | #pragma once 4 | 5 | #ifndef DPI_ENUMS_DECLARED 6 | 7 | typedef enum PROCESS_DPI_AWARENESS { 8 | PROCESS_DPI_UNAWARE = 0, 9 | PROCESS_SYSTEM_DPI_AWARE = 1, 10 | PROCESS_PER_MONITOR_DPI_AWARE = 2 11 | } PROCESS_DPI_AWARENESS; 12 | 13 | typedef enum MONITOR_DPI_TYPE { 14 | MDT_EFFECTIVE_DPI = 0, 15 | MDT_ANGULAR_DPI = 1, 16 | MDT_RAW_DPI = 2, 17 | MDT_DEFAULT = MDT_EFFECTIVE_DPI 18 | } MONITOR_DPI_TYPE; 19 | 20 | #define DPI_ENUMS_DECLARED 21 | #endif // (DPI_ENUMS_DECLARED) 22 | 23 | namespace DuiLib 24 | { 25 | class UILIB_API CDPI 26 | { 27 | public: 28 | CDPI(void); 29 | 30 | public: 31 | static int GetMainMonitorDPI(); 32 | static int GetDPIOfMonitor(HMONITOR hMonitor); 33 | static int GetDPIOfMonitorNearestToPoint(POINT pt); 34 | 35 | public: 36 | PROCESS_DPI_AWARENESS GetDPIAwareness(); 37 | BOOL SetDPIAwareness(PROCESS_DPI_AWARENESS Awareness); 38 | UINT GetDPI(); 39 | UINT GetScale(); 40 | void SetScale(UINT uDPI); 41 | RECT Scale(RECT rcRect); 42 | void Scale(RECT *pRect); 43 | POINT Scale(POINT ptPoint); 44 | void Scale(POINT *pPoint); 45 | SIZE Scale(SIZE szSize); 46 | void Scale(SIZE *pSize); 47 | int Scale(int iValue); 48 | 49 | int ScaleBack(int iValue); 50 | void ScaleBack(RECT *pRect); 51 | 52 | private: 53 | int m_nScaleFactor; 54 | int m_nScaleFactorSDA; 55 | PROCESS_DPI_AWARENESS m_Awareness; 56 | }; 57 | } 58 | #endif //__DPI_H__ -------------------------------------------------------------------------------- /Duilib/Utils/Flash11.tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Utils/Flash11.tlb -------------------------------------------------------------------------------- /Duilib/Utils/FlashEventHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | 创建日期: 2012/11/05 15:09:48 3 | 作者: daviyang35@gmail.com 4 | 描述: FlashEventHandler 5 | */ 6 | #pragma once 7 | //#include 8 | 9 | namespace DuiLib 10 | { 11 | class CFlashEventHandler 12 | { 13 | public: 14 | CFlashEventHandler() {} 15 | ~CFlashEventHandler() {} 16 | 17 | virtual ULONG STDMETHODCALLTYPE Release( void ) { return S_OK;} 18 | virtual ULONG STDMETHODCALLTYPE AddRef( void ) { return S_OK;} 19 | 20 | virtual HRESULT OnReadyStateChange ( long newState ) 21 | { 22 | return S_OK; 23 | } 24 | 25 | virtual HRESULT OnProgress (long percentDone ) 26 | { 27 | return S_OK; 28 | } 29 | 30 | virtual HRESULT FSCommand ( LPCTSTR command, LPCTSTR args ) 31 | { 32 | return S_OK; 33 | } 34 | 35 | virtual HRESULT FlashCall ( LPCTSTR request ) 36 | { 37 | return S_OK; 38 | } 39 | }; 40 | } -------------------------------------------------------------------------------- /Duilib/Utils/TrayIcon.h: -------------------------------------------------------------------------------- 1 | #ifndef __UITRAICON_H__ 2 | #define __UITRAICON_H__ 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace DuiLib 8 | { 9 | class UILIB_API CTrayIcon 10 | { 11 | public: 12 | CTrayIcon(void); 13 | ~CTrayIcon(void); 14 | 15 | public: 16 | void CreateTrayIcon( HWND _RecvHwnd, UINT _IconIDResource, LPCTSTR _ToolTipText = NULL, UINT _Message = NULL); 17 | void DeleteTrayIcon(); 18 | bool SetTooltipText(LPCTSTR _ToolTipText); 19 | bool SetTooltipText(UINT _IDResource); 20 | CDuiString GetTooltipText() const; 21 | 22 | bool SetIcon(HICON _Hicon); 23 | bool SetIcon(LPCTSTR _IconFile); 24 | bool SetIcon(UINT _IDResource); 25 | HICON GetIcon() const; 26 | void SetHideIcon(); 27 | void SetShowIcon(); 28 | void RemoveIcon(); 29 | bool Enabled(){return m_bEnabled;}; 30 | bool IsVisible(){return !m_bVisible;}; 31 | 32 | private: 33 | bool m_bEnabled; 34 | bool m_bVisible; 35 | HWND m_hWnd; 36 | UINT m_uMessage; 37 | HICON m_hIcon; 38 | NOTIFYICONDATA m_trayData; 39 | }; 40 | } 41 | #endif // 42 | 43 | -------------------------------------------------------------------------------- /Duilib/Utils/UIDelegate.h: -------------------------------------------------------------------------------- 1 | #ifndef __UIDELEGATE_H__ 2 | #define __UIDELEGATE_H__ 3 | 4 | #pragma once 5 | 6 | namespace DuiLib { 7 | 8 | class UILIB_API CDelegateBase 9 | { 10 | public: 11 | CDelegateBase(void* pObject, void* pFn); 12 | CDelegateBase(const CDelegateBase& rhs); 13 | virtual ~CDelegateBase(); 14 | bool Equals(const CDelegateBase& rhs) const; 15 | bool operator() (void* param); 16 | virtual CDelegateBase* Copy() const = 0; // add const for gcc 17 | 18 | protected: 19 | void* GetFn(); 20 | void* GetObject(); 21 | virtual bool Invoke(void* param) = 0; 22 | 23 | private: 24 | void* m_pObject; 25 | void* m_pFn; 26 | }; 27 | 28 | class CDelegateStatic: public CDelegateBase 29 | { 30 | typedef bool (*Fn)(void*); 31 | public: 32 | CDelegateStatic(Fn pFn) : CDelegateBase(NULL, pFn) { } 33 | CDelegateStatic(const CDelegateStatic& rhs) : CDelegateBase(rhs) { } 34 | virtual CDelegateBase* Copy() const { return new CDelegateStatic(*this); } 35 | 36 | protected: 37 | virtual bool Invoke(void* param) 38 | { 39 | Fn pFn = (Fn)GetFn(); 40 | return (*pFn)(param); 41 | } 42 | }; 43 | 44 | template 45 | class CDelegate : public CDelegateBase 46 | { 47 | typedef bool (T::* Fn)(void*); 48 | public: 49 | CDelegate(O* pObj, Fn pFn) : CDelegateBase(pObj, &pFn), m_pFn(pFn) { } 50 | CDelegate(const CDelegate& rhs) : CDelegateBase(rhs) { m_pFn = rhs.m_pFn; } 51 | virtual CDelegateBase* Copy() const { return new CDelegate(*this); } 52 | 53 | protected: 54 | virtual bool Invoke(void* param) 55 | { 56 | O* pObject = (O*) GetObject(); 57 | return (pObject->*m_pFn)(param); 58 | } 59 | 60 | private: 61 | Fn m_pFn; 62 | }; 63 | 64 | template 65 | CDelegate MakeDelegate(O* pObject, bool (T::* pFn)(void*)) 66 | { 67 | return CDelegate(pObject, pFn); 68 | } 69 | 70 | inline CDelegateStatic MakeDelegate(bool (*pFn)(void*)) 71 | { 72 | return CDelegateStatic(pFn); 73 | } 74 | 75 | class UILIB_API CEventSource 76 | { 77 | typedef bool (*FnType)(void*); 78 | public: 79 | ~CEventSource(); 80 | operator bool(); 81 | void operator+= (const CDelegateBase& d); // add const for gcc 82 | void operator+= (FnType pFn); 83 | void operator-= (const CDelegateBase& d); 84 | void operator-= (FnType pFn); 85 | bool operator() (void* param); 86 | void Clear(); 87 | 88 | protected: 89 | CStdPtrArray m_aDelegates; 90 | }; 91 | 92 | } // namespace DuiLib 93 | 94 | #endif // __UIDELEGATE_H__ -------------------------------------------------------------------------------- /Duilib/Utils/Utils.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Utils/Utils.cpp -------------------------------------------------------------------------------- /Duilib/Utils/WinImplBase.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Utils/WinImplBase.cpp -------------------------------------------------------------------------------- /Duilib/Utils/ZipApi.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /////////////////////////////////////////////////////////////////////////////////////// 3 | 4 | extern UILIB_API int UnZipDir(LPCTSTR src, LPCTSTR dst); 5 | extern UILIB_API int ZipDir(LPCTSTR lpszSrcPath, LPCTSTR lpszZipName, LPCTSTR lpszDestPath); 6 | -------------------------------------------------------------------------------- /Duilib/Utils/unzip.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/Duilib/Utils/unzip.cpp -------------------------------------------------------------------------------- /Duilib/duilib.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FFPlayer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/FFPlayer.h -------------------------------------------------------------------------------- /Ini.h: -------------------------------------------------------------------------------- 1 | // Ini.h: interface for the CIni class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_INI_H__82D19E50_EEFD_4348_A098_5D16E166B8C5__INCLUDED_) 6 | #define AFX_INI_H__82D19E50_EEFD_4348_A098_5D16E166B8C5__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include 13 | 14 | const char* AppPath(char* path, const char* fName); 15 | class CIni 16 | { 17 | public: 18 | CIni(const char* path); 19 | virtual ~CIni(); 20 | 21 | void SetPath(const char* path); 22 | const char* GetPath(){return cfgpath;} 23 | 24 | int GetInt(const char* sec, const char* key, int def); 25 | int GetStr(const char* sec, const char* key, char* value); 26 | 27 | bool SetInt(const char* sec, const char* key, int value); 28 | bool SetStr(const char* sec, const char* key, const char* value); 29 | protected: 30 | char cfgpath[260]; 31 | }; 32 | int GetIniInt(const char* sec, const char* key, int def); 33 | std::string GetIniStr(const char* sec, const char* key, const char* def); 34 | bool SetIniInt(const char* sec, const char* key, int value); 35 | bool SetIniStr(const char* sec, const char* key, const char* value); 36 | 37 | #endif // !defined(AFX_INI_H__82D19E50_EEFD_4348_A098_5D16E166B8C5__INCLUDED_) 38 | -------------------------------------------------------------------------------- /QPlayer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/QPlayer.cpp -------------------------------------------------------------------------------- /QPlayer.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/QPlayer.rc -------------------------------------------------------------------------------- /QPlayer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.40629.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QPlayer", "QPlayer.vcxproj", "{4D5A12B0-1205-4019-8AEA-E1A22766AE71}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {E106ACD7-4E53-4AEE-942B-D0DD426DB34E} = {E106ACD7-4E53-4AEE-942B-D0DD426DB34E} 9 | EndProjectSection 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DuiLib", "Duilib\DuiLib.vcxproj", "{E106ACD7-4E53-4AEE-942B-D0DD426DB34E}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Win32 = Debug|Win32 16 | Release|Win32 = Release|Win32 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {4D5A12B0-1205-4019-8AEA-E1A22766AE71}.Debug|Win32.ActiveCfg = Debug|Win32 20 | {4D5A12B0-1205-4019-8AEA-E1A22766AE71}.Debug|Win32.Build.0 = Debug|Win32 21 | {4D5A12B0-1205-4019-8AEA-E1A22766AE71}.Release|Win32.ActiveCfg = Release|Win32 22 | {4D5A12B0-1205-4019-8AEA-E1A22766AE71}.Release|Win32.Build.0 = Release|Win32 23 | {E106ACD7-4E53-4AEE-942B-D0DD426DB34E}.Debug|Win32.ActiveCfg = Debug|Win32 24 | {E106ACD7-4E53-4AEE-942B-D0DD426DB34E}.Debug|Win32.Build.0 = Debug|Win32 25 | {E106ACD7-4E53-4AEE-942B-D0DD426DB34E}.Release|Win32.ActiveCfg = Release|Win32 26 | {E106ACD7-4E53-4AEE-942B-D0DD426DB34E}.Release|Win32.Build.0 = Release|Win32 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # QPlayer 2 | win32 player base ffmpeg api and duilib 3 | 4 | support dlna render/play with local file or http:// url 5 | 6 | # install 7 | open QPlayer.sln with vs2013, build and enjoy .... 8 | 9 | bin output in ffmpeg/bin, just copy this dir to dist 10 | -------------------------------------------------------------------------------- /UICombox.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/UICombox.h -------------------------------------------------------------------------------- /audio/AudioPlay.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/AudioPlay.cpp -------------------------------------------------------------------------------- /audio/AudioPlay.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/AudioPlay.h -------------------------------------------------------------------------------- /audio/AudioRec.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/AudioRec.cpp -------------------------------------------------------------------------------- /audio/AudioRec.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/AudioRec.h -------------------------------------------------------------------------------- /audio/IVolume.h: -------------------------------------------------------------------------------- 1 | // IVolume.h : IVolume interface definition. 2 | // Developer : Alex Chmut 3 | // Created : 8/11/98 4 | #ifndef _IVOLUME_H_ 5 | #define _IVOLUME_H_ 6 | 7 | // User-defined callback for volume change notification 8 | typedef void (CALLBACK *PONMICVOULUMECHANGE)( DWORD dwCurrentVolume, DWORD dwUserValue ); 9 | 10 | //////////////////////////////////////////////////////////////////////// 11 | // IVolume interface 12 | class __declspec(novtable) IVolume 13 | { 14 | public: 15 | virtual bool IsAvailable() = 0; 16 | virtual void Enable() = 0; 17 | virtual void Disable() = 0; 18 | 19 | virtual DWORD GetVolumeMetric() = 0; 20 | 21 | virtual DWORD GetMinimalVolume() = 0; 22 | virtual DWORD GetMaximalVolume() = 0; 23 | 24 | virtual DWORD GetCurrentVolume() = 0; 25 | virtual void SetCurrentVolume( DWORD dwValue ) = 0; 26 | 27 | virtual void RegisterNotificationSink( PONMICVOULUMECHANGE, DWORD ) = 0; 28 | }; 29 | 30 | #endif -------------------------------------------------------------------------------- /audio/VolumeCtrl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/VolumeCtrl.cpp -------------------------------------------------------------------------------- /audio/VolumeCtrl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/VolumeCtrl.h -------------------------------------------------------------------------------- /audio/VolumeInXXX.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/VolumeInXXX.h -------------------------------------------------------------------------------- /audio/VolumeOutWave.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/VolumeOutWave.h -------------------------------------------------------------------------------- /audio/WaveBase.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "WaveBase.h" 4 | 5 | void WaveBase::SetPcmCallback(PcmCallback func, void * data) { 6 | cb_func = func; 7 | cb_data = data; 8 | } 9 | 10 | WaveBase::~WaveBase() { 11 | FreeBuffer(); 12 | } 13 | 14 | /// 释放缓冲区 15 | 16 | /*------------------------------------------------------------------------------*/ 17 | //释放内存 18 | 19 | bool WaveBase::FreeBuffer() 20 | { 21 | bool bRet = false; 22 | for (int i = 0; i 5 | #define NUM_BUF 10 6 | 7 | typedef void(*PcmCallback)(unsigned char* pcm, int size, void* user_data); 8 | typedef struct wavehdr_tag WAVEHDR; 9 | 10 | class WaveBase { 11 | public: 12 | void SetPcmCallback(PcmCallback func, void* data); 13 | protected: 14 | virtual ~WaveBase(); 15 | PcmCallback cb_func; 16 | void* cb_data; 17 | 18 | virtual void OnWaveDone(WAVEHDR* hdr) = 0; 19 | virtual bool OnWaveAlloc(WAVEHDR* hdr) = 0; 20 | virtual void OnWaveFree(WAVEHDR* hdr) = 0; 21 | /// 释放缓冲区 22 | bool FreeBuffer(); 23 | /// 申请缓冲区 24 | bool AllocBuffer(int count); 25 | 26 | std::vector m_pHdr; ///< 缓冲区数组(默认有10个缓冲区) 27 | unsigned int m_nBufSize; ///< 单个缓冲区大小 28 | }; 29 | 30 | #endif -------------------------------------------------------------------------------- /audio/WaveIn.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/WaveIn.cpp -------------------------------------------------------------------------------- /audio/WaveIn.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/WaveIn.h -------------------------------------------------------------------------------- /audio/WaveOut.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/WaveOut.cpp -------------------------------------------------------------------------------- /audio/WaveOut.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/audio/WaveOut.h -------------------------------------------------------------------------------- /dlna/UPnP技术总结.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/dlna/UPnP技术总结.docx -------------------------------------------------------------------------------- /dlna/UpnpRender.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/dlna/UpnpRender.cpp -------------------------------------------------------------------------------- /dlna/UpnpRender.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include "UpnpServer.h" 6 | 7 | class UpnpRender : public UpnpSidListener, 8 | public std::enable_shared_from_this 9 | { 10 | Device::Ptr model_; 11 | std::string url_; 12 | std::map sid_map_; 13 | float duration_; 14 | float speed_ = 1.0f; 15 | bool support_speed_ = true; 16 | void onSidMsg(const std::string& sid, const std::string& body) override; 17 | void onPropChange(const std::string& name, const std::string& value); 18 | public: 19 | typedef std::shared_ptr Ptr; 20 | UpnpRender(Device::Ptr dev); 21 | virtual ~UpnpRender(); 22 | 23 | float duration() const { return duration_; } 24 | float speed() const { return speed_; } 25 | 26 | void subscribe(int type, int sec); 27 | void unsubscribe(int type); 28 | /** 29 | 设置投屏地址 30 | @param urlStr 视频url 31 | */ 32 | int setAVTransportURL(const char* urlStr, RpcCB cb); 33 | std::string getURL() const { return url_; } 34 | float getDuration() const { return duration_; } 35 | /** 36 | 播放 37 | */ 38 | int play(float speed = 1.0f, RpcCB cb = nullptr); 39 | 40 | /** 41 | 暂停 42 | */ 43 | int pause(RpcCB cb = nullptr); 44 | 45 | /** 46 | 结束 47 | */ 48 | int stop(RpcCB cb = nullptr); 49 | 50 | 51 | /** 52 | 跳转进度 53 | @param relTime 进度时间(单位秒) 54 | */ 55 | int seek(float relTime, RpcCB cb = nullptr); 56 | 57 | /** 58 | 跳转至特定进度或视频 59 | @param target 目标值,可以是 00:02:21 格式的进度或者整数的 TRACK_NR。 60 | @param unit REL_TIME(跳转到某个进度)或 TRACK_NR(跳转到某个视频)。 61 | */ 62 | int seekToTarget(const char* target, const char* unit, RpcCB cb); 63 | 64 | /** 65 | 获取播放进度,可通过协议回调使用 66 | */ 67 | int getPositionInfo(std::function cb); 68 | 69 | /** 70 | 获取播放状态,可通过协议回调使用 71 | */ 72 | int getTransportInfo(std::function cb); 73 | 74 | /** 75 | 获取音频,可通过协议回调使用 76 | */ 77 | int getVolume(std::function cb); 78 | // 0-100 79 | int setVolume(int value, RpcCB cb = nullptr); 80 | 81 | /** 82 | 设置音频值 83 | @param value 值—>整数 84 | */ 85 | int setVolumeWith(const char* value, RpcCB cb = nullptr); 86 | 87 | }; 88 | -------------------------------------------------------------------------------- /dlna/UpnpServer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/dlna/UpnpServer.cpp -------------------------------------------------------------------------------- /dlna/httplib.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/dlna/httplib.cc -------------------------------------------------------------------------------- /dlna/一文读懂UPNP-UPNP超详细介绍.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/dlna/一文读懂UPNP-UPNP超详细介绍.docx -------------------------------------------------------------------------------- /doc/ffmpeg解码降低延迟记录.md: -------------------------------------------------------------------------------- 1 | 2 |  不知大家有没有发现FFmpeg长时间解码会出现延时增大(特别是在丢包的情况下)?如果在播放本地文件,这个问题是没有影响的。但是如果播放的是实时流,则图像的延时就越来越大。本人是做安防监控的,很多招标项目对解码器的图像延时都有要求:不能高于250毫秒。所以,对实时性要求高的场合,要尽量降低图像的延时。 3 | 4 | 网络摄像头从采集图像到通过网络传输到客户端解码的过程中都会产生延时,一般延时有几部分组成:编码延时、网络传输延时、解码延时。 5 | - 编码延时是由编码器产生的,只能由设备方去改善,如果是FFmpeg软编码的方式,也是需要优化的,优化方法见我的另外一篇博文怎么降低FFmpeg的编码延时。 6 | - 网络传输延时一般很小。 7 | - 解码延时是产生延时的一个很重要的部分,所以我们要想办法降低解码时的延时。 8 | 9 | ## 优化解码延时的方法我归纳如下: 10 | 11 | 12 | 第一,减少视频的缓冲帧数,尽量收到视频就送去解码。 13 | 14 | 第二,从网络接收数据,解码,还有显示操作用多线程处理,从而提高并发性。一般地,我们做播放器会把数据接收+解码放在一个线程处理,而显示放在另外一个线程;或者数据接收用一个线程,而解码+显示放在另外一个线程。中间实现一个缓冲队列,把第一个线程输出的数据扔到缓冲区,而第二个线程从队列里取数据,读到一帧就马上解码或显示。这样可以保证数据包可以得到最快的速度的处理,不会因为网络阻塞而影响后面的处理流程。 15 | 16 | 第三,清空FFmpeg编码器的缓冲区。当前面两种方法都无效时,这种方法可能就最管用了。在网络环境中,传输数据用UDP经常有丢包,而丢包很容易造成FFmpeg解码器缓冲的帧数增加。解决办法是:隔一段时间清空解码器缓存。伪代码如下: 17 | 18 | ```cpp 19 | int got_picture = 0; //重置解码器,在解码I帧之前清空解码器缓存 20 | //m_bReset为True,表示即将清空解码器缓存 21 | if(m_bReset && nFrameType ==1) { 22 | avcodec_flush_buffers(m_pVideoCodecCtx); 23 | m_bReset = FALSE; 24 | } 25 | AVPacket avpkt; 26 | av_init_packet(&avpkt); 27 | avpkt.size = inLen; avpkt.data = inbuf; 28 | int len = avcodec_decode_video2(m_pVideoCodecCtx, picture, &got_picture, &avpkt); 29 | if (len < 0) { 30 | TRACE("Error while decoding frame Len %d\n", inLen); 31 | return FALSE; 32 | } 33 | ``` 34 | 不过要注意的是:不能任何一帧前都可以进行清空操作,理想是在I帧之前做清空,否则图像会有不连续或马赛克的现象。 35 | 36 | ## 设置低延迟播放 37 | 38 | 无论是ffmpeg.exe还是libffmpeg等,均有可有效优化延迟的参数,现在列出部分实际工作中使用的记录。 39 | 40 | 41 | ```cpp 42 | AVDictionary *options = NULL; 43 | av_dict_set(&options, "fflags", "nobuffer", 0); //无缓存,解码时有效 44 | //av_dict_set(&options, "timeout", "10", 0); 45 | if (avformat_open_input(&m_pFormatContext, filename, NULL, &options) != 0) { 46 | log_print(LOG_ERR, "avformat_open_input failed, %s\r\n", filename); 47 | return FALSE; 48 | } 49 | //减低延迟操作:减少探测的时间 50 | m_pFormatContext->probesize = 100 * 1024; 51 | m_pFormatContext->max_analyze_duration = 5*AV_TIME_BASE; 52 | 53 | avformat_find_stream_info(m_pFormatContext, NULL); 54 | ``` -------------------------------------------------------------------------------- /ffmpeg/bin/avcodec-57.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/avcodec-57.dll -------------------------------------------------------------------------------- /ffmpeg/bin/avdevice-57.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/avdevice-57.dll -------------------------------------------------------------------------------- /ffmpeg/bin/avfilter-6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/avfilter-6.dll -------------------------------------------------------------------------------- /ffmpeg/bin/avformat-57.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/avformat-57.dll -------------------------------------------------------------------------------- /ffmpeg/bin/avutil-55.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/avutil-55.dll -------------------------------------------------------------------------------- /ffmpeg/bin/ffmpeg.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/ffmpeg.exe -------------------------------------------------------------------------------- /ffmpeg/bin/ffplay.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/ffplay.exe -------------------------------------------------------------------------------- /ffmpeg/bin/ffprobe.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/ffprobe.exe -------------------------------------------------------------------------------- /ffmpeg/bin/libcrypto-1_1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/libcrypto-1_1.dll -------------------------------------------------------------------------------- /ffmpeg/bin/libssl-1_1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/libssl-1_1.dll -------------------------------------------------------------------------------- /ffmpeg/bin/postproc-54.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/postproc-54.dll -------------------------------------------------------------------------------- /ffmpeg/bin/swresample-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/swresample-2.dll -------------------------------------------------------------------------------- /ffmpeg/bin/swscale-4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/bin/swscale-4.dll -------------------------------------------------------------------------------- /ffmpeg/examples/Makefile: -------------------------------------------------------------------------------- 1 | # use pkg-config for getting CFLAGS and LDLIBS 2 | FFMPEG_LIBS= libavdevice \ 3 | libavformat \ 4 | libavfilter \ 5 | libavcodec \ 6 | libswresample \ 7 | libswscale \ 8 | libavutil \ 9 | 10 | CFLAGS += -Wall -g 11 | CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS) 12 | LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS) 13 | 14 | EXAMPLES= avio_dir_cmd \ 15 | avio_reading \ 16 | decode_audio \ 17 | decode_video \ 18 | demuxing_decoding \ 19 | encode_audio \ 20 | encode_video \ 21 | extract_mvs \ 22 | filtering_video \ 23 | filtering_audio \ 24 | http_multiclient \ 25 | hw_decode \ 26 | metadata \ 27 | muxing \ 28 | remuxing \ 29 | resampling_audio \ 30 | scaling_video \ 31 | transcode_aac \ 32 | transcoding \ 33 | 34 | OBJS=$(addsuffix .o,$(EXAMPLES)) 35 | 36 | # the following examples make explicit use of the math library 37 | avcodec: LDLIBS += -lm 38 | encode_audio: LDLIBS += -lm 39 | muxing: LDLIBS += -lm 40 | resampling_audio: LDLIBS += -lm 41 | 42 | .phony: all clean-test clean 43 | 44 | all: $(OBJS) $(EXAMPLES) 45 | 46 | clean-test: 47 | $(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg 48 | 49 | clean: clean-test 50 | $(RM) $(EXAMPLES) $(OBJS) 51 | -------------------------------------------------------------------------------- /ffmpeg/examples/README: -------------------------------------------------------------------------------- 1 | FFmpeg examples README 2 | ---------------------- 3 | 4 | Both following use cases rely on pkg-config and make, thus make sure 5 | that you have them installed and working on your system. 6 | 7 | 8 | Method 1: build the installed examples in a generic read/write user directory 9 | 10 | Copy to a read/write user directory and just use "make", it will link 11 | to the libraries on your system, assuming the PKG_CONFIG_PATH is 12 | correctly configured. 13 | 14 | Method 2: build the examples in-tree 15 | 16 | Assuming you are in the source FFmpeg checkout directory, you need to build 17 | FFmpeg (no need to make install in any prefix). Then just run "make examples". 18 | This will build the examples using the FFmpeg build system. You can clean those 19 | examples using "make examplesclean" 20 | 21 | If you want to try the dedicated Makefile examples (to emulate the first 22 | method), go into doc/examples and run a command such as 23 | PKG_CONFIG_PATH=pc-uninstalled make. 24 | -------------------------------------------------------------------------------- /ffmpeg/examples/metadata.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Reinhard Tartler 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | /** 24 | * @file 25 | * Shows how the metadata API can be used in application programs. 26 | * @example metadata.c 27 | */ 28 | 29 | #include 30 | 31 | #include 32 | #include 33 | 34 | int main (int argc, char **argv) 35 | { 36 | AVFormatContext *fmt_ctx = NULL; 37 | AVDictionaryEntry *tag = NULL; 38 | int ret; 39 | 40 | if (argc != 2) { 41 | printf("usage: %s \n" 42 | "example program to demonstrate the use of the libavformat metadata API.\n" 43 | "\n", argv[0]); 44 | return 1; 45 | } 46 | 47 | av_register_all(); 48 | if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL))) 49 | return ret; 50 | 51 | while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) 52 | printf("%s=%s\n", tag->key, tag->value); 53 | 54 | avformat_close_input(&fmt_ctx); 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /ffmpeg/include/libavcodec/jni.h: -------------------------------------------------------------------------------- 1 | /* 2 | * JNI public API functions 3 | * 4 | * Copyright (c) 2015-2016 Matthieu Bouron 5 | * 6 | * This file is part of FFmpeg. 7 | * 8 | * FFmpeg is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * FFmpeg is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with FFmpeg; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef AVCODEC_JNI_H 24 | #define AVCODEC_JNI_H 25 | 26 | /* 27 | * Manually set a Java virtual machine which will be used to retrieve the JNI 28 | * environment. Once a Java VM is set it cannot be changed afterwards, meaning 29 | * you can call multiple times av_jni_set_java_vm with the same Java VM pointer 30 | * however it will error out if you try to set a different Java VM. 31 | * 32 | * @param vm Java virtual machine 33 | * @param log_ctx context used for logging, can be NULL 34 | * @return 0 on success, < 0 otherwise 35 | */ 36 | int av_jni_set_java_vm(void *vm, void *log_ctx); 37 | 38 | /* 39 | * Get the Java virtual machine which has been set with av_jni_set_java_vm. 40 | * 41 | * @param vm Java virtual machine 42 | * @return a pointer to the Java virtual machine 43 | */ 44 | void *av_jni_get_java_vm(void *log_ctx); 45 | 46 | #endif /* AVCODEC_JNI_H */ 47 | -------------------------------------------------------------------------------- /ffmpeg/include/libavcodec/vorbis_parser.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 | * A public API for Vorbis parsing 22 | * 23 | * Determines the duration for each packet. 24 | */ 25 | 26 | #ifndef AVCODEC_VORBIS_PARSER_H 27 | #define AVCODEC_VORBIS_PARSER_H 28 | 29 | #include 30 | 31 | typedef struct AVVorbisParseContext AVVorbisParseContext; 32 | 33 | /** 34 | * Allocate and initialize the Vorbis parser using headers in the extradata. 35 | */ 36 | AVVorbisParseContext *av_vorbis_parse_init(const uint8_t *extradata, 37 | int extradata_size); 38 | 39 | /** 40 | * Free the parser and everything associated with it. 41 | */ 42 | void av_vorbis_parse_free(AVVorbisParseContext **s); 43 | 44 | #define VORBIS_FLAG_HEADER 0x00000001 45 | #define VORBIS_FLAG_COMMENT 0x00000002 46 | #define VORBIS_FLAG_SETUP 0x00000004 47 | 48 | /** 49 | * Get the duration for a Vorbis packet. 50 | * 51 | * If @p flags is @c NULL, 52 | * special frames are considered invalid. 53 | * 54 | * @param s Vorbis parser context 55 | * @param buf buffer containing a Vorbis frame 56 | * @param buf_size size of the buffer 57 | * @param flags flags for special frames 58 | */ 59 | int av_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf, 60 | int buf_size, int *flags); 61 | 62 | /** 63 | * Get the duration for a Vorbis packet. 64 | * 65 | * @param s Vorbis parser context 66 | * @param buf buffer containing a Vorbis frame 67 | * @param buf_size size of the buffer 68 | */ 69 | int av_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf, 70 | int buf_size); 71 | 72 | void av_vorbis_parse_reset(AVVorbisParseContext *s); 73 | 74 | #endif /* AVCODEC_VORBIS_PARSER_H */ 75 | -------------------------------------------------------------------------------- /ffmpeg/include/libavdevice/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVDEVICE_VERSION_H 20 | #define AVDEVICE_VERSION_H 21 | 22 | /** 23 | * @file 24 | * @ingroup lavd 25 | * Libavdevice version macros 26 | */ 27 | 28 | #include "libavutil/version.h" 29 | 30 | #define LIBAVDEVICE_VERSION_MAJOR 57 31 | #define LIBAVDEVICE_VERSION_MINOR 10 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 | -------------------------------------------------------------------------------- /ffmpeg/include/libavfilter/avfiltergraph.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Filter graphs 3 | * copyright (c) 2007 Bobby Bingham 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVFILTER_AVFILTERGRAPH_H 23 | #define AVFILTER_AVFILTERGRAPH_H 24 | 25 | #include "avfilter.h" 26 | #include "libavutil/log.h" 27 | 28 | #endif /* AVFILTER_AVFILTERGRAPH_H */ 29 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/adler32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Mans Rullgard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /** 22 | * @file 23 | * @ingroup lavu_adler32 24 | * Public header for Adler-32 hash function implementation. 25 | */ 26 | 27 | #ifndef AVUTIL_ADLER32_H 28 | #define AVUTIL_ADLER32_H 29 | 30 | #include 31 | #include "attributes.h" 32 | 33 | /** 34 | * @defgroup lavu_adler32 Adler-32 35 | * @ingroup lavu_hash 36 | * Adler-32 hash function implementation. 37 | * 38 | * @{ 39 | */ 40 | 41 | /** 42 | * Calculate the Adler32 checksum of a buffer. 43 | * 44 | * Passing the return value to a subsequent av_adler32_update() call 45 | * allows the checksum of multiple buffers to be calculated as though 46 | * they were concatenated. 47 | * 48 | * @param adler initial checksum value 49 | * @param buf pointer to input buffer 50 | * @param len size of input buffer 51 | * @return updated checksum 52 | */ 53 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, 54 | unsigned int len) av_pure; 55 | 56 | /** 57 | * @} 58 | */ 59 | 60 | #endif /* AVUTIL_ADLER32_H */ 61 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2007 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_AES_H 22 | #define AVUTIL_AES_H 23 | 24 | #include 25 | 26 | #include "attributes.h" 27 | #include "version.h" 28 | 29 | /** 30 | * @defgroup lavu_aes AES 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | extern const int av_aes_size; 36 | 37 | struct AVAES; 38 | 39 | /** 40 | * Allocate an AVAES context. 41 | */ 42 | struct AVAES *av_aes_alloc(void); 43 | 44 | /** 45 | * Initialize an AVAES context. 46 | * @param key_bits 128, 192 or 256 47 | * @param decrypt 0 for encryption, 1 for decryption 48 | */ 49 | int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt); 50 | 51 | /** 52 | * Encrypt or decrypt a buffer using a previously initialized context. 53 | * @param count number of 16 byte blocks 54 | * @param dst destination array, can be equal to src 55 | * @param src source array, can be equal to dst 56 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 57 | * @param decrypt 0 for encryption, 1 for decryption 58 | */ 59 | void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | #endif /* AVUTIL_AES_H */ 66 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/aes_ctr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AES-CTR cipher 3 | * Copyright (c) 2015 Eran Kornblau 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_AES_CTR_H 23 | #define AVUTIL_AES_CTR_H 24 | 25 | #include 26 | 27 | #include "attributes.h" 28 | #include "version.h" 29 | 30 | #define AES_CTR_KEY_SIZE (16) 31 | #define AES_CTR_IV_SIZE (8) 32 | 33 | struct AVAESCTR; 34 | 35 | /** 36 | * Allocate an AVAESCTR context. 37 | */ 38 | struct AVAESCTR *av_aes_ctr_alloc(void); 39 | 40 | /** 41 | * Initialize an AVAESCTR context. 42 | * @param key encryption key, must have a length of AES_CTR_KEY_SIZE 43 | */ 44 | int av_aes_ctr_init(struct AVAESCTR *a, const uint8_t *key); 45 | 46 | /** 47 | * Release an AVAESCTR context. 48 | */ 49 | void av_aes_ctr_free(struct AVAESCTR *a); 50 | 51 | /** 52 | * Process a buffer using a previously initialized context. 53 | * @param dst destination array, can be equal to src 54 | * @param src source array, can be equal to dst 55 | * @param size the size of src and dst 56 | */ 57 | void av_aes_ctr_crypt(struct AVAESCTR *a, uint8_t *dst, const uint8_t *src, int size); 58 | 59 | /** 60 | * Get the current iv 61 | */ 62 | const uint8_t* av_aes_ctr_get_iv(struct AVAESCTR *a); 63 | 64 | /** 65 | * Generate a random iv 66 | */ 67 | void av_aes_ctr_set_random_iv(struct AVAESCTR *a); 68 | 69 | /** 70 | * Forcefully change the iv 71 | */ 72 | void av_aes_ctr_set_iv(struct AVAESCTR *a, const uint8_t* iv); 73 | 74 | /** 75 | * Increment the top 64 bit of the iv (performed after each frame) 76 | */ 77 | void av_aes_ctr_increment_iv(struct AVAESCTR *a); 78 | 79 | /** 80 | * @} 81 | */ 82 | 83 | #endif /* AVUTIL_AES_CTR_H */ 84 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/avassert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2010 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /** 22 | * @file 23 | * simple assert() macros that are a bit more flexible than ISO C assert(). 24 | * @author Michael Niedermayer 25 | */ 26 | 27 | #ifndef AVUTIL_AVASSERT_H 28 | #define AVUTIL_AVASSERT_H 29 | 30 | #include 31 | #include "avutil.h" 32 | #include "log.h" 33 | 34 | /** 35 | * assert() equivalent, that is always enabled. 36 | */ 37 | #define av_assert0(cond) do { \ 38 | if (!(cond)) { \ 39 | av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n", \ 40 | AV_STRINGIFY(cond), __FILE__, __LINE__); \ 41 | abort(); \ 42 | } \ 43 | } while (0) 44 | 45 | 46 | /** 47 | * assert() equivalent, that does not lie in speed critical code. 48 | * These asserts() thus can be enabled without fearing speed loss. 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 | #define av_assert2_fpu() av_assert0_fpu() 63 | #else 64 | #define av_assert2(cond) ((void)0) 65 | #define av_assert2_fpu() ((void)0) 66 | #endif 67 | 68 | /** 69 | * Assert that floating point opperations can be executed. 70 | * 71 | * This will av_assert0() that the cpu is not in MMX state on X86 72 | */ 73 | void av_assert0_fpu(void); 74 | 75 | #endif /* AVUTIL_AVASSERT_H */ 76 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/avconfig.h: -------------------------------------------------------------------------------- 1 | /* Generated by ffconf */ 2 | #ifndef AVUTIL_AVCONFIG_H 3 | #define AVUTIL_AVCONFIG_H 4 | #define AV_HAVE_BIGENDIAN 0 5 | #define AV_HAVE_FAST_UNALIGNED 1 6 | #endif /* AVUTIL_AVCONFIG_H */ 7 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_BASE64_H 22 | #define AVUTIL_BASE64_H 23 | 24 | #include 25 | 26 | /** 27 | * @defgroup lavu_base64 Base64 28 | * @ingroup lavu_crypto 29 | * @{ 30 | */ 31 | 32 | /** 33 | * Decode a base64-encoded string. 34 | * 35 | * @param out buffer for decoded data 36 | * @param in null-terminated input string 37 | * @param out_size size in bytes of the out buffer, must be at 38 | * least 3/4 of the length of in, that is AV_BASE64_DECODE_SIZE(strlen(in)) 39 | * @return number of bytes written, or a negative value in case of 40 | * invalid input 41 | */ 42 | int av_base64_decode(uint8_t *out, const char *in, int out_size); 43 | 44 | /** 45 | * Calculate the output size in bytes needed to decode a base64 string 46 | * with length x to a data buffer. 47 | */ 48 | #define AV_BASE64_DECODE_SIZE(x) ((x) * 3LL / 4) 49 | 50 | /** 51 | * Encode data to base64 and null-terminate. 52 | * 53 | * @param out buffer for encoded data 54 | * @param out_size size in bytes of the out buffer (including the 55 | * null terminator), must be at least AV_BASE64_SIZE(in_size) 56 | * @param in input buffer containing the data to encode 57 | * @param in_size size in bytes of the in buffer 58 | * @return out or NULL in case of error 59 | */ 60 | char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size); 61 | 62 | /** 63 | * Calculate the output size needed to base64-encode x bytes to a 64 | * null-terminated string. 65 | */ 66 | #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1) 67 | 68 | /** 69 | * @} 70 | */ 71 | 72 | #endif /* AVUTIL_BASE64_H */ 73 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/camellia.h: -------------------------------------------------------------------------------- 1 | /* 2 | * An implementation of the CAMELLIA algorithm as mentioned in RFC3713 3 | * Copyright (c) 2014 Supraja Meedinti 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_CAMELLIA_H 23 | #define AVUTIL_CAMELLIA_H 24 | 25 | #include 26 | 27 | 28 | /** 29 | * @file 30 | * @brief Public header for libavutil CAMELLIA algorithm 31 | * @defgroup lavu_camellia CAMELLIA 32 | * @ingroup lavu_crypto 33 | * @{ 34 | */ 35 | 36 | extern const int av_camellia_size; 37 | 38 | struct AVCAMELLIA; 39 | 40 | /** 41 | * Allocate an AVCAMELLIA context 42 | * To free the struct: av_free(ptr) 43 | */ 44 | struct AVCAMELLIA *av_camellia_alloc(void); 45 | 46 | /** 47 | * Initialize an AVCAMELLIA context. 48 | * 49 | * @param ctx an AVCAMELLIA context 50 | * @param key a key of 16, 24, 32 bytes used for encryption/decryption 51 | * @param key_bits number of keybits: possible are 128, 192, 256 52 | */ 53 | int av_camellia_init(struct AVCAMELLIA *ctx, const uint8_t *key, int key_bits); 54 | 55 | /** 56 | * Encrypt or decrypt a buffer using a previously initialized context 57 | * 58 | * @param ctx an AVCAMELLIA context 59 | * @param dst destination array, can be equal to src 60 | * @param src source array, can be equal to dst 61 | * @param count number of 16 byte blocks 62 | * @paran iv initialization vector for CBC mode, NULL for ECB mode 63 | * @param decrypt 0 for encryption, 1 for decryption 64 | */ 65 | void av_camellia_crypt(struct AVCAMELLIA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt); 66 | 67 | /** 68 | * @} 69 | */ 70 | #endif /* AVUTIL_CAMELLIA_H */ 71 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/des.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DES encryption/decryption 3 | * Copyright (c) 2007 Reimar Doeffinger 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_DES_H 23 | #define AVUTIL_DES_H 24 | 25 | #include 26 | 27 | /** 28 | * @defgroup lavu_des DES 29 | * @ingroup lavu_crypto 30 | * @{ 31 | */ 32 | 33 | typedef struct AVDES { 34 | uint64_t round_keys[3][16]; 35 | int triple_des; 36 | } AVDES; 37 | 38 | /** 39 | * Allocate an AVDES context. 40 | */ 41 | AVDES *av_des_alloc(void); 42 | 43 | /** 44 | * @brief Initializes an AVDES context. 45 | * 46 | * @param key_bits must be 64 or 192 47 | * @param decrypt 0 for encryption/CBC-MAC, 1 for decryption 48 | * @return zero on success, negative value otherwise 49 | */ 50 | int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt); 51 | 52 | /** 53 | * @brief Encrypts / decrypts using the DES algorithm. 54 | * 55 | * @param count number of 8 byte blocks 56 | * @param dst destination array, can be equal to src, must be 8-byte aligned 57 | * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL 58 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used, 59 | * must be 8-byte aligned 60 | * @param decrypt 0 for encryption, 1 for decryption 61 | */ 62 | void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); 63 | 64 | /** 65 | * @brief Calculates CBC-MAC using the DES algorithm. 66 | * 67 | * @param count number of 8 byte blocks 68 | * @param dst destination array, can be equal to src, must be 8-byte aligned 69 | * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL 70 | */ 71 | void av_des_mac(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count); 72 | 73 | /** 74 | * @} 75 | */ 76 | 77 | #endif /* AVUTIL_DES_H */ 78 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/ffversion.h: -------------------------------------------------------------------------------- 1 | /* Automatically generated by version.sh, do not manually edit! */ 2 | #ifndef AVUTIL_FFVERSION_H 3 | #define AVUTIL_FFVERSION_H 4 | #define FFMPEG_VERSION "3.4.2" 5 | #endif /* AVUTIL_FFVERSION_H */ 6 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/hwcontext_cuda.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | 20 | #ifndef AVUTIL_HWCONTEXT_CUDA_H 21 | #define AVUTIL_HWCONTEXT_CUDA_H 22 | 23 | #ifndef CUDA_VERSION 24 | #include 25 | #endif 26 | 27 | #include "pixfmt.h" 28 | 29 | /** 30 | * @file 31 | * An API-specific header for AV_HWDEVICE_TYPE_CUDA. 32 | * 33 | * This API supports dynamic frame pools. AVHWFramesContext.pool must return 34 | * AVBufferRefs whose data pointer is a CUdeviceptr. 35 | */ 36 | 37 | typedef struct AVCUDADeviceContextInternal AVCUDADeviceContextInternal; 38 | 39 | /** 40 | * This struct is allocated as AVHWDeviceContext.hwctx 41 | */ 42 | typedef struct AVCUDADeviceContext { 43 | CUcontext cuda_ctx; 44 | AVCUDADeviceContextInternal *internal; 45 | } AVCUDADeviceContext; 46 | 47 | /** 48 | * AVHWFramesContext.hwctx is currently not used 49 | */ 50 | 51 | #endif /* AVUTIL_HWCONTEXT_CUDA_H */ 52 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/hwcontext_qsv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_HWCONTEXT_QSV_H 20 | #define AVUTIL_HWCONTEXT_QSV_H 21 | 22 | #include 23 | 24 | /** 25 | * @file 26 | * An API-specific header for AV_HWDEVICE_TYPE_QSV. 27 | * 28 | * This API does not support dynamic frame pools. AVHWFramesContext.pool must 29 | * contain AVBufferRefs whose data pointer points to an mfxFrameSurface1 struct. 30 | */ 31 | 32 | /** 33 | * This struct is allocated as AVHWDeviceContext.hwctx 34 | */ 35 | typedef struct AVQSVDeviceContext { 36 | mfxSession session; 37 | } AVQSVDeviceContext; 38 | 39 | /** 40 | * This struct is allocated as AVHWFramesContext.hwctx 41 | */ 42 | typedef struct AVQSVFramesContext { 43 | mfxFrameSurface1 *surfaces; 44 | int nb_surfaces; 45 | 46 | /** 47 | * A combination of MFX_MEMTYPE_* describing the frame pool. 48 | */ 49 | int frame_type; 50 | } AVQSVFramesContext; 51 | 52 | #endif /* AVUTIL_HWCONTEXT_QSV_H */ 53 | 54 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/hwcontext_vdpau.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_HWCONTEXT_VDPAU_H 20 | #define AVUTIL_HWCONTEXT_VDPAU_H 21 | 22 | #include 23 | 24 | /** 25 | * @file 26 | * An API-specific header for AV_HWDEVICE_TYPE_VDPAU. 27 | * 28 | * This API supports dynamic frame pools. AVHWFramesContext.pool must return 29 | * AVBufferRefs whose data pointer is a VdpVideoSurface. 30 | */ 31 | 32 | /** 33 | * This struct is allocated as AVHWDeviceContext.hwctx 34 | */ 35 | typedef struct AVVDPAUDeviceContext { 36 | VdpDevice device; 37 | VdpGetProcAddress *get_proc_address; 38 | } AVVDPAUDeviceContext; 39 | 40 | /** 41 | * AVHWFramesContext.hwctx is currently not used 42 | */ 43 | 44 | #endif /* AVUTIL_HWCONTEXT_VDPAU_H */ 45 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/hwcontext_videotoolbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H 20 | #define AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H 21 | 22 | #include 23 | 24 | #include 25 | 26 | #include "pixfmt.h" 27 | 28 | /** 29 | * @file 30 | * An API-specific header for AV_HWDEVICE_TYPE_VIDEOTOOLBOX. 31 | * 32 | * This API currently does not support frame allocation, as the raw VideoToolbox 33 | * API does allocation, and FFmpeg itself never has the need to allocate frames. 34 | * 35 | * If the API user sets a custom pool, AVHWFramesContext.pool must return 36 | * AVBufferRefs whose data pointer is a CVImageBufferRef or CVPixelBufferRef. 37 | * 38 | * Currently AVHWDeviceContext.hwctx and AVHWFramesContext.hwctx are always 39 | * NULL. 40 | */ 41 | 42 | /** 43 | * Convert a VideoToolbox (actually CoreVideo) format to AVPixelFormat. 44 | * Returns AV_PIX_FMT_NONE if no known equivalent was found. 45 | */ 46 | enum AVPixelFormat av_map_videotoolbox_format_to_pixfmt(uint32_t cv_fmt); 47 | 48 | /** 49 | * Convert an AVPixelFormat to a VideoToolbox (actually CoreVideo) format. 50 | * Returns 0 if no known equivalent was found. 51 | */ 52 | uint32_t av_map_videotoolbox_format_from_pixfmt(enum AVPixelFormat pix_fmt); 53 | 54 | #endif /* AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H */ 55 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/intfloat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Mans Rullgard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_INTFLOAT_H 22 | #define AVUTIL_INTFLOAT_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | union av_intfloat32 { 28 | uint32_t i; 29 | float f; 30 | }; 31 | 32 | union av_intfloat64 { 33 | uint64_t i; 34 | double f; 35 | }; 36 | 37 | /** 38 | * Reinterpret a 32-bit integer as a float. 39 | */ 40 | static av_always_inline float av_int2float(uint32_t i) 41 | { 42 | union av_intfloat32 v; 43 | v.i = i; 44 | return v.f; 45 | } 46 | 47 | /** 48 | * Reinterpret a float as a 32-bit integer. 49 | */ 50 | static av_always_inline uint32_t av_float2int(float f) 51 | { 52 | union av_intfloat32 v; 53 | v.f = f; 54 | return v.i; 55 | } 56 | 57 | /** 58 | * Reinterpret a 64-bit integer as a double. 59 | */ 60 | static av_always_inline double av_int2double(uint64_t i) 61 | { 62 | union av_intfloat64 v; 63 | v.i = i; 64 | return v.f; 65 | } 66 | 67 | /** 68 | * Reinterpret a double as a 64-bit integer. 69 | */ 70 | static av_always_inline uint64_t av_double2int(double f) 71 | { 72 | union av_intfloat64 v; 73 | v.f = f; 74 | return v.i; 75 | } 76 | 77 | #endif /* AVUTIL_INTFLOAT_H */ 78 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/lfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Lagged Fibonacci PRNG 3 | * Copyright (c) 2008 Michael Niedermayer 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_LFG_H 23 | #define AVUTIL_LFG_H 24 | 25 | #include 26 | 27 | typedef struct AVLFG { 28 | unsigned int state[64]; 29 | int index; 30 | } AVLFG; 31 | 32 | void av_lfg_init(AVLFG *c, unsigned int seed); 33 | 34 | /** 35 | * Seed the state of the ALFG using binary data. 36 | * 37 | * Return value: 0 on success, negative value (AVERROR) on failure. 38 | */ 39 | int av_lfg_init_from_data(AVLFG *c, const uint8_t *data, unsigned int length); 40 | 41 | /** 42 | * Get the next random unsigned 32-bit number using an ALFG. 43 | * 44 | * Please also consider a simple LCG like state= state*1664525+1013904223, 45 | * it may be good enough and faster for your specific use case. 46 | */ 47 | static inline unsigned int av_lfg_get(AVLFG *c){ 48 | c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63]; 49 | return c->state[c->index++ & 63]; 50 | } 51 | 52 | /** 53 | * Get the next random unsigned 32-bit number using a MLFG. 54 | * 55 | * Please also consider av_lfg_get() above, it is faster. 56 | */ 57 | static inline unsigned int av_mlfg_get(AVLFG *c){ 58 | unsigned int a= c->state[(c->index-55) & 63]; 59 | unsigned int b= c->state[(c->index-24) & 63]; 60 | return c->state[c->index++ & 63] = 2*a*b+a+b; 61 | } 62 | 63 | /** 64 | * Get the next two numbers generated by a Box-Muller Gaussian 65 | * generator using the random numbers issued by lfg. 66 | * 67 | * @param out array where the two generated numbers are placed 68 | */ 69 | void av_bmg_get(AVLFG *lfg, double out[2]); 70 | 71 | #endif /* AVUTIL_LFG_H */ 72 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/lzo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LZO 1x decompression 3 | * copyright (c) 2006 Reimar Doeffinger 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_LZO_H 23 | #define AVUTIL_LZO_H 24 | 25 | /** 26 | * @defgroup lavu_lzo LZO 27 | * @ingroup lavu_crypto 28 | * 29 | * @{ 30 | */ 31 | 32 | #include 33 | 34 | /** @name Error flags returned by av_lzo1x_decode 35 | * @{ */ 36 | /// end of the input buffer reached before decoding finished 37 | #define AV_LZO_INPUT_DEPLETED 1 38 | /// decoded data did not fit into output buffer 39 | #define AV_LZO_OUTPUT_FULL 2 40 | /// a reference to previously decoded data was wrong 41 | #define AV_LZO_INVALID_BACKPTR 4 42 | /// a non-specific error in the compressed bitstream 43 | #define AV_LZO_ERROR 8 44 | /** @} */ 45 | 46 | #define AV_LZO_INPUT_PADDING 8 47 | #define AV_LZO_OUTPUT_PADDING 12 48 | 49 | /** 50 | * @brief Decodes LZO 1x compressed data. 51 | * @param out output buffer 52 | * @param outlen size of output buffer, number of bytes left are returned here 53 | * @param in input buffer 54 | * @param inlen size of input buffer, number of bytes left are returned here 55 | * @return 0 on success, otherwise a combination of the error flags above 56 | * 57 | * Make sure all buffers are appropriately padded, in must provide 58 | * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes. 59 | */ 60 | int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen); 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | #endif /* AVUTIL_LZO_H */ 67 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/macros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | /** 20 | * @file 21 | * @ingroup lavu 22 | * Utility Preprocessor macros 23 | */ 24 | 25 | #ifndef AVUTIL_MACROS_H 26 | #define AVUTIL_MACROS_H 27 | 28 | /** 29 | * @addtogroup preproc_misc Preprocessor String Macros 30 | * 31 | * String manipulation macros 32 | * 33 | * @{ 34 | */ 35 | 36 | #define AV_STRINGIFY(s) AV_TOSTRING(s) 37 | #define AV_TOSTRING(s) #s 38 | 39 | #define AV_GLUE(a, b) a ## b 40 | #define AV_JOIN(a, b) AV_GLUE(a, b) 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | #define AV_PRAGMA(s) _Pragma(#s) 47 | 48 | #define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1)) 49 | 50 | #endif /* AVUTIL_MACROS_H */ 51 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/motion_vector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_MOTION_VECTOR_H 20 | #define AVUTIL_MOTION_VECTOR_H 21 | 22 | #include 23 | 24 | typedef struct AVMotionVector { 25 | /** 26 | * Where the current macroblock comes from; negative value when it comes 27 | * from the past, positive value when it comes from the future. 28 | * XXX: set exact relative ref frame reference instead of a +/- 1 "direction". 29 | */ 30 | int32_t source; 31 | /** 32 | * Width and height of the block. 33 | */ 34 | uint8_t w, h; 35 | /** 36 | * Absolute source position. Can be outside the frame area. 37 | */ 38 | int16_t src_x, src_y; 39 | /** 40 | * Absolute destination position. Can be outside the frame area. 41 | */ 42 | int16_t dst_x, dst_y; 43 | /** 44 | * Extra flag information. 45 | * Currently unused. 46 | */ 47 | uint64_t flags; 48 | /** 49 | * Motion vector 50 | * src_x = dst_x + motion_x / motion_scale 51 | * src_y = dst_y + motion_y / motion_scale 52 | */ 53 | int32_t motion_x, motion_y; 54 | uint16_t motion_scale; 55 | } AVMotionVector; 56 | 57 | #endif /* AVUTIL_MOTION_VECTOR_H */ 58 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/pixelutils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_PIXELUTILS_H 20 | #define AVUTIL_PIXELUTILS_H 21 | 22 | #include 23 | #include 24 | #include "common.h" 25 | 26 | /** 27 | * Sum of abs(src1[x] - src2[x]) 28 | */ 29 | typedef int (*av_pixelutils_sad_fn)(const uint8_t *src1, ptrdiff_t stride1, 30 | const uint8_t *src2, ptrdiff_t stride2); 31 | 32 | /** 33 | * Get a potentially optimized pointer to a Sum-of-absolute-differences 34 | * function (see the av_pixelutils_sad_fn prototype). 35 | * 36 | * @param w_bits 1< 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_RANDOM_SEED_H 22 | #define AVUTIL_RANDOM_SEED_H 23 | 24 | #include 25 | /** 26 | * @addtogroup lavu_crypto 27 | * @{ 28 | */ 29 | 30 | /** 31 | * Get a seed to use in conjunction with random functions. 32 | * This function tries to provide a good seed at a best effort bases. 33 | * Its possible to call this function multiple times if more bits are needed. 34 | * It can be quite slow, which is why it should only be used as seed for a faster 35 | * PRNG. The quality of the seed depends on the platform. 36 | */ 37 | uint32_t av_get_random_seed(void); 38 | 39 | /** 40 | * @} 41 | */ 42 | 43 | #endif /* AVUTIL_RANDOM_SEED_H */ 44 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/rc4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RC4 encryption/decryption/pseudo-random number generator 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_RC4_H 22 | #define AVUTIL_RC4_H 23 | 24 | #include 25 | 26 | /** 27 | * @defgroup lavu_rc4 RC4 28 | * @ingroup lavu_crypto 29 | * @{ 30 | */ 31 | 32 | typedef struct AVRC4 { 33 | uint8_t state[256]; 34 | int x, y; 35 | } AVRC4; 36 | 37 | /** 38 | * Allocate an AVRC4 context. 39 | */ 40 | AVRC4 *av_rc4_alloc(void); 41 | 42 | /** 43 | * @brief Initializes an AVRC4 context. 44 | * 45 | * @param key_bits must be a multiple of 8 46 | * @param decrypt 0 for encryption, 1 for decryption, currently has no effect 47 | * @return zero on success, negative value otherwise 48 | */ 49 | int av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt); 50 | 51 | /** 52 | * @brief Encrypts / decrypts using the RC4 algorithm. 53 | * 54 | * @param count number of bytes 55 | * @param dst destination array, can be equal to src 56 | * @param src source array, can be equal to dst, may be NULL 57 | * @param iv not (yet) used for RC4, should be NULL 58 | * @param decrypt 0 for encryption, 1 for decryption, not (yet) used 59 | */ 60 | void av_rc4_crypt(struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | #endif /* AVUTIL_RC4_H */ 67 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/replaygain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_REPLAYGAIN_H 20 | #define AVUTIL_REPLAYGAIN_H 21 | 22 | #include 23 | 24 | /** 25 | * ReplayGain information (see 26 | * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification). 27 | * The size of this struct is a part of the public ABI. 28 | */ 29 | typedef struct AVReplayGain { 30 | /** 31 | * Track replay gain in microbels (divide by 100000 to get the value in dB). 32 | * Should be set to INT32_MIN when unknown. 33 | */ 34 | int32_t track_gain; 35 | /** 36 | * Peak track amplitude, with 100000 representing full scale (but values 37 | * may overflow). 0 when unknown. 38 | */ 39 | uint32_t track_peak; 40 | /** 41 | * Same as track_gain, but for the whole album. 42 | */ 43 | int32_t album_gain; 44 | /** 45 | * Same as track_peak, but for the whole album, 46 | */ 47 | uint32_t album_peak; 48 | } AVReplayGain; 49 | 50 | #endif /* AVUTIL_REPLAYGAIN_H */ 51 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/ripemd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Michael Niedermayer 3 | * Copyright (C) 2013 James Almer 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | /** 23 | * @file 24 | * @ingroup lavu_ripemd 25 | * Public header for RIPEMD hash function implementation. 26 | */ 27 | 28 | #ifndef AVUTIL_RIPEMD_H 29 | #define AVUTIL_RIPEMD_H 30 | 31 | #include 32 | 33 | #include "attributes.h" 34 | #include "version.h" 35 | 36 | /** 37 | * @defgroup lavu_ripemd RIPEMD 38 | * @ingroup lavu_hash 39 | * RIPEMD hash function implementation. 40 | * 41 | * @{ 42 | */ 43 | 44 | extern const int av_ripemd_size; 45 | 46 | struct AVRIPEMD; 47 | 48 | /** 49 | * Allocate an AVRIPEMD context. 50 | */ 51 | struct AVRIPEMD *av_ripemd_alloc(void); 52 | 53 | /** 54 | * Initialize RIPEMD hashing. 55 | * 56 | * @param context pointer to the function context (of size av_ripemd_size) 57 | * @param bits number of bits in digest (128, 160, 256 or 320 bits) 58 | * @return zero if initialization succeeded, -1 otherwise 59 | */ 60 | int av_ripemd_init(struct AVRIPEMD* context, int bits); 61 | 62 | /** 63 | * Update hash value. 64 | * 65 | * @param context hash function context 66 | * @param data input data to update hash with 67 | * @param len input data length 68 | */ 69 | void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len); 70 | 71 | /** 72 | * Finish hashing and output digest value. 73 | * 74 | * @param context hash function context 75 | * @param digest buffer where output digest value is stored 76 | */ 77 | void av_ripemd_final(struct AVRIPEMD* context, uint8_t *digest); 78 | 79 | /** 80 | * @} 81 | */ 82 | 83 | #endif /* AVUTIL_RIPEMD_H */ 84 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/tea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A 32-bit implementation of the TEA algorithm 3 | * Copyright (c) 2015 Vesselin Bontchev 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_TEA_H 23 | #define AVUTIL_TEA_H 24 | 25 | #include 26 | 27 | /** 28 | * @file 29 | * @brief Public header for libavutil TEA algorithm 30 | * @defgroup lavu_tea TEA 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | extern const int av_tea_size; 36 | 37 | struct AVTEA; 38 | 39 | /** 40 | * Allocate an AVTEA context 41 | * To free the struct: av_free(ptr) 42 | */ 43 | struct AVTEA *av_tea_alloc(void); 44 | 45 | /** 46 | * Initialize an AVTEA context. 47 | * 48 | * @param ctx an AVTEA context 49 | * @param key a key of 16 bytes used for encryption/decryption 50 | * @param rounds the number of rounds in TEA (64 is the "standard") 51 | */ 52 | void av_tea_init(struct AVTEA *ctx, const uint8_t key[16], int rounds); 53 | 54 | /** 55 | * Encrypt or decrypt a buffer using a previously initialized context. 56 | * 57 | * @param ctx an AVTEA context 58 | * @param dst destination array, can be equal to src 59 | * @param src source array, can be equal to dst 60 | * @param count number of 8 byte blocks 61 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 62 | * @param decrypt 0 for encryption, 1 for decryption 63 | */ 64 | void av_tea_crypt(struct AVTEA *ctx, uint8_t *dst, const uint8_t *src, 65 | int count, uint8_t *iv, int decrypt); 66 | 67 | /** 68 | * @} 69 | */ 70 | 71 | #endif /* AVUTIL_TEA_H */ 72 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2003 Fabrice Bellard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_TIME_H 22 | #define AVUTIL_TIME_H 23 | 24 | #include 25 | 26 | /** 27 | * Get the current time in microseconds. 28 | */ 29 | int64_t av_gettime(void); 30 | 31 | /** 32 | * Get the current time in microseconds since some unspecified starting point. 33 | * On platforms that support it, the time comes from a monotonic clock 34 | * This property makes this time source ideal for measuring relative time. 35 | * The returned values may not be monotonic on platforms where a monotonic 36 | * clock is not available. 37 | */ 38 | int64_t av_gettime_relative(void); 39 | 40 | /** 41 | * Indicates with a boolean result if the av_gettime_relative() time source 42 | * is monotonic. 43 | */ 44 | int av_gettime_relative_is_monotonic(void); 45 | 46 | /** 47 | * Sleep for a period of time. Although the duration is expressed in 48 | * microseconds, the actual delay may be rounded to the precision of the 49 | * system timer. 50 | * 51 | * @param usec Number of microseconds to sleep. 52 | * @return zero on success or (negative) error code. 53 | */ 54 | int av_usleep(unsigned usec); 55 | 56 | #endif /* AVUTIL_TIME_H */ 57 | -------------------------------------------------------------------------------- /ffmpeg/include/libavutil/twofish.h: -------------------------------------------------------------------------------- 1 | /* 2 | * An implementation of the TwoFish algorithm 3 | * Copyright (c) 2015 Supraja Meedinti 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_TWOFISH_H 23 | #define AVUTIL_TWOFISH_H 24 | 25 | #include 26 | 27 | 28 | /** 29 | * @file 30 | * @brief Public header for libavutil TWOFISH algorithm 31 | * @defgroup lavu_twofish TWOFISH 32 | * @ingroup lavu_crypto 33 | * @{ 34 | */ 35 | 36 | extern const int av_twofish_size; 37 | 38 | struct AVTWOFISH; 39 | 40 | /** 41 | * Allocate an AVTWOFISH context 42 | * To free the struct: av_free(ptr) 43 | */ 44 | struct AVTWOFISH *av_twofish_alloc(void); 45 | 46 | /** 47 | * Initialize an AVTWOFISH context. 48 | * 49 | * @param ctx an AVTWOFISH context 50 | * @param key a key of size ranging from 1 to 32 bytes used for encryption/decryption 51 | * @param key_bits number of keybits: 128, 192, 256 If less than the required, padded with zeroes to nearest valid value; return value is 0 if key_bits is 128/192/256, -1 if less than 0, 1 otherwise 52 | */ 53 | int av_twofish_init(struct AVTWOFISH *ctx, const uint8_t *key, int key_bits); 54 | 55 | /** 56 | * Encrypt or decrypt a buffer using a previously initialized context 57 | * 58 | * @param ctx an AVTWOFISH context 59 | * @param dst destination array, can be equal to src 60 | * @param src source array, can be equal to dst 61 | * @param count number of 16 byte blocks 62 | * @paran iv initialization vector for CBC mode, NULL for ECB mode 63 | * @param decrypt 0 for encryption, 1 for decryption 64 | */ 65 | void av_twofish_crypt(struct AVTWOFISH *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt); 66 | 67 | /** 68 | * @} 69 | */ 70 | #endif /* AVUTIL_TWOFISH_H */ 71 | -------------------------------------------------------------------------------- /ffmpeg/include/libpostproc/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef POSTPROC_VERSION_H 22 | #define POSTPROC_VERSION_H 23 | 24 | /** 25 | * @file 26 | * Libpostproc version macros 27 | */ 28 | 29 | #include "libavutil/avutil.h" 30 | 31 | #define LIBPOSTPROC_VERSION_MAJOR 54 32 | #define LIBPOSTPROC_VERSION_MINOR 7 33 | #define LIBPOSTPROC_VERSION_MICRO 100 34 | 35 | #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ 36 | LIBPOSTPROC_VERSION_MINOR, \ 37 | LIBPOSTPROC_VERSION_MICRO) 38 | #define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \ 39 | LIBPOSTPROC_VERSION_MINOR, \ 40 | LIBPOSTPROC_VERSION_MICRO) 41 | #define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT 42 | 43 | #define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION) 44 | 45 | #ifndef FF_API_QP_TYPE 46 | #define FF_API_QP_TYPE (LIBPOSTPROC_VERSION_MAJOR < 55) 47 | #endif 48 | 49 | #endif /* POSTPROC_VERSION_H */ 50 | -------------------------------------------------------------------------------- /ffmpeg/include/libswresample/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of libswresample 5 | * 6 | * libswresample is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * libswresample is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with libswresample; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef SWRESAMPLE_VERSION_H 22 | #define SWRESAMPLE_VERSION_H 23 | 24 | /** 25 | * @file 26 | * Libswresample version macros 27 | */ 28 | 29 | #include "libavutil/avutil.h" 30 | 31 | #define LIBSWRESAMPLE_VERSION_MAJOR 2 32 | #define LIBSWRESAMPLE_VERSION_MINOR 9 33 | #define LIBSWRESAMPLE_VERSION_MICRO 100 34 | 35 | #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ 36 | LIBSWRESAMPLE_VERSION_MINOR, \ 37 | LIBSWRESAMPLE_VERSION_MICRO) 38 | #define LIBSWRESAMPLE_VERSION AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \ 39 | LIBSWRESAMPLE_VERSION_MINOR, \ 40 | LIBSWRESAMPLE_VERSION_MICRO) 41 | #define LIBSWRESAMPLE_BUILD LIBSWRESAMPLE_VERSION_INT 42 | 43 | #define LIBSWRESAMPLE_IDENT "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION) 44 | 45 | #endif /* SWRESAMPLE_VERSION_H */ 46 | -------------------------------------------------------------------------------- /ffmpeg/include/libswscale/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef SWSCALE_VERSION_H 20 | #define SWSCALE_VERSION_H 21 | 22 | /** 23 | * @file 24 | * swscale version macros 25 | */ 26 | 27 | #include "libavutil/version.h" 28 | 29 | #define LIBSWSCALE_VERSION_MAJOR 4 30 | #define LIBSWSCALE_VERSION_MINOR 8 31 | #define LIBSWSCALE_VERSION_MICRO 100 32 | 33 | #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ 34 | LIBSWSCALE_VERSION_MINOR, \ 35 | LIBSWSCALE_VERSION_MICRO) 36 | #define LIBSWSCALE_VERSION AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \ 37 | LIBSWSCALE_VERSION_MINOR, \ 38 | LIBSWSCALE_VERSION_MICRO) 39 | #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT 40 | 41 | #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION) 42 | 43 | /** 44 | * FF_API_* defines may be placed below to indicate public API that will be 45 | * dropped at a future version bump. The defines themselves are not part of 46 | * the public API and may change, break or disappear at any time. 47 | */ 48 | 49 | #ifndef FF_API_SWS_VECTOR 50 | #define FF_API_SWS_VECTOR (LIBSWSCALE_VERSION_MAJOR < 6) 51 | #endif 52 | 53 | #endif /* SWSCALE_VERSION_H */ 54 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/__DECC_INCLUDE_EPILOGUE.H: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * This file is only used by HP C/C++ on VMS, and is included automatically 12 | * after each header file from this directory 13 | */ 14 | 15 | /* 16 | * The C++ compiler doesn't understand these pragmas, even though it 17 | * understands the corresponding command line qualifier. 18 | */ 19 | #ifndef __cplusplus 20 | /* restore state. Must correspond to the save in __decc_include_prologue.h */ 21 | # pragma names restore 22 | #endif 23 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/__DECC_INCLUDE_PROLOGUE.H: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * This file is only used by HP C/C++ on VMS, and is included automatically 12 | * after each header file from this directory 13 | */ 14 | 15 | /* 16 | * The C++ compiler doesn't understand these pragmas, even though it 17 | * understands the corresponding command line qualifier. 18 | */ 19 | #ifndef __cplusplus 20 | /* save state */ 21 | # pragma names save 22 | /* have the compiler shorten symbols larger than 31 chars to 23 chars 23 | * followed by a 8 hex char CRC 24 | */ 25 | # pragma names as_is,shortened 26 | #endif 27 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/asn1_mac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #error "This file is obsolete; please update your software." 11 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/asyncerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_ASYNCERR_H 12 | # define HEADER_ASYNCERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_ASYNC_strings(void); 22 | 23 | /* 24 | * ASYNC function codes. 25 | */ 26 | # define ASYNC_F_ASYNC_CTX_NEW 100 27 | # define ASYNC_F_ASYNC_INIT_THREAD 101 28 | # define ASYNC_F_ASYNC_JOB_NEW 102 29 | # define ASYNC_F_ASYNC_PAUSE_JOB 103 30 | # define ASYNC_F_ASYNC_START_FUNC 104 31 | # define ASYNC_F_ASYNC_START_JOB 105 32 | # define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD 106 33 | 34 | /* 35 | * ASYNC reason codes. 36 | */ 37 | # define ASYNC_R_FAILED_TO_SET_POOL 101 38 | # define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102 39 | # define ASYNC_R_INIT_FAILED 105 40 | # define ASYNC_R_INVALID_POOL_SIZE 103 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/blowfish.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_BLOWFISH_H 11 | # define HEADER_BLOWFISH_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_BF 16 | # include 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | # define BF_ENCRYPT 1 22 | # define BF_DECRYPT 0 23 | 24 | /*- 25 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26 | * ! BF_LONG has to be at least 32 bits wide. ! 27 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 28 | */ 29 | # define BF_LONG unsigned int 30 | 31 | # define BF_ROUNDS 16 32 | # define BF_BLOCK 8 33 | 34 | typedef struct bf_key_st { 35 | BF_LONG P[BF_ROUNDS + 2]; 36 | BF_LONG S[4 * 256]; 37 | } BF_KEY; 38 | 39 | void BF_set_key(BF_KEY *key, int len, const unsigned char *data); 40 | 41 | void BF_encrypt(BF_LONG *data, const BF_KEY *key); 42 | void BF_decrypt(BF_LONG *data, const BF_KEY *key); 43 | 44 | void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, 45 | const BF_KEY *key, int enc); 46 | void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 47 | const BF_KEY *schedule, unsigned char *ivec, int enc); 48 | void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, 49 | long length, const BF_KEY *schedule, 50 | unsigned char *ivec, int *num, int enc); 51 | void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, 52 | long length, const BF_KEY *schedule, 53 | unsigned char *ivec, int *num); 54 | const char *BF_options(void); 55 | 56 | # ifdef __cplusplus 57 | } 58 | # endif 59 | # endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_BUFFER_H 11 | # define HEADER_BUFFER_H 12 | 13 | # include 14 | # ifndef HEADER_CRYPTO_H 15 | # include 16 | # endif 17 | # include 18 | 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | # include 25 | # include 26 | 27 | /* 28 | * These names are outdated as of OpenSSL 1.1; a future release 29 | * will move them to be deprecated. 30 | */ 31 | # define BUF_strdup(s) OPENSSL_strdup(s) 32 | # define BUF_strndup(s, size) OPENSSL_strndup(s, size) 33 | # define BUF_memdup(data, size) OPENSSL_memdup(data, size) 34 | # define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) 35 | # define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) 36 | # define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) 37 | 38 | struct buf_mem_st { 39 | size_t length; /* current number of bytes */ 40 | char *data; 41 | size_t max; /* size of buffer */ 42 | unsigned long flags; 43 | }; 44 | 45 | # define BUF_MEM_FLAG_SECURE 0x01 46 | 47 | BUF_MEM *BUF_MEM_new(void); 48 | BUF_MEM *BUF_MEM_new_ex(unsigned long flags); 49 | void BUF_MEM_free(BUF_MEM *a); 50 | size_t BUF_MEM_grow(BUF_MEM *str, size_t len); 51 | size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len); 52 | void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); 53 | 54 | 55 | # ifdef __cplusplus 56 | } 57 | # endif 58 | #endif 59 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/buffererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_BUFERR_H 12 | # define HEADER_BUFERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_BUF_strings(void); 22 | 23 | /* 24 | * BUF function codes. 25 | */ 26 | # define BUF_F_BUF_MEM_GROW 100 27 | # define BUF_F_BUF_MEM_GROW_CLEAN 105 28 | # define BUF_F_BUF_MEM_NEW 101 29 | 30 | /* 31 | * BUF reason codes. 32 | */ 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/cast.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_CAST_H 11 | # define HEADER_CAST_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_CAST 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | # define CAST_ENCRYPT 1 21 | # define CAST_DECRYPT 0 22 | 23 | # define CAST_LONG unsigned int 24 | 25 | # define CAST_BLOCK 8 26 | # define CAST_KEY_LENGTH 16 27 | 28 | typedef struct cast_key_st { 29 | CAST_LONG data[32]; 30 | int short_key; /* Use reduced rounds for short key */ 31 | } CAST_KEY; 32 | 33 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 34 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, 35 | const CAST_KEY *key, int enc); 36 | void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); 37 | void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); 38 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, 39 | long length, const CAST_KEY *ks, unsigned char *iv, 40 | int enc); 41 | void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 42 | long length, const CAST_KEY *schedule, 43 | unsigned char *ivec, int *num, int enc); 44 | void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 45 | long length, const CAST_KEY *schedule, 46 | unsigned char *ivec, int *num); 47 | 48 | # ifdef __cplusplus 49 | } 50 | # endif 51 | # endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/cmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_CMAC_H 11 | # define HEADER_CMAC_H 12 | 13 | # ifndef OPENSSL_NO_CMAC 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | # include 20 | 21 | /* Opaque */ 22 | typedef struct CMAC_CTX_st CMAC_CTX; 23 | 24 | CMAC_CTX *CMAC_CTX_new(void); 25 | void CMAC_CTX_cleanup(CMAC_CTX *ctx); 26 | void CMAC_CTX_free(CMAC_CTX *ctx); 27 | EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); 28 | int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); 29 | 30 | int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, 31 | const EVP_CIPHER *cipher, ENGINE *impl); 32 | int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); 33 | int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); 34 | int CMAC_resume(CMAC_CTX *ctx); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | # endif 41 | #endif 42 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/comp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_COMP_H 11 | # define HEADER_COMP_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_COMP 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | 23 | 24 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 25 | const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx); 26 | int COMP_CTX_get_type(const COMP_CTX* comp); 27 | int COMP_get_type(const COMP_METHOD *meth); 28 | const char *COMP_get_name(const COMP_METHOD *meth); 29 | void COMP_CTX_free(COMP_CTX *ctx); 30 | 31 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 32 | unsigned char *in, int ilen); 33 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 34 | unsigned char *in, int ilen); 35 | 36 | COMP_METHOD *COMP_zlib(void); 37 | 38 | #if OPENSSL_API_COMPAT < 0x10100000L 39 | #define COMP_zlib_cleanup() while(0) continue 40 | #endif 41 | 42 | # ifdef HEADER_BIO_H 43 | # ifdef ZLIB 44 | const BIO_METHOD *BIO_f_zlib(void); 45 | # endif 46 | # endif 47 | 48 | 49 | # ifdef __cplusplus 50 | } 51 | # endif 52 | # endif 53 | #endif 54 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/comperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_COMPERR_H 12 | # define HEADER_COMPERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # include 19 | 20 | # ifndef OPENSSL_NO_COMP 21 | 22 | # ifdef __cplusplus 23 | extern "C" 24 | # endif 25 | int ERR_load_COMP_strings(void); 26 | 27 | /* 28 | * COMP function codes. 29 | */ 30 | # define COMP_F_BIO_ZLIB_FLUSH 99 31 | # define COMP_F_BIO_ZLIB_NEW 100 32 | # define COMP_F_BIO_ZLIB_READ 101 33 | # define COMP_F_BIO_ZLIB_WRITE 102 34 | # define COMP_F_COMP_CTX_NEW 103 35 | 36 | /* 37 | * COMP reason codes. 38 | */ 39 | # define COMP_R_ZLIB_DEFLATE_ERROR 99 40 | # define COMP_R_ZLIB_INFLATE_ERROR 100 41 | # define COMP_R_ZLIB_NOT_SUPPORTED 101 42 | 43 | # endif 44 | #endif 45 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_CONF_API_H 11 | # define HEADER_CONF_API_H 12 | 13 | # include 14 | # include 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | /* Up until OpenSSL 0.9.5a, this was new_section */ 21 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 22 | /* Up until OpenSSL 0.9.5a, this was get_section */ 23 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 24 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ 25 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 26 | const char *section); 27 | 28 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 29 | char *_CONF_get_string(const CONF *conf, const char *section, 30 | const char *name); 31 | long _CONF_get_number(const CONF *conf, const char *section, 32 | const char *name); 33 | 34 | int _CONF_new_data(CONF *conf); 35 | void _CONF_free_data(CONF *conf); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/cryptoerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_CRYPTOERR_H 12 | # define HEADER_CRYPTOERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_CRYPTO_strings(void); 22 | 23 | /* 24 | * CRYPTO function codes. 25 | */ 26 | # define CRYPTO_F_CMAC_CTX_NEW 120 27 | # define CRYPTO_F_CRYPTO_DUP_EX_DATA 110 28 | # define CRYPTO_F_CRYPTO_FREE_EX_DATA 111 29 | # define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 30 | # define CRYPTO_F_CRYPTO_MEMDUP 115 31 | # define CRYPTO_F_CRYPTO_NEW_EX_DATA 112 32 | # define CRYPTO_F_CRYPTO_OCB128_COPY_CTX 121 33 | # define CRYPTO_F_CRYPTO_OCB128_INIT 122 34 | # define CRYPTO_F_CRYPTO_SET_EX_DATA 102 35 | # define CRYPTO_F_FIPS_MODE_SET 109 36 | # define CRYPTO_F_GET_AND_LOCK 113 37 | # define CRYPTO_F_OPENSSL_ATEXIT 114 38 | # define CRYPTO_F_OPENSSL_BUF2HEXSTR 117 39 | # define CRYPTO_F_OPENSSL_FOPEN 119 40 | # define CRYPTO_F_OPENSSL_HEXSTR2BUF 118 41 | # define CRYPTO_F_OPENSSL_INIT_CRYPTO 116 42 | # define CRYPTO_F_OPENSSL_LH_NEW 126 43 | # define CRYPTO_F_OPENSSL_SK_DEEP_COPY 127 44 | # define CRYPTO_F_OPENSSL_SK_DUP 128 45 | # define CRYPTO_F_PKEY_HMAC_INIT 123 46 | # define CRYPTO_F_PKEY_POLY1305_INIT 124 47 | # define CRYPTO_F_PKEY_SIPHASH_INIT 125 48 | # define CRYPTO_F_SK_RESERVE 129 49 | 50 | /* 51 | * CRYPTO reason codes. 52 | */ 53 | # define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 54 | # define CRYPTO_R_ILLEGAL_HEX_DIGIT 102 55 | # define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/dtls1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_DTLS1_H 11 | # define HEADER_DTLS1_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | # define DTLS1_VERSION 0xFEFF 18 | # define DTLS1_2_VERSION 0xFEFD 19 | # define DTLS_MIN_VERSION DTLS1_VERSION 20 | # define DTLS_MAX_VERSION DTLS1_2_VERSION 21 | # define DTLS1_VERSION_MAJOR 0xFE 22 | 23 | # define DTLS1_BAD_VER 0x0100 24 | 25 | /* Special value for method supporting multiple versions */ 26 | # define DTLS_ANY_VERSION 0x1FFFF 27 | 28 | /* lengths of messages */ 29 | /* 30 | * Actually the max cookie length in DTLS is 255. But we can't change this now 31 | * due to compatibility concerns. 32 | */ 33 | # define DTLS1_COOKIE_LENGTH 256 34 | 35 | # define DTLS1_RT_HEADER_LENGTH 13 36 | 37 | # define DTLS1_HM_HEADER_LENGTH 12 38 | 39 | # define DTLS1_HM_BAD_FRAGMENT -2 40 | # define DTLS1_HM_FRAGMENT_RETRY -3 41 | 42 | # define DTLS1_CCS_HEADER_LENGTH 1 43 | 44 | # define DTLS1_AL_HEADER_LENGTH 2 45 | 46 | /* Timeout multipliers */ 47 | # define DTLS1_TMO_READ_COUNT 2 48 | # define DTLS1_TMO_WRITE_COUNT 2 49 | 50 | # define DTLS1_TMO_ALERT_COUNT 12 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | #endif 56 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_EBCDIC_H 11 | # define HEADER_EBCDIC_H 12 | 13 | # include 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | /* Avoid name clashes with other applications */ 20 | # define os_toascii _openssl_os_toascii 21 | # define os_toebcdic _openssl_os_toebcdic 22 | # define ebcdic2ascii _openssl_ebcdic2ascii 23 | # define ascii2ebcdic _openssl_ascii2ebcdic 24 | 25 | extern const unsigned char os_toascii[256]; 26 | extern const unsigned char os_toebcdic[256]; 27 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 28 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | #endif 34 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/ecdsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_HMAC_H 11 | # define HEADER_HMAC_H 12 | 13 | # include 14 | 15 | # include 16 | 17 | # if OPENSSL_API_COMPAT < 0x10200000L 18 | # define HMAC_MAX_MD_CBLOCK 128 /* Deprecated */ 19 | # endif 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | size_t HMAC_size(const HMAC_CTX *e); 26 | HMAC_CTX *HMAC_CTX_new(void); 27 | int HMAC_CTX_reset(HMAC_CTX *ctx); 28 | void HMAC_CTX_free(HMAC_CTX *ctx); 29 | 30 | DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, 31 | const EVP_MD *md)) 32 | 33 | /*__owur*/ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 34 | const EVP_MD *md, ENGINE *impl); 35 | /*__owur*/ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, 36 | size_t len); 37 | /*__owur*/ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, 38 | unsigned int *len); 39 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 40 | const unsigned char *d, size_t n, unsigned char *md, 41 | unsigned int *md_len); 42 | __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 43 | 44 | void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 45 | const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/idea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_IDEA_H 11 | # define HEADER_IDEA_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_IDEA 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | typedef unsigned int IDEA_INT; 21 | 22 | # define IDEA_ENCRYPT 1 23 | # define IDEA_DECRYPT 0 24 | 25 | # define IDEA_BLOCK 8 26 | # define IDEA_KEY_LENGTH 16 27 | 28 | typedef struct idea_key_st { 29 | IDEA_INT data[9][6]; 30 | } IDEA_KEY_SCHEDULE; 31 | 32 | const char *IDEA_options(void); 33 | void IDEA_ecb_encrypt(const unsigned char *in, unsigned char *out, 34 | IDEA_KEY_SCHEDULE *ks); 35 | void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 36 | void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 37 | void IDEA_cbc_encrypt(const unsigned char *in, unsigned char *out, 38 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 39 | int enc); 40 | void IDEA_cfb64_encrypt(const unsigned char *in, unsigned char *out, 41 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 42 | int *num, int enc); 43 | void IDEA_ofb64_encrypt(const unsigned char *in, unsigned char *out, 44 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 45 | int *num); 46 | void IDEA_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 47 | 48 | # if OPENSSL_API_COMPAT < 0x10100000L 49 | # define idea_options IDEA_options 50 | # define idea_ecb_encrypt IDEA_ecb_encrypt 51 | # define idea_set_encrypt_key IDEA_set_encrypt_key 52 | # define idea_set_decrypt_key IDEA_set_decrypt_key 53 | # define idea_cbc_encrypt IDEA_cbc_encrypt 54 | # define idea_cfb64_encrypt IDEA_cfb64_encrypt 55 | # define idea_ofb64_encrypt IDEA_ofb64_encrypt 56 | # define idea_encrypt IDEA_encrypt 57 | # endif 58 | 59 | # ifdef __cplusplus 60 | } 61 | # endif 62 | # endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/kdferr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_KDFERR_H 12 | # define HEADER_KDFERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_KDF_strings(void); 22 | 23 | /* 24 | * KDF function codes. 25 | */ 26 | # define KDF_F_PKEY_HKDF_CTRL_STR 103 27 | # define KDF_F_PKEY_HKDF_DERIVE 102 28 | # define KDF_F_PKEY_HKDF_INIT 108 29 | # define KDF_F_PKEY_SCRYPT_CTRL_STR 104 30 | # define KDF_F_PKEY_SCRYPT_CTRL_UINT64 105 31 | # define KDF_F_PKEY_SCRYPT_DERIVE 109 32 | # define KDF_F_PKEY_SCRYPT_INIT 106 33 | # define KDF_F_PKEY_SCRYPT_SET_MEMBUF 107 34 | # define KDF_F_PKEY_TLS1_PRF_CTRL_STR 100 35 | # define KDF_F_PKEY_TLS1_PRF_DERIVE 101 36 | # define KDF_F_PKEY_TLS1_PRF_INIT 110 37 | # define KDF_F_TLS1_PRF_ALG 111 38 | 39 | /* 40 | * KDF reason codes. 41 | */ 42 | # define KDF_R_INVALID_DIGEST 100 43 | # define KDF_R_MISSING_ITERATION_COUNT 109 44 | # define KDF_R_MISSING_KEY 104 45 | # define KDF_R_MISSING_MESSAGE_DIGEST 105 46 | # define KDF_R_MISSING_PARAMETER 101 47 | # define KDF_R_MISSING_PASS 110 48 | # define KDF_R_MISSING_SALT 111 49 | # define KDF_R_MISSING_SECRET 107 50 | # define KDF_R_MISSING_SEED 106 51 | # define KDF_R_UNKNOWN_PARAMETER_TYPE 103 52 | # define KDF_R_VALUE_ERROR 108 53 | # define KDF_R_VALUE_MISSING 102 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/md2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_MD2_H 11 | # define HEADER_MD2_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_MD2 16 | # include 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | typedef unsigned char MD2_INT; 22 | 23 | # define MD2_DIGEST_LENGTH 16 24 | # define MD2_BLOCK 16 25 | 26 | typedef struct MD2state_st { 27 | unsigned int num; 28 | unsigned char data[MD2_BLOCK]; 29 | MD2_INT cksm[MD2_BLOCK]; 30 | MD2_INT state[MD2_BLOCK]; 31 | } MD2_CTX; 32 | 33 | const char *MD2_options(void); 34 | int MD2_Init(MD2_CTX *c); 35 | int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); 36 | int MD2_Final(unsigned char *md, MD2_CTX *c); 37 | unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md); 38 | 39 | # ifdef __cplusplus 40 | } 41 | # endif 42 | # endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_MD4_H 11 | # define HEADER_MD4_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_MD4 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | /*- 23 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 24 | * ! MD4_LONG has to be at least 32 bits wide. ! 25 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26 | */ 27 | # define MD4_LONG unsigned int 28 | 29 | # define MD4_CBLOCK 64 30 | # define MD4_LBLOCK (MD4_CBLOCK/4) 31 | # define MD4_DIGEST_LENGTH 16 32 | 33 | typedef struct MD4state_st { 34 | MD4_LONG A, B, C, D; 35 | MD4_LONG Nl, Nh; 36 | MD4_LONG data[MD4_LBLOCK]; 37 | unsigned int num; 38 | } MD4_CTX; 39 | 40 | int MD4_Init(MD4_CTX *c); 41 | int MD4_Update(MD4_CTX *c, const void *data, size_t len); 42 | int MD4_Final(unsigned char *md, MD4_CTX *c); 43 | unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); 44 | void MD4_Transform(MD4_CTX *c, const unsigned char *b); 45 | 46 | # ifdef __cplusplus 47 | } 48 | # endif 49 | # endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_MD5_H 11 | # define HEADER_MD5_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_MD5 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | /* 23 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 24 | * ! MD5_LONG has to be at least 32 bits wide. ! 25 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26 | */ 27 | # define MD5_LONG unsigned int 28 | 29 | # define MD5_CBLOCK 64 30 | # define MD5_LBLOCK (MD5_CBLOCK/4) 31 | # define MD5_DIGEST_LENGTH 16 32 | 33 | typedef struct MD5state_st { 34 | MD5_LONG A, B, C, D; 35 | MD5_LONG Nl, Nh; 36 | MD5_LONG data[MD5_LBLOCK]; 37 | unsigned int num; 38 | } MD5_CTX; 39 | 40 | int MD5_Init(MD5_CTX *c); 41 | int MD5_Update(MD5_CTX *c, const void *data, size_t len); 42 | int MD5_Final(unsigned char *md, MD5_CTX *c); 43 | unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); 44 | void MD5_Transform(MD5_CTX *c, const unsigned char *b); 45 | # ifdef __cplusplus 46 | } 47 | # endif 48 | # endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/mdc2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_MDC2_H 11 | # define HEADER_MDC2_H 12 | 13 | # include 14 | 15 | #ifndef OPENSSL_NO_MDC2 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | # define MDC2_BLOCK 8 23 | # define MDC2_DIGEST_LENGTH 16 24 | 25 | typedef struct mdc2_ctx_st { 26 | unsigned int num; 27 | unsigned char data[MDC2_BLOCK]; 28 | DES_cblock h, hh; 29 | int pad_type; /* either 1 or 2, default 1 */ 30 | } MDC2_CTX; 31 | 32 | int MDC2_Init(MDC2_CTX *c); 33 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); 34 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); 35 | unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md); 36 | 37 | # ifdef __cplusplus 38 | } 39 | # endif 40 | # endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/objectserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_OBJERR_H 12 | # define HEADER_OBJERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_OBJ_strings(void); 22 | 23 | /* 24 | * OBJ function codes. 25 | */ 26 | # define OBJ_F_OBJ_ADD_OBJECT 105 27 | # define OBJ_F_OBJ_ADD_SIGID 107 28 | # define OBJ_F_OBJ_CREATE 100 29 | # define OBJ_F_OBJ_DUP 101 30 | # define OBJ_F_OBJ_NAME_NEW_INDEX 106 31 | # define OBJ_F_OBJ_NID2LN 102 32 | # define OBJ_F_OBJ_NID2OBJ 103 33 | # define OBJ_F_OBJ_NID2SN 104 34 | # define OBJ_F_OBJ_TXT2OBJ 108 35 | 36 | /* 37 | * OBJ reason codes. 38 | */ 39 | # define OBJ_R_OID_EXISTS 102 40 | # define OBJ_R_UNKNOWN_NID 101 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_PEM2_H 11 | # define HEADER_PEM2_H 12 | # include 13 | #endif 14 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/rand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RAND_H 11 | # define HEADER_RAND_H 12 | 13 | # include 14 | # include 15 | # include 16 | # include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | struct rand_meth_st { 23 | int (*seed) (const void *buf, int num); 24 | int (*bytes) (unsigned char *buf, int num); 25 | void (*cleanup) (void); 26 | int (*add) (const void *buf, int num, double randomness); 27 | int (*pseudorand) (unsigned char *buf, int num); 28 | int (*status) (void); 29 | }; 30 | 31 | int RAND_set_rand_method(const RAND_METHOD *meth); 32 | const RAND_METHOD *RAND_get_rand_method(void); 33 | # ifndef OPENSSL_NO_ENGINE 34 | int RAND_set_rand_engine(ENGINE *engine); 35 | # endif 36 | 37 | RAND_METHOD *RAND_OpenSSL(void); 38 | 39 | # if OPENSSL_API_COMPAT < 0x10100000L 40 | # define RAND_cleanup() while(0) continue 41 | # endif 42 | int RAND_bytes(unsigned char *buf, int num); 43 | int RAND_priv_bytes(unsigned char *buf, int num); 44 | DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num)) 45 | 46 | void RAND_seed(const void *buf, int num); 47 | void RAND_keep_random_devices_open(int keep); 48 | 49 | # if defined(__ANDROID__) && defined(__NDK_FPABI__) 50 | __NDK_FPABI__ /* __attribute__((pcs("aapcs"))) on ARM */ 51 | # endif 52 | void RAND_add(const void *buf, int num, double randomness); 53 | int RAND_load_file(const char *file, long max_bytes); 54 | int RAND_write_file(const char *file); 55 | const char *RAND_file_name(char *file, size_t num); 56 | int RAND_status(void); 57 | 58 | # ifndef OPENSSL_NO_EGD 59 | int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); 60 | int RAND_egd(const char *path); 61 | int RAND_egd_bytes(const char *path, int bytes); 62 | # endif 63 | 64 | int RAND_poll(void); 65 | 66 | # if defined(_WIN32) && (defined(BASETYPES) || defined(_WINDEF_H)) 67 | /* application has to include in order to use these */ 68 | DEPRECATEDIN_1_1_0(void RAND_screen(void)) 69 | DEPRECATEDIN_1_1_0(int RAND_event(UINT, WPARAM, LPARAM)) 70 | # endif 71 | 72 | 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RC2_H 11 | # define HEADER_RC2_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_RC2 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | typedef unsigned int RC2_INT; 21 | 22 | # define RC2_ENCRYPT 1 23 | # define RC2_DECRYPT 0 24 | 25 | # define RC2_BLOCK 8 26 | # define RC2_KEY_LENGTH 16 27 | 28 | typedef struct rc2_key_st { 29 | RC2_INT data[64]; 30 | } RC2_KEY; 31 | 32 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits); 33 | void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, 34 | RC2_KEY *key, int enc); 35 | void RC2_encrypt(unsigned long *data, RC2_KEY *key); 36 | void RC2_decrypt(unsigned long *data, RC2_KEY *key); 37 | void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 38 | RC2_KEY *ks, unsigned char *iv, int enc); 39 | void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, 40 | long length, RC2_KEY *schedule, unsigned char *ivec, 41 | int *num, int enc); 42 | void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, 43 | long length, RC2_KEY *schedule, unsigned char *ivec, 44 | int *num); 45 | 46 | # ifdef __cplusplus 47 | } 48 | # endif 49 | # endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RC4_H 11 | # define HEADER_RC4_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_RC4 16 | # include 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | typedef struct rc4_key_st { 22 | RC4_INT x, y; 23 | RC4_INT data[256]; 24 | } RC4_KEY; 25 | 26 | const char *RC4_options(void); 27 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 28 | void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, 29 | unsigned char *outdata); 30 | 31 | # ifdef __cplusplus 32 | } 33 | # endif 34 | # endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/rc5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RC5_H 11 | # define HEADER_RC5_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_RC5 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | # define RC5_ENCRYPT 1 21 | # define RC5_DECRYPT 0 22 | 23 | # define RC5_32_INT unsigned int 24 | 25 | # define RC5_32_BLOCK 8 26 | # define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */ 27 | 28 | /* 29 | * This are the only values supported. Tweak the code if you want more The 30 | * most supported modes will be RC5-32/12/16 RC5-32/16/8 31 | */ 32 | # define RC5_8_ROUNDS 8 33 | # define RC5_12_ROUNDS 12 34 | # define RC5_16_ROUNDS 16 35 | 36 | typedef struct rc5_key_st { 37 | /* Number of rounds */ 38 | int rounds; 39 | RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)]; 40 | } RC5_32_KEY; 41 | 42 | void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, 43 | int rounds); 44 | void RC5_32_ecb_encrypt(const unsigned char *in, unsigned char *out, 45 | RC5_32_KEY *key, int enc); 46 | void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key); 47 | void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key); 48 | void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out, 49 | long length, RC5_32_KEY *ks, unsigned char *iv, 50 | int enc); 51 | void RC5_32_cfb64_encrypt(const unsigned char *in, unsigned char *out, 52 | long length, RC5_32_KEY *schedule, 53 | unsigned char *ivec, int *num, int enc); 54 | void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out, 55 | long length, RC5_32_KEY *schedule, 56 | unsigned char *ivec, int *num); 57 | 58 | # ifdef __cplusplus 59 | } 60 | # endif 61 | # endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RIPEMD_H 11 | # define HEADER_RIPEMD_H 12 | 13 | # include 14 | 15 | #ifndef OPENSSL_NO_RMD160 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | # define RIPEMD160_LONG unsigned int 23 | 24 | # define RIPEMD160_CBLOCK 64 25 | # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 26 | # define RIPEMD160_DIGEST_LENGTH 20 27 | 28 | typedef struct RIPEMD160state_st { 29 | RIPEMD160_LONG A, B, C, D, E; 30 | RIPEMD160_LONG Nl, Nh; 31 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 32 | unsigned int num; 33 | } RIPEMD160_CTX; 34 | 35 | int RIPEMD160_Init(RIPEMD160_CTX *c); 36 | int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 37 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 38 | unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md); 39 | void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); 40 | 41 | # ifdef __cplusplus 42 | } 43 | # endif 44 | # endif 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/srtp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * DTLS code by Eric Rescorla 12 | * 13 | * Copyright (C) 2006, Network Resonance, Inc. Copyright (C) 2011, RTFM, Inc. 14 | */ 15 | 16 | #ifndef HEADER_D1_SRTP_H 17 | # define HEADER_D1_SRTP_H 18 | 19 | # include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | # define SRTP_AES128_CM_SHA1_80 0x0001 26 | # define SRTP_AES128_CM_SHA1_32 0x0002 27 | # define SRTP_AES128_F8_SHA1_80 0x0003 28 | # define SRTP_AES128_F8_SHA1_32 0x0004 29 | # define SRTP_NULL_SHA1_80 0x0005 30 | # define SRTP_NULL_SHA1_32 0x0006 31 | 32 | /* AEAD SRTP protection profiles from RFC 7714 */ 33 | # define SRTP_AEAD_AES_128_GCM 0x0007 34 | # define SRTP_AEAD_AES_256_GCM 0x0008 35 | 36 | # ifndef OPENSSL_NO_SRTP 37 | 38 | __owur int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); 39 | __owur int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles); 40 | 41 | __owur STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); 42 | __owur SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); 43 | 44 | # endif 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/ssl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_SSL2_H 11 | # define HEADER_SSL2_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | # define SSL2_VERSION 0x0002 18 | 19 | # define SSL2_MT_CLIENT_HELLO 1 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/symhacks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_SYMHACKS_H 11 | # define HEADER_SYMHACKS_H 12 | 13 | # include 14 | 15 | /* Case insensitive linking causes problems.... */ 16 | # if defined(OPENSSL_SYS_VMS) 17 | # undef ERR_load_CRYPTO_strings 18 | # define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings 19 | # undef OCSP_crlID_new 20 | # define OCSP_crlID_new OCSP_crlID2_new 21 | 22 | # undef d2i_ECPARAMETERS 23 | # define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS 24 | # undef i2d_ECPARAMETERS 25 | # define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS 26 | # undef d2i_ECPKPARAMETERS 27 | # define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS 28 | # undef i2d_ECPKPARAMETERS 29 | # define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS 30 | 31 | /* This one clashes with CMS_data_create */ 32 | # undef cms_Data_create 33 | # define cms_Data_create priv_cms_Data_create 34 | 35 | # endif 36 | 37 | #endif /* ! defined HEADER_VMS_IDHACKS_H */ 38 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_TXT_DB_H 11 | # define HEADER_TXT_DB_H 12 | 13 | # include 14 | # include 15 | # include 16 | # include 17 | 18 | # define DB_ERROR_OK 0 19 | # define DB_ERROR_MALLOC 1 20 | # define DB_ERROR_INDEX_CLASH 2 21 | # define DB_ERROR_INDEX_OUT_OF_RANGE 3 22 | # define DB_ERROR_NO_INDEX 4 23 | # define DB_ERROR_INSERT_INDEX_CLASH 5 24 | # define DB_ERROR_WRONG_NUM_FIELDS 6 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | typedef OPENSSL_STRING *OPENSSL_PSTRING; 31 | DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) 32 | 33 | typedef struct txt_db_st { 34 | int num_fields; 35 | STACK_OF(OPENSSL_PSTRING) *data; 36 | LHASH_OF(OPENSSL_STRING) **index; 37 | int (**qual) (OPENSSL_STRING *); 38 | long error; 39 | long arg1; 40 | long arg2; 41 | OPENSSL_STRING *arg_row; 42 | } TXT_DB; 43 | 44 | TXT_DB *TXT_DB_read(BIO *in, int num); 45 | long TXT_DB_write(BIO *out, TXT_DB *db); 46 | int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), 47 | OPENSSL_LH_HASHFUNC hash, OPENSSL_LH_COMPFUNC cmp); 48 | void TXT_DB_free(TXT_DB *db); 49 | OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, 50 | OPENSSL_STRING *value); 51 | int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /ffmpeg/include/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_WHRLPOOL_H 11 | # define HEADER_WHRLPOOL_H 12 | 13 | #include 14 | 15 | # ifndef OPENSSL_NO_WHIRLPOOL 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | # define WHIRLPOOL_DIGEST_LENGTH (512/8) 23 | # define WHIRLPOOL_BBLOCK 512 24 | # define WHIRLPOOL_COUNTER (256/8) 25 | 26 | typedef struct { 27 | union { 28 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; 29 | /* double q is here to ensure 64-bit alignment */ 30 | double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)]; 31 | } H; 32 | unsigned char data[WHIRLPOOL_BBLOCK / 8]; 33 | unsigned int bitoff; 34 | size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; 35 | } WHIRLPOOL_CTX; 36 | 37 | int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); 38 | int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes); 39 | void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits); 40 | int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); 41 | unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md); 42 | 43 | # ifdef __cplusplus 44 | } 45 | # endif 46 | # endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /ffmpeg/lib/avcodec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/avcodec.lib -------------------------------------------------------------------------------- /ffmpeg/lib/avdevice.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/avdevice.lib -------------------------------------------------------------------------------- /ffmpeg/lib/avfilter-6.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | av_abuffersink_params_alloc 3 | av_buffersink_get_channel_layout 4 | av_buffersink_get_channels 5 | av_buffersink_get_format 6 | av_buffersink_get_frame 7 | av_buffersink_get_frame_flags 8 | av_buffersink_get_frame_rate 9 | av_buffersink_get_h 10 | av_buffersink_get_hw_frames_ctx 11 | av_buffersink_get_sample_aspect_ratio 12 | av_buffersink_get_sample_rate 13 | av_buffersink_get_samples 14 | av_buffersink_get_time_base 15 | av_buffersink_get_type 16 | av_buffersink_get_w 17 | av_buffersink_params_alloc 18 | av_buffersink_set_frame_size 19 | av_buffersrc_add_frame 20 | av_buffersrc_add_frame_flags 21 | av_buffersrc_close 22 | av_buffersrc_get_nb_failed_requests 23 | av_buffersrc_parameters_alloc 24 | av_buffersrc_parameters_set 25 | av_buffersrc_write_frame 26 | av_filter_ffversion DATA 27 | av_filter_next 28 | avfilter_add_matrix 29 | avfilter_all_channel_layouts DATA 30 | avfilter_config_links 31 | avfilter_configuration 32 | avfilter_free 33 | avfilter_get_by_name 34 | avfilter_get_class 35 | avfilter_get_matrix 36 | avfilter_graph_add_filter 37 | avfilter_graph_alloc 38 | avfilter_graph_alloc_filter 39 | avfilter_graph_config 40 | avfilter_graph_create_filter 41 | avfilter_graph_dump 42 | avfilter_graph_free 43 | avfilter_graph_get_filter 44 | avfilter_graph_parse 45 | avfilter_graph_parse2 46 | avfilter_graph_parse_ptr 47 | avfilter_graph_queue_command 48 | avfilter_graph_request_oldest 49 | avfilter_graph_send_command 50 | avfilter_graph_set_auto_convert 51 | avfilter_init_dict 52 | avfilter_init_filter 53 | avfilter_init_str 54 | avfilter_inout_alloc 55 | avfilter_inout_free 56 | avfilter_insert_filter 57 | avfilter_license 58 | avfilter_link 59 | avfilter_link_free 60 | avfilter_link_get_channels 61 | avfilter_link_set_closed 62 | avfilter_make_format64_list 63 | avfilter_mul_matrix 64 | avfilter_next 65 | avfilter_open 66 | avfilter_pad_count 67 | avfilter_pad_get_name 68 | avfilter_pad_get_type 69 | avfilter_process_command 70 | avfilter_register 71 | avfilter_register_all 72 | avfilter_sub_matrix 73 | avfilter_transform 74 | avfilter_uninit 75 | avfilter_version 76 | -------------------------------------------------------------------------------- /ffmpeg/lib/avfilter.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/avfilter.lib -------------------------------------------------------------------------------- /ffmpeg/lib/avformat.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/avformat.lib -------------------------------------------------------------------------------- /ffmpeg/lib/avutil.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/avutil.lib -------------------------------------------------------------------------------- /ffmpeg/lib/libavcodec.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libavcodec.dll.a -------------------------------------------------------------------------------- /ffmpeg/lib/libavdevice.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libavdevice.dll.a -------------------------------------------------------------------------------- /ffmpeg/lib/libavfilter.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libavfilter.dll.a -------------------------------------------------------------------------------- /ffmpeg/lib/libavformat.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libavformat.dll.a -------------------------------------------------------------------------------- /ffmpeg/lib/libavutil.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libavutil.dll.a -------------------------------------------------------------------------------- /ffmpeg/lib/libcrypto32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libcrypto32.lib -------------------------------------------------------------------------------- /ffmpeg/lib/libpostproc.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libpostproc.dll.a -------------------------------------------------------------------------------- /ffmpeg/lib/libssl32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libssl32.lib -------------------------------------------------------------------------------- /ffmpeg/lib/libswresample.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libswresample.dll.a -------------------------------------------------------------------------------- /ffmpeg/lib/libswscale.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/libswscale.dll.a -------------------------------------------------------------------------------- /ffmpeg/lib/postproc-54.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | postproc_configuration 3 | postproc_ffversion DATA 4 | postproc_license 5 | postproc_version 6 | pp_free_context 7 | pp_free_mode 8 | pp_get_context 9 | pp_get_mode_by_name_and_quality 10 | pp_help DATA 11 | pp_postprocess 12 | -------------------------------------------------------------------------------- /ffmpeg/lib/postproc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/postproc.lib -------------------------------------------------------------------------------- /ffmpeg/lib/swresample-2.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | swr_alloc 3 | swr_alloc_set_opts 4 | swr_build_matrix 5 | swr_close 6 | swr_config_frame 7 | swr_convert 8 | swr_convert_frame 9 | swr_drop_output 10 | swr_ffversion DATA 11 | swr_free 12 | swr_get_class 13 | swr_get_delay 14 | swr_get_out_samples 15 | swr_init 16 | swr_inject_silence 17 | swr_is_initialized 18 | swr_next_pts 19 | swr_set_channel_mapping 20 | swr_set_compensation 21 | swr_set_matrix 22 | swresample_configuration 23 | swresample_license 24 | swresample_version 25 | -------------------------------------------------------------------------------- /ffmpeg/lib/swresample.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/swresample.lib -------------------------------------------------------------------------------- /ffmpeg/lib/swscale-4.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | sws_addVec 3 | sws_allocVec 4 | sws_alloc_context 5 | sws_alloc_set_opts 6 | sws_cloneVec 7 | sws_convVec 8 | sws_convertPalette8ToPacked24 9 | sws_convertPalette8ToPacked32 10 | sws_freeContext 11 | sws_freeFilter 12 | sws_freeVec 13 | sws_getCachedContext 14 | sws_getCoefficients 15 | sws_getColorspaceDetails 16 | sws_getConstVec 17 | sws_getContext 18 | sws_getDefaultFilter 19 | sws_getGaussianVec 20 | sws_getIdentityVec 21 | sws_get_class 22 | sws_init_context 23 | sws_isSupportedEndiannessConversion 24 | sws_isSupportedInput 25 | sws_isSupportedOutput 26 | sws_normalizeVec 27 | sws_printVec2 28 | sws_scale 29 | sws_scaleVec 30 | sws_setColorspaceDetails 31 | sws_shiftVec 32 | sws_subVec 33 | swscale_configuration 34 | swscale_license 35 | swscale_version 36 | -------------------------------------------------------------------------------- /ffmpeg/lib/swscale.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg/lib/swscale.lib -------------------------------------------------------------------------------- /ffmpeg/presets/libvpx-1080p.ffpreset: -------------------------------------------------------------------------------- 1 | vcodec=libvpx 2 | 3 | g=120 4 | lag-in-frames=16 5 | deadline=good 6 | cpu-used=0 7 | vprofile=1 8 | qmax=51 9 | qmin=11 10 | slices=4 11 | b=2M 12 | 13 | #ignored unless using -pass 2 14 | maxrate=24M 15 | minrate=100k 16 | auto-alt-ref=1 17 | arnr-maxframes=7 18 | arnr-strength=5 19 | arnr-type=centered 20 | -------------------------------------------------------------------------------- /ffmpeg/presets/libvpx-1080p50_60.ffpreset: -------------------------------------------------------------------------------- 1 | vcodec=libvpx 2 | 3 | g=120 4 | lag-in-frames=25 5 | deadline=good 6 | cpu-used=0 7 | vprofile=1 8 | qmax=51 9 | qmin=11 10 | slices=4 11 | b=2M 12 | 13 | #ignored unless using -pass 2 14 | maxrate=24M 15 | minrate=100k 16 | auto-alt-ref=1 17 | arnr-maxframes=7 18 | arnr-strength=5 19 | arnr-type=centered 20 | -------------------------------------------------------------------------------- /ffmpeg/presets/libvpx-360p.ffpreset: -------------------------------------------------------------------------------- 1 | vcodec=libvpx 2 | 3 | g=120 4 | lag-in-frames=16 5 | deadline=good 6 | cpu-used=0 7 | vprofile=0 8 | qmax=63 9 | qmin=0 10 | b=768k 11 | 12 | #ignored unless using -pass 2 13 | maxrate=1.5M 14 | minrate=40k 15 | auto-alt-ref=1 16 | arnr-maxframes=7 17 | arnr-strength=5 18 | arnr-type=centered 19 | -------------------------------------------------------------------------------- /ffmpeg/presets/libvpx-720p.ffpreset: -------------------------------------------------------------------------------- 1 | vcodec=libvpx 2 | 3 | g=120 4 | lag-in-frames=16 5 | deadline=good 6 | cpu-used=0 7 | vprofile=0 8 | qmax=51 9 | qmin=11 10 | slices=4 11 | b=2M 12 | 13 | #ignored unless using -pass 2 14 | maxrate=24M 15 | minrate=100k 16 | auto-alt-ref=1 17 | arnr-maxframes=7 18 | arnr-strength=5 19 | arnr-type=centered 20 | -------------------------------------------------------------------------------- /ffmpeg/presets/libvpx-720p50_60.ffpreset: -------------------------------------------------------------------------------- 1 | vcodec=libvpx 2 | 3 | g=120 4 | lag-in-frames=25 5 | deadline=good 6 | cpu-used=0 7 | vprofile=0 8 | qmax=51 9 | qmin=11 10 | slices=4 11 | b=2M 12 | 13 | #ignored unless using -pass 2 14 | maxrate=24M 15 | minrate=100k 16 | auto-alt-ref=1 17 | arnr-maxframes=7 18 | arnr-strength=5 19 | arnr-type=centered 20 | -------------------------------------------------------------------------------- /ffmpeg教程.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/ffmpeg教程.pdf -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "qplayer.h" 4 | #include "Ini.h" 5 | 6 | int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) 7 | { 8 | UNREFERENCED_PARAMETER(hPrevInstance); 9 | UNREFERENCED_PARAMETER(lpCmdLine); 10 | DuiLib::CPaintManagerUI::SetInstance(hInstance); 11 | DuiLib::CPaintManagerUI::SetResourcePath(DuiLib::CPaintManagerUI::GetInstancePath() + _T("skin")); 12 | QPlayer* dlg = new QPlayer(true); 13 | if (dlg == NULL){ 14 | return 0; 15 | } 16 | dlg->Create(NULL, _T("QPlayer"), 17 | UI_WNDSTYLE_FRAME, //WS_OVERLAPPEDWINDOW, 18 | WS_EX_STATICEDGE | WS_EX_APPWINDOW | WS_EX_ACCEPTFILES); 19 | dlg->CenterWindow(); 20 | dlg->ShowWindow(true); 21 | if (lpCmdLine&&lpCmdLine[0]) 22 | dlg->OpenFile(lpCmdLine); 23 | DuiLib::CPaintManagerUI::MessageLoop(); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /player.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/player.ico -------------------------------------------------------------------------------- /resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/resource.h -------------------------------------------------------------------------------- /skin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtdxc/QPlayer/a12969a062e5f581ad653a7535d0534164626cea/skin.zip --------------------------------------------------------------------------------