Fixing media, second part

This commit is contained in:
Siana Gearz
2010-11-12 00:02:37 +01:00
parent 93ae868684
commit e87975b8eb
10 changed files with 47 additions and 62 deletions

View File

@@ -2,10 +2,6 @@
project(llplugin)
if (WORD_SIZE EQUAL 64)
set(REQUIRE_PIC)
endif(WORD_SIZE EQUAL 64)
include(00-Common)
include(LLCommon)
include(LLImage)

View File

@@ -34,6 +34,13 @@
#include "llpluginsharedmemory.h"
#if LL_WINDOWS
#include <process.h>
#else // LL_WINDOWS
#include <sys/types.h>
#include <unistd.h>
#endif // LL_WINDOWS
// on Mac and Linux, we use the native shm_open/mmap interface by using
// #define USE_SHM_OPEN_SHARED_MEMORY 1
// in the appropriate sections below.

View File

@@ -2,10 +2,6 @@
project(media_plugin_base)
if(WORD_SIZE EQUAL 64)
set(REQUIRE_PIC)
endif(WORD_SIZE EQUAL 64)
include(00-Common)
include(LLCommon)
include(LLImage)

View File

@@ -2,10 +2,6 @@
project(media_plugin_example)
if(WORD_SIZE EQUAL 64)
set(REQUIRE_PIC)
endif(WORD_SIZE EQUAL 64)
include(00-Common)
include(LLCommon)
include(LLImage)

View File

@@ -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}

View File

@@ -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);\

View File

@@ -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");
}

View File

@@ -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()));
}
///////////////////////////////////////////////////////////////////////////////

View File

@@ -60,7 +60,8 @@ if (WINDOWS)
set_target_properties(
media_plugin_quicktime
PROPERTIES
LINK_FLAGS "/MANIFEST:NO"
LINK_FLAGS "/MANIFEST:NO /NODEFAULTLIB:LIBCMT"
LINK_FLAGS_DEBUG "/MANIFEST:NO /NODEFAULTLIB:\"LIBCMT;LIBCMTD\""
)
endif (WINDOWS)

View File

@@ -2,10 +2,6 @@
project(media_plugin_webkit)
if(WORD_SIZE EQUAL 64)
set(REQUIRE_PIC)
endif(WORD_SIZE EQUAL 64)
include(00-Common)
include(LLCommon)
include(LLImage)
@@ -13,6 +9,7 @@ include(LLPlugin)
include(LLMath)
include(LLRender)
include(LLWindow)
include(UI)
include(Linking)
include(PluginAPI)
include(MediaPluginBase)
@@ -28,6 +25,7 @@ include_directories(
${LLIMAGE_INCLUDE_DIRS}
${LLRENDER_INCLUDE_DIRS}
${LLWINDOW_INCLUDE_DIRS}
${LLQTWEBKIT_INCLUDE_DIR}
)
@@ -45,12 +43,7 @@ if(WORD_SIZE EQUAL 64)
endif(WINDOWS)
endif (WORD_SIZE EQUAL 64)
add_library(media_plugin_webkit
SHARED
${media_plugin_webkit_SOURCE_FILES}
)
target_link_libraries(media_plugin_webkit
set(media_plugin_webkit_LINK_LIBRARIES
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
@@ -58,6 +51,20 @@ target_link_libraries(media_plugin_webkit
${PLUGIN_API_WINDOWS_LIBRARIES}
)
if(LINUX)
list(APPEND media_plugin_webkit_LINK_LIBRARIES
${UI_LIBRARIES} # for glib/GTK
)
endif(LINUX)
add_library(media_plugin_webkit
SHARED
${media_plugin_webkit_SOURCE_FILES}
)
target_link_libraries(media_plugin_webkit ${media_plugin_webkit_LINK_LIBRARIES})
add_dependencies(media_plugin_webkit
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}