pleorasrc: initial working plugin for Pleora eBUS SDK U3V and GEV cameras

This commit is contained in:
Joshua M. Doe 2018-05-21 06:50:57 -04:00
parent 8ab8b4c28f
commit 1bc0829d81
5 changed files with 1228 additions and 0 deletions

View File

@ -88,6 +88,9 @@ macro_log_feature(MATROX_FOUND "Matrox MIL" "Required to build Matrox MIL source
find_package(Phoenix) find_package(Phoenix)
macro_log_feature(PHOENIX_FOUND "Active Silicon Phoenix" "Required to build Active Silicon Phoenix source element" "http://www.activesilicon.com/" FALSE) macro_log_feature(PHOENIX_FOUND "Active Silicon Phoenix" "Required to build Active Silicon Phoenix source element" "http://www.activesilicon.com/" FALSE)
find_package(Pleora)
macro_log_feature(Pleora_FOUND "Pleora eBUS" "Required to build Pleora eBUS source element" "http://www.pleora.com/" FALSE)
find_package(Sapera) find_package(Sapera)
macro_log_feature(SAPERA_FOUND "Teledyne DALSA Sapera" "Required to build Teledyne DALSA Sapera source element" "http://www.teledynedalsa.com/" FALSE) macro_log_feature(SAPERA_FOUND "Teledyne DALSA Sapera" "Required to build Teledyne DALSA Sapera source element" "http://www.teledynedalsa.com/" FALSE)

View File

@ -0,0 +1,35 @@
# - Try to find Pleora SDK
# Once done this will define
#
# PLEORA_FOUND - system has Pleora SDK
# PLEORA_INCLUDE_DIR - the Pleora SDK include directory
# PLEORA_LIBRARIES_DIR - the Pleora SDK libraries directory
# Copyright (c) 2006, Tim Beaulen <tbscope@gmail.com>
# Copyright (c) 2016 outside US, United States Government, Joshua M. Doe <oss@nvl.army.mil>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (NOT PLEORA_DIR)
set (PLEORA_DIR "C:/Program Files (x86)/Pleora Technologies Inc/eBUS SDK" CACHE PATH "Directory containing Pleora SDK includes and libraries")
endif ()
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
set(_LIB_SUFFIX "64")
else ()
set(_LIB_SUFFIX "")
endif ()
find_path (PLEORA_INCLUDE_DIR PvBase.h
PATHS
"${PLEORA_DIR}/Includes"
DOC "Directory containing Pleora eBUS SDK headers")
find_path (PLEORA_LIBRARIES_DIR PvBase${_LIB_SUFFIX}.lib
PATHS
"${PLEORA_DIR}/Libraries"
DOC "Directory containing Pleora eBUS SDK libraries")
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (PLEORA DEFAULT_MSG PLEORA_INCLUDE_DIR PLEORA_LIBRARIES_DIR)

30
sys/pleora/CMakeLists.txt Normal file
View File

@ -0,0 +1,30 @@
add_definitions(-D_XKEYCHECK_H)
set (SOURCES
gstpleorasrc.cpp)
set (HEADERS
gstpleorasrc.h)
include_directories (AFTER
${PLEORA_INCLUDE_DIR})
set (libname libgstpleora)
link_directories(${PLEORA_LIBRARIES_DIR})
add_library (${libname} MODULE
${SOURCES}
${HEADERS})
target_link_libraries (${libname}
${GLIB2_LIBRARIES}
${GOBJECT_LIBRARIES}
${GSTREAMER_LIBRARY}
${GSTREAMER_BASE_LIBRARY}
${GSTREAMER_VIDEO_LIBRARY})
set (pdbfile "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/${libname}.pdb")
install (FILES ${pdbfile} DESTINATION lib/gstreamer-1.0 COMPONENT pdb)
install(TARGETS ${libname}
LIBRARY DESTINATION lib/gstreamer-1.0)

1084
sys/pleora/gstpleorasrc.cpp Normal file

File diff suppressed because it is too large Load Diff

76
sys/pleora/gstpleorasrc.h Normal file
View File

@ -0,0 +1,76 @@
/* GStreamer
* Copyright (C) 2011 FIXME <fixme@example.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef _GST_PLEORA_SRC_H_
#define _GST_PLEORA_SRC_H_
#include <gst/base/gstpushsrc.h>
#include <PvDevice.h>
#include <PvPipeline.h>
#include <PvStream.h>
G_BEGIN_DECLS
#define GST_TYPE_PLEORA_SRC (gst_pleorasrc_get_type())
#define GST_PLEORA_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLEORA_SRC,GstPleoraSrc))
#define GST_PLEORA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLEORA_SRC,GstPleoraSrcClass))
#define GST_IS_PLEORA_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLEORA_SRC))
#define GST_IS_PLEORA_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLEORA_SRC))
typedef struct _GstPleoraSrc GstPleoraSrc;
typedef struct _GstPleoraSrcClass GstPleoraSrcClass;
struct _GstPleoraSrc
{
GstPushSrc base_pleorasrc;
/* camera handle */
PvPipeline *pipeline;
PvDevice *device;
PvStream *stream;
/* properties */
gchar *device_id;
gint device_index;
guint num_capture_buffers;
gint timeout;
gint detection_timeout;
guint32 last_frame_count;
guint32 total_dropped_frames;
GstCaps *caps;
gint height;
gint gst_stride;
gint bf_stride;
gboolean stop_requested;
};
struct _GstPleoraSrcClass
{
GstPushSrcClass base_pleorasrc_class;
};
GType gst_pleorasrc_get_type (void);
G_END_DECLS
#endif