pleora: build for various versions of eBUS, and append version to plugin name
Not the prettiest way to handle this, but we have a need for supporting multiple versions of eBUS, and this way we can distribute multiple versions. This also tries to modernize the FindPleora.cmake file.
This commit is contained in:
@@ -54,9 +54,9 @@ if (PHOENIX_FOUND)
|
||||
add_subdirectory(phoenix)
|
||||
endif (PHOENIX_FOUND)
|
||||
|
||||
if (PLEORA_FOUND)
|
||||
if (Pleora_FOUND)
|
||||
add_subdirectory(pleora)
|
||||
endif (PLEORA_FOUND)
|
||||
endif (Pleora_FOUND)
|
||||
|
||||
if (SAPERA_FOUND)
|
||||
add_subdirectory(sapera)
|
||||
|
||||
@@ -2,21 +2,28 @@ add_definitions(-D_XKEYCHECK_H)
|
||||
|
||||
set (SOURCES
|
||||
gstpleora.cpp
|
||||
gstpleorasink.cpp
|
||||
gstpleorasrc.cpp
|
||||
streamingchannelsource.cpp)
|
||||
gstpleorasrc.cpp)
|
||||
|
||||
set (HEADERS
|
||||
gstpleorasink.h
|
||||
gstpleorasrc.h
|
||||
streamingchannelsource.h)
|
||||
gstpleorasrc.h)
|
||||
|
||||
if (Pleora_VERSION_MAJOR GREATER 5)
|
||||
set (SOURCES
|
||||
${SOURCES}
|
||||
gstpleorasink.cpp
|
||||
streamingchannelsource.cpp)
|
||||
set (HEADERS
|
||||
${HEADERS}
|
||||
gstpleorasink.h
|
||||
streamingchannelsource.h)
|
||||
endif ()
|
||||
|
||||
include_directories (AFTER
|
||||
${PLEORA_INCLUDE_DIR})
|
||||
${Pleora_INCLUDE_DIR})
|
||||
|
||||
set (libname libgstpleora)
|
||||
link_directories(${Pleora_LIBRARY_DIR})
|
||||
|
||||
link_directories(${PLEORA_LIBRARIES_DIR})
|
||||
set (libname libgstpleora${Pleora_VERSION_MAJOR})
|
||||
|
||||
add_library (${libname} MODULE
|
||||
${SOURCES}
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "PvVersion.h"
|
||||
#if VERSION_MAJOR >= 6
|
||||
#include "gstpleorasink.h"
|
||||
#endif
|
||||
|
||||
#include "gstpleorasrc.h"
|
||||
|
||||
#define GST_CAT_DEFAULT gst_pleora_debug
|
||||
@@ -14,10 +18,13 @@ plugin_init (GstPlugin * plugin)
|
||||
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "pleora", 0,
|
||||
"debug category for pleora plugin");
|
||||
|
||||
#if VERSION_MAJOR >= 6
|
||||
/* eBUS 6 is needed for this sink element */
|
||||
if (!gst_element_register (plugin, "pleorasink", GST_RANK_NONE,
|
||||
gst_pleorasink_get_type ())) {
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!gst_element_register (plugin, "pleorasrc", GST_RANK_NONE,
|
||||
gst_pleorasrc_get_type ())) {
|
||||
@@ -27,9 +34,11 @@ plugin_init (GstPlugin * plugin)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define PLUGIN_NAME G_PASTE(pleora, VERSION_MAJOR)
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
pleora,
|
||||
"Pleora eBUS video sink/source",
|
||||
PLUGIN_NAME,
|
||||
"Pleora eBUS video elements",
|
||||
plugin_init, GST_PACKAGE_VERSION, GST_PACKAGE_LICENSE, GST_PACKAGE_NAME,
|
||||
GST_PACKAGE_ORIGIN)
|
||||
|
||||
Reference in New Issue
Block a user