imperxflexsrc: fix build and rename framelinksrc to imperxflexsrc

This commit is contained in:
Joshua M. Doe 2015-08-03 15:27:32 -04:00
parent 965709b06a
commit d585319cef
6 changed files with 71 additions and 13 deletions

View File

@ -40,6 +40,9 @@ macro_log_feature(EDT_FOUND "EDT" "Required to build EDT PDV source element" "ht
find_package(Euresys) find_package(Euresys)
macro_log_feature(EURESYS_FOUND "Euresys" "Required to build Euresys source element" "http://www.euresys.com/" FALSE) macro_log_feature(EURESYS_FOUND "Euresys" "Required to build Euresys source element" "http://www.euresys.com/" FALSE)
find_package(Imperx)
macro_log_feature(IMPERX_FLEX_FOUND "Imperx FrameLink Express" "Required to build Imperx FrameLink Express source element" "http://www.imperx.com/" FALSE)
find_package(IOtechDaqX) find_package(IOtechDaqX)
macro_log_feature(IOTECHDAQX_FOUND "IOtech DaqX" "Required to build IOtech DaqX source element" "http://www.euresys.com/" FALSE) macro_log_feature(IOTECHDAQX_FOUND "IOtech DaqX" "Required to build IOtech DaqX source element" "http://www.euresys.com/" FALSE)

View File

@ -0,0 +1,47 @@
# - Try to find Imperx FrameLink Express
# Once done this will define
#
# IMPERX_FLEX_FOUND - system has Imperx FrameLink Express
# IMPERX_FLEX_INCLUDE_DIR - the Imperx FrameLink Express include directory
# IMPERX_FLEX_LIBRARIES - the libraries needed to use Imperx FrameLink Express
# Copyright (c) 2006, Tim Beaulen <tbscope@gmail.com>
# Copyright (c) 2015, 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 IMPERX_FLEX_DIR)
# 32-bit dir on win32
file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES)
# 32-bit dir on win64
file(TO_CMAKE_PATH "$ENV{ProgramFiles(x86)}" _PROG_FILES_X86)
# 64-bit dir on win64
file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432)
if (_PROG_FILES_X86)
set(_PROGFILESDIR "${_PROG_FILES_W6432}")
else ()
set(_PROGFILESDIR "${_PROG_FILES}")
endif ()
set (IMPERX_FLEX_DIR "${_PROGFILESDIR}/Imperx/FrameLink Express" CACHE PATH "Directory containing Imperx FrameLink Express includes and libraries")
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
set(_LIB_PATH "${IMPERX_FLEX_DIR}/SDK/lib/x64")
else ()
set(_LIB_PATH "${IMPERX_FLEX_DIR}/SDK/lib/win3264")
endif ()
endif ()
find_path (IMPERX_FLEX_INCLUDE_DIR VCECLB.h
PATHS
"${IMPERX_FLEX_DIR}/SDK/inc"
DOC "Directory containing VCECLB.h include file")
find_library (IMPERX_FLEX_LIBRARIES NAMES VCECLB
PATHS
"${_LIB_PATH}"
DOC "Imperx FrameLink Express library to link with")
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (IMPERX_FLEX DEFAULT_MSG IMPERX_FLEX_INCLUDE_DIR IMPERX_FLEX_LIBRARIES)

View File

@ -14,6 +14,10 @@ if (NIIMAQDX_FOUND)
add_subdirectory (niimaqdx) add_subdirectory (niimaqdx)
endif (NIIMAQDX_FOUND) endif (NIIMAQDX_FOUND)
if (IMPERX_FLEX_FOUND)
add_subdirectory (imperx)
endif ()
if (IOTECHDAQX_FOUND) if (IOTECHDAQX_FOUND)
add_subdirectory (iotechdaqx) add_subdirectory (iotechdaqx)
endif (IOTECHDAQX_FOUND) endif (IOTECHDAQX_FOUND)

View File

@ -7,20 +7,21 @@ set ( HEADERS
gstframelinksrc.h ) gstframelinksrc.h )
include_directories ( AFTER include_directories ( AFTER
${FRAMELINK_INCLUDE_DIR} ${IMPERX_FLEX_INCLUDE_DIR}
.) .)
add_library ( libgstframelink MODULE add_library ( libgstimperxflex MODULE
${SOURCES} ${SOURCES}
${HEADERS} ) ${HEADERS} )
target_link_libraries ( libgstframelink target_link_libraries ( libgstimperxflex
${GLIB2_LIBRARIES} ${GLIB2_LIBRARIES}
${GSTREAMER_LIBRARIES} ${GOBJECT_LIBRARIES}
${GSTREAMER_LIBRARY}
${GSTREAMER_BASE_LIBRARY} ${GSTREAMER_BASE_LIBRARY}
${GSTREAMER_INTERFACE_LIBRARY} ${GSTREAMER_INTERFACE_LIBRARY}
${GSTREAMER_VIDEO_LIBRARY} ${GSTREAMER_VIDEO_LIBRARY}
${FRAMELINK_LIBRARIES}) ${IMPERX_FLEX_LIBRARIES})
install (TARGETS libgstframelink install (TARGETS libgstimperxflex
LIBRARY DESTINATION lib/gstreamer-0.10) LIBRARY DESTINATION lib/gstreamer-1.0)

View File

@ -17,16 +17,16 @@
* Boston, MA 02110-1335, USA. * Boston, MA 02110-1335, USA.
*/ */
/** /**
* SECTION:element-gstframelinksrc * SECTION:element-gstimperxflexsrc
* *
* The framelinksrc element is a source for IMPERX FrameLink and FrameLink Express framegrabbers. * The imperxflexsrc element is a source for IMPERX and FrameLink Express framegrabbers.
* *
* <refsect2> * <refsect2>
* <title>Example launch line</title> * <title>Example launch line</title>
* |[ * |[
* gst-launch -v framelinksrc ! ffmpegcolorspace ! autovideosink * gst-launch -v imperxflexsrc ! videoconvert ! autovideosink
* ]| * ]|
* Shows video from the default IMPERX FrameLink framegrabber * Shows video from the default IMPERX FrameLink Express framegrabber
* </refsect2> * </refsect2>
*/ */
@ -654,9 +654,9 @@ gst_framelinksrc_create (GstPushSrc * psrc, GstBuffer ** buf)
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (gst_framelinksrc_debug, "framelinksrc", 0, GST_DEBUG_CATEGORY_INIT (gst_framelinksrc_debug, "imperxflexsrc", 0,
"debug category for framelinksrc element"); "debug category for framelinksrc element");
gst_element_register (plugin, "framelinksrc", GST_RANK_NONE, gst_element_register (plugin, "imperxflexsrc", GST_RANK_NONE,
gst_framelinksrc_get_type ()); gst_framelinksrc_get_type ());
return TRUE; return TRUE;

View File

@ -22,7 +22,10 @@
#include <gst/base/gstpushsrc.h> #include <gst/base/gstpushsrc.h>
#define WIN32_LEAN_AND_MEAN
#include <Windows.h> #include <Windows.h>
#define bool gboolean
#include <VCECLB.h> #include <VCECLB.h>
G_BEGIN_DECLS G_BEGIN_DECLS