├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── cmake └── modules │ ├── FindATK.cmake │ ├── FindAptina.cmake │ ├── FindBitflow.cmake │ ├── FindCairo.cmake │ ├── FindEDT.cmake │ ├── FindEuresys.cmake │ ├── FindFreeImage.cmake │ ├── FindGLIB2.cmake │ ├── FindGObject.cmake │ ├── FindGStreamer.cmake │ ├── FindGStreamerPluginsBase.cmake │ ├── FindGTK2.cmake │ ├── FindGigESim.cmake │ ├── FindGlew.cmake │ ├── FindIDSuEye.cmake │ ├── FindIOtechDaqX.cmake │ ├── FindImperx.cmake │ ├── FindImperxSDI.cmake │ ├── FindKAYA.cmake │ ├── FindLibIconv.cmake │ ├── FindLibXml2.cmake │ ├── FindLibpng.cmake │ ├── FindMatrox.cmake │ ├── FindNIIMAQ.cmake │ ├── FindNIIMAQdx.cmake │ ├── FindOpenCV.cmake │ ├── FindOpenGL.cmake.off │ ├── FindOrc.cmake │ ├── FindPhoenix.cmake │ ├── FindPleora.cmake │ ├── FindPylon.cmake │ ├── FindQCam.cmake │ ├── FindSapera.cmake │ ├── FindXCLIB.cmake │ ├── GetGitRevisionDescription.cmake │ ├── GetGitRevisionDescription.cmake.in │ ├── MacroFindGStreamerLibrary.cmake │ └── MacroLogFeature.cmake ├── common ├── genicampixelformat.h └── get_unix_ns.h ├── ext ├── CMakeLists.txt ├── freeimage │ ├── CMakeLists.txt │ ├── gstfreeimage.c │ ├── gstfreeimage.h │ ├── gstfreeimagedec.c │ ├── gstfreeimagedec.h │ ├── gstfreeimageenc.c │ ├── gstfreeimageenc.h │ ├── gstfreeimageutils.c │ └── gstfreeimageutils.h └── gigesim │ ├── CMakeLists.txt │ ├── gstgigesim.cpp │ └── gstgigesim.h ├── gst-libs ├── CMakeLists.txt └── klv │ ├── CMakeLists.txt │ ├── klv.c │ └── klv.h ├── gst ├── CMakeLists.txt ├── bayerutils │ ├── CMakeLists.txt │ ├── gstbayer2gray.c │ └── gstbayer2gray.h ├── extractcolor │ ├── CMakeLists.txt │ ├── gstextractcolor.c │ ├── gstextractcolor.h │ ├── gstextractcolororc-dist.c │ ├── gstextractcolororc-dist.h │ └── gstextractcolororc.orc ├── klv │ ├── CMakeLists.txt │ ├── gstklv.c │ ├── gstklvinject.c │ ├── gstklvinject.h │ ├── gstklvinspect.c │ ├── gstklvinspect.h │ ├── gstklvtimestamp.c │ └── gstklvtimestamp.h ├── misb │ ├── CMakeLists.txt │ ├── gstmisb.c │ ├── gstmisbirpack.c │ ├── gstmisbirpack.h │ ├── gstmisbirunpack.c │ └── gstmisbirunpack.h ├── select │ ├── CMakeLists.txt │ ├── gstselect.c │ └── gstselect.h ├── sensorfx │ ├── CMakeLists.txt │ ├── gstsensorfx.c │ ├── gstsensorfx3dnoise.c │ ├── gstsensorfx3dnoise.h │ ├── gstsensorfxblur.c │ └── gstsensorfxblur.h └── videoadjust │ ├── CMakeLists.txt │ ├── gstvideoadjust.c │ ├── gstvideolevels.c │ └── gstvideolevels.h ├── set_paths_and_run_cmake.bat └── sys ├── CMakeLists.txt ├── aptina ├── CMakeLists.txt ├── gstaptinasrc.c └── gstaptinasrc.h ├── bitflow ├── CMakeLists.txt ├── gstbitflowsrc.c └── gstbitflowsrc.h ├── edt ├── CMakeLists.txt ├── gstedt.c ├── gstedtpdvsink.c ├── gstedtpdvsink.h ├── gstedtpdvsrc.c └── gstedtpdvsrc.h ├── euresys ├── CMakeLists.txt ├── gsteuresyssrc.c └── gsteuresyssrc.h ├── gentl ├── CMakeLists.txt ├── GenTL_v1_5.h ├── gstgentlsrc.c ├── gstgentlsrc.h ├── ioapi.c ├── ioapi.h ├── unzip.c └── unzip.h ├── idsueye ├── CMakeLists.txt ├── gstidsueyesrc.c └── gstidsueyesrc.h ├── imperxflex ├── CMakeLists.txt ├── gstframelinksrc.c └── gstframelinksrc.h ├── imperxsdi ├── CMakeLists.txt ├── gstimperxsdisrc.cpp └── gstimperxsdisrc.h ├── iotechdaqx ├── CMakeLists.txt ├── gstiotechdaqx.c └── gstiotechdaqx.h ├── kaya ├── CMakeLists.txt ├── gstkayaplugin.c ├── gstkayasink.c ├── gstkayasink.h ├── gstkayasrc.c └── gstkayasrc.h ├── matrox ├── CMakeLists.txt ├── gstmatroxsrc.c └── gstmatroxsrc.h ├── niimaq ├── CMakeLists.txt ├── gstniimaq.c └── gstniimaq.h ├── niimaqdx ├── CMakeLists.txt ├── gstniimaqdx.c ├── gstniimaqdx.h └── win64 │ ├── niimaqdx.def │ └── niimaqdx.lib ├── phoenix ├── CMakeLists.txt ├── gstphoenixsrc.c └── gstphoenixsrc.h ├── pixci ├── CMakeLists.txt ├── gstpixcisrc.c └── gstpixcisrc.h ├── pleora ├── CMakeLists.txt ├── gstpleora.cpp ├── gstpleorasink.cpp ├── gstpleorasink.h ├── gstpleorasrc.cpp ├── gstpleorasrc.h ├── streamingchannelsource.cpp └── streamingchannelsource.h ├── pylon ├── CMakeLists.txt ├── gstpylonsrc.c └── gstpylonsrc.h ├── qcam ├── CMakeLists.txt ├── gstqcamsrc.c └── gstqcamsrc.h └── sapera ├── CMakeLists.txt ├── aq2_prm_user.h ├── corhw_prm_user.h ├── gstsaperasrc.cpp └── gstsaperasrc.h /.gitignore: -------------------------------------------------------------------------------- 1 | #ignore backup copies 2 | *~ 3 | *.swp 4 | #ignore thumbnails created by windows 5 | Thumbs.db 6 | #ignore build folder 7 | [Bb]uild*/ 8 | #Ignore files build by Visual Studio 9 | *.obj 10 | *.exe 11 | *.pdb 12 | *.user 13 | *.aps 14 | *.pch 15 | *.vspscc 16 | *_i.c 17 | *_p.c 18 | *.ncb 19 | *.suo 20 | *.tlb 21 | *.tlh 22 | *.bak 23 | *.cache 24 | *.ilk 25 | *.log 26 | .vscode 27 | [Bb]in 28 | [Dd]ebug*/ 29 | *.lib 30 | *.sbr 31 | obj/ 32 | [Rr]elease*/ 33 | _ReSharper*/ 34 | [Tt]est[Rr]esult* 35 | *.sdf 36 | *.opensdf 37 | ipch/ 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) <2003> David Schleef 2 | Copyright (C) 2016-2019 Tim-Philipp Müller 3 | Copyright (C) 2016-2017 PlayGineering Ltd. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | -------------------------------------------------------------------------------- /cmake/modules/FindATK.cmake: -------------------------------------------------------------------------------- 1 | FILE(TO_CMAKE_PATH "$ENV{ATK_DIR}" TRY1_DIR) 2 | FILE(TO_CMAKE_PATH "${ATK_DIR}" TRY2_DIR) 3 | FILE(GLOB ATK_DIR ${TRY1_DIR} ${TRY2_DIR}) 4 | 5 | FIND_PATH(ATK_INCLUDE_DIR atk/atk.h 6 | PATHS ${ATK_DIR}/include /usr/local/include/atk-1.0 /usr/include/atk-1.0 7 | ENV INCLUDE DOC "Directory containing atk/atk.h include file") 8 | 9 | IF (ATK_INCLUDE_DIR) 10 | SET(ATK_FOUND TRUE) 11 | ENDIF (ATK_INCLUDE_DIR) 12 | -------------------------------------------------------------------------------- /cmake/modules/FindAptina.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Aptina SDK 2 | # Once done this will define 3 | # 4 | # APTINA_FOUND - system has Aptina SDK 5 | # APTINA_INCLUDE_DIR - the Aptina SDK include directory 6 | # APTINA_LIBRARIES - the libraries needed to use Aptina SDK 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2017 outside US, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT APTINA_DIR) 15 | set (APTINA_DIR "C:/Aptina Imaging" CACHE PATH "Directory containing Aptina SDK includes and libraries") 16 | endif () 17 | 18 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 19 | set(_LIB_NAME "apbase") 20 | else () 21 | set(_LIB_NAME "apbase") 22 | endif () 23 | 24 | find_path (APTINA_INCLUDE_DIR apbase.h 25 | PATHS 26 | "${APTINA_DIR}/include" 27 | DOC "Directory containing Aptina include files") 28 | 29 | find_library (APTINA_LIBRARIES NAMES ${_LIB_NAME} 30 | PATHS 31 | "${APTINA_DIR}/lib") 32 | 33 | include (FindPackageHandleStandardArgs) 34 | find_package_handle_standard_args (APTINA DEFAULT_MSG APTINA_INCLUDE_DIR APTINA_LIBRARIES) -------------------------------------------------------------------------------- /cmake/modules/FindBitflow.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Bitflow SDK 2 | # Once done this will define 3 | # 4 | # BITFLOW_FOUND - system has Bitflow SDK 5 | # BITFLOW_INCLUDE_DIR - the Bitflow SDK include directory 6 | # BITFLOW_LIBRARIES - the libraries needed to use Bitflow SDK 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2016 outside US, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT BITFLOW_DIR) 15 | set (BITFLOW_DIR "C:/BitFlow SDK 6.20" CACHE PATH "Directory containing Bitflow SDK includes and libraries") 16 | endif () 17 | 18 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 19 | set(_LIB_PATH "${BITFLOW_DIR}/Lib64") 20 | else () 21 | set(_LIB_PATH "${BITFLOW_DIR}/Lib32") 22 | endif () 23 | 24 | find_path (BITFLOW_INCLUDE_DIR BiApi.h 25 | PATHS 26 | "${BITFLOW_DIR}/Include" 27 | DOC "Directory containing BiApi.h include file") 28 | 29 | find_library (_BidLib NAMES bid 30 | PATHS 31 | "${_LIB_PATH}") 32 | 33 | find_library (_BfdLib NAMES bfd 34 | PATHS 35 | "${_LIB_PATH}") 36 | 37 | set (BITFLOW_LIBRARIES ${_BidLib} ${_BfdLib}) 38 | 39 | mark_as_advanced (_BidLib _BfdLib) 40 | 41 | include (FindPackageHandleStandardArgs) 42 | find_package_handle_standard_args (BITFLOW DEFAULT_MSG BITFLOW_INCLUDE_DIR BITFLOW_LIBRARIES) -------------------------------------------------------------------------------- /cmake/modules/FindCairo.cmake: -------------------------------------------------------------------------------- 1 | FILE(TO_CMAKE_PATH "$ENV{CAIRO_DIR}" TRY1_DIR) 2 | FILE(TO_CMAKE_PATH "${CAIRO_DIR}" TRY2_DIR) 3 | FILE(GLOB CAIRO_DIR ${TRY1_DIR} ${TRY2_DIR}) 4 | 5 | FIND_PATH(CAIRO_INCLUDE_DIR cairo.h 6 | PATHS ${CAIRO_DIR}/include /usr/local/include/cairo /usr/include/cairo 7 | ENV INCLUDE DOC "Directory containing cairo.h include file") 8 | 9 | IF (CAIRO_INCLUDE_DIR) 10 | SET(CAIRO_FOUND TRUE) 11 | ENDIF (CAIRO_INCLUDE_DIR) 12 | -------------------------------------------------------------------------------- /cmake/modules/FindEDT.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find EDT PDV 2 | # Once done this will define 3 | # 4 | # EDT_FOUND - system has EDT PDV 5 | # EDT_INCLUDE_DIR - the EDT PDV include directory 6 | # EDT_LIBRARIES - the libraries needed to use the EDT PDV 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # 10 | # Redistribution and use is allowed according to the terms of the BSD license. 11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 12 | 13 | if (NOT EDT_DIR) 14 | set (EDT_DIR "C:/EDT" CACHE PATH "Directory containing EDT PDV") 15 | endif (NOT EDT_DIR) 16 | 17 | find_path (EDT_INCLUDE_DIR edtinc.h 18 | PATHS 19 | "${EDT_DIR}/pdv" 20 | DOC "Directory containing edtinc.h include file") 21 | 22 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 23 | find_library (EDT_LIBRARIES NAMES pdvlib 24 | PATHS 25 | "${EDT_DIR}/pdv/lib/amd64" 26 | DOC "EDT library to link with") 27 | else () 28 | find_library (EDT_LIBRARIES NAMES pdvlib 29 | PATHS 30 | "${EDT_DIR}/pdv/lib/x86" 31 | DOC "EDT library to link with") 32 | endif () 33 | 34 | include (FindPackageHandleStandardArgs) 35 | find_package_handle_standard_args (EDT DEFAULT_MSG EDT_INCLUDE_DIR EDT_LIBRARIES) -------------------------------------------------------------------------------- /cmake/modules/FindEuresys.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Euresys Multicam 2 | # Once done this will define 3 | # 4 | # EURESYS_FOUND - system has Euresys Multicam 5 | # EURESYS_INCLUDE_DIR - the Euresys Multicam include directory 6 | # EURESYS_LIBRARIES - the libraries needed to use Euresys Multicam 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2015, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT EURESYS_DIR) 15 | # Euresys seems to be installed in the 32-bit dir on 32- or 64-bit Windows 16 | # 32-bit dir on win32 17 | file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) 18 | # 32-bit dir on win64 19 | set(_PROG_FILES_X86 "ProgramFiles(x86)") 20 | file(TO_CMAKE_PATH "$ENV{${_PROG_FILES_X86}}" _PROG_FILES_X86) 21 | 22 | # use (x86) dir if exists 23 | if (_PROG_FILES_X86) 24 | set(_PROG_FILES "${_PROG_FILES_X86}") 25 | endif () 26 | 27 | set (EURESYS_DIR "${_PROG_FILES}/Euresys/MultiCam" CACHE PATH "Directory containing Euresys Multicam includes and libraries") 28 | 29 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 30 | set(_LIB_PATH "${EURESYS_DIR}/lib/amd64") 31 | else () 32 | set(_LIB_PATH "${EURESYS_DIR}/lib") 33 | endif () 34 | endif () 35 | 36 | find_path (EURESYS_INCLUDE_DIR multicam.h 37 | PATHS 38 | "${EURESYS_DIR}/include" 39 | DOC "Directory containing multicam.h include file") 40 | 41 | find_library (EURESYS_LIBRARIES NAMES MultiCam 42 | PATHS 43 | "${_LIB_PATH}" 44 | DOC "EURESYS library to link with") 45 | 46 | include (FindPackageHandleStandardArgs) 47 | find_package_handle_standard_args (EURESYS DEFAULT_MSG EURESYS_INCLUDE_DIR EURESYS_LIBRARIES) 48 | -------------------------------------------------------------------------------- /cmake/modules/FindFreeImage.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find the FreeImage library and include path. 3 | # Once done this will define 4 | # 5 | # FREEIMAGE_FOUND 6 | # FREEIMAGE_INCLUDE_DIR 7 | # FREEIMAGE_LIBRARY 8 | # 9 | 10 | IF (WIN32) 11 | FIND_PATH( FREEIMAGE_INCLUDE_DIR FreeImage.h 12 | ${PROJECT_SOURCE_DIR}/extern/FreeImage 13 | DOC "The directory where FreeImage.h resides") 14 | FIND_LIBRARY( FREEIMAGE_LIBRARY 15 | NAMES FreeImage freeimage 16 | PATHS 17 | ${PROJECT_SOURCE_DIR}/extern/FreeImage 18 | DOC "The FreeImage library") 19 | ELSE (WIN32) 20 | FIND_PATH( FREEIMAGE_INCLUDE_DIR FreeImage.h 21 | /usr/include 22 | /usr/local/include 23 | /sw/include 24 | /opt/local/include 25 | DOC "The directory where FreeImage.h resides") 26 | FIND_LIBRARY( FREEIMAGE_LIBRARY 27 | NAMES FreeImage freeimage 28 | PATHS 29 | /usr/lib64 30 | /usr/lib 31 | /usr/local/lib64 32 | /usr/local/lib 33 | /sw/lib 34 | /opt/local/lib 35 | DOC "The FreeImage library") 36 | ENDIF (WIN32) 37 | 38 | SET(FREEIMAGE_LIBRARIES ${FREEIMAGE_LIBRARY}) 39 | 40 | IF (FREEIMAGE_INCLUDE_DIR AND FREEIMAGE_LIBRARY) 41 | SET( FREEIMAGE_FOUND TRUE CACHE BOOL "Set to TRUE if GLEW is found, FALSE otherwise") 42 | ELSE (FREEIMAGE_INCLUDE_DIR AND FREEIMAGE_LIBRARY) 43 | SET( FREEIMAGE_FOUND FALSE CACHE BOOL "Set to TRUE if GLEW is found, FALSE otherwise") 44 | ENDIF (FREEIMAGE_INCLUDE_DIR AND FREEIMAGE_LIBRARY) 45 | 46 | MARK_AS_ADVANCED( 47 | FREEIMAGE_FOUND 48 | FREEIMAGE_LIBRARY 49 | FREEIMAGE_LIBRARIES 50 | FREEIMAGE_INCLUDE_PATH) 51 | 52 | -------------------------------------------------------------------------------- /cmake/modules/FindGLIB2.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find the GLIB2 libraries 2 | # Once done this will define 3 | # 4 | # GLIB2_FOUND - system has glib2 5 | # GLIB2_INCLUDE_DIR - the glib2 include directory 6 | # GLIB2_LIBRARIES - glib2 library 7 | 8 | # Copyright (c) 2008 Laurent Montel, 9 | # 10 | # Redistribution and use is allowed according to the terms of the BSD license. 11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 12 | 13 | 14 | if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) 15 | # Already in cache, be silent 16 | set(GLIB2_FIND_QUIETLY TRUE) 17 | endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) 18 | 19 | if (NOT WIN32) 20 | find_package(PkgConfig REQUIRED) 21 | pkg_check_modules(PKG_GLIB REQUIRED glib-2.0) 22 | endif(NOT WIN32) 23 | 24 | if (NOT GSTREAMER_ROOT) 25 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 26 | set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86_64}) 27 | else () 28 | set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86}) 29 | endif () 30 | endif () 31 | 32 | find_path(GLIB2_MAIN_INCLUDE_DIR glib.h 33 | PATH_SUFFIXES glib-2.0 34 | HINTS ${PKG_GLIB_INCLUDE_DIRS} ${PKG_GLIB_INCLUDEDIR} ${GSTREAMER_ROOT}/include) 35 | 36 | # search the glibconfig.h include dir under the same root where the library is found 37 | find_library(GLIB2_LIBRARIES 38 | NAMES glib-2.0 39 | HINTS ${PKG_GLIB_LIBRARY_DIRS} ${PKG_GLIB_LIBDIR} ${GSTREAMER_ROOT}/lib) 40 | 41 | find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h 42 | PATH_SUFFIXES glib-2.0/include ../lib/glib-2.0/include 43 | HINTS ${PKG_GLIB_INCLUDE_DIRS} ${PKG_GLIB_LIBRARIES} ${CMAKE_SYSTEM_LIBRARY_PATH} ${GSTREAMER_ROOT}/lib) 44 | 45 | set(GLIB2_INCLUDE_DIR ${GLIB2_MAIN_INCLUDE_DIR}) 46 | 47 | # not sure if this include dir is optional or required 48 | # for now it is optional 49 | if(GLIB2_INTERNAL_INCLUDE_DIR) 50 | set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} ${GLIB2_INTERNAL_INCLUDE_DIR}) 51 | endif(GLIB2_INTERNAL_INCLUDE_DIR) 52 | 53 | include(FindPackageHandleStandardArgs) 54 | find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR) 55 | 56 | mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES) 57 | 58 | 59 | find_program(GLIB2_GENMARSHAL_UTIL glib-genmarshal) 60 | 61 | macro(glib2_genmarshal output_name) 62 | file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/genmarshal_tmp) 63 | foreach(_declaration ${ARGN}) 64 | file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/genmarshal_tmp "${_declaration}\n") 65 | endforeach() 66 | add_custom_command( 67 | OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${output_name}.h ${CMAKE_CURRENT_BINARY_DIR}/${output_name}.c 68 | COMMAND ${GLIB2_GENMARSHAL_UTIL} --header genmarshal_tmp > ${output_name}.h 69 | COMMAND ${GLIB2_GENMARSHAL_UTIL} --body genmarshal_tmp > ${output_name}.c 70 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 71 | ) 72 | endmacro() 73 | -------------------------------------------------------------------------------- /cmake/modules/FindGObject.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find GObject 2 | # Once done this will define 3 | # 4 | # GOBJECT_FOUND - system has GObject 5 | # GOBJECT_INCLUDE_DIR - the GObject include directory 6 | # GOBJECT_LIBRARIES - the libraries needed to use GObject 7 | # GOBJECT_DEFINITIONS - Compiler switches required for using GObject 8 | 9 | # Copyright (c) 2006, Tim Beaulen 10 | # Copyright (c) 2008 Helio Chissini de Castro, 11 | # 12 | # Redistribution and use is allowed according to the terms of the BSD license. 13 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 14 | 15 | 16 | IF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES) 17 | # in cache already 18 | SET(GObject_FIND_QUIETLY TRUE) 19 | ELSE (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES) 20 | SET(GObject_FIND_QUIETLY FALSE) 21 | ENDIF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES) 22 | 23 | IF (NOT WIN32) 24 | FIND_PACKAGE(PkgConfig REQUIRED) 25 | # use pkg-config to get the directories and then use these values 26 | # in the FIND_PATH() and FIND_LIBRARY() calls 27 | PKG_CHECK_MODULES(PKG_GOBJECT2 REQUIRED gobject-2.0) 28 | SET(GOBJECT_DEFINITIONS ${PKG_GOBJECT2_CFLAGS}) 29 | ENDIF (NOT WIN32) 30 | 31 | if (NOT GSTREAMER_ROOT) 32 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 33 | set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86_64}) 34 | else () 35 | set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86}) 36 | endif () 37 | endif () 38 | 39 | FIND_PATH(GOBJECT_INCLUDE_DIR gobject/gobject.h 40 | HINTS ${PKG_GOBJECT2_INCLUDE_DIRS} ${PKG_GOBJECT2_INCLUDEDIR} 41 | PATHS /usr/include/glib-2.0/ ${GSTREAMER_ROOT}/include 42 | PATH_SUFFIXES glib-2.0 43 | ) 44 | 45 | FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0 46 | HINTS 47 | ${PKG_GOBJECT2_LIBRARY_DIRS} 48 | ${PKG_GOBJECT2_LIBDIR} 49 | ${GSTREAMER_ROOT}/lib 50 | ) 51 | FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0 52 | HINTS 53 | ${PKG_GOBJECT2_LIBRARY_DIRS} 54 | ${PKG_GOBJECT2_LIBDIR} 55 | ${GSTREAMER_ROOT}/lib 56 | ) 57 | FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0 58 | HINTS 59 | ${PKG_GOBJECT2_LIBRARY_DIRS} 60 | ${PKG_GOBJECT2_LIBDIR} 61 | ${GSTREAMER_ROOT}/lib 62 | ) 63 | FIND_LIBRARY(_GLibs NAMES glib-2.0 64 | HINTS 65 | ${PKG_GOBJECT2_LIBRARY_DIRS} 66 | ${PKG_GOBJECT2_LIBDIR} 67 | ${GSTREAMER_ROOT}/lib 68 | ) 69 | FIND_LIBRARY(_GIOLibs NAMES gio-2.0 70 | HINTS 71 | ${PKG_GOBJECT2_LIBRARY_DIRS} 72 | ${PKG_GOBJECT2_LIBDIR} 73 | ${GSTREAMER_ROOT}/lib 74 | ) 75 | 76 | SET (GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs} ${_GIOLibs}) 77 | 78 | MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR GOBJECT_LIBRARIES) 79 | 80 | INCLUDE(FindPackageHandleStandardArgs) 81 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(GObject DEFAULT_MSG GOBJECT_INCLUDE_DIR GOBJECT_LIBRARIES) 82 | -------------------------------------------------------------------------------- /cmake/modules/FindGStreamerPluginsBase.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find gst-plugins-base 2 | # Once done this will define 3 | # 4 | # GSTREAMER_PLUGINS_BASE_FOUND - system has gst-plugins-base 5 | # 6 | # And for all the plugin libraries specified in the COMPONENTS 7 | # of find_package, this module will define: 8 | # 9 | # GSTREAMER__LIBRARY_FOUND - system has 10 | # GSTREAMER__LIBRARY - the library 11 | # GSTREAMER__INCLUDE_DIR - the include directory 12 | # 13 | # Copyright (c) 2010, Collabora Ltd. 14 | # @author George Kiagiadakis 15 | # 16 | # Redistribution and use is allowed according to the terms of the BSD license. 17 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 18 | 19 | set(GSTREAMER_ABI_VERSION "1.0") 20 | 21 | 22 | # Find the pkg-config file for doing the version check 23 | find_package(PkgConfig) 24 | 25 | if (PKG_CONFIG_FOUND) 26 | pkg_check_modules(PKG_GSTREAMER_PLUGINS_BASE gstreamer-plugins-base-${GSTREAMER_ABI_VERSION}) 27 | endif() 28 | 29 | 30 | # Find the plugin libraries 31 | include(MacroFindGStreamerLibrary) 32 | 33 | macro(_find_gst_plugins_base_component _name _header) 34 | find_gstreamer_library(${_name} ${_header} ${GSTREAMER_ABI_VERSION}) 35 | set(_GSTREAMER_PLUGINS_BASE_EXTRA_VARIABLES ${_GSTREAMER_PLUGINS_BASE_EXTRA_VARIABLES} 36 | GSTREAMER_${_name}_LIBRARY GSTREAMER_${_name}_INCLUDE_DIR) 37 | endmacro() 38 | 39 | foreach(_component ${GStreamerPluginsBase_FIND_COMPONENTS}) 40 | if (${_component} STREQUAL "app") 41 | _find_gst_plugins_base_component(APP gstappsrc.h) 42 | elseif (${_component} STREQUAL "audio") 43 | _find_gst_plugins_base_component(AUDIO audio.h) 44 | elseif (${_component} STREQUAL "cdda") 45 | _find_gst_plugins_base_component(CDDA gstcddabasesrc.h) 46 | elseif (${_component} STREQUAL "fft") 47 | _find_gst_plugins_base_component(FFT gstfft.h) 48 | elseif (${_component} STREQUAL "floatcast") 49 | _find_gst_plugins_base_component(FLOATCAST floatcast.h) 50 | elseif (${_component} STREQUAL "interfaces") 51 | _find_gst_plugins_base_component(INTERFACES xoverlay.h) 52 | elseif (${_component} STREQUAL "insertbin") 53 | _find_gst_plugins_base_component(INSERTBIN gstinsertbin.h) 54 | elseif (${_component} STREQUAL "netbuffer") 55 | _find_gst_plugins_base_component(NETBUFFER gstnetbuffer.h) 56 | elseif (${_component} STREQUAL "riff") 57 | _find_gst_plugins_base_component(RIFF riff-ids.h) 58 | elseif (${_component} STREQUAL "rtp") 59 | _find_gst_plugins_base_component(RTP gstrtpbuffer.h) 60 | elseif (${_component} STREQUAL "rtsp") 61 | _find_gst_plugins_base_component(RTSP gstrtspdefs.h) 62 | elseif (${_component} STREQUAL "sdp") 63 | _find_gst_plugins_base_component(SDP gstsdp.h) 64 | elseif (${_component} STREQUAL "tag") 65 | _find_gst_plugins_base_component(TAG tag.h) 66 | elseif (${_component} STREQUAL "pbutils") 67 | _find_gst_plugins_base_component(PBUTILS pbutils.h) 68 | elseif (${_component} STREQUAL "video") 69 | _find_gst_plugins_base_component(VIDEO video.h) 70 | else() 71 | message (AUTHOR_WARNING "FindGStreamer.cmake: Invalid component \"${_component}\" was specified") 72 | endif() 73 | endforeach() 74 | 75 | 76 | # Version check 77 | if (GStreamerPluginsBase_FIND_VERSION) 78 | if (PKG_GSTREAMER_PLUGINS_BASE_FOUND) 79 | if("${PKG_GSTREAMER_PLUGINS_BASE_VERSION}" VERSION_LESS "${GStreamerPluginsBase_FIND_VERSION}") 80 | message(STATUS "Found gst-plugins-base version ${PKG_GSTREAMER_PLUGINS_BASE_VERSION}, but at least version ${GStreamerPluginsBase_FIND_VERSION} is required") 81 | set(GSTREAMER_PLUGINS_BASE_VERSION_COMPATIBLE FALSE) 82 | else() 83 | set(GSTREAMER_PLUGINS_BASE_VERSION_COMPATIBLE TRUE) 84 | endif() 85 | else() 86 | # We can't make any version checks without pkg-config, just assume version is compatible and hope... 87 | set(GSTREAMER_PLUGINS_BASE_VERSION_COMPATIBLE TRUE) 88 | endif() 89 | else() 90 | # No version constrain was specified, thus we consider the version compatible 91 | set(GSTREAMER_PLUGINS_BASE_VERSION_COMPATIBLE TRUE) 92 | endif() 93 | 94 | 95 | include(FindPackageHandleStandardArgs) 96 | find_package_handle_standard_args(GStreamerPluginsBase DEFAULT_MSG 97 | GSTREAMER_PLUGINS_BASE_VERSION_COMPATIBLE 98 | ${_GSTREAMER_PLUGINS_BASE_EXTRA_VARIABLES}) 99 | -------------------------------------------------------------------------------- /cmake/modules/FindGTK2.cmake: -------------------------------------------------------------------------------- 1 | FILE(TO_CMAKE_PATH "$ENV{GTK2_DIR}" TRY1_DIR) 2 | FILE(TO_CMAKE_PATH "${GTK2_DIR}" TRY2_DIR) 3 | FILE(GLOB GTK_DIR ${TRY1_DIR} ${TRY2_DIR}) 4 | 5 | FIND_PATH(GTK_gtk_2_INCLUDE_DIR gtk/gtk.h 6 | PATHS ${GTK_DIR}/include /usr/local/include/gtk-2.0 /usr/include/gtk-2.0 7 | ENV INCLUDE DOC "Directory containing gtk/gtk.h include file") 8 | 9 | FIND_PATH(GTK_gdk_2_INCLUDE_DIR gdk/gdk.h 10 | PATHS ${GTK_DIR}/include /usr/local/include/gtk-2.0 /usr/include/gtk-2.0 11 | ENV INCLUDE DOC "Directory containing gdk/gdk.h include file") 12 | 13 | FIND_PATH(GTK_gdkconfig_2_INCLUDE_DIR gdkconfig.h 14 | PATHS ${GTK_DIR}/include ${GTK_DIR}/lib/include /usr/local/include/gtk-2.0 /usr/include/gtk-2.0 /usr/lib/gtk-2.0/include /usr/local/lib/gtk-2.0/include 15 | ENV INCLUDE DOC "Directory containing gdkconfig.h include file") 16 | 17 | FIND_LIBRARY(GTK_gdk_pixbuf_2_LIBRARY NAMES gdk_pixbuf-2.0 18 | PATHS ${GTK_DIR}/lib ${GTK_DIR}/bin ${GTK_DIR}/win32/bin ${GTK_DIR}/lib ${GTK_DIR}/win32/lib /usr/local/lib /usr/lib 19 | ENV LIB 20 | DOC "gdk_pixbuf library to link with" 21 | NO_SYSTEM_ENVIRONMENT_PATH) 22 | 23 | FIND_LIBRARY(GTK_gdk_2_LIBRARY NAMES gdk-win32-2.0 gdk-x11-2.0 24 | PATHS ${GTK_DIR}/lib ${GTK_DIR}/bin ${GTK_DIR}/win32/bin ${GTK_DIR}/lib ${GTK_DIR}/win32/lib /usr/lib /usr/local/lib 25 | ENV LIB 26 | DOC "gdk2 library to link with" 27 | NO_SYSTEM_ENVIRONMENT_PATH) 28 | 29 | FIND_LIBRARY(GTK_gtk_2_LIBRARY NAMES gtk-win32-2.0 gtk-x11-2.0 30 | PATHS ${GTK_DIR}/lib ${GTK_DIR}/bin ${GTK_DIR}/win32/bin ${GTK_DIR}/lib ${GTK_DIR}/win32/lib /usr/lib /usr/local/lib 31 | ENV LIB 32 | DOC "gtk2 library to link with" 33 | NO_SYSTEM_ENVIRONMENT_PATH) 34 | 35 | 36 | IF (GTK_gtk_2_INCLUDE_DIR AND GTK_gdk_2_INCLUDE_DIR AND GTK_gdkconfig_2_INCLUDE_DIR AND 37 | GTK_gdk_pixbuf_2_LIBRARY AND GTK_gdk_2_LIBRARY AND GTK_gtk_2_LIBRARY) 38 | SET(GTK2_INCLUDE_DIR ${GTK_gtk_2_INCLUDE_DIR} ${GTK_gdk_2_INCLUDE_DIR} ${GTK_gdkconfig_2_INCLUDE_DIR}) 39 | list(REMOVE_DUPLICATES GTK2_INCLUDE_DIR) 40 | SET(GTK2_LIBRARIES ${GTK_gdk_pixbuf_2_LIBRARY} ${GTK_gdk_2_LIBRARY} ${GTK_gtk_2_LIBRARY}) 41 | list(REMOVE_DUPLICATES GTK2_LIBRARIES) 42 | SET(GTK2_FOUND TRUE) 43 | ENDIF (GTK_gtk_2_INCLUDE_DIR AND GTK_gdk_2_INCLUDE_DIR AND GTK_gdkconfig_2_INCLUDE_DIR AND 44 | GTK_gdk_pixbuf_2_LIBRARY AND GTK_gdk_2_LIBRARY AND GTK_gtk_2_LIBRARY) 45 | -------------------------------------------------------------------------------- /cmake/modules/FindGigESim.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find A&B Soft GigESim 2 | # Once done this will define 3 | # 4 | # GIGESIM_FOUND - system has A&B Soft GigESim 5 | # GIGESIM_INCLUDE_DIR - the A&B Soft GigESim include directory 6 | # GIGESIM_LIBRARIES - the libraries needed to use the A&B Soft GigESim 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # 10 | # Redistribution and use is allowed according to the terms of the BSD license. 11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 12 | 13 | if (NOT GIGESIM_DIR) 14 | set (GIGESIM_DIR "C:/Program Files/GigESim" CACHE PATH "Directory containing A&B Soft GigESim") 15 | endif (NOT GIGESIM_DIR) 16 | 17 | find_path (GIGESIM_INCLUDE_DIR GigeSimSDK.h 18 | PATHS 19 | "${GIGESIM_DIR}/Include" 20 | DOC "Directory containing GigESim include file") 21 | 22 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 23 | find_library (GIGESIM_LIBRARIES NAMES gigesimsdk64.lib 24 | PATHS 25 | "${GIGESIM_DIR}/Lib" 26 | DOC "GIGESIM library to link with") 27 | else () 28 | find_library (GIGESIM_LIBRARIES NAMES gigesimsdk 29 | PATHS 30 | "${GIGESIM_DIR}/Lib" 31 | DOC "GIGESIM library to link with") 32 | endif () 33 | 34 | include (FindPackageHandleStandardArgs) 35 | find_package_handle_standard_args (GIGESIM DEFAULT_MSG GIGESIM_INCLUDE_DIR GIGESIM_LIBRARIES) 36 | -------------------------------------------------------------------------------- /cmake/modules/FindGlew.cmake: -------------------------------------------------------------------------------- 1 | FILE(TO_CMAKE_PATH "$ENV{GLEW_DIR}" TRY1_DIR) 2 | FILE(TO_CMAKE_PATH "${GLEW_DIR}" TRY2_DIR) 3 | FILE(GLOB GLEW_DIR ${TRY1_DIR} ${TRY2_DIR}) 4 | 5 | FIND_PATH(GLEW_INCLUDE_DIR GL/glew.h 6 | PATHS ${GLEW_DIR}/include /usr/local/include /usr/include 7 | ENV INCLUDE DOC "Directory containing GL/glew.h include file") 8 | 9 | FIND_LIBRARY(GLEW_LIBRARY NAMES glew32 GLEW glew32s 10 | PATHS ${GLEW_DIR}/bin ${GLEW_DIR}/win32/bin ${GLEW_DIR}/lib ${GLEW_DIR}/win32/lib /usr/local/lib /usr/lib 11 | ENV LIB 12 | DOC "glew library to link with" 13 | NO_SYSTEM_ENVIRONMENT_PATH) 14 | 15 | IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) 16 | SET(GLEW_FOUND TRUE) 17 | ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) 18 | -------------------------------------------------------------------------------- /cmake/modules/FindIDSuEye.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find IDS uEye SDK 2 | # Once done this will define 3 | # 4 | # IDSUEYE_FOUND - system has IDS uEye SDK 5 | # IDSUEYE_INCLUDE_DIR - the IDS uEye SDK include directory 6 | # IDSUEYE_LIBRARIES - the libraries needed to use IDS uEye SDK 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2017 outside US, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | if (WIN32) 14 | if (NOT IDSUEYE_DIR) 15 | set (IDSUEYE_DIR "C:/Program Files/IDS/uEye/Develop" CACHE PATH "Directory containing IDS uEye SDK includes and libraries") 16 | endif () 17 | 18 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 19 | set(_LIB_NAME "uEye_api_64") 20 | else () 21 | set(_LIB_NAME "uEye_api") 22 | endif () 23 | 24 | find_path (IDSUEYE_INCLUDE_DIR uEye.h 25 | PATHS 26 | "${IDSUEYE_DIR}/include" 27 | DOC "Directory containing IDS uEye include files") 28 | endif (WIN32) 29 | 30 | if (UNIX) 31 | if (NOT IDSUEYE_DIR) 32 | set (IDSUEYE_DIR "/usr" CACHE PATH "Directory containing IDS uEye SDK includes and libraries") 33 | endif () 34 | 35 | set(_LIB_NAME "libueye_api.so") 36 | 37 | find_path (IDSUEYE_INCLUDE_DIR ueye.h 38 | PATHS 39 | "${IDSUEYE_DIR}/include" 40 | DOC "Directory containing IDS uEye include files") 41 | endif (UNIX) 42 | 43 | find_library (_uEyeLib NAMES ${_LIB_NAME} 44 | PATHS 45 | "${IDSUEYE_DIR}/Lib") 46 | 47 | set (IDSUEYE_LIBRARIES ${_uEyeLib}) 48 | 49 | mark_as_advanced (_uEyeLib) 50 | 51 | include (FindPackageHandleStandardArgs) 52 | find_package_handle_standard_args (IDSUEYE DEFAULT_MSG IDSUEYE_INCLUDE_DIR IDSUEYE_LIBRARIES) 53 | -------------------------------------------------------------------------------- /cmake/modules/FindIOtechDaqX.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find IOtech DaqX SDK 2 | # Once done this will define 3 | # 4 | # IOTECHDAQX_FOUND - system has IOtech DaqX SDK 5 | # IOTECHDAQX_INCLUDE_DIR - the IOtech DaqX SDK include directory 6 | # IOTECHDAQX_LIBRARIES - the libraries needed to use IOtech DaqX 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # 10 | # Redistribution and use is allowed according to the terms of the BSD license. 11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 12 | 13 | IF (IOTECHDAQX_INCLUDE_DIR AND IOTECHDAQX_LIBRARIES) 14 | # in cache already 15 | SET(IOTECHDAQX_FIND_QUIETLY TRUE) 16 | ELSE (IOTECHDAQX_INCLUDE_DIR AND IOTECHDAQX_LIBRARIES) 17 | SET(IOTECHDAQX_FIND_QUIETLY FALSE) 18 | ENDIF (IOTECHDAQX_INCLUDE_DIR AND IOTECHDAQX_LIBRARIES) 19 | 20 | IF (NOT IOTECHDAQX_DIR) 21 | SET (IOTECHDAQX_DIR "C:/Program Files/DaqX" CACHE PATH "Directory containing IOtech DaqX") 22 | ENDIF (NOT IOTECHDAQX_DIR) 23 | 24 | FIND_PATH (IOTECHDAQX_INCLUDE_DIR DAQX.H 25 | PATHS 26 | "${IOTECHDAQX_DIR}/Programming Language Support/WaveBook/C/32-bit Enhanced API" 27 | DOC "Directory containing DAQX.H include file") 28 | 29 | FIND_LIBRARY (IOTECHDAQX_LIBRARIES NAMES DAQX 30 | PATHS 31 | "${IOTECHDAQX_DIR}/Programming Language Support/WaveBook/C/32-bit Enhanced API" 32 | DOC "IOTECHDAQX library to link with") 33 | 34 | IF (IOTECHDAQX_INCLUDE_DIR) 35 | #MESSAGE(STATUS "DEBUG: Found IOtech DaqX include dir: ${IOTECHDAQX_INCLUDE_DIR}") 36 | ELSE (IOTECHDAQX_INCLUDE_DIR) 37 | MESSAGE(STATUS "IOTECHDAQX: WARNING: include dir not found") 38 | ENDIF (IOTECHDAQX_INCLUDE_DIR) 39 | 40 | IF (IOTECHDAQX_LIBRARIES) 41 | #MESSAGE(STATUS "DEBUG: Found IOtech DaqX library: ${IOTECHDAQX_LIBRARIES}") 42 | ELSE (IOTECHDAQX_LIBRARIES) 43 | MESSAGE(STATUS "IOTECHDAQX: WARNING: library not found") 44 | ENDIF (IOTECHDAQX_LIBRARIES) 45 | 46 | INCLUDE (FindPackageHandleStandardArgs) 47 | FIND_PACKAGE_HANDLE_STANDARD_ARGS (IOTECHDAQX DEFAULT_MSG IOTECHDAQX_INCLUDE_DIR IOTECHDAQX_LIBRARIES) 48 | 49 | MARK_AS_ADVANCED(IOTECHDAQX_INCLUDE_DIR IOTECHDAQX_LIBRARIES) -------------------------------------------------------------------------------- /cmake/modules/FindImperx.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Imperx FrameLink Express 2 | # Once done this will define 3 | # 4 | # IMPERX_FLEX_FOUND - system has Imperx FrameLink Express 5 | # IMPERX_FLEX_INCLUDE_DIR - the Imperx FrameLink Express include directory 6 | # IMPERX_FLEX_LIBRARIES - the libraries needed to use Imperx FrameLink Express 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2015, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT IMPERX_FLEX_DIR) 15 | # 32-bit dir on win32 16 | file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) 17 | # 32-bit dir on win64 18 | set(_PROG_FILES_X86 "ProgramFiles(x86)") 19 | file(TO_CMAKE_PATH "$ENV{${_PROG_FILES_X86}}" _PROG_FILES_X86) 20 | # 64-bit dir on win64 21 | file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432) 22 | if (_PROG_FILES_X86) 23 | set(_PROGFILESDIR "${_PROG_FILES_W6432}") 24 | else () 25 | set(_PROGFILESDIR "${_PROG_FILES}") 26 | endif () 27 | 28 | set (IMPERX_FLEX_DIR "${_PROGFILESDIR}/Imperx/FrameLink Express" CACHE PATH "Directory containing Imperx FrameLink Express includes and libraries") 29 | 30 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 31 | set(_LIB_PATH "${IMPERX_FLEX_DIR}/SDK/lib/x64") 32 | else () 33 | set(_LIB_PATH "${IMPERX_FLEX_DIR}/SDK/lib/win32") 34 | endif () 35 | endif () 36 | 37 | find_path (IMPERX_FLEX_INCLUDE_DIR VCECLB.h 38 | PATHS 39 | "${IMPERX_FLEX_DIR}/SDK/inc" 40 | DOC "Directory containing VCECLB.h include file") 41 | 42 | find_library (IMPERX_FLEX_LIBRARIES NAMES VCECLB 43 | PATHS 44 | "${_LIB_PATH}" 45 | DOC "Imperx FrameLink Express library to link with") 46 | 47 | include (FindPackageHandleStandardArgs) 48 | find_package_handle_standard_args (IMPERX_FLEX DEFAULT_MSG IMPERX_FLEX_INCLUDE_DIR IMPERX_FLEX_LIBRARIES) 49 | -------------------------------------------------------------------------------- /cmake/modules/FindImperxSDI.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Imperx FrameLink Express 2 | # Once done this will define 3 | # 4 | # IMPERX_SDI_FOUND - system has Imperx SDI 5 | # IMPERX_SDI_INCLUDE_DIR - the Imperx SDI include directory 6 | # IMPERX_SDI_LIBRARIES - the libraries needed to use Imperx SDI 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2019, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT IMPERX_SDI_DIR) 15 | # 32-bit dir on win32 16 | file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) 17 | # 32-bit dir on win64 18 | set(_PROG_FILES_X86 "ProgramFiles(x86)") 19 | file(TO_CMAKE_PATH "$ENV{${_PROG_FILES_X86}}" _PROG_FILES_X86) 20 | # 64-bit dir on win64 21 | file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432) 22 | if (_PROG_FILES_X86) 23 | set(_PROGFILESDIR "${_PROG_FILES_W6432}") 24 | else () 25 | set(_PROGFILESDIR "${_PROG_FILES}") 26 | endif () 27 | 28 | set (IMPERX_SDI_DIR "${_PROGFILESDIR}/Imperx/HD-SDI Express" CACHE PATH "Directory containing Imperx HD-SDI Express includes and libraries") 29 | 30 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 31 | set(_LIB_PATH "${IMPERX_SDI_DIR}/SDK/lib/x64") 32 | else () 33 | set(_LIB_PATH "${IMPERX_SDI_DIR}/SDK/lib/win32") 34 | endif () 35 | endif () 36 | 37 | find_path (IMPERX_SDI_INCLUDE_DIR VCESDI.h 38 | PATHS 39 | "${IMPERX_SDI_DIR}/SDK/inc" 40 | DOC "Directory containing VCESDI.h include file") 41 | 42 | find_library (IMPERX_SDI_LIBRARIES NAMES VCESDI 43 | PATHS 44 | "${_LIB_PATH}" 45 | DOC "Imperx HD-SDI Express library to link with") 46 | 47 | include (FindPackageHandleStandardArgs) 48 | find_package_handle_standard_args (IMPERX_SDI DEFAULT_MSG IMPERX_SDI_INCLUDE_DIR IMPERX_SDI_LIBRARIES) 49 | -------------------------------------------------------------------------------- /cmake/modules/FindKAYA.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find KAYA SDK 2 | # Once done this will define 3 | # 4 | # KAYA_FOUND - system has KAYA SDK 5 | # KAYA_INCLUDE_DIR - the KAYA SDK include directory 6 | # KAYA_LIBRARIES - the libraries needed to use KAYA SDK 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2018 outside US, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT KAYA_DIR) 15 | set (KAYA_DIR "C:/Program Files/KAYA Instruments/Vision Point" CACHE PATH "Directory containing KAYA SDK includes and libraries") 16 | endif () 17 | 18 | find_path (KAYA_INCLUDE_DIR KYFGLib.h 19 | PATHS 20 | "${KAYA_DIR}/include" 21 | DOC "Directory containing KYFGLib.h include file") 22 | 23 | find_library (_KYFGLib NAMES KYFGLib 24 | PATHS 25 | "${KAYA_DIR}/lib") 26 | 27 | set (KAYA_LIBRARIES ${_KYFGLib}) 28 | 29 | mark_as_advanced (_KYFGLib) 30 | 31 | include (FindPackageHandleStandardArgs) 32 | find_package_handle_standard_args (KAYA DEFAULT_MSG KAYA_INCLUDE_DIR KAYA_LIBRARIES) 33 | -------------------------------------------------------------------------------- /cmake/modules/FindLibIconv.cmake: -------------------------------------------------------------------------------- 1 | if (NOT LIBICONV_DIR) 2 | set (LIBICONV_DIR "" CACHE PATH "Directory containing iconv.h") 3 | endif () 4 | 5 | FILE(TO_CMAKE_PATH "$ENV{LIBICONV_DIR}" TRY1_DIR) 6 | FILE(TO_CMAKE_PATH "${LIBICONV_DIR}" TRY2_DIR) 7 | FILE(GLOB LIBICONV_DIR ${TRY1_DIR} ${TRY2_DIR}) 8 | 9 | FIND_PATH(LIBICONV_INCLUDE_DIR iconv.h 10 | PATHS ${LIBICONV_DIR}/include /usr/local/include /usr/include 11 | ENV INCLUDE DOC "Directory containing iconv.h include file") 12 | mark_as_advanced (LIBICONV_INCLUDE_DIR) 13 | 14 | IF (LIBICONV_INCLUDE_DIR) 15 | SET(LIBICONV_FOUND TRUE) 16 | ENDIF (LIBICONV_INCLUDE_DIR) 17 | -------------------------------------------------------------------------------- /cmake/modules/FindLibXml2.cmake: -------------------------------------------------------------------------------- 1 | if (NOT LIBXML2_DIR) 2 | set (LIBXML2_DIR "" CACHE PATH "Directory containing libxml") 3 | endif () 4 | 5 | FILE(TO_CMAKE_PATH "$ENV{LIBXML2_DIR}" TRY1_DIR) 6 | FILE(TO_CMAKE_PATH "${LIBXML2_DIR}" TRY2_DIR) 7 | FILE(GLOB LIBXML2_DIR ${TRY1_DIR} ${TRY2_DIR}) 8 | 9 | FIND_PATH(LIBXML2_INCLUDE_DIR libxml/parser.h 10 | PATHS ${LIBXML2_DIR}/include ${LIBXML2_DIR}/include/libxml2 /usr/local/include/libxml2 /usr/include/libxml2 11 | ENV INCLUDE DOC "Directory containing libxml/parser.h include file") 12 | mark_as_advanced (LIBXML2_INCLUDE_DIR) 13 | 14 | IF (LIBXML2_INCLUDE_DIR) 15 | SET(LIBXML2_FOUND TRUE) 16 | ENDIF (LIBXML2_INCLUDE_DIR) 17 | -------------------------------------------------------------------------------- /cmake/modules/FindLibpng.cmake: -------------------------------------------------------------------------------- 1 | FILE(TO_CMAKE_PATH "$ENV{PNG_DIR}" TRY1_DIR) 2 | FILE(TO_CMAKE_PATH "${PNG_DIR}" TRY2_DIR) 3 | FILE(GLOB PNG_DIR ${TRY1_DIR} ${TRY2_DIR}) 4 | 5 | FIND_PATH(PNG_INCLUDE_DIR png.h 6 | PATHS ${PNG_DIR}/include /usr/local/include /usr/include 7 | ENV INCLUDE DOC "Directory containing png.h include file") 8 | 9 | FIND_LIBRARY(PNG_LIBRARY NAMES png12 png 10 | PATHS ${PNG_DIR}/bin ${PNG_DIR}/win32/bin ${PNG_DIR}/lib ${PNG_DIR}/win32/lib /usr/local/lib /usr/lib 11 | ENV LIB 12 | DOC "png library to link with" 13 | NO_SYSTEM_ENVIRONMENT_PATH) 14 | 15 | IF (PNG_INCLUDE_DIR AND PNG_LIBRARY) 16 | SET(PNG_FOUND TRUE) 17 | ENDIF (PNG_INCLUDE_DIR AND PNG_LIBRARY) 18 | -------------------------------------------------------------------------------- /cmake/modules/FindMatrox.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Matrox MIL SDK 2 | # Once done this will define 3 | # 4 | # MATROX_FOUND - system has Matrox MIL SDK 5 | # MATROX_INCLUDE_DIR - the Matrox MIL SDK include directory 6 | # MATROX_LIBRARIES - the libraries needed to use Matrox MIL SDK 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2017 outside US, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT MATROX_DIR) 15 | # 32-bit dir on win32 16 | file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) 17 | # 32-bit dir on win64 18 | set(_PROG_FILES_X86 "ProgramFiles(x86)") 19 | file(TO_CMAKE_PATH "$ENV{${_PROG_FILES_X86}}" _PROG_FILES_X86) 20 | # 64-bit dir on win64 21 | file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432) 22 | 23 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 24 | set(_PROGFILESDIR "${_PROG_FILES_W6432}") 25 | else () 26 | if (_PROG_FILES_X86) 27 | set(_PROGFILESDIR "${_PROG_FILES_X86}") 28 | else () 29 | set(_PROGFILESDIR "${_PROG_FILES}") 30 | endif () 31 | endif () 32 | set (MATROX_DIR "${_PROGFILESDIR}/Matrox Imaging/Mil" CACHE PATH "Directory containing Matrox MIL SDK includes and libraries") 33 | endif () 34 | 35 | find_path (MATROX_INCLUDE_DIR Mil.h 36 | PATHS 37 | "${MATROX_DIR}/Include" 38 | DOC "Directory containing Matrox MIL include files") 39 | 40 | find_library (_MATROX_LIB NAMES Mil.lib 41 | PATHS 42 | "${MATROX_DIR}/LIB") 43 | 44 | 45 | set (MATROX_LIBRARIES ${_MATROX_LIB}) 46 | 47 | mark_as_advanced (_MATROX_LIB) 48 | 49 | include (FindPackageHandleStandardArgs) 50 | find_package_handle_standard_args (MATROX DEFAULT_MSG MATROX_INCLUDE_DIR MATROX_LIBRARIES) 51 | -------------------------------------------------------------------------------- /cmake/modules/FindNIIMAQ.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find National Instruments IMAQ 2 | # Once done this will define 3 | # 4 | # NIIMAQ_FOUND - system has NI-IMAQ 5 | # NIIMAQ_INCLUDE_DIR - the NI-IMAQ include directory 6 | # NIIMAQ_LIBRARIES - the libraries needed to use NI-IMAQ 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2014, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT NIIMAQ_DIR) 15 | # 32-bit dir on win32 16 | file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) 17 | # 32-bit dir on win64 18 | set(_PROG_FILES_X86 "ProgramFiles(x86)") 19 | file(TO_CMAKE_PATH "$ENV{${_PROG_FILES_X86}}" _PROG_FILES_X86) 20 | # 64-bit dir on win64 21 | file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432) 22 | 23 | # NI puts 64-bit lib in 32-bit Program Files directory 24 | if (_PROG_FILES_X86) 25 | set(_PROGFILESDIR "${_PROG_FILES_X86}") 26 | else () 27 | set(_PROGFILESDIR "${_PROG_FILES}") 28 | endif () 29 | 30 | set(NIIMAQ_DIR "${_PROGFILESDIR}/National Instruments" CACHE PATH "Top level National Instruments directory") 31 | endif (NOT NIIMAQ_DIR) 32 | 33 | find_path(NIIMAQ_INCLUDE_DIR niimaq.h 34 | PATHS 35 | "${NIIMAQ_DIR}/Shared/ExternalCompilerSupport/C/Include" 36 | DOC "Directory containing niimaq.h include file") 37 | 38 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 39 | find_library(NIIMAQ_LIBRARIES NAMES imaq 40 | PATHS 41 | "${NIIMAQ_DIR}/Shared/ExternalCompilerSupport/C/Lib64/MSVC" 42 | DOC "niimaq library to link with") 43 | else () 44 | find_library(NIIMAQ_LIBRARIES NAMES imaq 45 | PATHS 46 | "${NIIMAQ_DIR}/Shared/ExternalCompilerSupport/C/Lib32/MSVC" 47 | DOC "niimaq library to link with") 48 | endif () 49 | 50 | include(FindPackageHandleStandardArgs) 51 | find_package_handle_standard_args(NIIMAQ DEFAULT_MSG NIIMAQ_INCLUDE_DIR NIIMAQ_LIBRARIES) 52 | 53 | mark_as_advanced(NIIMAQ_INCLUDE_DIR NIIMAQ_LIBRARIES) 54 | -------------------------------------------------------------------------------- /cmake/modules/FindNIIMAQdx.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find National Instruments IMAQdx 2 | # Once done this will define 3 | # 4 | # NIIMAQDX_FOUND - system has NI-IMAQdx 5 | # NIIMAQDX_INCLUDE_DIR - the NI-IMAQdx include directory 6 | # NIIMAQDX_LIBRARIES - the libraries needed to use NI-IMAQdx 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2010, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT NIIMAQDX_DIR) 15 | file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) 16 | set(_PROG_FILES_X86 "ProgramFiles(x86)") 17 | file(TO_CMAKE_PATH "$ENV{${_PROG_FILES_X86}}" _PROG_FILES_X86) 18 | if (_PROG_FILES_X86) 19 | set(_PROGFILESDIR "${_PROG_FILES_X86}") 20 | else () 21 | set(_PROGFILESDIR "${_PROG_FILES}") 22 | endif () 23 | 24 | set (NIIMAQDX_DIR "${_PROGFILESDIR}/National Instruments" CACHE PATH "Directory containing NI includes and libraries") 25 | endif () 26 | 27 | find_path (NIIMAQDX_INCLUDE_DIR NIIMAQdx.h 28 | PATHS 29 | "${NIIMAQDX_DIR}/Shared/ExternalCompilerSupport/C/Include" 30 | DOC "Directory containing NIIMAQdx.h include file") 31 | 32 | find_library (NIIMAQDX_LIBRARIES NAMES niimaqdx 33 | PATHS 34 | "${NIIMAQDX_DIR}/Shared/ExternalCompilerSupport/C/Lib32/MSVC" 35 | DOC "NI-IMAQdx library to link with") 36 | 37 | include (FindPackageHandleStandardArgs) 38 | find_package_handle_standard_args (NIIMAQDX DEFAULT_MSG NIIMAQDX_INCLUDE_DIR NIIMAQDX_LIBRARIES) 39 | 40 | MARK_AS_ADVANCED(NIIMAQDX_INCLUDE_DIR NIIMAQDX_LIBRARIES) 41 | -------------------------------------------------------------------------------- /cmake/modules/FindOpenGL.cmake.off: -------------------------------------------------------------------------------- 1 | FILE(TO_CMAKE_PATH "$ENV{OPENGL_DIR}" TRY1_DIR) 2 | FILE(TO_CMAKE_PATH "${OPENGL_DIR}" TRY2_DIR) 3 | FILE(GLOB OPENGL_DIR ${TRY1_DIR} ${TRY2_DIR}) 4 | 5 | FIND_PATH(OPENGL_gl_INCLUDE_DIR GL/gl.h 6 | PATHS ${OPENGL_DIR}/include /usr/local/include /usr/include 7 | ENV INCLUDE DOC "Directory containing GL/gl.h include file") 8 | 9 | FIND_PATH(OPENGL_glu_INCLUDE_DIR GL/glu.h 10 | PATHS ${OPENGL_DIR}/include /usr/local/include /usr/include 11 | ENV INCLUDE DOC "Directory containing GL/glu.h include file") 12 | 13 | FIND_LIBRARY(OPENGL_gl_LIBRARY NAMES opengl32 GL 14 | PATHS ${OPENGL_DIR}/bin ${OPENGL_DIR}/win32/bin ${OPENGL_DIR}/lib ${OPENGL_DIR}/win32/lib /usr/local/lib /usr/lib 15 | ENV LIB 16 | DOC "gl library to link with" 17 | NO_SYSTEM_ENVIRONMENT_PATH) 18 | 19 | FIND_LIBRARY(OPENGL_glu_LIBRARY NAMES glu32 GLU 20 | PATHS ${OPENGL_DIR}/bin ${OPENGL_DIR}/win32/bin ${OPENGL_DIR}/lib ${OPENGL_DIR}/win32/lib /usr/local/lib /usr/lib 21 | ENV LIB 22 | DOC "glu library to link with" 23 | NO_SYSTEM_ENVIRONMENT_PATH) 24 | 25 | IF (OPENGL_gl_INCLUDE_DIR AND OPENGL_glu_INCLUDE_DIR AND OPENGL_gl_LIBRARY AND OPENGL_glu_LIBRARY) 26 | SET(OPENGL_INCLUDE_DIR ${OPENGL_gl_INCLUDE_DIR} ${OPENGL_glu_INCLUDE_DIR}) 27 | list(REMOVE_DUPLICATES OPENGL_INCLUDE_DIR) 28 | SET(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) 29 | list(REMOVE_DUPLICATES OPENGL_LIBRARIES) 30 | ENDIF (OPENGL_gl_INCLUDE_DIR AND OPENGL_glu_INCLUDE_DIR AND OPENGL_gl_LIBRARY AND OPENGL_glu_LIBRARY) 31 | -------------------------------------------------------------------------------- /cmake/modules/FindOrc.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find the Orc libraries 2 | # Once done this will define 3 | # 4 | # ORC_FOUND - system has Orc 5 | # ORC_INCLUDE_DIR - the Orc include directory 6 | # ORC_LIBRARIES - Orc library 7 | 8 | # Copyright (c) 2008 Laurent Montel, 9 | # 10 | # Redistribution and use is allowed according to the terms of the BSD license. 11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 12 | 13 | 14 | if (NOT WIN32) 15 | find_package(PkgConfig REQUIRED) 16 | pkg_check_modules(PKG_ORC REQUIRED orc-0.4) 17 | endif(NOT WIN32) 18 | 19 | if (NOT GSTREAMER_ROOT) 20 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 21 | set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86_64}) 22 | else () 23 | set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86}) 24 | endif () 25 | endif () 26 | 27 | find_path(ORC_INCLUDE_DIR orc/orc.h 28 | PATH_SUFFIXES orc-0.4 29 | HINTS ${PKG_ORC_INCLUDE_DIRS} ${PKG_ORC_INCLUDEDIR} ${GSTREAMER_ROOT}/include) 30 | 31 | find_library(ORC_LIBRARIES 32 | NAMES orc-0.4 33 | HINTS ${PKG_ORC_LIBRARY_DIRS} ${PKG_ORC_LIBDIR} ${GSTREAMER_ROOT}/lib) 34 | 35 | include(FindPackageHandleStandardArgs) 36 | find_package_handle_standard_args(ORC DEFAULT_MSG ORC_LIBRARIES ORC_INCLUDE_DIR) -------------------------------------------------------------------------------- /cmake/modules/FindPhoenix.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Active Silicon Phoenix SDK 2 | # Once done this will define 3 | # 4 | # PHOENIX_FOUND - system has Active Silicon Phoenix SDK 5 | # PHOENIX_INCLUDE_DIR - the Active Silicon Phoenix SDK include directory 6 | # PHOENIX_LIBRARIES - the libraries needed to use Active Silicon Phoenix SDK 7 | # 8 | # Redistribution and use is allowed according to the terms of the BSD license. 9 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 10 | 11 | if (NOT PHOENIX_DIR) 12 | set (PHOENIX_DIR "C:/Program Files (x86)/Active Silicon/Phoenix/Win/SDK6.30" CACHE PATH "Directory containing Phoenix SDK includes and libraries") 13 | endif () 14 | 15 | find_path(PHOENIX_INCLUDE_DIR phx_api.h 16 | PATHS 17 | "${PHOENIX_DIR}/Include" 18 | DOC "Directory containing phx_api.h include file") 19 | 20 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 21 | find_library(PHOENIX_LIBRARIES NAMES phxlx64 22 | PATHS 23 | "${PHOENIX_DIR}/Lib/win64" 24 | DOC "PHOENIX library to link with") 25 | else () 26 | find_library(PHOENIX_LIBRARIES NAMES phxlw32 27 | PATHS 28 | "${PHOENIX_DIR}/Lib/win32" 29 | DOC "PHOENIX library to link with") 30 | endif() 31 | 32 | include(FindPackageHandleStandardArgs) 33 | find_package_handle_standard_args(PHOENIX DEFAULT_MSG PHOENIX_INCLUDE_DIR PHOENIX_LIBRARIES) 34 | -------------------------------------------------------------------------------- /cmake/modules/FindPleora.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Pleora SDK 2 | # Once done this will define 3 | # 4 | # Pleora_FOUND - system has Pleora SDK 5 | # Pleora_INCLUDE_DIR - the Pleora SDK include directory 6 | # Pleora_LIBRARIES - the Pleora SDK libraries 7 | # Pleora_LIBRARY_DIR - the Pleora SDK library directory 8 | 9 | # Copyright (c) 2006, Tim Beaulen 10 | # Copyright (c) 2019 outside US, United States Government, Joshua M. Doe 11 | # 12 | # Redistribution and use is allowed according to the terms of the BSD license. 13 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 14 | 15 | if (NOT Pleora_DIR) 16 | set (Pleora_DIR $ENV{PUREGEV_ROOT} CACHE PATH "Directory containing Pleora SDK includes and libraries") 17 | endif () 18 | 19 | if (WIN32 AND CMAKE_SIZEOF_VOID_P MATCHES "8") 20 | set(_LIB_SUFFIX "64") 21 | else () 22 | set(_LIB_SUFFIX "") 23 | endif () 24 | 25 | set (_Pleora_PATHS PATHS 26 | "${Pleora_DIR}" 27 | "C:/Program Files/Pleora Technologies Inc/eBUS SDK" 28 | "C:/Program Files (x86)/Pleora Technologies Inc/eBUS SDK") 29 | 30 | find_path (Pleora_INCLUDE_DIR PvBase.h 31 | PATHS ${_Pleora_PATHS} 32 | PATH_SUFFIXES Includes include) 33 | message (STATUS "Found Pleora include dir in ${Pleora_INCLUDE_DIR}") 34 | 35 | find_path (Pleora_LIBRARY_DIR NAMES libPvBase.so "PvBase${_LIB_SUFFIX}.lib" 36 | PATHS ${_Pleora_PATHS} 37 | PATH_SUFFIXES Libraries lib) 38 | 39 | message (STATUS "Found Pleora library in ${Pleora_LIBRARY_DIR}") 40 | 41 | find_library (Pleora_LIBRARY_BASE "PvBase${_LIB_SUFFIX}" ${Pleora_LIBRARY_DIR}) 42 | find_library (Pleora_LIBRARY_DEVICE "PvDevice${_LIB_SUFFIX}" ${Pleora_LIBRARY_DIR}) 43 | find_library (Pleora_LIBRARY_PERSISTENCE "PvPersistence${_LIB_SUFFIX}" ${Pleora_LIBRARY_DIR}) 44 | find_library (Pleora_LIBRARY_VIRTUAL_DEVICE "PvVirtualDevice${_LIB_SUFFIX}" ${Pleora_LIBRARY_DIR}) 45 | 46 | set (Pleora_LIBRARIES ${Pleora_LIBRARY_BASE} ${Pleora_LIBRARY_DEVICE} ${Pleora_LIBRARY_PERSISTENCE} ${Pleora_LIBRARY_VIRTUAL_DEVICE}) 47 | 48 | if (Pleora_INCLUDE_DIR) 49 | file(STRINGS "${Pleora_INCLUDE_DIR}/PvVersion.h" _pleora_VERSION_CONTENTS REGEX "#define NVERSION_STRING") 50 | if ("${_pleora_VERSION_CONTENTS}" MATCHES "#define NVERSION_STRING[ \t]+\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)+") 51 | set(Pleora_VERSION_MAJOR "${CMAKE_MATCH_1}") 52 | set(Pleora_VERSION_MINOR "${CMAKE_MATCH_2}") 53 | set(Pleora_VERSION_PATCH "${CMAKE_MATCH_3}") 54 | set(Pleora_VERSION_TWEAK "${CMAKE_MATCH_4}") 55 | set(Pleora_VERSION_COUNT 4) 56 | set(Pleora_VERSION_STRING "${Pleora_VERSION_MAJOR}.${Pleora_VERSION_MINOR}.${Pleora_VERSION_PATCH}.${Pleora_VERSION_TWEAK}") 57 | set(Pleora_VERSION ${Pleora_VERSION_STRING}) 58 | message(STATUS "Found Pleora version: ${Pleora_VERSION_STRING}") 59 | endif () 60 | endif () 61 | 62 | include (FindPackageHandleStandardArgs) 63 | find_package_handle_standard_args (Pleora 64 | REQUIRED_VARS Pleora_INCLUDE_DIR Pleora_LIBRARY_DIR Pleora_LIBRARIES 65 | VERSION_VAR Pleora_VERSION_STRING) 66 | -------------------------------------------------------------------------------- /cmake/modules/FindPylon.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Pylon SDK 2 | # Once done this will define 3 | # 4 | # PYLON_FOUND - system has Pylon SDK 5 | # PYLON_INCLUDE_DIR - the Pylon SDK include directory 6 | # PYLON_LIBRARIES - the libraries needed to use Pylon SDK 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # 10 | # Redistribution and use is allowed according to the terms of the BSD license. 11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 12 | 13 | if (NOT PYLON_DIR) 14 | if (WIN32) 15 | set (_PYLON_DIR "C:/Program Files/Basler/pylon 5") 16 | else () 17 | set (_PYLON_DIR "/opt/pylon5") 18 | endif () 19 | set (PYLON_DIR ${_PYLON_DIR} CACHE PATH "Directory containing Pylon SDK includes and libraries") 20 | endif () 21 | 22 | find_path (PYLON_INCLUDE_DIR pylonc/PylonC.h 23 | PATHS 24 | "${PYLON_DIR}/Development/include" 25 | "${PYLON_DIR}/include" 26 | DOC "Directory containing PylonC.h include file") 27 | 28 | # TODO: support multiple SDK versions 29 | find_library (_PylonCLib NAMES PylonC_MD_VC120 pylonc 30 | PATHS 31 | "${PYLON_DIR}/Development/lib/x64" 32 | "${PYLON_DIR}/lib64" 33 | "${PYLON_DIR}/lib" 34 | ) 35 | 36 | set (PYLON_LIBRARIES ${_PylonCLib}) 37 | 38 | mark_as_advanced (_PylonCLib) 39 | 40 | include (FindPackageHandleStandardArgs) 41 | find_package_handle_standard_args (PYLON DEFAULT_MSG PYLON_INCLUDE_DIR PYLON_LIBRARIES) 42 | -------------------------------------------------------------------------------- /cmake/modules/FindQCam.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find QCam SDK 2 | # Once done this will define 3 | # 4 | # QCAM_FOUND - system has QCam SDK 5 | # QCAM_INCLUDE_DIR - the QCam SDK include directory 6 | # QCAM_LIBRARIES - the libraries needed to use QCam SDK 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # Copyright (c) 2021 outside US, United States Government, Joshua M. Doe 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | if (NOT QCAM_DIR) 15 | set (QCAM_DIR "C:/Program Files/QImaging/SDK" CACHE PATH "Directory containing QCam SDK includes and libraries") 16 | endif () 17 | 18 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 19 | set(_LIB_NAME "QCamDriverx64") 20 | else () 21 | set(_LIB_NAME "QCamDriver") 22 | endif () 23 | 24 | find_path (QCAM_INCLUDE_DIR QCamApi.h 25 | PATHS 26 | "${QCAM_DIR}/Headers" 27 | DOC "Directory containing QCam API include files") 28 | 29 | find_library (QCAM_LIBRARIES NAMES ${_LIB_NAME} 30 | PATHS 31 | "${QCAM_DIR}/libs/AMD64" "${QCAM_DIR}/libs/i386") 32 | 33 | include (FindPackageHandleStandardArgs) 34 | find_package_handle_standard_args (QCAM DEFAULT_MSG QCAM_INCLUDE_DIR QCAM_LIBRARIES) -------------------------------------------------------------------------------- /cmake/modules/FindSapera.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Sapera SDK 2 | # Once done this will define 3 | # 4 | # SAPERA_FOUND - system has Sapera SDK 5 | # SAPERA_INCLUDE_DIR - the Sapera SDK include directory 6 | # SAPERA_LIBRARIES - the libraries needed to use the Sapera SDK 7 | 8 | # Copyright (c) 2006, Tim Beaulen 9 | # 10 | # Redistribution and use is allowed according to the terms of the BSD license. 11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 12 | 13 | 14 | if (NOT SAPERA_DIR) 15 | # 32-bit dir on win32 16 | file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) 17 | # 32-bit dir on win64 18 | set(_PROG_FILES_X86 "ProgramFiles(x86)") 19 | file(TO_CMAKE_PATH "$ENV{${_PROG_FILES_X86}}" _PROG_FILES_X86) 20 | # 64-bit dir on win64 21 | file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432) 22 | if (_PROG_FILES_X86) 23 | set(_PROGFILESDIR "${_PROG_FILES_W6432}") 24 | else () 25 | set(_PROGFILESDIR "${_PROG_FILES}") 26 | endif () 27 | 28 | set (SAPERA_DIR "${_PROGFILESDIR}/Teledyne DALSA/Sapera" CACHE PATH "Directory containing NI includes and libraries") 29 | endif () 30 | 31 | find_path(SAPERA_PLUS_PLUS_INCLUDE_DIR SapClassBasic.h 32 | PATHS 33 | "${SAPERA_DIR}/Classes/Basic" 34 | DOC "Directory containing Sapera include files") 35 | 36 | find_path(SAPERA_C_INCLUDE_DIR corapi.h 37 | PATHS 38 | "${SAPERA_DIR}/Include" 39 | DOC "Directory containing Sapera include files") 40 | 41 | set (SAPERA_INCLUDE_DIR ${SAPERA_PLUS_PLUS_INCLUDE_DIR} ${SAPERA_C_INCLUDE_DIR}) 42 | 43 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 44 | find_library(SAPERA_LIBRARIES NAMES SapClassBasic 45 | PATHS 46 | "${SAPERA_DIR}/Lib/Win64" 47 | DOC "Sapera library to link with") 48 | else () 49 | find_library(SAPERA_LIBRARIES NAMES SapClassBasic 50 | PATHS 51 | "${SAPERA_DIR}/Lib/Win32" 52 | DOC "Sapera library to link with") 53 | endif () 54 | 55 | include(FindPackageHandleStandardArgs) 56 | find_package_handle_standard_args(SAPERA DEFAULT_MSG SAPERA_INCLUDE_DIR SAPERA_LIBRARIES) 57 | -------------------------------------------------------------------------------- /cmake/modules/FindXCLIB.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find EPIX XCLIB 2 | # Once done this will define 3 | # 4 | # XCLIB_FOUND - system has EPIX XCLIB 5 | # XCLIB_INCLUDE_DIR - the EPIX XCLIB include directory 6 | # XCLIB_LIBRARIES - the libraries needed to use EPIX XCLIB 7 | # 8 | # Redistribution and use is allowed according to the terms of the BSD license. 9 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 10 | 11 | # TODO: properly handle Linux 12 | 13 | if (NOT XCLIB_DIR) 14 | # 32-bit dir on win32 15 | file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) 16 | # 32-bit dir on win64 17 | set(_PROG_FILES_X86 "ProgramFiles(x86)") 18 | file(TO_CMAKE_PATH "$ENV{${_PROG_FILES_X86}}" _PROG_FILES_X86) 19 | # 64-bit dir on win64 20 | file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432) 21 | 22 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 23 | set(_PROGFILESDIR "${_PROG_FILES_W6432}") 24 | else () 25 | if (_PROG_FILES_X86) 26 | set(_PROGFILESDIR "${_PROG_FILES_X86}") 27 | else () 28 | set(_PROGFILESDIR "${_PROG_FILES}") 29 | endif () 30 | endif () 31 | 32 | set (XCLIB_DIR "${_PROGFILESDIR}/EPIX/XCLIB" CACHE PATH "Directory containing EPIX PIXCI XCLIB includes and libraries") 33 | endif (NOT XCLIB_DIR) 34 | 35 | find_path (XCLIB_INCLUDE_DIR xcliball.h 36 | PATHS 37 | "${XCLIB_DIR}" 38 | DOC "Directory containing xcliball.h include file") 39 | 40 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 41 | find_library (XCLIB_LIBRARIES NAMES XCLIBW64 42 | PATHS 43 | "${XCLIB_DIR}" 44 | DOC "XCLIB 64-bit library to link with") 45 | else () 46 | find_library (XCLIB_LIBRARIES NAMES XCLIBWNT 47 | PATHS 48 | "${XCLIB_DIR}" 49 | DOC "XCLIB 32-bit library to link with") 50 | endif () 51 | 52 | if (XCLIB_INCLUDE_DIR) 53 | #message(STATUS "DEBUG: Found EPIX XCLIB include dir: ${XCLIB_INCLUDE_DIR}") 54 | else (XCLIB_INCLUDE_DIR) 55 | message(STATUS "XCLIB: WARNING: include dir not found") 56 | endif (XCLIB_INCLUDE_DIR) 57 | 58 | if (XCLIB_LIBRARIES) 59 | #message(STATUS "DEBUG: Found EPIX XCLIB library: ${XCLIB_LIBRARIES}") 60 | else (XCLIB_LIBRARIES) 61 | message(STATUS "XCLIB: WARNING: library not found") 62 | endif (XCLIB_LIBRARIES) 63 | 64 | include (FindPackageHandleStandardArgs) 65 | find_package_handle_standard_args (XCLIB DEFAULT_MSG XCLIB_INCLUDE_DIR XCLIB_LIBRARIES) 66 | 67 | mark_as_advanced(XCLIB_INCLUDE_DIR XCLIB_LIBRARIES) 68 | -------------------------------------------------------------------------------- /cmake/modules/GetGitRevisionDescription.cmake: -------------------------------------------------------------------------------- 1 | # - Returns a version string from Git 2 | # 3 | # These functions force a re-configure on each git commit so that you can 4 | # trust the values of the variables in your build system. 5 | # 6 | # get_git_head_revision( [ ...]) 7 | # 8 | # Returns the refspec and sha hash of the current head revision 9 | # 10 | # git_describe( [ ...]) 11 | # 12 | # Returns the results of git describe on the source tree, and adjusting 13 | # the output so that it tests false if an error occurs. 14 | # 15 | # git_get_exact_tag( [ ...]) 16 | # 17 | # Returns the results of git describe --exact-match on the source tree, 18 | # and adjusting the output so that it tests false if there was no exact 19 | # matching tag. 20 | # 21 | # Requires CMake 2.6 or newer (uses the 'function' command) 22 | # 23 | # Original Author: 24 | # 2009-2010 Ryan Pavlik 25 | # http://academic.cleardefinition.com 26 | # Iowa State University HCI Graduate Program/VRAC 27 | # 28 | # Copyright Iowa State University 2009-2010. 29 | # Distributed under the Boost Software License, Version 1.0. 30 | # (See accompanying file LICENSE_1_0.txt or copy at 31 | # http://www.boost.org/LICENSE_1_0.txt) 32 | 33 | if(__get_git_revision_description) 34 | return() 35 | endif() 36 | set(__get_git_revision_description YES) 37 | 38 | # We must run the following at "include" time, not at function call time, 39 | # to find the path to this module rather than the path to a calling list file 40 | get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) 41 | 42 | function(get_git_head_revision _refspecvar _hashvar) 43 | set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 44 | set(GIT_DIR "${GIT_PARENT_DIR}/.git") 45 | while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories 46 | set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") 47 | get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) 48 | if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) 49 | # We have reached the root directory, we are not in git 50 | set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) 51 | set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) 52 | return() 53 | endif() 54 | set(GIT_DIR "${GIT_PARENT_DIR}/.git") 55 | endwhile() 56 | # check if this is a submodule 57 | if(NOT IS_DIRECTORY ${GIT_DIR}) 58 | file(READ ${GIT_DIR} submodule) 59 | string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule}) 60 | get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH) 61 | get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE) 62 | endif() 63 | set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data") 64 | if(NOT EXISTS "${GIT_DATA}") 65 | file(MAKE_DIRECTORY "${GIT_DATA}") 66 | endif() 67 | 68 | if(NOT EXISTS "${GIT_DIR}/HEAD") 69 | return() 70 | endif() 71 | set(HEAD_FILE "${GIT_DATA}/HEAD") 72 | configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY) 73 | 74 | configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in" 75 | "${GIT_DATA}/grabRef.cmake" 76 | @ONLY) 77 | include("${GIT_DATA}/grabRef.cmake") 78 | 79 | set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE) 80 | set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE) 81 | endfunction() 82 | 83 | function(git_describe _var) 84 | if(NOT GIT_FOUND) 85 | find_package(Git QUIET) 86 | endif() 87 | get_git_head_revision(refspec hash) 88 | if(NOT GIT_FOUND) 89 | set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) 90 | return() 91 | endif() 92 | if(NOT hash) 93 | set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) 94 | return() 95 | endif() 96 | 97 | # TODO sanitize 98 | #if((${ARGN}" MATCHES "&&") OR 99 | # (ARGN MATCHES "||") OR 100 | # (ARGN MATCHES "\\;")) 101 | # message("Please report the following error to the project!") 102 | # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") 103 | #endif() 104 | 105 | #message(STATUS "Arguments to execute_process: ${ARGN}") 106 | 107 | execute_process(COMMAND 108 | "${GIT_EXECUTABLE}" 109 | describe 110 | # ${hash} # doesn't make sense to specify hash and --dirty 111 | ${ARGN} 112 | WORKING_DIRECTORY 113 | "${CMAKE_SOURCE_DIR}" 114 | RESULT_VARIABLE 115 | res 116 | OUTPUT_VARIABLE 117 | out 118 | #ERROR_QUIET 119 | OUTPUT_STRIP_TRAILING_WHITESPACE) 120 | if(NOT res EQUAL 0) 121 | set(out "${out}-${res}-NOTFOUND") 122 | endif() 123 | 124 | set(${_var} "${out}" PARENT_SCOPE) 125 | endfunction() 126 | 127 | function(git_get_exact_tag _var) 128 | git_describe(out --exact-match ${ARGN}) 129 | set(${_var} "${out}" PARENT_SCOPE) 130 | endfunction() 131 | -------------------------------------------------------------------------------- /cmake/modules/GetGitRevisionDescription.cmake.in: -------------------------------------------------------------------------------- 1 | # 2 | # Internal file for GetGitRevisionDescription.cmake 3 | # 4 | # Requires CMake 2.6 or newer (uses the 'function' command) 5 | # 6 | # Original Author: 7 | # 2009-2010 Ryan Pavlik 8 | # http://academic.cleardefinition.com 9 | # Iowa State University HCI Graduate Program/VRAC 10 | # 11 | # Copyright Iowa State University 2009-2010. 12 | # Distributed under the Boost Software License, Version 1.0. 13 | # (See accompanying file LICENSE_1_0.txt or copy at 14 | # http://www.boost.org/LICENSE_1_0.txt) 15 | 16 | set(HEAD_HASH) 17 | 18 | file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) 19 | 20 | string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) 21 | if(HEAD_CONTENTS MATCHES "ref") 22 | # named branch 23 | string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") 24 | if(EXISTS "@GIT_DIR@/${HEAD_REF}") 25 | configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) 26 | elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}") 27 | configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) 28 | set(HEAD_HASH "${HEAD_REF}") 29 | endif() 30 | else() 31 | # detached HEAD 32 | configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) 33 | endif() 34 | 35 | if(NOT HEAD_HASH) 36 | file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) 37 | string(STRIP "${HEAD_HASH}" HEAD_HASH) 38 | endif() 39 | -------------------------------------------------------------------------------- /cmake/modules/MacroFindGStreamerLibrary.cmake: -------------------------------------------------------------------------------- 1 | # - macro find_gstreamer_library 2 | # 3 | # Copyright (c) 2010, Collabora Ltd. 4 | # @author George Kiagiadakis 5 | # 6 | # Redistribution and use is allowed according to the terms of the BSD license. 7 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 8 | 9 | macro(find_gstreamer_library _name _header _abi_version) 10 | string(TOLOWER ${_name} _lower_name) 11 | string(TOUPPER ${_name} _upper_name) 12 | 13 | if (GSTREAMER_${_upper_name}_LIBRARY AND GSTREAMER_${_upper_name}_INCLUDE_DIR) 14 | set(_GSTREAMER_${_upper_name}_QUIET TRUE) 15 | else() 16 | set(_GSTREAMER_${_upper_name}_QUIET FALSE) 17 | endif() 18 | 19 | if (PKG_CONFIG_FOUND) 20 | pkg_check_modules(PKG_GSTREAMER_${_upper_name} gstreamer-${_lower_name}-${_abi_version}) 21 | endif() 22 | 23 | if (NOT GSTREAMER_ROOT) 24 | if (CMAKE_SIZEOF_VOID_P MATCHES "8") 25 | set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86_64}) 26 | else () 27 | set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86}) 28 | endif () 29 | endif () 30 | 31 | find_library(GSTREAMER_${_upper_name}_LIBRARY 32 | NAMES gst${_lower_name}-${_abi_version} 33 | HINTS ${PKG_GSTREAMER_${_upper_name}_LIBRARY_DIRS} 34 | ${PKG_GSTREAMER_${_upper_name}_LIBDIR} 35 | ${GSTREAMER_ROOT}/lib 36 | ${GSTREAMER_ROOT}/lib/aarch64-linux-gnu 37 | ) 38 | 39 | find_path(GSTREAMER_${_upper_name}_INCLUDE_DIR 40 | gst/${_lower_name}/${_header} 41 | HINTS ${PKG_GSTREAMER_${_upper_name}_INCLUDE_DIRS} 42 | ${PKG_GSTREAMER_${_upper_name}_INCLUDEDIR} 43 | ${GSTREAMER_ROOT}/include 44 | PATH_SUFFIXES gstreamer-${_abi_version} 45 | ) 46 | 47 | if (GSTREAMER_${_upper_name}_LIBRARY AND GSTREAMER_${_upper_name}_INCLUDE_DIR) 48 | set(GSTREAMER_${_upper_name}_LIBRARY_FOUND TRUE) 49 | else() 50 | set(GSTREAMER_${_upper_name}_LIBRARY_FOUND FALSE) 51 | endif() 52 | 53 | if (NOT _GSTREAMER_${_upper_name}_QUIET) 54 | if (GSTREAMER_${_upper_name}_LIBRARY) 55 | message(STATUS "Found GSTREAMER_${_upper_name}_LIBRARY: ${GSTREAMER_${_upper_name}_LIBRARY}") 56 | else() 57 | message(STATUS "Could NOT find GSTREAMER_${_upper_name}_LIBRARY") 58 | endif() 59 | 60 | if (GSTREAMER_${_upper_name}_INCLUDE_DIR) 61 | message(STATUS "Found GSTREAMER_${_upper_name}_INCLUDE_DIR: ${GSTREAMER_${_upper_name}_INCLUDE_DIR}") 62 | else() 63 | message(STATUS "Could NOT find GSTREAMER_${_upper_name}_INCLUDE_DIR") 64 | endif() 65 | endif() 66 | 67 | mark_as_advanced(GSTREAMER_${_upper_name}_LIBRARY GSTREAMER_${_upper_name}_INCLUDE_DIR) 68 | endmacro() 69 | -------------------------------------------------------------------------------- /common/get_unix_ns.h: -------------------------------------------------------------------------------- 1 | #ifndef _GET_UNIX_NS_H_ 2 | #define _GET_UNIX_NS_H_ 3 | 4 | #include 5 | 6 | #ifdef _WIN32 7 | #define WIN32_LEAN_AND_MEAN 8 | #include 9 | #endif 10 | 11 | 12 | #ifdef _WIN32 13 | typedef struct _MYFILETIME 14 | { 15 | guint32 dwLowDateTime; 16 | guint32 dwHighDateTime; 17 | } MYFILETIME; 18 | typedef void (*GetSystemTimeFunc) (MYFILETIME * lpSystemTimeAsFileTime); 19 | 20 | static guint64 21 | get_unix_ns () 22 | { 23 | MYFILETIME ftime; 24 | LARGE_INTEGER ltime; 25 | static GetSystemTimeFunc time_func = NULL; 26 | if (!time_func) { 27 | GModule *module; 28 | module = g_module_open ("Kernel32.dll", G_MODULE_BIND_LAZY); 29 | if (module) { 30 | if (!g_module_symbol (module, "GetSystemTimePreciseAsFileTime", 31 | (gpointer *) & time_func) || time_func == NULL) { 32 | GST_WARNING 33 | ("Couldn't find GetSystemTimePreciseAsFileTime, falling back to GetSystemTimeAsFileTime"); 34 | if (!g_module_symbol (module, "GetSystemTimeAsFileTime", 35 | (gpointer *) & time_func) || time_func == NULL) { 36 | GST_WARNING 37 | ("Couldn't find GetSystemTimeAsFileTime, something is very wrong"); 38 | } 39 | } 40 | } 41 | } 42 | //GetSystemTimePreciseAsFileTime(&ftime); 43 | time_func (&ftime); 44 | ltime.HighPart = ftime.dwHighDateTime; 45 | ltime.LowPart = ftime.dwLowDateTime; 46 | ltime.QuadPart -= 11644473600000 * 10000; 47 | return ltime.QuadPart * 100; 48 | } 49 | #endif /* _WIN32 */ 50 | 51 | 52 | #ifdef __unix__ 53 | static guint64 54 | get_unix_ns () 55 | { 56 | struct timespec spec; 57 | 58 | clock_gettime (CLOCK_REALTIME, &spec); 59 | return (guint64) spec.tv_sec * 1000000000L + (guint64) spec.tv_nsec; 60 | } 61 | #endif /* __unix__ */ 62 | 63 | 64 | #endif /* _GET_UNIX_NS_H_ */ 65 | -------------------------------------------------------------------------------- /ext/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #if(FREEIMAGE_FOUND) 2 | # add_subdirectory (freeimage) 3 | #endif(FREEIMAGE_FOUND) 4 | 5 | if(GIGESIM_FOUND) 6 | add_subdirectory (gigesim) 7 | endif(GIGESIM_FOUND) 8 | -------------------------------------------------------------------------------- /ext/freeimage/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DHAVE_CONFIG_H) 2 | 3 | set ( SOURCES 4 | gstfreeimage.c 5 | gstfreeimagedec.c 6 | gstfreeimageenc.c 7 | gstfreeimageutils.c) 8 | 9 | set ( HEADERS 10 | gstfreeimage.h 11 | gstfreeimagedec.h 12 | gstfreeimageenc.h 13 | gstfreeimageutils.h) 14 | 15 | include_directories ( AFTER 16 | ${FREEIMAGE_INCLUDE_DIR} ) 17 | 18 | add_library ( libgstfreeimage MODULE 19 | ${SOURCES} 20 | ${HEADERS} ) 21 | 22 | target_link_libraries ( libgstfreeimage 23 | general ${GLIB2_LIBRARIES} 24 | general ${GSTREAMER_LIBRARIES} 25 | general ${GSTREAMER_BASE_LIBRARY} 26 | general ${GSTREAMER_INTERFACE_LIBRARY} 27 | general ${GSTREAMER_VIDEO_LIBRARY} 28 | general ${FREEIMAGE_LIBRARIES} ) 29 | 30 | install (TARGETS libgstfreeimage 31 | LIBRARY DESTINATION lib/gstreamer-0.10) -------------------------------------------------------------------------------- /ext/freeimage/gstfreeimage.c: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * 4 | * Filter: 5 | * Copyright (C) 2000 Donald A. Graft 6 | * 7 | * This library is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | * Library General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU Library General Public 13 | * License along with this library; if not, write to the 14 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 15 | * Boston, MA 02111-1307, USA. 16 | * 17 | */ 18 | 19 | #ifdef HAVE_CONFIG_H 20 | #include 21 | #endif 22 | 23 | #include 24 | #include 25 | 26 | #include "gstfreeimagedec.h" 27 | #include "gstfreeimageenc.h" 28 | 29 | 30 | GST_DEBUG_CATEGORY (freeimagedec_debug); 31 | GST_DEBUG_CATEGORY (freeimageenc_debug); 32 | 33 | static gboolean 34 | plugin_init (GstPlugin * plugin) 35 | { 36 | GST_DEBUG_CATEGORY_INIT (freeimagedec_debug, "freeimagedec", 0, 37 | "FreeImage image decoder"); 38 | GST_DEBUG_CATEGORY_INIT (freeimageenc_debug, "freeimageenc", 0, 39 | "FreeImage image encoder"); 40 | 41 | if (!gst_freeimagedec_register_plugins (plugin)) 42 | return FALSE; 43 | 44 | if (!gst_freeimageenc_register_plugins (plugin)) 45 | return FALSE; 46 | 47 | return TRUE; 48 | } 49 | 50 | GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 51 | GST_VERSION_MINOR, 52 | "freeimage", 53 | "FreeImage plugin library", plugin_init, VERSION, "LGPL", PACKAGE_NAME, 54 | GST_PACKAGE_ORIGIN) 55 | -------------------------------------------------------------------------------- /ext/freeimage/gstfreeimage.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * 4 | * Filter: 5 | * Copyright (C) 2000 Donald A. Graft 6 | * 7 | * This library is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | * Library General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU Library General Public 13 | * License along with this library; if not, write to the 14 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 15 | * Boston, MA 02111-1307, USA. 16 | * 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | //GType gst_pngenc_get_type (void); 23 | // 24 | //extern GstPadTemplate *gst_png_sink_factory (); 25 | //extern GstPadTemplate *gst_png_src_factory (); 26 | -------------------------------------------------------------------------------- /ext/freeimage/gstfreeimagedec.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | 21 | #ifndef __GST_FREEIMAGEDEC_H__ 22 | #define __GST_FREEIMAGEDEC_H__ 23 | 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_FREEIMAGEDEC(obj) \ 30 | ((GstFreeImageDec *) obj) 31 | #define GST_FREEIMAGEDEC_CLASS(klass) \ 32 | ((GstFreeImageDecClass *) klass) 33 | #define GST_FREEIMAGEDEC_GET_CLASS(obj) \ 34 | ((GstFreeImageDecClass *) g_type_class_peek (G_TYPE_FROM_INSTANCE (obj))) 35 | 36 | 37 | typedef struct _GstFreeImageDec GstFreeImageDec; 38 | typedef struct _GstFreeImageDecClass GstFreeImageDecClass; 39 | 40 | struct _GstFreeImageDec 41 | { 42 | GstElement element; 43 | 44 | GstPad *sinkpad, *srcpad; 45 | 46 | gboolean need_newsegment; 47 | 48 | /* Pull range */ 49 | long offset; 50 | 51 | 52 | guint64 in_timestamp; 53 | guint64 in_duration; 54 | guint64 in_offset; 55 | 56 | gboolean framed; 57 | 58 | gint ret; 59 | 60 | FIBITMAP *dib; 61 | 62 | gboolean setup; 63 | 64 | gint fps_n; 65 | gint fps_d; 66 | 67 | GstSegment segment; 68 | gboolean image_ready; 69 | 70 | FreeImageIO fiio; 71 | guint64 length; 72 | }; 73 | 74 | struct _GstFreeImageDecClass 75 | { 76 | GstElementClass parent_class; 77 | 78 | FREE_IMAGE_FORMAT fif; 79 | }; 80 | 81 | gboolean gst_freeimagedec_register_plugins (GstPlugin * plugin); 82 | 83 | G_END_DECLS 84 | 85 | #endif /* __GST_FREEIMAGEDEC_H__ */ 86 | -------------------------------------------------------------------------------- /ext/freeimage/gstfreeimageenc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | 21 | #ifndef __GST_FREEIMAGEENC_H__ 22 | #define __GST_FREEIMAGEENC_H__ 23 | 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_FREEIMAGEENC(obj) \ 30 | ((GstFreeImageEnc *) obj) 31 | #define GST_FREEIMAGEENC_CLASS(klass) \ 32 | ((GstFreeImageEncClass *) klass) 33 | #define GST_FREEIMAGEENC_GET_CLASS(obj) \ 34 | ((GstFreeImageEncClass *) g_type_class_peek (G_TYPE_FROM_INSTANCE (obj))) 35 | 36 | 37 | typedef struct _GstFreeImageEnc GstFreeImageEnc; 38 | typedef struct _GstFreeImageEncClass GstFreeImageEncClass; 39 | 40 | struct _GstFreeImageEnc 41 | { 42 | GstElement element; 43 | 44 | GstPad *sinkpad, *srcpad; 45 | 46 | gboolean need_newsegment; 47 | 48 | /* Pull range */ 49 | long offset; 50 | 51 | 52 | guint64 in_timestamp; 53 | guint64 in_duration; 54 | 55 | gboolean framed; 56 | 57 | gint ret; 58 | 59 | FIBITMAP *dib; 60 | 61 | gboolean setup; 62 | 63 | gint fps_n; 64 | gint fps_d; 65 | 66 | gboolean image_ready; 67 | 68 | FreeImageIO fiio; 69 | guint64 length; 70 | }; 71 | 72 | struct _GstFreeImageEncClass 73 | { 74 | GstElementClass parent_class; 75 | 76 | FREE_IMAGE_FORMAT fif; 77 | }; 78 | 79 | gboolean gst_freeimageenc_register_plugins (GstPlugin * plugin); 80 | 81 | G_END_DECLS 82 | 83 | #endif /* __GST_FREEIMAGEENC_H__ */ 84 | -------------------------------------------------------------------------------- /ext/freeimage/gstfreeimageutils.h: -------------------------------------------------------------------------------- 1 | #ifndef __GST_FREEIMAGEUTILS_H__ 2 | #define __GST_FREEIMAGEUTILS_H__ 3 | 4 | #include 5 | #include 6 | 7 | GstCaps * gst_freeimageutils_caps_from_dib (FIBITMAP * dib, 8 | gint fps_n, gint fps_d); 9 | GstCaps * gst_freeimageutils_caps_from_freeimage_format ( 10 | FREE_IMAGE_FORMAT fif); 11 | 12 | gboolean gst_freeimageutils_parse_caps (const GstCaps * caps, 13 | FREE_IMAGE_TYPE * type, gint * width, gint * height, gint * bpp, 14 | unsigned * red_mask, unsigned * green_mask, unsigned * blue_mask); 15 | 16 | #endif // __GST_FREEIMAGEUTILS_H__ -------------------------------------------------------------------------------- /ext/gigesim/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstgigesim.cpp) 3 | 4 | set (HEADERS 5 | gstgigesim.h) 6 | 7 | include_directories (AFTER 8 | ${GIGESIM_INCLUDE_DIR}) 9 | 10 | set (libname gstgigesim) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${GIGESIM_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /ext/gigesim/gstgigesim.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_GIGESIM_H_ 21 | #define _GST_GIGESIM_H_ 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GST_TYPE_GIGESIMSINK (gst_gigesimsink_get_type()) 29 | #define GST_GIGESIMSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GIGESIMSINK,GstGigesimSink)) 30 | #define GST_GIGESIMSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GIGESIMSINK,GstGigesimSinkClass)) 31 | #define GST_IS_GIGESIMSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GIGESIMSINK)) 32 | #define GST_IS_GIGESIMSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GIGESIMSINK)) 33 | 34 | typedef struct _GstGigesimSink GstGigesimSink; 35 | typedef struct _GstGigesimSinkClass GstGigesimSinkClass; 36 | 37 | struct _GstGigesimSink 38 | { 39 | GstBaseSink base; 40 | 41 | CGevCamera* pCamera; 42 | 43 | gint timeout; 44 | gchar *address; 45 | gchar *manufacturer; 46 | gchar *model; 47 | gchar *version; 48 | gchar *info; 49 | gchar *serial; 50 | gchar *mac; 51 | 52 | gboolean camera_connected; 53 | GstVideoInfo vinfo; 54 | 55 | GMutex mutex; 56 | GCond cond; 57 | gboolean acquisition_started; 58 | gboolean stop_requested; 59 | }; 60 | 61 | struct _GstGigesimSinkClass 62 | { 63 | GstBaseSinkClass base_class; 64 | }; 65 | 66 | GType gst_gigesimsink_get_type (void); 67 | 68 | G_END_DECLS 69 | 70 | #endif /* _GST_GIGESIM_H_ */ -------------------------------------------------------------------------------- /gst-libs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (ENABLE_KLV) 2 | add_subdirectory (klv) 3 | endif () -------------------------------------------------------------------------------- /gst-libs/klv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DBUILDING_GST_KLV) 2 | 3 | set (SOURCES 4 | klv.c) 5 | 6 | set (HEADERS 7 | klv.h) 8 | 9 | include_directories (AFTER 10 | ${PROJECT_SOURCE_DIR}/common 11 | ) 12 | 13 | set (libname gstklv-1.0-0) 14 | 15 | add_library (${libname} SHARED 16 | ${SOURCES} 17 | ${HEADERS}) 18 | 19 | target_link_libraries (${libname} 20 | ${GLIB2_LIBRARIES} 21 | ${GOBJECT_LIBRARIES} 22 | ${GSTREAMER_LIBRARY} 23 | ${GSTREAMER_BASE_LIBRARY} 24 | ${GSTREAMER_VIDEO_LIBRARY}) 25 | 26 | if (WIN32) 27 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 28 | endif() 29 | install (TARGETS ${libname} LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}) 30 | -------------------------------------------------------------------------------- /gst-libs/klv/klv.h: -------------------------------------------------------------------------------- 1 | /* GStreamer KLV Metadata Support Library 2 | * Copyright (C) 2016-2019 Tim-Philipp Müller 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef __GST_TAG_KLV_H__ 21 | #define __GST_TAG_KLV_H__ 22 | 23 | #include 24 | 25 | // FIXME: include this for now until gst-plugins-base MR124 is accepted 26 | //#define GST_API_EXPORT __declspec(dllexport) extern 27 | //#define GST_TAG_API GST_API_EXPORT 28 | #if defined (_MSC_VER) 29 | #define GST_KLV_EXPORT __declspec(dllexport) 30 | #define GST_KLV_IMPORT __declspec(dllimport) 31 | #elif defined (__GNUC__) 32 | #define GST_KLV_EXPORT __attribute__((visibility("default"))) 33 | #define GST_KLV_IMPORT 34 | #else 35 | #define GST_KLV_EXPORT 36 | #define GST_KLV_IMPORT 37 | #endif 38 | 39 | #ifdef BUILDING_GST_KLV 40 | #define GST_KLV_API GST_KLV_EXPORT 41 | #else 42 | #define GST_KLV_API GST_KLV_IMPORT 43 | #endif 44 | #define GST_TAG_API GST_KLV_API 45 | 46 | G_BEGIN_DECLS 47 | 48 | /** 49 | * GstKLVMeta: 50 | * 51 | * An opaque #GstMeta structure representing a self-contained KLV metadata 52 | * block that can be attached to buffers. 53 | * 54 | * Since: 1.16 55 | */ 56 | typedef struct { 57 | /*< private >*/ 58 | GstMeta meta; 59 | } GstKLVMeta; 60 | 61 | GST_TAG_API 62 | GType gst_klv_meta_get_type (void); 63 | 64 | #define GST_KLV_META_API_TYPE (gst_klv_meta_api_get_type()) 65 | #define GST_KLV_META_INFO (gst_klv_meta_get_info()) 66 | 67 | GST_TAG_API 68 | GType gst_klv_meta_api_get_type (void); 69 | 70 | GST_TAG_API 71 | const GstMetaInfo * gst_klv_meta_get_info (void); 72 | 73 | /* Add KLV meta data to a buffer */ 74 | 75 | GST_TAG_API 76 | GstKLVMeta * gst_buffer_add_klv_meta_from_data (GstBuffer * buffer, const guint8 * data, gsize size); 77 | 78 | GST_TAG_API 79 | GstKLVMeta * gst_buffer_add_klv_meta_take_data (GstBuffer * buffer, guint8 * data, gsize size); 80 | 81 | GST_TAG_API 82 | GstKLVMeta * gst_buffer_add_klv_meta_from_bytes (GstBuffer * buffer, GBytes * bytes); 83 | 84 | GST_TAG_API 85 | GstKLVMeta * gst_buffer_add_klv_meta_take_bytes (GstBuffer * buffer, GBytes * bytes); 86 | 87 | /* Get KLV meta data from a buffer */ 88 | 89 | GST_TAG_API 90 | GstKLVMeta * gst_buffer_get_klv_meta (GstBuffer * buffer); 91 | 92 | GST_TAG_API 93 | const guint8 * gst_klv_meta_get_data (GstKLVMeta * klv_meta, gsize * size); 94 | 95 | GST_TAG_API 96 | GBytes * gst_klv_meta_get_bytes (GstKLVMeta * klv_meta); 97 | 98 | G_END_DECLS 99 | 100 | #endif /* __GST_TAG_KLV_H__ */ 101 | -------------------------------------------------------------------------------- /gst/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (OPENCV_FOUND) 2 | add_subdirectory (sensorfx) 3 | endif (OPENCV_FOUND) 4 | 5 | add_subdirectory (bayerutils) 6 | add_subdirectory (extractcolor) 7 | 8 | if (ENABLE_KLV) 9 | add_subdirectory (klv) 10 | endif () 11 | 12 | add_subdirectory (misb) 13 | add_subdirectory (select) 14 | add_subdirectory (videoadjust) 15 | -------------------------------------------------------------------------------- /gst/bayerutils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstbayer2gray.c 3 | ) 4 | 5 | set (HEADERS 6 | gstbayer2gray.h) 7 | 8 | include_directories (AFTER 9 | ) 10 | 11 | set (libname gstbayerutils) 12 | 13 | add_library (${libname} MODULE 14 | ${SOURCES} 15 | ${HEADERS}) 16 | 17 | target_link_libraries (${libname} 18 | ${GLIB2_LIBRARIES} 19 | ${GOBJECT_LIBRARIES} 20 | ${GSTREAMER_LIBRARY} 21 | ${GSTREAMER_BASE_LIBRARY} 22 | ${GSTREAMER_VIDEO_LIBRARY}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /gst/bayerutils/gstbayer2gray.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * Copyright (C) <2003> David Schleef 4 | * Copyright (C) 2003 Arwed v. Merkatz 5 | * Copyright (C) 2006 Mark Nauwelaerts 6 | * Copyright (C) 2020 United States Government, Joshua M. Doe 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library 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 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | * Boston, MA 02111-1307, USA. 22 | */ 23 | 24 | 25 | #ifndef __GST_BAYER2GRAY_H__ 26 | #define __GST_BAYER2GRAY_H__ 27 | 28 | #include 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_BAYER2GRAY \ 34 | (gst_bayer2gray_get_type()) 35 | #define GST_BAYER2GRAY(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BAYER2GRAY,GstBayer2Gray)) 37 | #define GST_BAYER2GRAY_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BAYER2GRAY,GstBayer2GrayClass)) 39 | #define GST_IS_BAYER2GRAY(obj) \ 40 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BAYER2GRAY)) 41 | #define GST_IS_BAYER2GRAY_CLASS(klass) \ 42 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BAYER2GRAY)) 43 | 44 | typedef struct _GstBayer2Gray GstBayer2Gray; 45 | typedef struct _GstBayer2GrayClass GstBayer2GrayClass; 46 | 47 | 48 | /** 49 | * GstBayer2Gray: 50 | * @element: the parent element. 51 | * 52 | * 53 | * The opaque GstBayer2Gray data structure. 54 | */ 55 | struct _GstBayer2Gray 56 | { 57 | GstBaseTransform element; 58 | 59 | /* format */ 60 | GstVideoInfo vinfo; 61 | gint width; 62 | gint height; 63 | gint depth; 64 | gint bpp; 65 | gint fps_n; 66 | gint fps_d; 67 | }; 68 | 69 | struct _GstBayer2GrayClass 70 | { 71 | GstBaseTransformClass parent_class; 72 | }; 73 | 74 | GType gst_bayer2gray_get_type(void); 75 | 76 | G_END_DECLS 77 | 78 | #endif /* __GST_BAYER2GRAY_H__ */ 79 | -------------------------------------------------------------------------------- /gst/extractcolor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstextractcolor.c 3 | gstextractcolororc-dist.c) 4 | 5 | set (HEADERS 6 | gstextractcolor.h) 7 | 8 | include_directories (AFTER 9 | ${ORC_INCLUDE_DIR}) 10 | 11 | set (libname gstextractcolor) 12 | 13 | add_library (${libname} MODULE 14 | ${SOURCES} 15 | ${HEADERS}) 16 | 17 | target_link_libraries (${libname} 18 | ${ORC_LIBRARIES} 19 | ${GLIB2_LIBRARIES} 20 | ${GOBJECT_LIBRARIES} 21 | ${GSTREAMER_LIBRARY} 22 | ${GSTREAMER_BASE_LIBRARY} 23 | ${GSTREAMER_VIDEO_LIBRARY}) 24 | 25 | if (WIN32) 26 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 27 | endif () 28 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 29 | -------------------------------------------------------------------------------- /gst/extractcolor/gstextractcolor.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * Copyright (C) <2003> David Schleef 4 | * Copyright (C) 2003 Arwed v. Merkatz 5 | * Copyright (C) 2006 Mark Nauwelaerts 6 | * Copyright (C) 2015 United States Government, Joshua M. Doe 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library 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 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | * Boston, MA 02111-1307, USA. 22 | */ 23 | 24 | 25 | #ifndef __GST_EXTRACT_COLOR_H__ 26 | #define __GST_EXTRACT_COLOR_H__ 27 | 28 | #include 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_EXTRACT_COLOR \ 34 | (gst_extract_color_get_type()) 35 | #define GST_EXTRACT_COLOR(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EXTRACT_COLOR,GstExtractColor)) 37 | #define GST_EXTRACT_COLOR_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_EXTRACT_COLOR,GstExtractColorClass)) 39 | #define GST_IS_EXTRACT_COLOR(obj) \ 40 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EXTRACT_COLOR)) 41 | #define GST_IS_EXTRACT_COLOR_CLASS(klass) \ 42 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_EXTRACT_COLOR)) 43 | 44 | typedef struct _GstExtractColor GstExtractColor; 45 | typedef struct _GstExtractColorClass GstExtractColorClass; 46 | 47 | /** 48 | * GstExtractColorComponent: 49 | * @GST_EXTRACT_COLOR_COMPONENT_RED: extract red component 50 | * @GST_EXTRACT_COLOR_COMPONENT_GREEN: extract green component 51 | * @GST_EXTRACT_COLOR_COMPONENT_BLUE: extract blue component 52 | * 53 | * Component to extract. 54 | */ 55 | typedef enum { 56 | GST_EXTRACT_COLOR_COMPONENT_RED, 57 | GST_EXTRACT_COLOR_COMPONENT_GREEN, 58 | GST_EXTRACT_COLOR_COMPONENT_BLUE 59 | } GstExtractColorComponent; 60 | 61 | /** 62 | * GstExtractColor: 63 | * @element: the parent element. 64 | * 65 | * 66 | * The opaque GstExtractColor data structure. 67 | */ 68 | struct _GstExtractColor 69 | { 70 | GstVideoFilter element; 71 | 72 | /* format */ 73 | GstVideoInfo info_in; 74 | GstVideoInfo info_out; 75 | 76 | /* properties */ 77 | GstExtractColorComponent component; 78 | }; 79 | 80 | struct _GstExtractColorClass 81 | { 82 | GstVideoFilterClass parent_class; 83 | }; 84 | 85 | GType gst_extract_color_get_type(void); 86 | 87 | G_END_DECLS 88 | 89 | #endif /* __GST_EXTRACT_COLOR_H__ */ 90 | -------------------------------------------------------------------------------- /gst/extractcolor/gstextractcolororc-dist.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* autogenerated from gstextractcolororc.orc */ 3 | 4 | #ifndef _OUT_H_ 5 | #define _OUT_H_ 6 | 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | 13 | 14 | #ifndef _ORC_INTEGER_TYPEDEFS_ 15 | #define _ORC_INTEGER_TYPEDEFS_ 16 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 17 | #include 18 | typedef int8_t orc_int8; 19 | typedef int16_t orc_int16; 20 | typedef int32_t orc_int32; 21 | typedef int64_t orc_int64; 22 | typedef uint8_t orc_uint8; 23 | typedef uint16_t orc_uint16; 24 | typedef uint32_t orc_uint32; 25 | typedef uint64_t orc_uint64; 26 | #define ORC_UINT64_C(x) UINT64_C(x) 27 | #elif defined(_MSC_VER) 28 | typedef signed __int8 orc_int8; 29 | typedef signed __int16 orc_int16; 30 | typedef signed __int32 orc_int32; 31 | typedef signed __int64 orc_int64; 32 | typedef unsigned __int8 orc_uint8; 33 | typedef unsigned __int16 orc_uint16; 34 | typedef unsigned __int32 orc_uint32; 35 | typedef unsigned __int64 orc_uint64; 36 | #define ORC_UINT64_C(x) (x##Ui64) 37 | #define inline __inline 38 | #else 39 | #include 40 | typedef signed char orc_int8; 41 | typedef short orc_int16; 42 | typedef int orc_int32; 43 | typedef unsigned char orc_uint8; 44 | typedef unsigned short orc_uint16; 45 | typedef unsigned int orc_uint32; 46 | #if INT_MAX == LONG_MAX 47 | typedef long long orc_int64; 48 | typedef unsigned long long orc_uint64; 49 | #define ORC_UINT64_C(x) (x##ULL) 50 | #else 51 | typedef long orc_int64; 52 | typedef unsigned long orc_uint64; 53 | #define ORC_UINT64_C(x) (x##UL) 54 | #endif 55 | #endif 56 | typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 57 | typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32; 58 | typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64; 59 | #endif 60 | #ifndef ORC_RESTRICT 61 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 62 | #define ORC_RESTRICT restrict 63 | #elif defined(__GNUC__) && __GNUC__ >= 4 64 | #define ORC_RESTRICT __restrict__ 65 | #else 66 | #define ORC_RESTRICT 67 | #endif 68 | #endif 69 | 70 | #ifndef ORC_INTERNAL 71 | #if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) 72 | #define ORC_INTERNAL __attribute__((visibility("hidden"))) 73 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) 74 | #define ORC_INTERNAL __hidden 75 | #elif defined (__GNUC__) 76 | #define ORC_INTERNAL __attribute__((visibility("hidden"))) 77 | #else 78 | #define ORC_INTERNAL 79 | #endif 80 | #endif 81 | 82 | void extractcolor_orc_copy32_0 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); 83 | void extractcolor_orc_copy32_1 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); 84 | void extractcolor_orc_copy32_2 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); 85 | void extractcolor_orc_copy32_3 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); 86 | 87 | #ifdef __cplusplus 88 | } 89 | #endif 90 | 91 | #endif 92 | 93 | -------------------------------------------------------------------------------- /gst/extractcolor/gstextractcolororc.orc: -------------------------------------------------------------------------------- 1 | 2 | .function extractcolor_orc_copy32_0 3 | .flags 2d 4 | .dest 1 d guint8 5 | .source 4 s guint8 6 | .temp 2 t 7 | select0lw t, s 8 | select0wb d, t 9 | 10 | 11 | .function extractcolor_orc_copy32_1 12 | .flags 2d 13 | .dest 1 d guint8 14 | .source 4 s guint8 15 | .temp 2 t 16 | select0lw t, s 17 | select1wb d, t 18 | 19 | 20 | .function extractcolor_orc_copy32_2 21 | .flags 2d 22 | .dest 1 d guint8 23 | .source 4 s guint8 24 | .temp 2 t 25 | select1lw t, s 26 | select0wb d, t 27 | 28 | 29 | .function extractcolor_orc_copy32_3 30 | .flags 2d 31 | .dest 1 d guint8 32 | .source 4 s guint8 33 | .temp 2 t 34 | select1lw t, s 35 | select1wb d, t 36 | 37 | 38 | .function extractcolor_orc_copy64_0 39 | .flags 2d 40 | .dest 2 d guint16 41 | .source 8 s guint16 42 | .temp 4 t 43 | select0ql t, s 44 | select0lw d, t 45 | 46 | 47 | .function extractcolor_orc_copy64_1 48 | .flags 2d 49 | .dest 2 d guint16 50 | .source 8 s guint16 51 | .temp 4 t 52 | select0ql t, s 53 | select1lw d, t 54 | 55 | 56 | .function extractcolor_orc_copy64_2 57 | .flags 2d 58 | .dest 2 d guint16 59 | .source 8 s guint16 60 | .temp 4 t 61 | select1ql t, s 62 | select0lw d, t 63 | 64 | 65 | .function extractcolor_orc_copy64_3 66 | .flags 2d 67 | .dest 2 d guint16 68 | .source 8 s guint16 69 | .temp 4 t 70 | select1ql t, s 71 | select1lw d, t -------------------------------------------------------------------------------- /gst/klv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstklv.c 3 | gstklvinject.c 4 | gstklvtimestamp.c 5 | gstklvinspect.c) 6 | 7 | set (HEADERS 8 | gstklvinject.h 9 | gstklvtimestamp.h 10 | gstklvinspect.h) 11 | 12 | include_directories (AFTER 13 | ${PROJECT_SOURCE_DIR}/common 14 | ${PROJECT_SOURCE_DIR}/gst-libs/klv 15 | ) 16 | 17 | set (libname gstklv) 18 | 19 | add_library (${libname} MODULE 20 | ${SOURCES} 21 | ${HEADERS}) 22 | 23 | target_link_libraries (${libname} 24 | ${GLIB2_LIBRARIES} 25 | ${GOBJECT_LIBRARIES} 26 | ${GSTREAMER_LIBRARY} 27 | ${GSTREAMER_BASE_LIBRARY} 28 | ${GSTREAMER_VIDEO_LIBRARY} 29 | gstklv-1.0-0) 30 | 31 | if (WIN32) 32 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 33 | endif () 34 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 35 | -------------------------------------------------------------------------------- /gst/klv/gstklv.c: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2016 William Manley 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, 17 | * Boston, MA 02110-1335, USA. 18 | */ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include "config.h" 22 | #endif 23 | 24 | #include 25 | 26 | #include "gstklvinject.h" 27 | #include "gstklvinspect.h" 28 | #include "gstklvtimestamp.h" 29 | 30 | static gboolean 31 | plugin_init (GstPlugin * plugin) 32 | { 33 | return 34 | gst_element_register (plugin, "klvinspect", 35 | GST_RANK_NONE, GST_TYPE_KLVINSPECT) && 36 | gst_element_register (plugin, "klvinject", 37 | GST_RANK_NONE, GST_TYPE_KLVINJECT) && 38 | gst_element_register (plugin, "klvtimestamp", 39 | GST_RANK_NONE, GST_TYPE_KLVTIMESTAMP); 40 | } 41 | 42 | GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 43 | GST_VERSION_MINOR, 44 | klv, 45 | "Elements for working with KLV data", 46 | plugin_init, GST_PACKAGE_VERSION, GST_PACKAGE_LICENSE, GST_PACKAGE_NAME, 47 | GST_PACKAGE_ORIGIN); 48 | -------------------------------------------------------------------------------- /gst/klv/gstklvinject.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2016 William Manley 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef _GST_KLVINJECT_H_ 21 | #define _GST_KLVINJECT_H_ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GST_TYPE_KLVINJECT (gst_klvinject_get_type()) 28 | #define GST_KLVINJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KLVINJECT,GstKlvInject)) 29 | #define GST_KLVINJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KLVINJECT,GstKlvInjectClass)) 30 | #define GST_IS_KLVINJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KLVINJECT)) 31 | #define GST_IS_KLVINJECT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KLVINJECT)) 32 | 33 | typedef struct _GstKlvInject GstKlvInject; 34 | typedef struct _GstKlvInjectClass GstKlvInjectClass; 35 | 36 | struct _GstKlvInject 37 | { 38 | GstBaseTransform base_klvinject; 39 | }; 40 | 41 | struct _GstKlvInjectClass 42 | { 43 | GstBaseTransformClass base_klvinject_class; 44 | }; 45 | 46 | GType gst_klvinject_get_type (void); 47 | 48 | G_END_DECLS 49 | 50 | #endif /* _GST_KLVINJECT_H_ */ 51 | -------------------------------------------------------------------------------- /gst/klv/gstklvinspect.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2016 William Manley 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef _GST_KLVINSPECT_H_ 21 | #define _GST_KLVINSPECT_H_ 22 | 23 | #include 24 | 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_TYPE_KLVINSPECT (gst_klvinspect_get_type()) 30 | #define GST_KLVINSPECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KLVINSPECT,GstKlvInspect)) 31 | #define GST_KLVINSPECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KLVINSPECT,GstKlvInspectClass)) 32 | #define GST_IS_KLVINSPECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KLVINSPECT)) 33 | #define GST_IS_KLVINSPECT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KLVINSPECT)) 34 | 35 | typedef struct _GstKlvInspect GstKlvInspect; 36 | typedef struct _GstKlvInspectClass GstKlvInspectClass; 37 | 38 | struct _GstKlvInspect 39 | { 40 | GstBaseTransform base_klvinspect; 41 | 42 | /* properties */ 43 | gchar* dump_location; 44 | 45 | FILE* dump_file; 46 | }; 47 | 48 | struct _GstKlvInspectClass 49 | { 50 | GstBaseTransformClass base_klvinspect_class; 51 | }; 52 | 53 | GType gst_klvinspect_get_type (void); 54 | 55 | G_END_DECLS 56 | 57 | #endif /* _GST_KLVINSPECT_H_ */ 58 | -------------------------------------------------------------------------------- /gst/klv/gstklvtimestamp.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2016 William Manley 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef _GST_KLVTIMESTAMP_H_ 21 | #define _GST_KLVTIMESTAMP_H_ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GST_TYPE_KLVTIMESTAMP (gst_klvtimestamp_get_type()) 28 | #define GST_KLVTIMESTAMP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KLVTIMESTAMP,GstKlvTimestamp)) 29 | #define GST_KLVTIMESTAMP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KLVTIMESTAMP,GstKlvTimestampClass)) 30 | #define GST_IS_KLVTIMESTAMP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KLVTIMESTAMP)) 31 | #define GST_IS_KLVTIMESTAMP_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KLVTIMESTAMP)) 32 | 33 | typedef struct _GstKlvTimestamp GstKlvTimestamp; 34 | typedef struct _GstKlvTimestampClass GstKlvTimestampClass; 35 | 36 | struct _GstKlvTimestamp 37 | { 38 | GstBaseTransform base_klvtimestamp; 39 | }; 40 | 41 | struct _GstKlvTimestampClass 42 | { 43 | GstBaseTransformClass base_klvtimestamp_class; 44 | }; 45 | 46 | GType gst_klvtimestamp_get_type (void); 47 | 48 | G_END_DECLS 49 | 50 | #endif /* _GST_KLVTIMESTAMP_H_ */ 51 | -------------------------------------------------------------------------------- /gst/misb/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstmisb.c 3 | gstmisbirpack.c 4 | gstmisbirunpack.c 5 | ) 6 | 7 | set (HEADERS 8 | gstmisbirpack.h 9 | gstmisbirunpack.h) 10 | 11 | include_directories (AFTER 12 | ${ORC_INCLUDE_DIR}) 13 | 14 | set (libname gstmisb) 15 | 16 | add_library (${libname} MODULE 17 | ${SOURCES} 18 | ${HEADERS}) 19 | 20 | target_link_libraries (${libname} 21 | ${ORC_LIBRARIES} 22 | ${GLIB2_LIBRARIES} 23 | ${GOBJECT_LIBRARIES} 24 | ${GSTREAMER_LIBRARY} 25 | ${GSTREAMER_BASE_LIBRARY} 26 | ${GSTREAMER_VIDEO_LIBRARY}) 27 | 28 | if (WIN32) 29 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 30 | endif () 31 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 32 | -------------------------------------------------------------------------------- /gst/misb/gstmisb.c: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * Copyright (C) <2003> David Schleef 4 | * Copyright (C) 2003 Arwed v. Merkatz 5 | * Copyright (C) 2006 Mark Nauwelaerts 6 | * Copyright (C) 2018 United States Government, Joshua M. Doe 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library 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 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | * Boston, MA 02111-1307, USA. 22 | */ 23 | 24 | #ifdef HAVE_CONFIG_H 25 | #include "config.h" 26 | #endif 27 | 28 | #include "gstmisbirpack.h" 29 | #include "gstmisbirunpack.h" 30 | 31 | static gboolean 32 | plugin_init (GstPlugin * plugin) 33 | { 34 | GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "misb", 0, 35 | "debug category for misb"); 36 | 37 | GST_DEBUG ("plugin_init"); 38 | 39 | GST_CAT_INFO (GST_CAT_DEFAULT, "registering misbirpack element"); 40 | if (!gst_element_register (plugin, "misbirpack", GST_RANK_NONE, 41 | GST_TYPE_MISB_IR_PACK)) { 42 | return FALSE; 43 | } 44 | 45 | GST_CAT_INFO (GST_CAT_DEFAULT, "registering misbirunpack element"); 46 | if (!gst_element_register (plugin, "misbirunpack", GST_RANK_NONE, 47 | GST_TYPE_MISB_IR_UNPACK)) { 48 | return FALSE; 49 | } 50 | 51 | return TRUE; 52 | } 53 | 54 | GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 55 | GST_VERSION_MINOR, 56 | misb, 57 | "MISB related filters", 58 | plugin_init, GST_PACKAGE_VERSION, GST_PACKAGE_LICENSE, GST_PACKAGE_NAME, 59 | GST_PACKAGE_ORIGIN); 60 | -------------------------------------------------------------------------------- /gst/misb/gstmisbirpack.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * Copyright (C) <2003> David Schleef 4 | * Copyright (C) 2003 Arwed v. Merkatz 5 | * Copyright (C) 2006 Mark Nauwelaerts 6 | * Copyright (C) 2018 United States Government, Joshua M. Doe 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library 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 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | * Boston, MA 02111-1307, USA. 22 | */ 23 | 24 | 25 | #ifndef __GST_MISB_IR_PACK_H__ 26 | #define __GST_MISB_IR_PACK_H__ 27 | 28 | #include 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_MISB_IR_PACK \ 34 | (gst_misb_ir_pack_get_type()) 35 | #define GST_MISB_IR_PACK(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MISB_IR_PACK,GstMisbIrPack)) 37 | #define GST_MISB_IR_PACK_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MISB_IR_PACK,GstMisbIrPackClass)) 39 | #define GST_IS_MISB_IR_PACK(obj) \ 40 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MISB_IR_PACK)) 41 | #define GST_IS_MISB_IR_PACK_CLASS(klass) \ 42 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MISB_IR_PACK)) 43 | 44 | typedef struct _GstMisbIrPack GstMisbIrPack; 45 | typedef struct _GstMisbIrPackClass GstMisbIrPackClass; 46 | 47 | /** 48 | * GstMisbIrPack: 49 | * @element: the parent element. 50 | * 51 | * 52 | * The opaque GstMisbIrPack data structure. 53 | */ 54 | struct _GstMisbIrPack 55 | { 56 | GstVideoFilter element; 57 | 58 | /* format */ 59 | GstVideoInfo info_in; 60 | GstVideoInfo info_out; 61 | 62 | /* properties */ 63 | guint offset_value; 64 | }; 65 | 66 | struct _GstMisbIrPackClass 67 | { 68 | GstVideoFilterClass parent_class; 69 | }; 70 | 71 | GType gst_misb_ir_pack_get_type(void); 72 | 73 | G_END_DECLS 74 | 75 | #endif /* __GST_MISB_IR_PACK_H__ */ 76 | -------------------------------------------------------------------------------- /gst/misb/gstmisbirunpack.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * Copyright (C) <2003> David Schleef 4 | * Copyright (C) 2003 Arwed v. Merkatz 5 | * Copyright (C) 2006 Mark Nauwelaerts 6 | * Copyright (C) 2018 United States Government, Joshua M. Doe 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library 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 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | * Boston, MA 02111-1307, USA. 22 | */ 23 | 24 | 25 | #ifndef __GST_MISB_IR_UNPACK_H__ 26 | #define __GST_MISB_IR_UNPACK_H__ 27 | 28 | #include 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_MISB_IR_UNPACK \ 34 | (gst_misb_ir_unpack_get_type()) 35 | #define GST_MISB_IR_UNPACK(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MISB_IR_UNPACK,GstMisbIrUnpack)) 37 | #define GST_MISB_IR_UNPACK_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MISB_IR_UNPACK,GstMisbIrUnpackClass)) 39 | #define GST_IS_MISB_IR_UNPACK(obj) \ 40 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MISB_IR_UNPACK)) 41 | #define GST_IS_MISB_IR_UNPACK_CLASS(klass) \ 42 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MISB_IR_UNPACK)) 43 | 44 | typedef struct _GstMisbIrUnpack GstMisbIrUnpack; 45 | typedef struct _GstMisbIrUnpackClass GstMisbIrUnpackClass; 46 | 47 | /** 48 | * GstMisbIrUnpack: 49 | * @element: the parent element. 50 | * 51 | * 52 | * The opaque GstMisbIrUnpack data structure. 53 | */ 54 | struct _GstMisbIrUnpack 55 | { 56 | GstVideoFilter element; 57 | 58 | /* format */ 59 | GstVideoInfo info_in; 60 | GstVideoInfo info_out; 61 | 62 | /* properties */ 63 | gint offset_value; 64 | guint shift_value; 65 | gboolean swap; 66 | guint luma_mask; 67 | guint chroma_mask; 68 | }; 69 | 70 | struct _GstMisbIrUnpackClass 71 | { 72 | GstVideoFilterClass parent_class; 73 | }; 74 | 75 | GType gst_misb_ir_unpack_get_type(void); 76 | 77 | G_END_DECLS 78 | 79 | #endif /* __GST_MISB_IR_UNPACK_H__ */ 80 | -------------------------------------------------------------------------------- /gst/select/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstselect.c 3 | ) 4 | 5 | set (HEADERS 6 | gstselect.h) 7 | 8 | include_directories (AFTER 9 | ${ORC_INCLUDE_DIR}) 10 | 11 | set (libname gstselect) 12 | 13 | add_library (${libname} MODULE 14 | ${SOURCES} 15 | ${HEADERS}) 16 | 17 | target_link_libraries (${libname} 18 | ${ORC_LIBRARIES} 19 | ${GLIB2_LIBRARIES} 20 | ${GOBJECT_LIBRARIES} 21 | ${GSTREAMER_LIBRARY} 22 | ${GSTREAMER_BASE_LIBRARY} 23 | ${GSTREAMER_VIDEO_LIBRARY}) 24 | 25 | if (WIN32) 26 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 27 | endif () 28 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 29 | -------------------------------------------------------------------------------- /gst/select/gstselect.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * Copyright (C) <2003> David Schleef 4 | * Copyright (C) 2003 Arwed v. Merkatz 5 | * Copyright (C) 2006 Mark Nauwelaerts 6 | * Copyright (C) 2015 United States Government, Joshua M. Doe 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library 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 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | * Boston, MA 02111-1307, USA. 22 | */ 23 | 24 | 25 | #ifndef __GST_SELECT_H__ 26 | #define __GST_SELECT_H__ 27 | 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define GST_TYPE_SELECT \ 33 | (gst_select_get_type()) 34 | #define GST_SELECT(obj) \ 35 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SELECT,GstSelect)) 36 | #define GST_SELECT_CLASS(klass) \ 37 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SELECT,GstSelectClass)) 38 | #define GST_IS_SELECT(obj) \ 39 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SELECT)) 40 | #define GST_IS_SELECT_CLASS(klass) \ 41 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SELECT)) 42 | 43 | typedef struct _GstSelect GstSelect; 44 | typedef struct _GstSelectClass GstSelectClass; 45 | 46 | /** 47 | * GstSelect: 48 | * @element: the parent element. 49 | * 50 | * 51 | * The opaque GstSelect data structure. 52 | */ 53 | struct _GstSelect 54 | { 55 | GstBaseTransform element; 56 | 57 | /* properties */ 58 | gint offset; 59 | gint skip; 60 | }; 61 | 62 | struct _GstSelectClass 63 | { 64 | GstBaseTransformClass parent_class; 65 | }; 66 | 67 | GType gst_select_get_type(void); 68 | 69 | G_END_DECLS 70 | 71 | #endif /* __GST_SELECT_H__ */ 72 | -------------------------------------------------------------------------------- /gst/sensorfx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions (-DHAVE_CONFIG_H) 2 | 3 | set (SOURCES 4 | gstsensorfx.c 5 | gstsensorfx3dnoise.c) 6 | 7 | set (HEADERS 8 | gstsensorfx3dnoise.h) 9 | 10 | include_directories ( 11 | . 12 | C:/gstreamer/include/gstreamer-0.10/gst/opencv 13 | ${OpenCV_INCLUDE_DIR}) 14 | 15 | add_library (libgstsensorfx MODULE 16 | ${SOURCES} 17 | ${HEADERS}) 18 | 19 | target_link_libraries (libgstsensorfx 20 | general ${GLIB2_LIBRARIES} 21 | general ${GSTREAMER_LIBRARIES} 22 | general ${GSTREAMER_BASE_LIBRARY} 23 | general ${GSTREAMER_VIDEO_LIBRARY} 24 | ${OpenCV_LIBS} 25 | C:/gstreamer/lib/libgstopencv-0.10.lib) 26 | 27 | install (TARGETS libgstsensorfx 28 | LIBRARY DESTINATION lib/gstreamer-0.10) -------------------------------------------------------------------------------- /gst/sensorfx/gstsensorfx.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #include "gstsensorfx3dnoise.h" 6 | 7 | #define GST_CAT_DEFAULT gst_sensorfx_debug 8 | GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); 9 | 10 | 11 | /* Register filters that make up the gstsfx plugin */ 12 | static gboolean 13 | plugin_init (GstPlugin * plugin) 14 | { 15 | GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "sensorfx", 0, "sensorfx"); 16 | 17 | GST_DEBUG ("plugin_init"); 18 | 19 | if (!gst_element_register (plugin, "sfx3dnoise", GST_RANK_NONE, 20 | GST_TYPE_SFX3DNOISE)) { 21 | return FALSE; 22 | } 23 | 24 | return TRUE; 25 | } 26 | 27 | GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 28 | GST_VERSION_MINOR, 29 | "sensorfx", 30 | "Filters to simulate the effects of real sensors", 31 | plugin_init, VERSION, GST_LICENSE, PACKAGE_NAME, GST_PACKAGE_ORIGIN); 32 | -------------------------------------------------------------------------------- /gst/sensorfx/gstsensorfx3dnoise.h: -------------------------------------------------------------------------------- 1 | /* 2 | * GStreamer 3 | * Copyright (C) 2010 Thiago Santos 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a 6 | * copy of this software and associated documentation files (the "Software"), 7 | * to deal in the Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | * and/or sell copies of the Software, and to permit persons to whom the 10 | * Software is furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | * Alternatively, the contents of this file may be used under the 24 | * GNU Lesser General Public License Version 2.1 (the "LGPL"), in 25 | * which case the following provisions apply instead of the ones 26 | * mentioned above: 27 | * 28 | * This library is free software; you can redistribute it and/or 29 | * modify it under the terms of the GNU Library General Public 30 | * License as published by the Free Software Foundation; either 31 | * version 2 of the License, or (at your option) any later version. 32 | * 33 | * This library is distributed in the hope that it will be useful, 34 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 36 | * Library General Public License for more details. 37 | * 38 | * You should have received a copy of the GNU Library General Public 39 | * License along with this library; if not, write to the 40 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 41 | * Boston, MA 02111-1307, USA. 42 | */ 43 | 44 | #ifndef __GST_SFX3DNOISE_H__ 45 | #define __GST_SFX3DNOISE_H__ 46 | 47 | #include 48 | #include 49 | #include 50 | 51 | G_BEGIN_DECLS 52 | 53 | /* #defines don't like whitespacey bits */ 54 | #define GST_TYPE_SFX3DNOISE \ 55 | (gst_sfx3dnoise_get_type()) 56 | #define GST_SFX3DNOISE(obj) \ 57 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SFX3DNOISE,GstSfx3DNoise)) 58 | #define GST_SFX3DNOISE_CLASS(klass) \ 59 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SFX3DNOISE,GstSfx3DNoiseClass)) 60 | #define GST_IS_SFX3DNOISE(obj) \ 61 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SFX3DNOISE)) 62 | #define GST_IS_SFX3DNOISE_CLASS(klass) \ 63 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SFX3DNOISE)) 64 | 65 | typedef struct _GstSfx3DNoise GstSfx3DNoise; 66 | typedef struct _GstSfx3DNoiseClass GstSfx3DNoiseClass; 67 | 68 | struct _GstSfx3DNoise 69 | { 70 | GstOpencvBaseTransform element; 71 | 72 | gdouble sigma_t; 73 | gdouble sigma_v; 74 | gdouble sigma_h; 75 | gdouble sigma_tv; 76 | gdouble sigma_th; 77 | gdouble sigma_vh; 78 | gdouble sigma_tvh; 79 | 80 | gdouble sigma_v_old; 81 | gdouble sigma_h_old; 82 | gdouble sigma_vh_old; 83 | 84 | gint width; 85 | gint height; 86 | 87 | CvRNG rng; 88 | CvMat * fixed_noise; 89 | CvMat * intermediary; 90 | }; 91 | 92 | struct _GstSfx3DNoiseClass 93 | { 94 | GstOpencvBaseTransformClass parent_class; 95 | }; 96 | 97 | GType gst_sfx3dnoise_get_type (void); 98 | 99 | gboolean gst_sfx3dnoise_plugin_init (GstPlugin * plugin); 100 | 101 | G_END_DECLS 102 | 103 | #endif /* __GST_SFX3DNOISE_H__ */ 104 | -------------------------------------------------------------------------------- /gst/sensorfx/gstsensorfxblur.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * Copyright (C) <2003> David Schleef 4 | * Copyright (C) 2003 Arwed v. Merkatz 5 | * Copyright (C) 2006 Mark Nauwelaerts 6 | * Copyright (C) 2010 United States Government, Joshua M. Doe 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library 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 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | * Boston, MA 02111-1307, USA. 22 | */ 23 | 24 | 25 | #ifndef __GST_SENSORFXBLUR_H__ 26 | #define __GST_SENSORFXBLUR_H__ 27 | 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define GST_TYPE_SENSORFXBLUR \ 33 | (gst_sfxblur_get_type()) 34 | #define GST_SENSORFXBLUR(obj) \ 35 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SENSORFXBLUR,GstSensorFxBlur)) 36 | #define GST_SENSORFXBLUR_CLASS(klass) \ 37 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SENSORFXBLUR,GstSensorFxBlurClass)) 38 | #define GST_IS_SENSORFXBLUR(obj) \ 39 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SENSORFXBLUR)) 40 | #define GST_IS_SENSORFXBLUR_CLASS(klass) \ 41 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SENSORFXBLUR)) 42 | 43 | typedef struct _GstSensorFxBlur GstSensorFxBlur; 44 | typedef struct _GstSensorFxBlurClass GstSensorFxBlurClass; 45 | 46 | /** 47 | * GstSensorFxBlur: 48 | * @element: the parent element. 49 | * 50 | * 51 | * The opaque GstSensorFxBlur data structure. 52 | */ 53 | struct _GstSensorFxBlur 54 | { 55 | GstVideoFilter element; 56 | 57 | /* format */ 58 | gint width; 59 | gint height; 60 | guint stride; 61 | gint bpp; 62 | gint depth; 63 | gint endianness; 64 | 65 | /* properties */ 66 | 67 | }; 68 | 69 | struct _GstSensorFxBlurClass 70 | { 71 | GstVideoFilterClass parent_class; 72 | }; 73 | 74 | GType gst_sfxblur_get_type(void); 75 | 76 | gboolean gst_sfxblur_plugin_init (GstPlugin * plugin); 77 | 78 | G_END_DECLS 79 | 80 | #endif /* __GST_SENSORFXBLUR_H__ */ 81 | -------------------------------------------------------------------------------- /gst/videoadjust/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstvideoadjust.c 3 | gstvideolevels.c) 4 | 5 | set (HEADERS 6 | gstvideolevels.h) 7 | 8 | include_directories (AFTER 9 | ${PROJECT_SOURCE_DIR}/common 10 | ) 11 | 12 | set (libname gstvideoadjust) 13 | 14 | add_library (${libname} MODULE 15 | ${SOURCES} 16 | ${HEADERS}) 17 | 18 | target_link_libraries (${libname} 19 | ${GLIB2_LIBRARIES} 20 | ${GOBJECT_LIBRARIES} 21 | ${GSTREAMER_LIBRARY} 22 | ${GSTREAMER_BASE_LIBRARY} 23 | ${GSTREAMER_VIDEO_LIBRARY}) 24 | 25 | if (WIN32) 26 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 27 | endif () 28 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 29 | -------------------------------------------------------------------------------- /gst/videoadjust/gstvideoadjust.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #include "gstvideolevels.h" 6 | 7 | #define GST_CAT_DEFAULT gst_nvl_gstvideoadjust_debug 8 | GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); 9 | 10 | 11 | /* Register filters that make up the gstgl plugin */ 12 | static gboolean 13 | plugin_init (GstPlugin * plugin) 14 | { 15 | GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "videoadjust", 0, "videoadjust"); 16 | 17 | GST_DEBUG ("plugin_init"); 18 | 19 | GST_CAT_INFO (GST_CAT_DEFAULT, "registering videolevels element"); 20 | 21 | if (!gst_element_register (plugin, "videolevels", GST_RANK_NONE, 22 | GST_TYPE_VIDEOLEVELS)) { 23 | return FALSE; 24 | } 25 | 26 | return TRUE; 27 | } 28 | 29 | GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 30 | GST_VERSION_MINOR, 31 | videoadjust, 32 | "Filters that apply transform from 16-bit to 8-bit video", 33 | plugin_init, GST_PACKAGE_VERSION, GST_PACKAGE_LICENSE, GST_PACKAGE_NAME, 34 | GST_PACKAGE_ORIGIN); 35 | -------------------------------------------------------------------------------- /gst/videoadjust/gstvideolevels.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * Copyright (C) <2003> David Schleef 4 | * Copyright (C) 2003 Arwed v. Merkatz 5 | * Copyright (C) 2006 Mark Nauwelaerts 6 | * Copyright (C) 2010 United States Government, Joshua M. Doe 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library 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 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | * Boston, MA 02111-1307, USA. 22 | */ 23 | 24 | 25 | #ifndef __GST_VIDEO_LEVELS_H__ 26 | #define __GST_VIDEO_LEVELS_H__ 27 | 28 | #include 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_VIDEOLEVELS \ 34 | (gst_videolevels_get_type()) 35 | #define GST_VIDEOLEVELS(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEOLEVELS,GstVideoLevels)) 37 | #define GST_VIDEOLEVELS_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEOLEVELS,GstVideoLevelsClass)) 39 | #define GST_IS_VIDEOLEVELS(obj) \ 40 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEOLEVELS)) 41 | #define GST_IS_VIDEOLEVELS_CLASS(klass) \ 42 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEOLEVELS)) 43 | 44 | typedef struct _GstVideoLevels GstVideoLevels; 45 | typedef struct _GstVideoLevelsClass GstVideoLevelsClass; 46 | 47 | /** 48 | * GstVideoLevelsAuto: 49 | * @GST_VIDEOLEVELS_AUTO_OFF: don't perform auto adjustment 50 | * @GST_VIDEOLEVELS_AUTO_SINGLE: perform auto adjustment once 51 | * @GST_VIDEOLEVELS_AUTO_CONTINUOUS: perform auto adjustment continuously (defined by "interval" property) 52 | * 53 | * Vertical alignment of the text. 54 | */ 55 | typedef enum { 56 | GST_VIDEOLEVELS_AUTO_OFF, 57 | GST_VIDEOLEVELS_AUTO_SINGLE, 58 | GST_VIDEOLEVELS_AUTO_CONTINUOUS 59 | } GstVideoLevelsAuto; 60 | 61 | /** 62 | * GstVideoLevels: 63 | * @element: the parent element. 64 | * 65 | * 66 | * The opaque GstVideoLevels data structure. 67 | */ 68 | struct _GstVideoLevels 69 | { 70 | GstBaseTransform element; 71 | 72 | /* format */ 73 | gint width; 74 | gint height; 75 | gint bpp_in; 76 | gint bpp_out; 77 | gint endianness_in; 78 | gint stride_in; 79 | gint stride_out; 80 | 81 | /* properties */ 82 | gint lower_input; 83 | gint upper_input; 84 | gint lower_output; 85 | gint upper_output; 86 | gfloat lower_pix_sat; 87 | gfloat upper_pix_sat; 88 | gint roi_x; 89 | gint roi_y; 90 | gint roi_width; 91 | gint roi_height; 92 | 93 | /* tables */ 94 | gpointer lookup_table; 95 | 96 | GstVideoLevelsAuto auto_adjust; 97 | guint64 interval; 98 | gboolean check_roi; 99 | gint nbins; 100 | gint * histogram; 101 | 102 | guint64 last_auto_timestamp; 103 | 104 | gboolean passthrough; 105 | }; 106 | 107 | struct _GstVideoLevelsClass 108 | { 109 | GstBaseTransformClass parent_class; 110 | }; 111 | 112 | GType gst_videolevels_get_type(void); 113 | 114 | G_END_DECLS 115 | 116 | #endif /* __GST_VIDEO_LEVELS_H__ */ 117 | -------------------------------------------------------------------------------- /set_paths_and_run_cmake.bat: -------------------------------------------------------------------------------- 1 | rem ######################################################################## 2 | set GSTREAMER_DIR=C:\gstreamer 3 | set LIBXML2_DIR=%GSTREAMER_DIR% 4 | set LIBICONV_DIR=%GSTREAMER_DIR% 5 | set GLIB2_DIR=%GSTREAMER_DIR% 6 | set NIIMAQ_DIR=C:\Program Files\National Instruments 7 | set EURESYS_DIR=C:\Program Files\Euresys\MultiCam 8 | set OpenCV_DIR=C:\Users\joshua.doe\Apps\opencv 9 | 10 | rem Plugins will be installed under %CMAKE_PREFIX_PATH%\lib\gstreamer-0.10 11 | set CMAKE_PREFIX_PATH=C:\gstreamer 12 | 13 | rem cd mingw32 14 | rem del *ache* && cmake -G "MinGW Makefiles" .. 15 | 16 | rem cd vs9 17 | rem del *ache* && cmake -G "Visual Studio 9 2008" .. 18 | 19 | rem cmd 20 | rem ######################################################################## 21 | 22 | cmake-gui -------------------------------------------------------------------------------- /sys/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (APTINA_FOUND) 2 | add_subdirectory(aptina) 3 | endif (APTINA_FOUND) 4 | 5 | if (BITFLOW_FOUND) 6 | add_subdirectory(bitflow) 7 | endif (BITFLOW_FOUND) 8 | 9 | if (EDT_FOUND) 10 | add_subdirectory(edt) 11 | endif (EDT_FOUND) 12 | 13 | if (EURESYS_FOUND) 14 | add_subdirectory (euresys) 15 | endif (EURESYS_FOUND) 16 | 17 | add_subdirectory (gentl) 18 | 19 | if (IDSUEYE_FOUND) 20 | add_subdirectory (idsueye) 21 | endif (IDSUEYE_FOUND) 22 | 23 | if (KAYA_FOUND) 24 | add_subdirectory (kaya) 25 | endif (KAYA_FOUND) 26 | 27 | if (MATROX_FOUND) 28 | add_subdirectory (matrox) 29 | endif (MATROX_FOUND) 30 | 31 | if (NIIMAQ_FOUND) 32 | add_subdirectory (niimaq) 33 | endif (NIIMAQ_FOUND) 34 | 35 | if (NIIMAQDX_FOUND) 36 | add_subdirectory (niimaqdx) 37 | endif (NIIMAQDX_FOUND) 38 | 39 | if (IMPERX_FLEX_FOUND) 40 | add_subdirectory (imperxflex) 41 | endif () 42 | 43 | if (IMPERX_SDI_FOUND) 44 | add_subdirectory (imperxsdi) 45 | endif () 46 | 47 | if (IOTECHDAQX_FOUND) 48 | add_subdirectory (iotechdaqx) 49 | endif (IOTECHDAQX_FOUND) 50 | 51 | if (PHOENIX_FOUND) 52 | add_subdirectory(phoenix) 53 | endif (PHOENIX_FOUND) 54 | 55 | if (Pleora_FOUND) 56 | add_subdirectory(pleora) 57 | endif (Pleora_FOUND) 58 | 59 | if (PYLON_FOUND) 60 | add_subdirectory(pylon) 61 | endif (PYLON_FOUND) 62 | 63 | if (QCAM_FOUND) 64 | add_subdirectory(qcam) 65 | endif (QCAM_FOUND) 66 | 67 | if (SAPERA_FOUND) 68 | add_subdirectory(sapera) 69 | endif (SAPERA_FOUND) 70 | 71 | if (XCLIB_FOUND) 72 | add_subdirectory(pixci) 73 | endif (XCLIB_FOUND) 74 | -------------------------------------------------------------------------------- /sys/aptina/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DHAVE_ORC=TRUE) 2 | 3 | set (SOURCES 4 | gstaptinasrc.c) 5 | 6 | set (HEADERS 7 | gstaptinasrc.h) 8 | 9 | include_directories (AFTER 10 | ${ORC_INCLUDE_DIR} 11 | ${APTINA_INCLUDE_DIR}) 12 | 13 | set (libname gstaptina) 14 | 15 | add_library (${libname} MODULE 16 | ${SOURCES} 17 | ${HEADERS}) 18 | 19 | target_link_libraries (${libname} 20 | ${ORC_LIBRARIES} 21 | ${GLIB2_LIBRARIES} 22 | ${GOBJECT_LIBRARIES} 23 | ${GSTREAMER_LIBRARY} 24 | ${GSTREAMER_BASE_LIBRARY} 25 | ${GSTREAMER_VIDEO_LIBRARY} 26 | ${APTINA_LIBRARIES}) 27 | 28 | if (WIN32) 29 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 30 | endif () 31 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 32 | -------------------------------------------------------------------------------- /sys/aptina/gstaptinasrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_APTINA_SRC_H_ 21 | #define _GST_APTINA_SRC_H_ 22 | 23 | #include 24 | 25 | #include "apbase.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_TYPE_APTINA_SRC (gst_aptinasrc_get_type()) 30 | #define GST_APTINA_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_APTINA_SRC,GstAptinaSrc)) 31 | #define GST_APTINA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_APTINA_SRC,GstAptinaSrcClass)) 32 | #define GST_IS_APTINA_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_APTINA_SRC)) 33 | #define GST_IS_APTINA_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_APTINA_SRC)) 34 | 35 | typedef struct _GstAptinaSrc GstAptinaSrc; 36 | typedef struct _GstAptinaSrcClass GstAptinaSrcClass; 37 | 38 | struct _GstAptinaSrc 39 | { 40 | GstPushSrc base_aptinasrc; 41 | 42 | AP_HANDLE apbase; 43 | gboolean is_started; 44 | 45 | /* properties */ 46 | gint camera_index; 47 | gchar *config_file; 48 | gchar *config_preset; 49 | gchar *xsdat_file; 50 | 51 | GstClockTime acq_start_time; 52 | guint32 last_frame_count; 53 | guint32 total_dropped_frames; 54 | 55 | GstCaps *caps; 56 | gint raw_framesize; 57 | guint out_framesize; 58 | gboolean convert_to_rgb; 59 | guint8 *buffer; 60 | 61 | gboolean stop_requested; 62 | }; 63 | 64 | struct _GstAptinaSrcClass 65 | { 66 | GstPushSrcClass base_aptinasrc_class; 67 | }; 68 | 69 | GType gst_aptinasrc_get_type (void); 70 | 71 | G_END_DECLS 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /sys/bitflow/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstbitflowsrc.c) 3 | 4 | set (HEADERS 5 | gstbitflowsrc.h) 6 | 7 | include_directories (AFTER 8 | ${BITFLOW_INCLUDE_DIR}) 9 | 10 | set (libname gstbitflow) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${BITFLOW_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /sys/bitflow/gstbitflowsrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_BITFLOW_SRC_H_ 21 | #define _GST_BITFLOW_SRC_H_ 22 | 23 | #include 24 | 25 | #include "BiApi.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_TYPE_BITFLOW_SRC (gst_bitflowsrc_get_type()) 30 | #define GST_BITFLOW_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BITFLOW_SRC,GstBitflowSrc)) 31 | #define GST_BITFLOW_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BITFLOW_SRC,GstBitflowSrcClass)) 32 | #define GST_IS_BITFLOW_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BITFLOW_SRC)) 33 | #define GST_IS_BITFLOW_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BITFLOW_SRC)) 34 | 35 | typedef struct _GstBitflowSrc GstBitflowSrc; 36 | typedef struct _GstBitflowSrcClass GstBitflowSrcClass; 37 | 38 | struct _GstBitflowSrc 39 | { 40 | GstPushSrc base_bitflowsrc; 41 | 42 | /* camera handle */ 43 | Bd board; 44 | BIBA buffer_array; 45 | BFCHAR error_string[MAX_STRING]; 46 | 47 | /* properties */ 48 | gchar *camera_file; 49 | guint num_capture_buffers; 50 | guint board_index; 51 | gint timeout; 52 | 53 | GstClockTime acq_start_time; 54 | guint32 last_frame_count; 55 | guint32 total_dropped_frames; 56 | 57 | GstCaps *caps; 58 | gint height; 59 | gint gst_stride; 60 | gint bf_stride; 61 | 62 | gboolean stop_requested; 63 | }; 64 | 65 | struct _GstBitflowSrcClass 66 | { 67 | GstPushSrcClass base_bitflowsrc_class; 68 | }; 69 | 70 | GType gst_bitflowsrc_get_type (void); 71 | 72 | G_END_DECLS 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /sys/edt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstedt.c 3 | gstedtpdvsink.c 4 | gstedtpdvsrc.c) 5 | 6 | set (HEADERS 7 | gstedtpdvsink.h 8 | gstedtpdvsrc.h) 9 | 10 | include_directories (AFTER 11 | ${EDT_INCLUDE_DIR}) 12 | 13 | set (libname gstedt) 14 | 15 | add_library (${libname} MODULE 16 | ${SOURCES} 17 | ${HEADERS}) 18 | 19 | target_link_libraries (${libname} 20 | ${GLIB2_LIBRARIES} 21 | ${GOBJECT_LIBRARIES} 22 | ${GSTREAMER_LIBRARY} 23 | ${GSTREAMER_BASE_LIBRARY} 24 | ${GSTREAMER_VIDEO_LIBRARY} 25 | ${EDT_LIBRARIES}) 26 | 27 | if (WIN32) 28 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 29 | endif () 30 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 31 | -------------------------------------------------------------------------------- /sys/edt/gstedt.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #include "gstedtpdvsink.h" 6 | #include "gstedtpdvsrc.h" 7 | 8 | #define GST_CAT_DEFAULT gst_gstedt_debug 9 | GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); 10 | 11 | static gboolean 12 | plugin_init (GstPlugin * plugin) 13 | { 14 | GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "edt", 0, 15 | "debug category for EDT elements"); 16 | 17 | if (!gst_element_register (plugin, "edtpdvsink", GST_RANK_NONE, 18 | GST_TYPE_EDT_PDV_SINK)) { 19 | return FALSE; 20 | } 21 | 22 | if (!gst_element_register (plugin, "edtpdvsrc", GST_RANK_NONE, 23 | GST_TYPE_EDT_PDV_SRC)) { 24 | return FALSE; 25 | } 26 | 27 | return TRUE; 28 | } 29 | 30 | GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 31 | GST_VERSION_MINOR, 32 | edt, 33 | "EDT PDV elements", 34 | plugin_init, GST_PACKAGE_VERSION, GST_PACKAGE_LICENSE, GST_PACKAGE_NAME, 35 | GST_PACKAGE_ORIGIN) 36 | -------------------------------------------------------------------------------- /sys/edt/gstedtpdvsink.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_EDT_PDV_SINK_H_ 21 | #define _GST_EDT_PDV_SINK_H_ 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GST_TYPE_EDT_PDV_SINK (gst_edt_pdv_sink_get_type()) 29 | #define GST_EDT_PDV_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EDT_PDV_SINK,GstEdtPdvSink)) 30 | #define GST_EDT_PDV_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_EDT_PDV_SINK,GstEdtPdvSinkClass)) 31 | #define GST_IS_EDT_PDV_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EDT_PDV_SINK)) 32 | #define GST_IS_EDT_PDV_SINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_EDT_PDV_SINK)) 33 | 34 | typedef struct _GstEdtPdvSink GstEdtPdvSink; 35 | typedef struct _GstEdtPdvSinkClass GstEdtPdvSinkClass; 36 | 37 | struct _GstEdtPdvSink 38 | { 39 | GstBaseSink base; 40 | 41 | PdvDev *dev; 42 | int unit; 43 | int channel; 44 | 45 | unsigned char **buffers; 46 | int n_buffers; 47 | int cur_buffer; 48 | }; 49 | 50 | struct _GstEdtPdvSinkClass 51 | { 52 | GstBaseSinkClass base_class; 53 | }; 54 | 55 | GType gst_edt_pdv_sink_get_type (void); 56 | 57 | G_END_DECLS 58 | 59 | #endif /* _GST_EDT_PDV_SINK_H_ */ -------------------------------------------------------------------------------- /sys/edt/gstedtpdvsrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_EDT_PDV_SRC_H_ 21 | #define _GST_EDT_PDV_SRC_H_ 22 | 23 | #include 24 | 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_TYPE_EDT_PDV_SRC (gst_edt_pdv_src_get_type()) 30 | #define GST_EDT_PDV_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EDT_PDV_SRC,GstEdtPdvSrc)) 31 | #define GST_EDT_PDV_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_EDT_PDV_SRC,GstEdtPdvSrcClass)) 32 | #define GST_IS_EDT_PDV_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EDT_PDV_SRC)) 33 | #define GST_IS_EDT_PDV_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_EDT_PDV_SRC)) 34 | 35 | typedef struct _GstEdtPdvSrc GstEdtPdvSrc; 36 | typedef struct _GstEdtPdvSrcClass GstEdtPdvSrcClass; 37 | 38 | /** 39 | * GstEdtPdvSrcConnector: 40 | * @MC_Connector_VID<1..16>: channel is linked to camera at the VID<1..16> input 41 | * @MC_Connector_YC: channel is linked to a camera at the YC input 42 | * 43 | * 44 | * Identifies the connector that the camera is connected to. 45 | */ 46 | typedef enum { 47 | 48 | } GstEdtPdvSrcConnector; 49 | 50 | struct _GstEdtPdvSrc 51 | { 52 | GstPushSrc base_edt_pdv_src; 53 | 54 | /* properties */ 55 | guint unit; 56 | guint channel; 57 | gchar *config_file_path; 58 | guint num_ring_buffers; 59 | 60 | PdvDev *dev; 61 | gboolean acq_started; 62 | 63 | gint total_timeouts; 64 | 65 | gint height; 66 | gint gst_stride; 67 | gint edt_stride; 68 | }; 69 | 70 | struct _GstEdtPdvSrcClass 71 | { 72 | GstPushSrcClass base_edt_pdv_src_class; 73 | }; 74 | 75 | GType gst_edt_pdv_src_get_type (void); 76 | 77 | G_END_DECLS 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /sys/euresys/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gsteuresyssrc.c) 3 | 4 | set (HEADERS 5 | gsteuresyssrc.h) 6 | 7 | include_directories (AFTER 8 | ${EURESYS_INCLUDE_DIR}) 9 | 10 | set (libname gsteuresys) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${EURESYS_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /sys/euresys/gsteuresyssrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_EURESYS_H_ 21 | #define _GST_EURESYS_H_ 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GST_TYPE_EURESYS (gst_euresys_get_type()) 29 | #define GST_EURESYS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EURESYS,GstEuresys)) 30 | #define GST_EURESYS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_EURESYS,GstEuresysClass)) 31 | #define GST_IS_EURESYS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EURESYS)) 32 | #define GST_IS_EURESYS_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_EURESYS)) 33 | 34 | typedef struct _GstEuresys GstEuresys; 35 | typedef struct _GstEuresysClass GstEuresysClass; 36 | 37 | /** 38 | * GstEuresysConnector: 39 | * @MC_Connector_VID<1..16>: channel is linked to camera at the VID<1..16> input 40 | * @MC_Connector_YC: channel is linked to a camera at the YC input 41 | * 42 | * 43 | * Identifies the connector that the camera is connected to. 44 | */ 45 | typedef enum { 46 | GST_EURESYS_CONNECTOR_VID1, 47 | GST_EURESYS_CONNECTOR_VID2, 48 | GST_EURESYS_CONNECTOR_VID3, 49 | GST_EURESYS_CONNECTOR_VID4 50 | } GstEuresysConnectorEnum; 51 | 52 | typedef enum { 53 | GST_EURESYS_COLOR_FORMAT_Y8, 54 | GST_EURESYS_COLOR_FORMAT_RGB24, 55 | GST_EURESYS_COLOR_FORMAT_RGB32, 56 | GST_EURESYS_COLOR_FORMAT_ARGB32 57 | } GstEuresysColorFormatEnum; 58 | 59 | typedef enum { 60 | GST_EURESYS_CAMERA_EIA, 61 | GST_EURESYS_CAMERA_NTSC, 62 | GST_EURESYS_CAMERA_CCIR, 63 | GST_EURESYS_CAMERA_PAL 64 | } GstEuresysCameraEnum; 65 | 66 | typedef enum { 67 | GST_EURESYS_PIXEL_TIMING_SQUARE, 68 | GST_EURESYS_PIXEL_TIMING_BROADCAST 69 | } GstEuresysPixelTimingEnum; 70 | 71 | struct _GstEuresys 72 | { 73 | GstPushSrc base_euresys; 74 | 75 | gint dropped_frame_count; 76 | gboolean acq_started; 77 | 78 | INT32 last_time_code; 79 | MCHANDLE hChannel; 80 | INT32 boardType; 81 | 82 | /* properties */ 83 | INT32 boardIdx; 84 | GstEuresysCameraEnum cameraType; 85 | GstEuresysConnectorEnum connector; 86 | GstEuresysColorFormatEnum colorFormat; 87 | GstEuresysPixelTimingEnum pixelTiming; 88 | gint num_capture_buffers; 89 | }; 90 | 91 | struct _GstEuresysClass 92 | { 93 | GstPushSrcClass base_euresys_class; 94 | }; 95 | 96 | GType gst_euresys_get_type (void); 97 | 98 | G_END_DECLS 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /sys/gentl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstgentlsrc.c 3 | ioapi.c 4 | unzip.c) 5 | 6 | set (HEADERS 7 | gstgentlsrc.h) 8 | 9 | include_directories (AFTER 10 | ${GSTREAMER_INCLUDE_DIR}/.. 11 | ${PROJECT_SOURCE_DIR}/common 12 | ) 13 | 14 | set (libname gstgentl) 15 | 16 | add_library (${libname} MODULE 17 | ${SOURCES} 18 | ${HEADERS}) 19 | 20 | target_link_libraries (${libname} 21 | ${GLIB2_LIBRARIES} 22 | ${GOBJECT_LIBRARIES} 23 | ${GSTREAMER_LIBRARY} 24 | ${GSTREAMER_BASE_LIBRARY} 25 | ${GSTREAMER_VIDEO_LIBRARY} 26 | ${ZLIB_LIBRARIES} 27 | ) 28 | 29 | if (WIN32) 30 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 31 | endif () 32 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 33 | -------------------------------------------------------------------------------- /sys/gentl/gstgentlsrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_GENTL_SRC_H_ 21 | #define _GST_GENTL_SRC_H_ 22 | 23 | #include 24 | 25 | #undef __cplusplus 26 | #include "GenTL_v1_5.h" 27 | 28 | #define MAX_ERROR_STRING_LEN 256 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define GST_TYPE_GENTL_SRC (gst_gentlsrc_get_type()) 33 | #define GST_GENTL_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GENTL_SRC,GstGenTlSrc)) 34 | #define GST_GENTL_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GENTL_SRC,GstGenTlSrcClass)) 35 | #define GST_IS_GENTL_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GENTL_SRC)) 36 | #define GST_IS_GENTL_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GENTL_SRC)) 37 | #define GST_GENTL_SRC_GET_CLASS(klass) \ 38 | (G_TYPE_INSTANCE_GET_CLASS ((klass), GST_TYPE_GENTL_SRC, GstGenTlSrcClass)) 39 | 40 | typedef struct _GstGenTlSrc GstGenTlSrc; 41 | typedef struct _GstGenTlSrcClass GstGenTlSrcClass; 42 | 43 | typedef struct _GstGenTlProducer GstGenTlProducer; 44 | struct _GstGenTlProducer 45 | { 46 | gchar* cti_path; 47 | guint32 acquisition_mode_value; 48 | guint32 timestamp_control_latch_value; 49 | 50 | guint64 width; 51 | guint64 height; 52 | guint64 pixel_format; 53 | guint64 payload_size; 54 | guint64 acquisition_mode; 55 | guint64 acquisition_start; 56 | guint64 acquisition_stop; 57 | guint64 tick_frequency_low; 58 | guint64 tick_frequency_high; 59 | guint64 timestamp_control_latch; // GevTimestampControlLatch 60 | guint64 timestamp; // TimestampLatchValue 61 | guint64 timestamp_low; // GevTimestampValueLow 62 | guint64 timestamp_high; // GevTimestampValueHigh 63 | guint16 port_endianness; 64 | }; 65 | 66 | 67 | /** 68 | * GstGenTlSrcProducer: 69 | * @GST_GENTLSRC_PRODUCER_BASLER: Basler producer 70 | * @GST_GENTLSRC_PRODUCER_EVT: EVT producer 71 | * 72 | * Producer to use. 73 | */ 74 | typedef enum { 75 | GST_GENTLSRC_PRODUCER_BASLER, 76 | GST_GENTLSRC_PRODUCER_EVT, 77 | GST_GENTLSRC_PRODUCER_FLIR, 78 | } GstGenTlSrcProducer; 79 | 80 | 81 | struct _GstGenTlSrc 82 | { 83 | GstPushSrc base_gentlsrc; 84 | 85 | /* camera handle */ 86 | TL_HANDLE hTL; 87 | IF_HANDLE hIF; 88 | DEV_HANDLE hDEV; 89 | DS_HANDLE hDS; 90 | PORT_HANDLE hDevPort; 91 | EVENT_HANDLE hNewBufferEvent; 92 | char error_string[MAX_ERROR_STRING_LEN]; 93 | GstGenTlProducer producer; 94 | 95 | /* properties */ 96 | GstGenTlSrcProducer producer_prop; 97 | guint interface_index; 98 | gchar *interface_id; 99 | guint device_index; 100 | gchar *device_id; 101 | gchar *device_user_id; 102 | guint stream_index; 103 | gchar *stream_id; 104 | guint num_capture_buffers; 105 | gint timeout; 106 | gchar* attributes; 107 | 108 | GstClockTime acq_start_time; 109 | guint32 last_frame_count; 110 | guint32 total_dropped_frames; 111 | 112 | guint64 tick_frequency; 113 | guint64 unix_latched_ns; 114 | guint64 gentl_latched_ns; 115 | 116 | GstCaps *caps; 117 | gint height; 118 | gint gst_stride; 119 | 120 | gboolean stop_requested; 121 | }; 122 | 123 | struct _GstGenTlSrcClass 124 | { 125 | GstPushSrcClass base_gentlsrc_class; 126 | TL_HANDLE hTL; 127 | GMutex tl_mutex; 128 | guint tl_refcount; 129 | }; 130 | 131 | GType gst_gentlsrc_get_type (void); 132 | 133 | G_END_DECLS 134 | 135 | #endif 136 | -------------------------------------------------------------------------------- /sys/idsueye/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstidsueyesrc.c) 3 | 4 | set (HEADERS 5 | gstidsueyesrc.h) 6 | 7 | include_directories (AFTER 8 | ${IDSUEYE_INCLUDE_DIR}) 9 | 10 | set (libname gstidsueye) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${IDSUEYE_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /sys/idsueye/gstidsueyesrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_IDSUEYE_SRC_H_ 21 | #define _GST_IDSUEYE_SRC_H_ 22 | 23 | #include 24 | 25 | #define _PURE_C 26 | #include "ueye.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define GST_TYPE_IDSUEYE_SRC (gst_idsueyesrc_get_type()) 31 | #define GST_IDSUEYE_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_IDSUEYE_SRC,GstIdsueyeSrc)) 32 | #define GST_IDSUEYE_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_IDSUEYE_SRC,GstIdsueyeSrcClass)) 33 | #define GST_IS_IDSUEYE_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IDSUEYE_SRC)) 34 | #define GST_IS_IDSUEYE_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IDSUEYE_SRC)) 35 | 36 | typedef struct _GstIdsueyeSrc GstIdsueyeSrc; 37 | typedef struct _GstIdsueyeSrcClass GstIdsueyeSrcClass; 38 | 39 | #define MAX_SEQ_BUFFERS 4096 40 | 41 | struct _GstIdsueyeSrc 42 | { 43 | GstPushSrc base_idsueyesrc; 44 | 45 | /* camera handle */ 46 | HIDS hCam; 47 | gboolean is_started; 48 | 49 | char* seqImgMem[MAX_SEQ_BUFFERS]; 50 | int seqMemId[MAX_SEQ_BUFFERS]; 51 | 52 | /* properties */ 53 | gint camera_id; 54 | gchar *config_file; 55 | gint num_capture_buffers; 56 | gint timeout; 57 | gdouble exposure; 58 | gdouble framerate; 59 | 60 | GstClockTime acq_start_time; 61 | guint32 last_frame_count; 62 | guint32 total_dropped_frames; 63 | 64 | GstCaps *caps; 65 | gint width; 66 | gint height; 67 | gint bitsPerPixel; 68 | 69 | gboolean stop_requested; 70 | }; 71 | 72 | struct _GstIdsueyeSrcClass 73 | { 74 | GstPushSrcClass base_idsueyesrc_class; 75 | }; 76 | 77 | GType gst_idsueyesrc_get_type (void); 78 | 79 | G_END_DECLS 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /sys/imperxflex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstframelinksrc.c) 3 | 4 | set (HEADERS 5 | gstframelinksrc.h) 6 | 7 | include_directories (AFTER 8 | ${IMPERX_FLEX_INCLUDE_DIR}) 9 | 10 | set (libname gstimperxflex) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${IMPERX_FLEX_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /sys/imperxflex/gstframelinksrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_FRAMELINK_SRC_H_ 21 | #define _GST_FRAMELINK_SRC_H_ 22 | 23 | #include 24 | 25 | #define WIN32_LEAN_AND_MEAN 26 | #include 27 | 28 | #define bool gboolean 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_FRAMELINK_SRC (gst_framelinksrc_get_type()) 34 | #define GST_FRAMELINK_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FRAMELINK_SRC,GstFramelinkSrc)) 35 | #define GST_FRAMELINK_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FRAMELINK_SRC,GstFramelinkSrcClass)) 36 | #define GST_IS_FRAMELINK_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FRAMELINK_SRC)) 37 | #define GST_IS_FRAMELINK_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FRAMELINK_SRC)) 38 | 39 | typedef struct _GstFramelinkSrc GstFramelinkSrc; 40 | typedef struct _GstFramelinkSrcClass GstFramelinkSrcClass; 41 | 42 | struct _GstFramelinkSrc 43 | { 44 | GstPushSrc base_framelinksrc; 45 | 46 | gboolean acq_started; 47 | 48 | /* camera handle */ 49 | HANDLE grabber; 50 | 51 | /* properties */ 52 | gchar *format_file; 53 | guint num_capture_buffers; 54 | guint board; 55 | guint channel; 56 | gint timeout; 57 | 58 | GstBuffer *buffer; 59 | GstClockTime acq_start_time; 60 | 61 | GstCaps *caps; 62 | gint height; 63 | gint gst_stride; 64 | VCECLB_RawPixelInfoEx pixInfo; 65 | 66 | GMutex mutex; 67 | GCond cond; 68 | gboolean stop_requested; 69 | }; 70 | 71 | struct _GstFramelinkSrcClass 72 | { 73 | GstPushSrcClass base_framelinksrc_class; 74 | }; 75 | 76 | GType gst_framelinksrc_get_type (void); 77 | 78 | G_END_DECLS 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /sys/imperxsdi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstimperxsdisrc.cpp) 3 | 4 | set (HEADERS 5 | gstimperxsdisrc.h) 6 | 7 | include_directories (AFTER 8 | ${IMPERX_SDI_INCLUDE_DIR}) 9 | 10 | set (libname gstimperxsdi) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${IMPERX_SDI_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /sys/imperxsdi/gstimperxsdisrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_IMPERX_SDI_SRC_H_ 21 | #define _GST_IMPERX_SDI_SRC_H_ 22 | 23 | #include 24 | 25 | #define WIN32_LEAN_AND_MEAN 26 | #include 27 | 28 | #define bool gboolean 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_IMPERX_SDI_SRC (gst_imperxsdisrc_get_type()) 34 | #define GST_IMPERX_SDI_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_IMPERX_SDI_SRC,GstImperxSdiSrc)) 35 | #define GST_IMPERX_SDI_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_IMPERX_SDI_SRC,GstImperxSdiSrcClass)) 36 | #define GST_IS_IMPERX_SDI_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IMPERX_SDI_SRC)) 37 | #define GST_IS_IMPERX_SDI_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IMPERX_SDI_SRC)) 38 | 39 | typedef struct _GstImperxSdiSrc GstImperxSdiSrc; 40 | typedef struct _GstImperxSdiSrcClass GstImperxSdiSrcClass; 41 | 42 | struct _GstImperxSdiSrc 43 | { 44 | GstPushSrc base_imperxsdisrc; 45 | 46 | gboolean acq_started; 47 | 48 | /* camera handle */ 49 | VCESDI_GRABBER grabber; 50 | VCESDI_CameraData camera_data; 51 | 52 | /* properties */ 53 | guint num_capture_buffers; 54 | guint board; 55 | gint timeout; 56 | 57 | GstBuffer *buffer; 58 | GstClockTime acq_start_time; 59 | 60 | GstCaps *caps; 61 | GstVideoFormat format; 62 | gint width; 63 | gint height; 64 | gfloat framerate; 65 | gboolean is_interlaced; 66 | gint gst_stride; 67 | gint imperx_stride; 68 | 69 | GMutex mutex; 70 | GCond cond; 71 | gboolean stop_requested; 72 | }; 73 | 74 | struct _GstImperxSdiSrcClass 75 | { 76 | GstPushSrcClass base_imperxsdisrc_class; 77 | }; 78 | 79 | GType gst_imperxsdisrc_get_type (void); 80 | 81 | G_END_DECLS 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /sys/iotechdaqx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DHAVE_CONFIG_H) 2 | 3 | set ( SOURCES 4 | gstiotechdaqx.c ) 5 | 6 | set ( HEADERS 7 | gstiotechdaqx.h ) 8 | 9 | include_directories ( AFTER 10 | . 11 | ${WAVEBOOK_INCLUDE_DIR} ) 12 | 13 | add_library ( libgstiotechdaqx MODULE 14 | ${SOURCES} 15 | ${HEADERS} ) 16 | 17 | target_link_libraries ( libgstiotechdaqx 18 | ${GLIB2_LIBRARIES} 19 | ${GSTREAMER_LIBRARIES} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_INTERFACE_LIBRARY} 22 | ${GSTREAMER_VIDEO_LIBRARY} 23 | ${IOTECHDAQX_LIBRARIES}) 24 | 25 | install (TARGETS libgstiotechdaqx 26 | LIBRARY DESTINATION lib/gstreamer-0.10) -------------------------------------------------------------------------------- /sys/iotechdaqx/gstiotechdaqx.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_IOTECHDAQX_H_ 21 | #define _GST_IOTECHDAQX_H_ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_TYPE_IOTECHDAQX (gst_iotechdaqx_get_type()) 30 | #define GST_IOTECHDAQX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_IOTECHDAQX,GstIOtechDaqX)) 31 | #define GST_IOTECHDAQX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_IOTECHDAQX,GstIOtechDaqXClass)) 32 | #define GST_IS_IOTECHDAQX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IOTECHDAQX)) 33 | #define GST_IS_IOTECHDAQX_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IOTECHDAQX)) 34 | 35 | typedef struct _GstIOtechDaqX GstIOtechDaqX; 36 | typedef struct _GstIOtechDaqXClass GstIOtechDaqXClass; 37 | 38 | struct _GstIOtechDaqX 39 | { 40 | GstPushSrc base_iotechdaqx; 41 | 42 | GstPad *srcpad; 43 | 44 | GstCaps *caps; 45 | gint rate; 46 | gint channels; 47 | gint endianness; 48 | gint width; 49 | gint depth; 50 | gboolean is_signed; 51 | 52 | gboolean opened; 53 | 54 | DaqHandleT handle; 55 | }; 56 | 57 | struct _GstIOtechDaqXClass 58 | { 59 | GstPushSrcClass base_iotechdaqx_class; 60 | }; 61 | 62 | GType gst_iotechdaqx_get_type (void); 63 | 64 | G_END_DECLS 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /sys/kaya/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstkayaplugin.c 3 | gstkayasink.c 4 | gstkayasrc.c 5 | ) 6 | 7 | set (HEADERS 8 | gstkayasink.h 9 | gstkayasrc.h) 10 | 11 | include_directories (AFTER 12 | ${GSTREAMER_INCLUDE_DIR}/.. 13 | ${KAYA_INCLUDE_DIR} 14 | ${PROJECT_SOURCE_DIR}/common 15 | ) 16 | 17 | set (libname gstkaya) 18 | 19 | add_library (${libname} MODULE 20 | ${SOURCES} 21 | ${HEADERS}) 22 | 23 | target_link_libraries (${libname} 24 | ${GLIB2_LIBRARIES} 25 | ${GOBJECT_LIBRARIES} 26 | ${GSTREAMER_LIBRARY} 27 | ${GSTREAMER_BASE_LIBRARY} 28 | ${GSTREAMER_VIDEO_LIBRARY} 29 | ${KAYA_LIBRARIES} 30 | ) 31 | 32 | if (WIN32) 33 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 34 | endif () 35 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 36 | -------------------------------------------------------------------------------- /sys/kaya/gstkayaplugin.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "gstkayasink.h" 4 | #include "gstkayasrc.h" 5 | 6 | GST_DEBUG_CATEGORY_STATIC (kayaplugin_debug); 7 | #define GST_CAT_DEFAULT kayaplugin_debug 8 | 9 | static gboolean 10 | plugin_init (GstPlugin * plugin) 11 | { 12 | GST_DEBUG_CATEGORY_INIT (kayaplugin_debug, "kaya", 0, 13 | "debug category for kaya plugin"); 14 | 15 | if (!gst_element_register (plugin, "kayasink", GST_RANK_NONE, 16 | gst_kayasink_get_type ())) 17 | return FALSE; 18 | 19 | if (!gst_element_register (plugin, "kayasrc", GST_RANK_NONE, 20 | gst_kayasrc_get_type ())) 21 | return FALSE; 22 | 23 | return TRUE; 24 | } 25 | 26 | GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 27 | GST_VERSION_MINOR, 28 | kaya, 29 | "Kaya plugin", 30 | plugin_init, GST_PACKAGE_VERSION, GST_PACKAGE_LICENSE, GST_PACKAGE_NAME, 31 | GST_PACKAGE_ORIGIN); 32 | -------------------------------------------------------------------------------- /sys/kaya/gstkayasink.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_KAYA_SINK_H_ 21 | #define _GST_KAYA_SINK_H_ 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | 28 | #define KAYA_SINK_MAX_FG_HANDLES 16 29 | #define KAYA_SINK_MAX_CAM_HANDLES 4 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_KAYASINK (gst_kayasink_get_type()) 34 | #define GST_KAYASINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KAYASINK,GstKayaSink)) 35 | #define GST_KAYASINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KAYASINK,GstKayaSinkClass)) 36 | #define GST_IS_KAYASINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KAYASINK)) 37 | #define GST_IS_KAYASINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KAYASINK)) 38 | #define GST_KAYA_SINK_GET_CLASS(klass) \ 39 | (G_TYPE_INSTANCE_GET_CLASS ((klass), GST_TYPE_KAYA_SINK, GstKayaSinkClass)) 40 | 41 | typedef struct _GstKayaSink GstKayaSink; 42 | typedef struct _GstKayaSinkClass GstKayaSinkClass; 43 | 44 | typedef struct _GstKayaSinkFramegrabber GstKayaSinkFramegrabber; 45 | 46 | struct _GstKayaSink 47 | { 48 | GstBaseSink base; 49 | 50 | GstKayaSinkFramegrabber* fg_data; 51 | CAMHANDLE cam_handle; 52 | STREAM_HANDLE stream_handle; 53 | STREAM_BUFFER_HANDLE* buffer_handles; 54 | 55 | /* properties */ 56 | guint interface_index; 57 | guint device_index; 58 | guint num_render_buffers; 59 | gint timeout; 60 | gchar* project_file; 61 | gchar* xml_file; 62 | gboolean wait_for_receiver; 63 | gint wait_timeout; 64 | 65 | gboolean receiver_connected; 66 | GstVideoInfo vinfo; 67 | 68 | GAsyncQueue* queue; 69 | 70 | GMutex mutex; 71 | GCond cond; 72 | gboolean acquisition_started; 73 | gboolean stop_requested; 74 | }; 75 | 76 | struct _GstKayaSinkFramegrabber 77 | { 78 | FGHANDLE fg_handle; 79 | guint32 ref_count; 80 | CAMHANDLE cam_handles[KAYA_SINK_MAX_CAM_HANDLES]; 81 | int num_cams; 82 | GMutex fg_mutex; 83 | }; 84 | 85 | struct _GstKayaSinkClass 86 | { 87 | GstBaseSinkClass base_class; 88 | 89 | GstKayaSinkFramegrabber fg_data[KAYA_SINK_MAX_FG_HANDLES]; 90 | }; 91 | 92 | GType gst_kayasink_get_type (void); 93 | 94 | G_END_DECLS 95 | 96 | #endif /* _GST_KAYA_SINK_H_ */ -------------------------------------------------------------------------------- /sys/kaya/gstkayasrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (c) 2018 outside US, United States Government, Joshua M. Doe 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_KAYA_SRC_H_ 21 | #define _GST_KAYA_SRC_H_ 22 | 23 | #include 24 | 25 | #include 26 | 27 | #define KAYA_SRC_MAX_FG_HANDLES 16 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define GST_TYPE_KAYA_SRC (gst_kayasrc_get_type()) 32 | #define GST_KAYA_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KAYA_SRC,GstKayaSrc)) 33 | #define GST_KAYA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KAYA_SRC,GstKayaSrcClass)) 34 | #define GST_IS_KAYA_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KAYA_SRC)) 35 | #define GST_IS_KAYA_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KAYA_SRC)) 36 | #define GST_KAYA_SRC_GET_CLASS(klass) \ 37 | (G_TYPE_INSTANCE_GET_CLASS ((klass), GST_TYPE_KAYA_SRC, GstKayaSrcClass)) 38 | 39 | typedef struct _GstKayaSrc GstKayaSrc; 40 | typedef struct _GstKayaSrcClass GstKayaSrcClass; 41 | 42 | typedef struct _GstKayaSrcFramegrabber GstKayaSrcFramegrabber; 43 | 44 | struct _GstKayaSrc 45 | { 46 | GstPushSrc base_kayasrc; 47 | 48 | /* handles */ 49 | GstKayaSrcFramegrabber *fg_data; 50 | CAMHANDLE cam_handle; 51 | STREAM_HANDLE stream_handle; 52 | STREAM_BUFFER_HANDLE *buffer_handles; 53 | size_t frame_size; 54 | 55 | /* properties */ 56 | guint interface_index; 57 | guint device_index; 58 | guint num_capture_buffers; 59 | gint timeout; 60 | gchar *project_file; 61 | gchar *xml_file; 62 | gfloat exposure_time; 63 | gchar *execute_command; 64 | 65 | gboolean acquisition_started; 66 | guint64 frame_count; 67 | gboolean stop_requested; 68 | gint64 dropped_frames; 69 | 70 | GstCaps *caps; 71 | GAsyncQueue *queue; 72 | 73 | GstClockTime unix_base; 74 | GstClockTime kaya_base; 75 | }; 76 | 77 | struct _GstKayaSrcFramegrabber 78 | { 79 | FGHANDLE fg_handle; 80 | guint32 ref_count; 81 | CAMHANDLE cam_handles[4]; 82 | int num_cams; 83 | GMutex fg_mutex; 84 | }; 85 | 86 | struct _GstKayaSrcClass 87 | { 88 | GstPushSrcClass base_kayasrc_class; 89 | 90 | GstKayaSrcFramegrabber fg_data[KAYA_SRC_MAX_FG_HANDLES]; 91 | }; 92 | 93 | GType gst_kayasrc_get_type (void); 94 | 95 | G_END_DECLS 96 | 97 | #endif 98 | -------------------------------------------------------------------------------- /sys/matrox/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstmatroxsrc.c) 3 | 4 | set (HEADERS 5 | gstmatroxsrc.h) 6 | 7 | include_directories (AFTER 8 | ${MATROX_INCLUDE_DIR}) 9 | 10 | set (libname gstmatrox) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${MATROX_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /sys/matrox/gstmatroxsrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2017 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_MATROX_SRC_H_ 21 | #define _GST_MATROX_SRC_H_ 22 | 23 | #include 24 | 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_TYPE_MATROX_SRC (gst_matroxsrc_get_type()) 30 | #define GST_MATROX_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MATROX_SRC,GstMatroxSrc)) 31 | #define GST_MATROX_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MATROX_SRC,GstMatroxSrcClass)) 32 | #define GST_IS_MATROX_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MATROX_SRC)) 33 | #define GST_IS_MATROX_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MATROX_SRC)) 34 | 35 | typedef struct _GstMatroxSrc GstMatroxSrc; 36 | typedef struct _GstMatroxSrcClass GstMatroxSrcClass; 37 | 38 | typedef enum { 39 | GST_MATROX_BAYER_MODE_BAYER, 40 | GST_MATROX_BAYER_MODE_GRAY, 41 | GST_MATROX_BAYER_MODE_RGB 42 | } GstMatroxBayerModeEnum; 43 | 44 | struct _GstMatroxSrc 45 | { 46 | GstPushSrc base_matroxsrc; 47 | 48 | gboolean acq_started; 49 | 50 | /* MIL handles */ 51 | MIL_ID MilApplication; 52 | MIL_ID MilSystem; 53 | MIL_ID MilDigitizer; 54 | MIL_ID *MilGrabBufferList; 55 | 56 | /* properties */ 57 | gint system; 58 | gint board; 59 | gint channel; 60 | gchar *config_file; 61 | guint num_capture_buffers; 62 | gint timeout; 63 | GstMatroxBayerModeEnum bayer_mode; 64 | 65 | GstBuffer *buffer; 66 | GstClockTime acq_start_time; 67 | 68 | GstCaps *caps; 69 | gint height; 70 | gint gst_stride; 71 | MIL_INT mil_type; 72 | GstVideoFormat video_format; 73 | 74 | GMutex mutex; 75 | GCond cond; 76 | gboolean stop_requested; 77 | }; 78 | 79 | struct _GstMatroxSrcClass 80 | { 81 | GstPushSrcClass base_matroxsrc_class; 82 | }; 83 | 84 | GType gst_matroxsrc_get_type (void); 85 | 86 | G_END_DECLS 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /sys/niimaq/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstniimaq.c) 3 | 4 | set (HEADERS 5 | gstniimaq.h) 6 | 7 | include_directories (AFTER 8 | ${NIIMAQ_INCLUDE_DIR}) 9 | 10 | set (libname gstniimaq) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${NIIMAQ_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /sys/niimaq/gstniimaq.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <2006> Eric Jonas 3 | * Copyright (C) <2006> Antoine Tremblay 4 | * Copyright (C) 2010 United States Government, Joshua M. Doe 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library 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 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef __GST_NIIMAQSRC_H__ 23 | #define __GST_NIIMAQSRC_H__ 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_NIIMAQSRC \ 34 | (gst_niimaqsrc_get_type()) 35 | #define GST_NIIMAQSRC(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NIIMAQSRC,GstNiImaqSrc)) 37 | #define GST_NIIMAQSRC_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NIIMAQSRC,GstNiImaqSrcClass)) 39 | #define GST_IS_NIIMAQSRC(obj) \ 40 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NIIMAQSRC)) 41 | #define GST_IS_NIIMAQSRC_CLASS(obj) \ 42 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NIIMAQSRC)) 43 | #define GST_NIIMAQSRC_GET_CLASS(klass) \ 44 | (G_TYPE_INSTANCE_GET_CLASS ((klass), GST_TYPE_NIIMAQSRC, GstNiImaqSrcClass)) 45 | 46 | typedef struct _GstNiImaqSrc GstNiImaqSrc; 47 | typedef struct _GstNiImaqSrcClass GstNiImaqSrcClass; 48 | 49 | struct _GstNiImaqSrc { 50 | GstPushSrc element; 51 | 52 | /* properties */ 53 | gchar *interface_name; 54 | gint bufsize; 55 | gboolean is_signed; 56 | guint32 timeout; 57 | 58 | /* image info */ 59 | GstVideoFormat format; 60 | int width; 61 | int height; 62 | gint framesize; 63 | int rowpixels; 64 | 65 | guint64 imaqFrameStartNum; 66 | uInt32 cumbufnum; 67 | gint64 n_dropped_frames; 68 | 69 | guint32** buflist; 70 | INTERFACE_ID iid; 71 | SESSION_ID sid; 72 | 73 | gboolean session_started; 74 | 75 | GAsyncQueue *time_queue; 76 | 77 | GstClock *clock; 78 | GstClockTime stream_base; 79 | GstClockTime unix_base; 80 | }; 81 | 82 | struct _GstNiImaqSrcClass { 83 | GstPushSrcClass parent_class; 84 | 85 | /* probed interfaces */ 86 | GList *interfaces; 87 | }; 88 | 89 | GType gst_niimaqsrc_get_type (void); 90 | 91 | G_END_DECLS 92 | 93 | #endif /* __GST_NIIMAQSRC_H__ */ 94 | -------------------------------------------------------------------------------- /sys/niimaqdx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstniimaqdx.c) 3 | 4 | set (HEADERS 5 | gstniimaqdx.h) 6 | 7 | include_directories (AFTER 8 | ${NIIMAQDX_INCLUDE_DIR}) 9 | 10 | set (libname gstniimaqdx) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | # National Instruments doesn't provide a .lib for 64-bit, so use our own 17 | if (CMAKE_SIZEOF_VOID_P EQUAL 8) 18 | set (NIIMAQDX_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/win64/niimaqdx.lib") 19 | endif () 20 | 21 | target_link_libraries (${libname} 22 | ${GLIB2_LIBRARIES} 23 | ${GOBJECT_LIBRARIES} 24 | ${GSTREAMER_LIBRARY} 25 | ${GSTREAMER_BASE_LIBRARY} 26 | ${GSTREAMER_VIDEO_LIBRARY} 27 | ${NIIMAQDX_LIBRARIES}) 28 | 29 | if (WIN32) 30 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 31 | endif () 32 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 33 | -------------------------------------------------------------------------------- /sys/niimaqdx/gstniimaqdx.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <2006> Eric Jonas 3 | * Copyright (C) <2006> Antoine Tremblay 4 | * Copyright (C) 2013 United States Government, Joshua M. Doe 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library 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 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef __GST_NIIMAQDXSRC_H__ 23 | #define __GST_NIIMAQDXSRC_H__ 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GST_TYPE_NIIMAQDXSRC \ 34 | (gst_niimaqdxsrc_get_type()) 35 | #define GST_NIIMAQDXSRC(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NIIMAQDXSRC,GstNiImaqDxSrc)) 37 | #define GST_NIIMAQDXSRC_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NIIMAQDXSRC,GstNiImaqDxSrcClass)) 39 | #define GST_IS_NIIMAQDXSRC(obj) \ 40 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NIIMAQDXSRC)) 41 | #define GST_IS_NIIMAQDXSRC_CLASS(obj) \ 42 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NIIMAQDXSRC)) 43 | #define GST_NIIMAQDXSRC_GET_CLASS(klass) \ 44 | (G_TYPE_INSTANCE_GET_CLASS ((klass), GST_TYPE_NIIMAQDXSRC, GstNiImaqDxSrcClass)) 45 | 46 | typedef struct _GstNiImaqDxSrc GstNiImaqDxSrc; 47 | typedef struct _GstNiImaqDxSrcClass GstNiImaqDxSrcClass; 48 | 49 | typedef struct 50 | { 51 | const char *pixel_format; 52 | int endianness; 53 | const char *gst_caps_string; 54 | int bpp; 55 | int depth; 56 | int row_multiple; 57 | } ImaqDxCapsInfo; 58 | 59 | struct _GstNiImaqDxSrc { 60 | GstPushSrc element; 61 | 62 | /* properties */ 63 | gchar *device_name; 64 | gint ringbuffer_count; 65 | gchar *attributes; 66 | gboolean bayer_as_gray; 67 | gboolean is_controller; 68 | 69 | /* image info */ 70 | char pixel_format[IMAQDX_MAX_API_STRING_LENGTH]; 71 | int width; 72 | int height; 73 | int dx_row_stride; 74 | gint dx_framesize; 75 | int gst_row_stride; 76 | gint gst_framesize; 77 | guint8 *temp_buffer; 78 | const ImaqDxCapsInfo *caps_info; 79 | gboolean is_jpeg; 80 | 81 | uInt32 cumbufnum; 82 | gint64 n_dropped_frames; 83 | 84 | IMAQdxSession session; 85 | 86 | gboolean session_started; 87 | 88 | GAsyncQueue *time_queue; 89 | 90 | GstClock *clock; 91 | GstClockTime stream_base; 92 | GstClockTime unix_base; 93 | }; 94 | 95 | struct _GstNiImaqDxSrcClass { 96 | GstPushSrcClass parent_class; 97 | 98 | /* probed interfaces */ 99 | GList *devices; 100 | }; 101 | 102 | GType gst_niimaqdxsrc_get_type (void); 103 | 104 | G_END_DECLS 105 | 106 | #endif /* __GST_NIIMAQDXSRC_H__ */ 107 | -------------------------------------------------------------------------------- /sys/niimaqdx/win64/niimaqdx.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | IMAQdxAllocate 3 | IMAQdxBenchmarkGenICamXMLLoad 4 | IMAQdxCalculateBayerGains 5 | IMAQdxCalculatePacketSize 6 | IMAQdxCloseCamera 7 | IMAQdxConfigureAcquisition 8 | IMAQdxConfigureGrab 9 | IMAQdxDebugAttributesToFile 10 | IMAQdxDiscoverEthernetCameras 11 | IMAQdxDispose 12 | IMAQdxEnumerateAttributeValues 13 | IMAQdxEnumerateAttributeValuesCW 14 | IMAQdxEnumerateAttributes 15 | IMAQdxEnumerateAttributes2 16 | IMAQdxEnumerateAttributes2CW 17 | IMAQdxEnumerateAttributes3 18 | IMAQdxEnumerateAttributes3CW 19 | IMAQdxEnumerateAttributesCW 20 | IMAQdxEnumerateCameraFiles 21 | IMAQdxEnumerateCameras 22 | IMAQdxEnumerateCamerasCW 23 | IMAQdxEnumerateVideoModes 24 | IMAQdxEnumerateVideoModesCW 25 | IMAQdxGetActionCommandPort 26 | IMAQdxGetAttribute 27 | IMAQdxGetAttributeCW 28 | IMAQdxGetAttributeDescription 29 | IMAQdxGetAttributeDescriptionCW 30 | IMAQdxGetAttributeDisplayName 31 | IMAQdxGetAttributeDisplayNameCW 32 | IMAQdxGetAttributeIncrement 33 | IMAQdxGetAttributeIncrementCW 34 | IMAQdxGetAttributeMaximum 35 | IMAQdxGetAttributeMaximumCW 36 | IMAQdxGetAttributeMinimum 37 | IMAQdxGetAttributeMinimumCW 38 | IMAQdxGetAttributeRepresentation 39 | IMAQdxGetAttributeTooltip 40 | IMAQdxGetAttributeTooltipCW 41 | IMAQdxGetAttributeType 42 | IMAQdxGetAttributeUnits 43 | IMAQdxGetAttributeUnitsCW 44 | IMAQdxGetAttributeVisibility 45 | IMAQdxGetCameraProperty 46 | IMAQdxGetCameraStatus 47 | IMAQdxGetDriverName 48 | IMAQdxGetDriverName2 49 | IMAQdxGetDriverVersion 50 | IMAQdxGetErrorString 51 | IMAQdxGetErrorStringCW 52 | IMAQdxGetFullyQualifiedAttributeName 53 | IMAQdxGetImage 54 | IMAQdxGetImageCW 55 | IMAQdxGetImageData 56 | IMAQdxGetImageDataCW 57 | IMAQdxGetRawBufferSize 58 | IMAQdxGrab 59 | IMAQdxGrabCW 60 | IMAQdxIsAttributeReadable 61 | IMAQdxIsAttributeReadableCW 62 | IMAQdxIsAttributeWritable 63 | IMAQdxIsAttributeWritableCW 64 | IMAQdxOpenCamera 65 | IMAQdxReadAttributes 66 | IMAQdxReadAttributesFromString 67 | IMAQdxReadMemory 68 | IMAQdxReadRegister 69 | IMAQdxRegisterAttributeUpdatedEvent 70 | IMAQdxRegisterFrameDoneEvent 71 | IMAQdxRegisterPnpEvent 72 | IMAQdxRenameInterface 73 | IMAQdxResetCamera 74 | IMAQdxResetEthernetCameraAddress 75 | IMAQdxSequence 76 | IMAQdxSequenceCW 77 | IMAQdxSetAttribute 78 | IMAQdxSetAttributeCW 79 | IMAQdxSetAttributeFromParamInfo 80 | IMAQdxSetAttributeFromVoidPtr 81 | IMAQdxSnap 82 | IMAQdxSnapCW 83 | IMAQdxStartAcquisition 84 | IMAQdxStopAcquisition 85 | IMAQdxSwitchCameraDriver 86 | IMAQdxUnconfigureAcquisition 87 | IMAQdxValidateAcquisition 88 | IMAQdxWriteAttributes 89 | IMAQdxWriteAttributesToString 90 | IMAQdxWriteMemory 91 | IMAQdxWriteRegister 92 | IMAQdxWriteSettingsToRegistry 93 | -------------------------------------------------------------------------------- /sys/niimaqdx/win64/niimaqdx.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshdoe/gst-plugins-vision/8a5478b344c0284684cc1e566332519695aedb40/sys/niimaqdx/win64/niimaqdx.lib -------------------------------------------------------------------------------- /sys/phoenix/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstphoenixsrc.c) 3 | 4 | set (HEADERS 5 | gstphoenixsrc.h) 6 | 7 | include_directories (AFTER 8 | ${PHOENIX_INCLUDE_DIR}) 9 | 10 | set (libname gstphoenix) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${PHOENIX_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /sys/phoenix/gstphoenixsrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_PHOENIX_SRC_H_ 21 | #define _GST_PHOENIX_SRC_H_ 22 | 23 | #include 24 | 25 | // TODO: if/elif for linux/mac/etc 26 | #define _PHX_WIN32 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define GST_TYPE_PHOENIX_SRC (gst_phoenixsrc_get_type()) 32 | #define GST_PHOENIX_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PHOENIX_SRC,GstPhoenixSrc)) 33 | #define GST_PHOENIX_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PHOENIX_SRC,GstPhoenixSrcClass)) 34 | #define GST_IS_PHOENIX_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PHOENIX_SRC)) 35 | #define GST_IS_PHOENIX_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PHOENIX_SRC)) 36 | 37 | typedef struct _GstPhoenixSrc GstPhoenixSrc; 38 | typedef struct _GstPhoenixSrcClass GstPhoenixSrcClass; 39 | 40 | /** 41 | * GstPhoenixSrcConnector: 42 | * @MC_Connector_VID<1..16>: channel is linked to camera at the VID<1..16> input 43 | * @MC_Connector_YC: channel is linked to a camera at the YC input 44 | * 45 | * 46 | * Identifies the connector that the camera is connected to. 47 | */ 48 | typedef enum { 49 | 50 | } GstPhoenixSrcConnector; 51 | 52 | struct _GstPhoenixSrc 53 | { 54 | GstPushSrc base_phoenixsrc; 55 | 56 | gint dropped_frame_count; 57 | gboolean acq_started; 58 | 59 | /* camera handle */ 60 | tHandle hCamera; 61 | 62 | /* properties */ 63 | gchar *config_filepath; 64 | guint num_capture_buffers; 65 | guint board; 66 | guint channel; 67 | 68 | GstClockTime first_phoenix_ts; 69 | guint64 *frame_start_times; 70 | guint64 *frame_end_times; 71 | gboolean buffer_ready; 72 | guint buffer_ready_count; 73 | guint frame_start_count; 74 | guint frame_end_count; 75 | guint buffer_processed_count; 76 | gboolean timeout_occurred; 77 | gboolean fifo_overflow_occurred; 78 | 79 | gint height; 80 | gint gst_stride; 81 | guint phx_stride; 82 | 83 | GMutex mutex; 84 | GCond cond; 85 | }; 86 | 87 | struct _GstPhoenixSrcClass 88 | { 89 | GstPushSrcClass base_phoenixsrc_class; 90 | }; 91 | 92 | GType gst_phoenixsrc_get_type (void); 93 | 94 | G_END_DECLS 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /sys/pixci/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstpixcisrc.c) 3 | 4 | set (HEADERS 5 | gstpixcisrc.h) 6 | 7 | include_directories (AFTER 8 | ${XCLIB_INCLUDE_DIR}) 9 | 10 | set (libname gstpixci) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${XCLIB_LIBRARIES}) 23 | 24 | if (WIN32) 25 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 26 | endif () 27 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 28 | -------------------------------------------------------------------------------- /sys/pixci/gstpixcisrc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshdoe/gst-plugins-vision/8a5478b344c0284684cc1e566332519695aedb40/sys/pixci/gstpixcisrc.c -------------------------------------------------------------------------------- /sys/pleora/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (ENABLE_KLV) 2 | add_definitions(-DGST_PLUGINS_VISION_ENABLE_KLV) 3 | endif () 4 | 5 | if (UNIX) 6 | add_definitions(-D_UNIX_) 7 | endif () 8 | 9 | add_definitions(-D_XKEYCHECK_H) 10 | 11 | set (SOURCES 12 | gstpleora.cpp 13 | gstpleorasrc.cpp) 14 | 15 | set (HEADERS 16 | gstpleorasrc.h) 17 | 18 | if (Pleora_VERSION_MAJOR GREATER 5) 19 | set (SOURCES 20 | ${SOURCES} 21 | gstpleorasink.cpp 22 | streamingchannelsource.cpp) 23 | set (HEADERS 24 | ${HEADERS} 25 | gstpleorasink.h 26 | streamingchannelsource.h) 27 | endif () 28 | 29 | include_directories (AFTER 30 | ${Pleora_INCLUDE_DIR} 31 | ${PROJECT_SOURCE_DIR}/common 32 | ${PROJECT_SOURCE_DIR}/gst-libs/klv 33 | ) 34 | 35 | link_directories(${Pleora_LIBRARY_DIR}) 36 | 37 | set (libname gstpleora${Pleora_VERSION_MAJOR}) 38 | 39 | add_library (${libname} MODULE 40 | ${SOURCES} 41 | ${HEADERS}) 42 | 43 | set (LIBRARIES 44 | ${GLIB2_LIBRARIES} 45 | ${GOBJECT_LIBRARIES} 46 | ${GSTREAMER_LIBRARY} 47 | ${GSTREAMER_BASE_LIBRARY} 48 | ${GSTREAMER_VIDEO_LIBRARY} 49 | ${Pleora_LIBRARIES} 50 | ) 51 | 52 | if (ENABLE_KLV) 53 | set (LIBRARIES ${LIBRARIES} gstklv-1.0-0) 54 | endif () 55 | 56 | target_link_libraries (${libname} 57 | ${LIBRARIES} 58 | ) 59 | 60 | if (WIN32) 61 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 62 | endif () 63 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 64 | -------------------------------------------------------------------------------- /sys/pleora/gstpleora.cpp: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #include "PvVersion.h" 6 | #if VERSION_MAJOR >= 6 7 | #include "gstpleorasink.h" 8 | #endif 9 | 10 | #include "gstpleorasrc.h" 11 | 12 | #define GST_CAT_DEFAULT gst_pleora_debug 13 | GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); 14 | 15 | static gboolean 16 | plugin_init (GstPlugin * plugin) 17 | { 18 | GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "pleora", 0, 19 | "debug category for pleora plugin"); 20 | 21 | #if VERSION_MAJOR >= 6 22 | /* eBUS 6 is needed for this sink element */ 23 | if (!gst_element_register (plugin, "pleorasink", GST_RANK_NONE, 24 | gst_pleorasink_get_type ())) { 25 | return FALSE; 26 | } 27 | #endif 28 | 29 | if (!gst_element_register (plugin, "pleorasrc", GST_RANK_NONE, 30 | gst_pleorasrc_get_type ())) { 31 | return FALSE; 32 | } 33 | 34 | return TRUE; 35 | } 36 | 37 | #define PLUGIN_NAME G_PASTE(pleora, VERSION_MAJOR) 38 | 39 | GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 40 | GST_VERSION_MINOR, 41 | PLUGIN_NAME, 42 | "Pleora eBUS video elements", 43 | plugin_init, GST_PACKAGE_VERSION, GST_PACKAGE_LICENSE, GST_PACKAGE_NAME, 44 | GST_PACKAGE_ORIGIN) 45 | -------------------------------------------------------------------------------- /sys/pleora/gstpleorasink.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_PLEORASINK_H_ 21 | #define _GST_PLEORASINK_H_ 22 | 23 | #include 24 | #include 25 | 26 | class GstStreamingChannelSource; 27 | class PvSoftDeviceGEV; 28 | class IPvRegister; 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define GST_TYPE_PLEORASINK (gst_pleorasink_get_type()) 33 | #define GST_PLEORASINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLEORASINK,GstPleoraSink)) 34 | #define GST_PLEORASINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLEORASINK,GstPleoraSinkClass)) 35 | #define GST_IS_PLEORASINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLEORASINK)) 36 | #define GST_IS_PLEORASINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLEORASINK)) 37 | 38 | typedef struct _GstPleoraSink GstPleoraSink; 39 | typedef struct _GstPleoraSinkClass GstPleoraSinkClass; 40 | 41 | struct _GstPleoraSink 42 | { 43 | GstBaseSink base; 44 | 45 | GstStreamingChannelSource *source; 46 | PvSoftDeviceGEV *device; 47 | 48 | gint num_internal_buffers; 49 | gchar *address; 50 | gchar *manufacturer; 51 | gchar *model; 52 | gchar *version; 53 | gchar *info; 54 | gchar *serial; 55 | gchar *mac; 56 | gboolean output_klv; 57 | guint32 packet_size; 58 | gboolean auto_multicast; 59 | gchar *multicast_group; 60 | gint multicast_port; 61 | 62 | gboolean camera_connected; 63 | GstVideoInfo vinfo; 64 | 65 | gboolean acquisition_started; 66 | gboolean stop_requested; 67 | 68 | IPvRegister *register_SCDA0; 69 | IPvRegister *register_SCPS0; 70 | IPvRegister *register_SCP0; 71 | IPvRegister *register_AcquisitionStart0; 72 | IPvRegister *register_AcquisitionStop0; 73 | }; 74 | 75 | struct _GstPleoraSinkClass 76 | { 77 | GstBaseSinkClass base_class; 78 | }; 79 | 80 | GType gst_pleorasink_get_type (void); 81 | 82 | G_END_DECLS 83 | 84 | #endif /* _GST_PLEORASINK_H_ */ 85 | -------------------------------------------------------------------------------- /sys/pleora/gstpleorasrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_PLEORA_SRC_H_ 21 | #define _GST_PLEORA_SRC_H_ 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define GST_TYPE_PLEORA_SRC (gst_pleorasrc_get_type()) 32 | #define GST_PLEORA_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLEORA_SRC,GstPleoraSrc)) 33 | #define GST_PLEORA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLEORA_SRC,GstPleoraSrcClass)) 34 | #define GST_IS_PLEORA_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLEORA_SRC)) 35 | #define GST_IS_PLEORA_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLEORA_SRC)) 36 | 37 | typedef struct _GstPleoraSrc GstPleoraSrc; 38 | typedef struct _GstPleoraSrcClass GstPleoraSrcClass; 39 | 40 | struct _GstPleoraSrc 41 | { 42 | GstPushSrc base_pleorasrc; 43 | 44 | /* camera handle */ 45 | PvPipeline *pipeline; 46 | PvDevice *device; 47 | PvStream *stream; 48 | PvBuffer *pvbuffer; 49 | PvDeviceType device_type; 50 | 51 | /* properties */ 52 | gchar *device_id; 53 | gint device_index; 54 | guint num_capture_buffers; 55 | gint timeout; 56 | gint detection_timeout; 57 | gchar *multicast_group; 58 | gint port; 59 | gboolean receiver_only; 60 | gint packet_size; 61 | gchar *config_file; 62 | gboolean config_file_connect; 63 | gboolean output_klv; 64 | 65 | guint32 last_frame_count; 66 | guint32 total_dropped_frames; 67 | 68 | GstCaps *caps; 69 | PvPixelType pv_pixel_type; 70 | gint width; 71 | gint height; 72 | gint gst_stride; 73 | gint pleora_stride; 74 | 75 | gboolean stop_requested; 76 | }; 77 | 78 | struct _GstPleoraSrcClass 79 | { 80 | GstPushSrcClass base_pleorasrc_class; 81 | }; 82 | 83 | GType gst_pleorasrc_get_type (void); 84 | 85 | G_END_DECLS 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /sys/pleora/streamingchannelsource.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, 17 | * Boston, MA 02110-1335, USA. 18 | */ 19 | 20 | #include 21 | 22 | #include "gstpleorasink.h" 23 | 24 | class GstStreamingChannelSource:public PvStreamingChannelSourceDefault 25 | { 26 | public: 27 | GstStreamingChannelSource (); 28 | 29 | void OnStreamingStart(); 30 | void OnStreamingStop(); 31 | 32 | void SetSink (GstPleoraSink * sink); 33 | void SetCaps (GstCaps * caps); 34 | void ResizeBufferIfNeeded (PvBuffer * aBuffer); 35 | void SetBuffer (GstBuffer * buf); 36 | 37 | PvBuffer *AllocBuffer (); 38 | void FreeBuffer (PvBuffer * aBuffer); 39 | 40 | PvResult QueueBuffer (PvBuffer * aBuffer); 41 | PvResult RetrieveBuffer (PvBuffer ** aBuffer); 42 | 43 | void GetWidthInfo (uint32_t & aMin, uint32_t & aMax, uint32_t & aInc) const; 44 | void GetHeightInfo (uint32_t & aMin, uint32_t & aMax, uint32_t & aInc) const; 45 | PvResult GetSupportedPixelType (int aIndex, PvPixelType & aPixelType) const; 46 | 47 | PvResult GetSupportedChunk (int aIndex, uint32_t &aID, PvString &aName) const; 48 | bool GetChunkEnable (uint32_t aChunkID) const; 49 | PvResult SetChunkEnable (uint32_t aChunkID, bool aEnabled); 50 | bool GetChunkModeActive() const { return mChunkModeActive; } 51 | PvResult SetChunkModeActive( bool aEnabled ) { mChunkModeActive = aEnabled; return PvResult::Code::OK; } 52 | uint32_t GetChunksSize() const { return GetRequiredChunkSize(); } 53 | 54 | uint32_t GetRequiredChunkSize () const; 55 | void SetKlvEnabled (bool enable = true); 56 | gboolean GetKlvEnabled (); 57 | GByteArray * GetKlvByteArray (GstBuffer * buf); 58 | 59 | private: 60 | GstPleoraSink * mSink; 61 | GAsyncQueue* mInputQueue; 62 | GAsyncQueue* mOutputQueue; 63 | gint mBufferCount; 64 | 65 | gint mWidth; 66 | gint mHeight; 67 | PvPixelType mPixelType; 68 | 69 | bool mChunkModeActive; 70 | bool mChunkKlvEnabled; 71 | 72 | gint mKlvChunkSize; 73 | 74 | bool mStreamingStarted; 75 | }; -------------------------------------------------------------------------------- /sys/pylon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstpylonsrc.c 3 | ) 4 | 5 | set (HEADERS 6 | gstpylonsrc.h) 7 | 8 | include_directories (AFTER 9 | ${GSTREAMER_INCLUDE_DIR}/.. 10 | ${PYLON_INCLUDE_DIR} 11 | ) 12 | 13 | set (libname gstpylon) 14 | 15 | add_library (${libname} MODULE 16 | ${SOURCES} 17 | ${HEADERS}) 18 | 19 | target_link_libraries (${libname} 20 | ${GLIB2_LIBRARIES} 21 | ${GOBJECT_LIBRARIES} 22 | ${GSTREAMER_LIBRARY} 23 | ${GSTREAMER_BASE_LIBRARY} 24 | ${GSTREAMER_VIDEO_LIBRARY} 25 | ${PYLON_LIBRARIES} 26 | ) 27 | 28 | if(MSVC) 29 | target_compile_options(${libname} PRIVATE /W4) 30 | else() 31 | target_compile_options(${libname} PRIVATE -Wall) 32 | endif() 33 | 34 | if (WIN32) 35 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 36 | endif () 37 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 38 | -------------------------------------------------------------------------------- /sys/pylon/gstpylonsrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2016-2017 Ingmars Melkis 3 | * Copyright (C) 2018 Ingmars Melkis 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef _GST_PYLONSRC_H_ 22 | #define _GST_PYLONSRC_H_ 23 | 24 | #include 25 | #include "pylonc/PylonC.h" 26 | 27 | // pylonsrc plugin calls PylonInitialize when first plugin is created 28 | // and PylonTerminate when the last plugin is finalized. 29 | // Static variable is used to keep count of existing plugins 30 | // These functions can be used to increase or decrease this counter, 31 | // if pylon environment is needed beyond lifetime of plugins. 32 | // On success return value is the new value of counter 33 | // On failure return value is negative 34 | int gst_pylonsrc_ref_pylon_environment (); 35 | int gst_pylonsrc_unref_pylon_environment (); 36 | 37 | enum 38 | { 39 | GST_PYLONSRC_NUM_CAPTURE_BUFFERS = 10, 40 | GST_PYLONSRC_NUM_AUTO_FEATURES = 3, 41 | GST_PYLONSRC_NUM_LIMITED_FEATURES = 2, 42 | GST_PYLONSRC_NUM_PROPS = 75 43 | }; 44 | 45 | typedef enum _GST_PYLONSRC_PROPERTY_STATE 46 | { 47 | GST_PYLONSRC_PROPST_DEFAULT, 48 | GST_PYLONSRC_PROPST_NOT_SET, 49 | GST_PYLONSRC_PROPST_SET 50 | } GST_PYLONSRC_PROPERTY_STATE; 51 | 52 | typedef struct _GstPylonSrcLimitedFeature 53 | { 54 | double lower; 55 | double upper; 56 | double manual; 57 | } GstPylonSrcLimitedFeature; 58 | 59 | G_BEGIN_DECLS 60 | #define GST_TYPE_PYLONSRC (gst_pylonsrc_get_type()) 61 | #define GST_PYLONSRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PYLONSRC,GstPylonSrc)) 62 | #define GST_PYLONSRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PYLONSRC,GstPylonSrcClass)) 63 | #define GST_IS_PYLONSRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PYLONSRC)) 64 | #define GST_IS_PYLONSRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PYLONSRC)) 65 | typedef struct _GstPylonSrc GstPylonSrc; 66 | typedef struct _GstPylonSrcClass GstPylonSrcClass; 67 | 68 | struct _GstPylonSrc 69 | { 70 | GstPushSrc base_pylonsrc; 71 | 72 | GstCaps *caps; 73 | 74 | gint cameraId; 75 | PYLON_DEVICE_HANDLE deviceHandle; // Handle for the camera. 76 | PYLON_STREAMGRABBER_HANDLE streamGrabber; // Handler for camera's streams. 77 | PYLON_WAITOBJECT_HANDLE waitObject; // Handles timing out in the main loop. 78 | gboolean deviceConnected; 79 | gboolean acquisition_configured; 80 | 81 | unsigned char *buffers[GST_PYLONSRC_NUM_CAPTURE_BUFFERS]; 82 | PYLON_STREAMBUFFER_HANDLE bufferHandle[GST_PYLONSRC_NUM_CAPTURE_BUFFERS]; 83 | 84 | int32_t frameSize; // Size of a frame in bytes. 85 | int32_t payloadSize; // Size of a frame in bytes. 86 | guint64 frameNumber; // Fun note: At 120fps it will take around 4 billion years to overflow this variable. 87 | gint failedFrames; // Count of concecutive frames that have failed. 88 | 89 | // Plugin parameters 90 | _Bool setFPS, continuousMode, limitBandwidth, demosaicing, colorAdjustment; 91 | _Bool center[2]; 92 | _Bool flip[2]; 93 | _Bool ignoreDefaults; 94 | double fps, blacklevel, gamma, sharpnessenhancement, noisereduction, 95 | brightnesstarget; 96 | double balance[3]; 97 | double hue[6]; 98 | double saturation[6]; 99 | double transformation[3][3]; 100 | 101 | GstPylonSrcLimitedFeature limitedFeature[GST_PYLONSRC_NUM_LIMITED_FEATURES]; 102 | 103 | gint maxBandwidth, testImage, frameDropLimit, grabtimeout, packetSize, 104 | interPacketDelay, frameTransDelay, bandwidthReserve, bandwidthReserveAcc, 105 | maxTransferSize; 106 | gint size[2]; 107 | gint binning[2]; 108 | gint maxSize[2]; 109 | gint offset[2]; 110 | gchar *pixel_format, *sensorMode, *lightsource, *reset, *autoprofile, 111 | *transformationselector, *userid, *testImageSource; 112 | gchar *autoFeature[GST_PYLONSRC_NUM_AUTO_FEATURES]; 113 | gchar *configFile; 114 | GST_PYLONSRC_PROPERTY_STATE propFlags[GST_PYLONSRC_NUM_PROPS]; 115 | }; 116 | 117 | struct _GstPylonSrcClass 118 | { 119 | GstPushSrcClass base_pylonsrc_class; 120 | }; 121 | 122 | GType gst_pylonsrc_get_type (void); 123 | 124 | G_END_DECLS 125 | #endif 126 | -------------------------------------------------------------------------------- /sys/qcam/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstqcamsrc.c) 3 | 4 | set (HEADERS 5 | gstqcamsrc.h) 6 | 7 | include_directories (AFTER 8 | ${QCAM_INCLUDE_DIR} 9 | ) 10 | 11 | set (libname gstqcam) 12 | 13 | add_library (${libname} MODULE 14 | ${SOURCES} 15 | ${HEADERS}) 16 | 17 | set (LIBRARIES 18 | ${GLIB2_LIBRARIES} 19 | ${GOBJECT_LIBRARIES} 20 | ${GSTREAMER_LIBRARY} 21 | ${GSTREAMER_BASE_LIBRARY} 22 | ${GSTREAMER_VIDEO_LIBRARY} 23 | ${QCAM_LIBRARIES} 24 | ) 25 | 26 | target_link_libraries (${libname} 27 | ${LIBRARIES} 28 | ) 29 | 30 | if (WIN32) 31 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 32 | endif () 33 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 34 | -------------------------------------------------------------------------------- /sys/qcam/gstqcamsrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2021 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_QCAM_SRC_H_ 21 | #define _GST_QCAM_SRC_H_ 22 | 23 | #include 24 | 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_TYPE_QCAM_SRC (gst_qcamsrc_get_type()) 30 | #define GST_QCAM_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QCAM_SRC,GstQcamSrc)) 31 | #define GST_QCAM_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QCAM_SRC,GstQcamSrcClass)) 32 | #define GST_IS_QCAM_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QCAM_SRC)) 33 | #define GST_IS_QCAM_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QCAM_SRC)) 34 | 35 | typedef struct _GstQcamSrc GstQcamSrc; 36 | typedef struct _GstQcamSrcClass GstQcamSrcClass; 37 | 38 | struct _GstQcamSrc 39 | { 40 | GstPushSrc base_qcamsrc; 41 | 42 | /* camera handle */ 43 | QCam_Handle handle; 44 | gboolean send_settings; 45 | QCam_Settings qsettings; 46 | 47 | /* properties */ 48 | gint device_index; 49 | guint num_capture_buffers; 50 | gint timeout; 51 | guint exposure; 52 | gdouble gain; 53 | gint offset; 54 | gint format; 55 | gint x; 56 | gint y; 57 | gint width; 58 | gint height; 59 | gint binning; 60 | 61 | GAsyncQueue *queue; 62 | GstClockTime base_time; 63 | 64 | guint32 last_frame_count; 65 | guint32 total_dropped_frames; 66 | 67 | GstCaps *caps; 68 | 69 | gboolean stop_requested; 70 | }; 71 | 72 | struct _GstQcamSrcClass 73 | { 74 | GstPushSrcClass base_qcamsrc_class; 75 | }; 76 | 77 | GType gst_qcamsrc_get_type (void); 78 | 79 | G_END_DECLS 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /sys/sapera/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (SOURCES 2 | gstsaperasrc.cpp) 3 | 4 | set (HEADERS 5 | gstsaperasrc.h) 6 | 7 | include_directories (AFTER 8 | ${SAPERA_INCLUDE_DIR}) 9 | 10 | set (libname gstsapera) 11 | 12 | add_library (${libname} MODULE 13 | ${SOURCES} 14 | ${HEADERS}) 15 | 16 | target_link_libraries (${libname} 17 | ${GLIB2_LIBRARIES} 18 | ${GOBJECT_LIBRARIES} 19 | ${GSTREAMER_LIBRARY} 20 | ${GSTREAMER_BASE_LIBRARY} 21 | ${GSTREAMER_VIDEO_LIBRARY} 22 | ${SAPERA_LIBRARIES} 23 | "C:\\Program Files\\Teledyne DALSA\\Sapera\\Lib\\Win64\\corapi.lib" 24 | ) 25 | 26 | if (WIN32) 27 | install (FILES $ DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL) 28 | endif () 29 | install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR}) 30 | -------------------------------------------------------------------------------- /sys/sapera/aq2_prm_user.h: -------------------------------------------------------------------------------- 1 | #ifndef _AQ2_PRM_USER 2 | #define _AQ2_PRM_USER 3 | 4 | // Device indexes for CORHW_DEVICE_PRM_GET_VOLTAGE 5 | #define AQ2_VOLTAGE_INDEX_12V 0 6 | #define AQ2_VOLTAGE_INDEX_INPUT_THRESHOLD 1 7 | #define AQ2_VOLTAGE_INDEX_FPGA_VCCINT 2 8 | #define AQ2_VOLTAGE_INDEX_FPGA_VCCAUX 3 9 | #define AQ2_VOLTAGE_POCL0_RSENSE 4 10 | #define AQ2_VOLTAGE_POCL1_RSENSE 5 11 | 12 | // Device indexes for CORHW_DEVICE_PRM_GET_TEMPERATURE 13 | #define AQ2_TEMPERATURE_INDEX_FPGA 0 14 | 15 | // Parameter indexes for CORHW_DEVICE_PRM_GET_LANES_STATS 16 | #define AQ2_CLHS_LANES_CRC_ERROR_COUNT 0 17 | #define AQ2_CLHS_LANES_VIDEO_MSG_COUNT 1 18 | #define AQ2_CLHS_LANES_PACKET_BUFFER_OVERFLOW_COUNT 2 19 | #define AQ2_CLHS_LANES_RESEND_FLAG_COUNT 3 20 | #define AQ2_CLHS_LANES_8B_10B_ERROR_COUNT 4 21 | 22 | #endif -------------------------------------------------------------------------------- /sys/sapera/gstsaperasrc.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) 2011 FIXME 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _GST_SAPERA_SRC_H_ 21 | #define _GST_SAPERA_SRC_H_ 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define GST_TYPE_SAPERA_SRC (gst_saperasrc_get_type()) 31 | #define GST_SAPERA_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SAPERA_SRC,GstSaperaSrc)) 32 | #define GST_SAPERA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SAPERA_SRC,GstSaperaSrcClass)) 33 | #define GST_IS_SAPERA_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SAPERA_SRC)) 34 | #define GST_IS_SAPERA_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SAPERA_SRC)) 35 | 36 | typedef struct _GstSaperaSrc GstSaperaSrc; 37 | typedef struct _GstSaperaSrcClass GstSaperaSrcClass; 38 | 39 | class SapMyProcessing; 40 | 41 | struct _GstSaperaSrc 42 | { 43 | GstPushSrc base_saperasrc; 44 | 45 | guint last_buffer_number; 46 | gint dropped_frame_count; 47 | gboolean acq_started; 48 | 49 | /* Sapera objects */ 50 | SapAcquisition *sap_acq; 51 | SapBuffer *sap_buffers; 52 | SapBayer *sap_bayer; 53 | SapTransfer *sap_xfer; 54 | SapMyProcessing*sap_pro; 55 | 56 | /* properties */ 57 | gchar *format_file; 58 | guint num_capture_buffers; 59 | gint server_index; 60 | gint resource_index; 61 | gint channel_extract; 62 | 63 | GstBuffer *buffer; 64 | 65 | GstCaps *caps; 66 | gint width; 67 | gint height; 68 | gint gst_stride; 69 | 70 | GMutex buffer_mutex; 71 | GCond buffer_cond; 72 | }; 73 | 74 | struct _GstSaperaSrcClass 75 | { 76 | GstPushSrcClass base_saperasrc_class; 77 | }; 78 | 79 | GType gst_saperasrc_get_type (void); 80 | 81 | G_END_DECLS 82 | 83 | #endif 84 | --------------------------------------------------------------------------------