Fixing media, second part
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
|
||||
project(media_plugin_gstreamer010)
|
||||
|
||||
if(WORD_SIZE EQUAL 64)
|
||||
set(REQUIRE_PIC)
|
||||
endif(WORD_SIZE EQUAL 64)
|
||||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(LLImage)
|
||||
@@ -34,14 +30,6 @@ include_directories(
|
||||
|
||||
### media_plugin_gstreamer010
|
||||
|
||||
if(WORD_SIZE EQUAL 64)
|
||||
if(WINDOWS)
|
||||
add_definitions(/FIXED:NO)
|
||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
||||
add_definitions(-fPIC)
|
||||
endif(WINDOWS)
|
||||
endif (WORD_SIZE EQUAL 64)
|
||||
|
||||
set(media_plugin_gstreamer010_SOURCE_FILES
|
||||
media_plugin_gstreamer010.cpp
|
||||
llmediaimplgstreamer_syms.cpp
|
||||
@@ -54,15 +42,6 @@ set(media_plugin_gstreamer010_HEADER_FILES
|
||||
llmediaimplgstreamertriviallogging.h
|
||||
)
|
||||
|
||||
if (LINUX)
|
||||
if (${CXX_VERSION} GREATER 419)
|
||||
# Work around a bad interaction between broken gstreamer headers and
|
||||
# g++ 4.2's increased strictness.
|
||||
set_source_files_properties(llmediaimplgstreamervidplug.cpp PROPERTIES
|
||||
COMPILE_FLAGS -Wno-write-strings)
|
||||
endif (${CXX_VERSION} GREATER 419)
|
||||
endif (LINUX)
|
||||
|
||||
add_library(media_plugin_gstreamer010
|
||||
SHARED
|
||||
${media_plugin_gstreamer010_SOURCE_FILES}
|
||||
|
||||
@@ -35,16 +35,19 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
extern "C" {
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// Debug/Info/Warning macros.
|
||||
#if LL_WINDOWS
|
||||
#include <process.h>
|
||||
#define LL_GETPID GetCurrentProcessId
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#define LL_GETPID getpid
|
||||
#endif
|
||||
#define MSGMODULEFOO "(media plugin)"
|
||||
#define STDERRMSG(...) do{\
|
||||
fprintf(stderr, " pid:%d: ", (int)getpid());\
|
||||
fprintf(stderr, " pid:%d: ", (int)LL_GETPID());\
|
||||
fprintf(stderr, MSGMODULEFOO " %s:%d: ", __FUNCTION__, __LINE__);\
|
||||
fprintf(stderr, __VA_ARGS__);\
|
||||
fputc('\n',stderr);\
|
||||
|
||||
@@ -52,7 +52,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_slvideo_debug);
|
||||
#define SLV_ALLCAPS GST_VIDEO_CAPS_RGBx SLV_SIZECAPS
|
||||
|
||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE (
|
||||
"sink",
|
||||
(gchar*)"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (SLV_ALLCAPS)
|
||||
@@ -512,18 +512,18 @@ plugin_init (GstPlugin * plugin)
|
||||
some g++ versions buggily avoid __attribute__((constructor)) functions -
|
||||
so we provide an explicit plugin init function.
|
||||
*/
|
||||
#define PACKAGE (gchar*)"packagehack"
|
||||
// this macro quietly refers to PACKAGE internally
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
(gchar*)"private-slvideoplugin",
|
||||
(gchar*)"SL Video sink plugin",
|
||||
plugin_init, (gchar*)"0.1", (gchar*)GST_LICENSE_UNKNOWN,
|
||||
(gchar*)"Second Life",
|
||||
(gchar*)"http://www.secondlife.com/");
|
||||
#undef PACKAGE
|
||||
void gst_slvideo_init_class (void)
|
||||
{
|
||||
#define PACKAGE "packagehack"
|
||||
// this macro quietly refers to PACKAGE internally
|
||||
static GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"private-slvideoplugin",
|
||||
"SL Video sink plugin",
|
||||
plugin_init, "0.1", GST_LICENSE_UNKNOWN,
|
||||
"Second Life",
|
||||
"http://www.secondlife.com/");
|
||||
#undef PACKAGE
|
||||
ll_gst_plugin_register_static (&gst_plugin_desc);
|
||||
DEBUGMSG("CLASS INIT");
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ MediaPluginGStreamer010::MediaPluginGStreamer010(
|
||||
mCommand ( COMMAND_NONE )
|
||||
{
|
||||
std::ostringstream str;
|
||||
INFOMSG("MediaPluginGStreamer010 constructor - my PID=%u", U32(getpid()));
|
||||
INFOMSG("MediaPluginGStreamer010 constructor - my PID=%u", U32(LL_GETPID()));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user