parent
927840b079
commit
8217d505cf
@ -1 +1 @@
|
||||
vlc-1.0.0-pre1.tar.bz2
|
||||
vlc-1.0.0-rc1.tar.bz2
|
||||
|
@ -1,516 +0,0 @@
|
||||
diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp
|
||||
index ccc3945..43466c0 100644
|
||||
--- a/projects/mozilla/support/npmac.cpp
|
||||
+++ b/projects/mozilla/support/npmac.cpp
|
||||
@@ -54,7 +54,11 @@
|
||||
#undef XP_UNIX
|
||||
#endif
|
||||
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
#include "npupp.h"
|
||||
+#else
|
||||
+#include "npfunctions.h"
|
||||
+#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#ifndef powerc
|
||||
@@ -130,7 +134,7 @@ static inline void* SetupFPtoTVGlue(TFPtoTVGlue* functionGlue, void* fp)
|
||||
|
||||
// glue for mapping netscape TVectors to Macho function pointers
|
||||
struct TTVtoFPGlue {
|
||||
- uint32 glue[6];
|
||||
+ uint32_t glue[6];
|
||||
};
|
||||
|
||||
static struct {
|
||||
@@ -252,7 +256,7 @@ NPError NPN_GetURL(NPP instance, const char* url, const char* window)
|
||||
return CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window);
|
||||
}
|
||||
|
||||
-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData)
|
||||
+NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData)
|
||||
{
|
||||
int navMinorVers = gNetscapeFuncs.version & 0xFF;
|
||||
NPError err;
|
||||
@@ -269,7 +273,7 @@ NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uin
|
||||
return err;
|
||||
}
|
||||
|
||||
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)
|
||||
+NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file)
|
||||
{
|
||||
return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, url, window, len, buf, file);
|
||||
}
|
||||
@@ -295,7 +299,7 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* window, NPStrea
|
||||
return err;
|
||||
}
|
||||
|
||||
-int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
|
||||
+int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)
|
||||
{
|
||||
int navMinorVers = gNetscapeFuncs.version & 0xFF;
|
||||
NPError err;
|
||||
@@ -337,7 +341,7 @@ const char* NPN_UserAgent(NPP instance)
|
||||
return CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance);
|
||||
}
|
||||
|
||||
-void* NPN_MemAlloc(uint32 size)
|
||||
+void* NPN_MemAlloc(uint32_t size)
|
||||
{
|
||||
return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);
|
||||
}
|
||||
@@ -347,7 +351,7 @@ void NPN_MemFree(void* ptr)
|
||||
CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);
|
||||
}
|
||||
|
||||
-uint32 NPN_MemFlush(uint32 size)
|
||||
+uint32_t NPN_MemFlush(uint32_t size)
|
||||
{
|
||||
return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);
|
||||
}
|
||||
@@ -594,18 +598,18 @@ void NPN_SetException(NPObject *npobj, const NPUTF8 *message)
|
||||
|
||||
NPError Private_Initialize(void);
|
||||
void Private_Shutdown(void);
|
||||
-NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);
|
||||
+NPError Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
|
||||
NPError Private_Destroy(NPP instance, NPSavedData** save);
|
||||
NPError Private_SetWindow(NPP instance, NPWindow* window);
|
||||
NPError Private_GetValue( NPP instance, NPPVariable variable, void *value );
|
||||
NPError Private_SetValue( NPP instance, NPPVariable variable, void *value );
|
||||
NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);
|
||||
NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason);
|
||||
-int32 Private_WriteReady(NPP instance, NPStream* stream);
|
||||
-int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);
|
||||
+int32_t Private_WriteReady(NPP instance, NPStream* stream);
|
||||
+int32_t Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer);
|
||||
void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
|
||||
void Private_Print(NPP instance, NPPrint* platformPrint);
|
||||
-int16 Private_HandleEvent(NPP instance, void* event);
|
||||
+int16_t Private_HandleEvent(NPP instance, void* event);
|
||||
void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
|
||||
jobject Private_GetJavaClass(void);
|
||||
|
||||
@@ -633,7 +637,7 @@ void Private_Shutdown(void)
|
||||
ExitCodeResource();
|
||||
}
|
||||
|
||||
-NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved)
|
||||
+NPError Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
|
||||
{
|
||||
EnterCodeResource();
|
||||
NPError ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
|
||||
@@ -692,9 +696,9 @@ NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBoo
|
||||
return err;
|
||||
}
|
||||
|
||||
-int32 Private_WriteReady(NPP instance, NPStream* stream)
|
||||
+int32_t Private_WriteReady(NPP instance, NPStream* stream)
|
||||
{
|
||||
- int32 result;
|
||||
+ int32_t result;
|
||||
EnterCodeResource();
|
||||
PLUGINDEBUGSTR("\pWriteReady;g;");
|
||||
result = NPP_WriteReady(instance, stream);
|
||||
@@ -702,9 +706,9 @@ int32 Private_WriteReady(NPP instance, NPStream* stream)
|
||||
return result;
|
||||
}
|
||||
|
||||
-int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer)
|
||||
+int32_t Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer)
|
||||
{
|
||||
- int32 result;
|
||||
+ int32_t result;
|
||||
EnterCodeResource();
|
||||
PLUGINDEBUGSTR("\pWrite;g;");
|
||||
result = NPP_Write(instance, stream, offset, len, buffer);
|
||||
@@ -730,9 +734,9 @@ NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)
|
||||
return err;
|
||||
}
|
||||
|
||||
-int16 Private_HandleEvent(NPP instance, void* event)
|
||||
+int16_t Private_HandleEvent(NPP instance, void* event)
|
||||
{
|
||||
- int16 result;
|
||||
+ int16_t result;
|
||||
EnterCodeResource();
|
||||
PLUGINDEBUGSTR("\pHandleEvent;g;");
|
||||
result = NPP_HandleEvent(instance, event);
|
||||
@@ -993,6 +997,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
|
||||
//
|
||||
pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
|
||||
pluginFuncs->size = sizeof(NPPluginFuncs);
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
pluginFuncs->newp = NewNPP_NewProc(PLUGIN_TO_HOST_GLUE(newp, Private_New));
|
||||
pluginFuncs->destroy = NewNPP_DestroyProc(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy));
|
||||
pluginFuncs->setwindow = NewNPP_SetWindowProc(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow));
|
||||
@@ -1004,9 +1009,26 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
|
||||
pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print));
|
||||
pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent));
|
||||
pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue));
|
||||
+#else
|
||||
+ pluginFuncs->newp = (NPP_NewProcPtr)(PLUGIN_TO_HOST_GLUE(newp, Private_New));
|
||||
+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy));
|
||||
+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow));
|
||||
+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream));
|
||||
+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream));
|
||||
+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile));
|
||||
+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady));
|
||||
+ pluginFuncs->write = (NPP_WriteProcPtr)(PLUGIN_TO_HOST_GLUE(write, Private_Write));
|
||||
+ pluginFuncs->print = (NPP_PrintProcPtr)(PLUGIN_TO_HOST_GLUE(print, Private_Print));
|
||||
+ pluginFuncs->event = (NPP_HandleEventProcPtr)(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent));
|
||||
+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue));
|
||||
+#endif
|
||||
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
|
||||
{
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify));
|
||||
+#else
|
||||
+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify));
|
||||
+#endif
|
||||
}
|
||||
#ifdef OJI
|
||||
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
|
||||
@@ -1016,7 +1038,11 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
|
||||
#else
|
||||
pluginFuncs->javaClass = NULL;
|
||||
#endif
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
*unloadUpp = NewNPP_ShutdownProc(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown));
|
||||
+#else
|
||||
+ *unloadUpp = (NPP_ShutdownProcPtr)(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown));
|
||||
+#endif
|
||||
|
||||
SetUpQD();
|
||||
err = Private_Initialize();
|
||||
@@ -1152,6 +1178,7 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)
|
||||
|
||||
pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
|
||||
pluginFuncs->size = sizeof(NPPluginFuncs);
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
pluginFuncs->newp = NewNPP_NewProc(Private_New);
|
||||
pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);
|
||||
pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);
|
||||
@@ -1164,6 +1191,27 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)
|
||||
pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent);
|
||||
pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
|
||||
pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
|
||||
+#else
|
||||
+ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New);
|
||||
+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy);
|
||||
+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow);
|
||||
+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream);
|
||||
+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream);
|
||||
+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile);
|
||||
+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady);
|
||||
+ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write);
|
||||
+ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print);
|
||||
+ pluginFuncs->event = (NPP_HandleEventProcPtr)(Private_HandleEvent);
|
||||
+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue);
|
||||
+ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue);
|
||||
+#endif
|
||||
+ if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
|
||||
+ {
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
+ pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify));
|
||||
+#else
|
||||
+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify));
|
||||
+#endif
|
||||
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
|
||||
{
|
||||
pluginFuncs->urlnotify = Private_URLNotify;
|
||||
diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c
|
||||
index 26c6736..450d627 100644
|
||||
--- a/projects/mozilla/support/npunix.c
|
||||
+++ b/projects/mozilla/support/npunix.c
|
||||
@@ -43,7 +43,132 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <npapi.h>
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
#include <npupp.h>
|
||||
+#else
|
||||
+#include <npfunctions.h>
|
||||
+// For 1.9 compatibility
|
||||
+// ------------------------------------------------
|
||||
+typedef NPError (*NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue);
|
||||
+#define NewNPN_GetValueProc(FUNC) \
|
||||
+ ((NPN_GetValueUPP) (FUNC))
|
||||
+#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \
|
||||
+ (*(FUNC))((ARG1), (ARG2), (ARG3))
|
||||
+
|
||||
+typedef NPError (*NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue);
|
||||
+#define NewNPN_SetValueProc(FUNC) \
|
||||
+ ((NPN_SetValueUPP) (FUNC))
|
||||
+#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \
|
||||
+ (*(FUNC))((ARG1), (ARG2), (ARG3))
|
||||
+
|
||||
+typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window);
|
||||
+#define NewNPN_GetURLProc(FUNC) \
|
||||
+ ((NPN_GetURLUPP) (FUNC))
|
||||
+#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \
|
||||
+ (*(FUNC))((ARG1), (ARG2), (ARG3))
|
||||
+
|
||||
+typedef NPError (*NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData);
|
||||
+#define NewNPN_GetURLNotifyProc(FUNC) \
|
||||
+ ((NPN_GetURLNotifyUPP) (FUNC))
|
||||
+#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \
|
||||
+ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
|
||||
+
|
||||
+typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file);
|
||||
+#define NewNPN_PostURLProc(FUNC) \
|
||||
+ ((NPN_PostURLUPP) (FUNC))
|
||||
+#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
|
||||
+ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
|
||||
+
|
||||
+typedef NPError (*NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData);
|
||||
+#define NewNPN_PostURLNotifyProc(FUNC) \
|
||||
+ ((NPN_PostURLNotifyUPP) (FUNC))
|
||||
+#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \
|
||||
+ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))
|
||||
+
|
||||
+typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList);
|
||||
+#define NewNPN_RequestReadProc(FUNC) \
|
||||
+ ((NPN_RequestReadUPP) (FUNC))
|
||||
+#define CallNPN_RequestReadProc(FUNC, stream, range) \
|
||||
+ (*(FUNC))((stream), (range))
|
||||
+
|
||||
+typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream);
|
||||
+#define NewNPN_NewStreamProc(FUNC) \
|
||||
+ ((NPN_NewStreamUPP) (FUNC))
|
||||
+#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \
|
||||
+ (*(FUNC))((npp), (type), (window), (stream))
|
||||
+
|
||||
+typedef int32_t (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32_t len, void* buffer);
|
||||
+#define NewNPN_WriteProc(FUNC) \
|
||||
+ ((NPN_WriteUPP) (FUNC))
|
||||
+#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \
|
||||
+ (*(FUNC))((npp), (stream), (len), (buffer))
|
||||
+
|
||||
+typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason);
|
||||
+#define NewNPN_DestroyStreamProc(FUNC) \
|
||||
+ ((NPN_DestroyStreamUPP) (FUNC))
|
||||
+#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \
|
||||
+ (*(FUNC))((npp), (stream), (reason))
|
||||
+
|
||||
+typedef void (*NPN_StatusUPP)(NPP instance, const char* message);
|
||||
+#define NewNPN_StatusProc(FUNC) \
|
||||
+ ((NPN_StatusUPP) (FUNC))
|
||||
+#define CallNPN_StatusProc(FUNC, npp, msg) \
|
||||
+ (*(FUNC))((npp), (msg))
|
||||
+
|
||||
+typedef const char* (*NPN_UserAgentUPP)(NPP instance);
|
||||
+#define NewNPN_UserAgentProc(FUNC) \
|
||||
+ ((NPN_UserAgentUPP) (FUNC))
|
||||
+#define CallNPN_UserAgentProc(FUNC, ARG1) \
|
||||
+ (*(FUNC))((ARG1))
|
||||
+
|
||||
+typedef void* (*NPN_MemAllocUPP)(uint32_t size);
|
||||
+#define NewNPN_MemAllocProc(FUNC) \
|
||||
+ ((NPN_MemAllocUPP) (FUNC))
|
||||
+#define CallNPN_MemAllocProc(FUNC, ARG1) \
|
||||
+ (*(FUNC))((ARG1))
|
||||
+
|
||||
+typedef void (*NPN_MemFreeUPP)(void* ptr);
|
||||
+#define NewNPN_MemFreeProc(FUNC) \
|
||||
+ ((NPN_MemFreeUPP) (FUNC))
|
||||
+#define CallNPN_MemFreeProc(FUNC, ARG1) \
|
||||
+ (*(FUNC))((ARG1))
|
||||
+
|
||||
+typedef uint32_t (*NPN_MemFlushUPP)(uint32_t size);
|
||||
+#define NewNPN_MemFlushProc(FUNC) \
|
||||
+ ((NPN_MemFlushUPP) (FUNC))
|
||||
+#define CallNPN_MemFlushProc(FUNC, ARG1) \
|
||||
+ (*(FUNC))((ARG1))
|
||||
+
|
||||
+typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages);
|
||||
+#define NewNPN_ReloadPluginsProc(FUNC) \
|
||||
+ ((NPN_ReloadPluginsUPP) (FUNC))
|
||||
+#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \
|
||||
+ (*(FUNC))((ARG1))
|
||||
+
|
||||
+//NPN_GetJavaEnv NPN_GetJavaPeer
|
||||
+
|
||||
+typedef void (*NPN_InvalidateRectUPP)(NPP instance, NPRect *rect);
|
||||
+#define NewNPN_InvalidateRectProc(FUNC) \
|
||||
+ ((NPN_InvalidateRectUPP) (FUNC))
|
||||
+#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \
|
||||
+ (*(FUNC))((ARG1), (ARG2))
|
||||
+
|
||||
+typedef void (*NPN_InvalidateRegionUPP)(NPP instance, NPRegion region);
|
||||
+#define NewNPN_InvalidateRegionProc(FUNC) \
|
||||
+ ((NPN_InvalidateRegionUPP) (FUNC))
|
||||
+#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \
|
||||
+ (*(FUNC))((ARG1), (ARG2))
|
||||
+
|
||||
+typedef void (*NPN_ForceRedrawUPP)(NPP instance);
|
||||
+#define NewNPN_ForceRedrawProc(FUNC) \
|
||||
+ ((NPN_ForceRedrawUPP) (FUNC))
|
||||
+#define CallNPN_ForceRedrawProc(FUNC, ARG1) \
|
||||
+ (*(FUNC))((ARG1))
|
||||
+
|
||||
+//NPN_GetStringIdentifier NPN_GetStringIdentifiers NPN_GetIntIdentifier NPN_IdentifierIsString
|
||||
+//NPN_UTF8FromIdentifier NPN_IntFromIdentifier NPN_CreateObject
|
||||
+
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Define PLUGIN_TRACE to have the wrapper functions print
|
||||
@@ -117,14 +242,14 @@ NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notify
|
||||
|
||||
NPError
|
||||
NPN_PostURL(NPP instance, const char* url, const char* window,
|
||||
- uint32 len, const char* buf, NPBool file)
|
||||
+ uint32_t len, const char* buf, NPBool file)
|
||||
{
|
||||
return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance,
|
||||
url, window, len, buf, file);
|
||||
}
|
||||
|
||||
NPError
|
||||
-NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len,
|
||||
+NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len,
|
||||
const char* buf, NPBool file, void* notifyData)
|
||||
{
|
||||
return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify,
|
||||
@@ -147,7 +272,7 @@ NPN_NewStream(NPP instance, NPMIMEType type, const char *window,
|
||||
}
|
||||
|
||||
int32
|
||||
-NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
|
||||
+NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)
|
||||
{
|
||||
return CallNPN_WriteProc(gNetscapeFuncs.write, instance,
|
||||
stream, len, buffer);
|
||||
@@ -173,7 +298,7 @@ NPN_UserAgent(NPP instance)
|
||||
}
|
||||
|
||||
void*
|
||||
-NPN_MemAlloc(uint32 size)
|
||||
+NPN_MemAlloc(uint32_t size)
|
||||
{
|
||||
return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);
|
||||
}
|
||||
@@ -183,7 +308,7 @@ void NPN_MemFree(void* ptr)
|
||||
CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);
|
||||
}
|
||||
|
||||
-uint32 NPN_MemFlush(uint32 size)
|
||||
+uint32_t NPN_MemFlush(uint32_t size)
|
||||
{
|
||||
return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);
|
||||
}
|
||||
@@ -423,8 +548,8 @@ void NPN_SetException(NPObject *npobj, const NPUTF8 *message)
|
||||
***********************************************************************/
|
||||
|
||||
NPError
|
||||
-Private_New(NPMIMEType pluginType, NPP instance, uint16 mode,
|
||||
- int16 argc, char* argn[], char* argv[], NPSavedData* saved)
|
||||
+Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode,
|
||||
+ int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
|
||||
{
|
||||
NPError ret;
|
||||
PLUGINDEBUGSTR("New");
|
||||
@@ -468,7 +593,7 @@ Private_WriteReady(NPP instance, NPStream* stream)
|
||||
}
|
||||
|
||||
int32
|
||||
-Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len,
|
||||
+Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len,
|
||||
void* buffer)
|
||||
{
|
||||
unsigned int result;
|
||||
@@ -685,6 +810,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
|
||||
*/
|
||||
pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
|
||||
pluginFuncs->size = sizeof(NPPluginFuncs);
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
pluginFuncs->newp = NewNPP_NewProc(Private_New);
|
||||
pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);
|
||||
pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);
|
||||
@@ -697,9 +823,27 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
|
||||
pluginFuncs->event = NULL;
|
||||
pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
|
||||
pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
|
||||
+#else
|
||||
+ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New);
|
||||
+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy);
|
||||
+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow);
|
||||
+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream);
|
||||
+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream);
|
||||
+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile);
|
||||
+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady);
|
||||
+ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write);
|
||||
+ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print);
|
||||
+ pluginFuncs->event = NULL;
|
||||
+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue);
|
||||
+ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue);
|
||||
+#endif
|
||||
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
|
||||
{
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
|
||||
+#else
|
||||
+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify);
|
||||
+#endif
|
||||
}
|
||||
#ifdef OJI
|
||||
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
|
||||
diff --git a/projects/mozilla/support/npwin.cpp b/projects/mozilla/support/npwin.cpp
|
||||
index c277f84..2d08805 100644
|
||||
--- a/projects/mozilla/support/npwin.cpp
|
||||
+++ b/projects/mozilla/support/npwin.cpp
|
||||
@@ -42,7 +42,11 @@
|
||||
#endif
|
||||
|
||||
#include "npapi.h"
|
||||
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
||||
#include "npupp.h"
|
||||
+#else
|
||||
+#include "npfunctions.h"
|
||||
+#endif
|
||||
|
||||
//\\// DEFINE
|
||||
#define NP_EXPORT
|
||||
@@ -228,7 +232,7 @@ NPError NPN_GetURL(NPP instance, const char *url, const char *target)
|
||||
return g_pNavigatorFuncs->geturl(instance, url, target);
|
||||
}
|
||||
|
||||
-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData)
|
||||
+NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData)
|
||||
{
|
||||
int navMinorVers = g_pNavigatorFuncs->version & 0xFF;
|
||||
NPError err;
|
||||
@@ -242,7 +246,7 @@ NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uin
|
||||
}
|
||||
|
||||
|
||||
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)
|
||||
+NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file)
|
||||
{
|
||||
return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file);
|
||||
}
|
||||
@@ -276,11 +280,11 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type,
|
||||
|
||||
/* Provides len bytes of data.
|
||||
*/
|
||||
-int32 NPN_Write(NPP instance, NPStream *stream,
|
||||
- int32 len, void *buffer)
|
||||
+int32_t NPN_Write(NPP instance, NPStream *stream,
|
||||
+ int32_t len, void *buffer)
|
||||
{
|
||||
int navMinorVersion = g_pNavigatorFuncs->version & 0xFF;
|
||||
- int32 result;
|
||||
+ int32_t result;
|
||||
|
||||
if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) {
|
||||
result = g_pNavigatorFuncs->write(instance, stream, len, buffer);
|
||||
@@ -327,7 +331,7 @@ const char* NPN_UserAgent(NPP instance)
|
||||
*/
|
||||
|
||||
|
||||
-void* NPN_MemAlloc(uint32 size)
|
||||
+void* NPN_MemAlloc(uint32_t size)
|
||||
{
|
||||
return g_pNavigatorFuncs->memalloc(size);
|
||||
}
|
@ -1 +1 @@
|
||||
3397813329f2b962f28ddb1cc6e0242f vlc-1.0.0-pre1.tar.bz2
|
||||
42e31b46e6faa3e0ce7aec3790f014a3 vlc-1.0.0-rc1.tar.bz2
|
||||
|
@ -0,0 +1,751 @@
|
||||
diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
|
||||
index 4085e25..5794c0a 100644
|
||||
--- a/include/vlc/libvlc.h
|
||||
+++ b/include/vlc/libvlc.h
|
||||
@@ -1065,7 +1065,7 @@ VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc
|
||||
* \param i_height the snapshot's height
|
||||
* \param p_e an initialized exception pointer
|
||||
*/
|
||||
-VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, char *,unsigned int, unsigned int, libvlc_exception_t * );
|
||||
+VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * );
|
||||
|
||||
/**
|
||||
* Resize the current video output window.
|
||||
diff --git a/include/vlc_url.h b/include/vlc_url.h
|
||||
index dc2a021..448c685 100644
|
||||
--- a/include/vlc_url.h
|
||||
+++ b/include/vlc_url.h
|
||||
@@ -48,8 +48,9 @@ struct vlc_url_t
|
||||
VLC_EXPORT( char *, unescape_URI_duplicate, ( const char *psz ) );
|
||||
VLC_EXPORT( void, unescape_URI, ( char *psz ) );
|
||||
VLC_EXPORT( char *, decode_URI_duplicate, ( const char *psz ) );
|
||||
-VLC_EXPORT( void, decode_URI, ( char *psz ) );
|
||||
+VLC_EXPORT( char *, decode_URI, ( char *psz ) );
|
||||
VLC_EXPORT( char *, encode_URI_component, ( const char *psz ) );
|
||||
+VLC_EXPORT( char *, make_URI, ( const char *path ) );
|
||||
|
||||
/*****************************************************************************
|
||||
* vlc_UrlParse:
|
||||
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
|
||||
index 19e4b75..86bd6dd 100644
|
||||
--- a/modules/audio_output/pulse.c
|
||||
+++ b/modules/audio_output/pulse.c
|
||||
@@ -176,16 +176,15 @@ static int Open ( vlc_object_t *p_this )
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- a.maxlength = pa_bytes_per_second(&ss)/4/pa_frame_size(&ss);
|
||||
- a.tlength = a.maxlength*9/10;
|
||||
- a.prebuf = a.tlength/2;
|
||||
- a.minreq = a.tlength/10;
|
||||
-
|
||||
- a.maxlength *= pa_frame_size(&ss);
|
||||
- a.tlength *= pa_frame_size(&ss);
|
||||
- a.prebuf *= pa_frame_size(&ss);
|
||||
- a.minreq *= pa_frame_size(&ss);
|
||||
-
|
||||
+ /* Reduce overall latency to 200mS to reduce audible clicks
|
||||
+ * Also pulse minreq and internal buffers are now 20mS which reduces resampling
|
||||
+ */
|
||||
+ a.tlength = pa_bytes_per_second(&ss)/5;
|
||||
+ a.maxlength = a.tlength * 2;
|
||||
+ a.prebuf = a.tlength;
|
||||
+ a.minreq = a.tlength / 10;
|
||||
+
|
||||
+ /* Buffer size is 20mS */
|
||||
p_sys->buffer_size = a.minreq;
|
||||
|
||||
/* Initialise the speaker map setup above */
|
||||
@@ -240,7 +239,7 @@ static int Open ( vlc_object_t *p_this )
|
||||
pa_stream_set_write_callback(p_sys->stream, stream_request_cb, p_aout);
|
||||
pa_stream_set_latency_update_callback(p_sys->stream, stream_latency_update_cb, p_aout);
|
||||
|
||||
- if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL) < 0) {
|
||||
+ if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_ADJUST_LATENCY, NULL, NULL) < 0) {
|
||||
msg_Err(p_aout, "Failed to connect stream: %s", pa_strerror(pa_context_errno(p_sys->context)));
|
||||
goto unlock_and_fail;
|
||||
}
|
||||
@@ -448,16 +447,11 @@ static void stream_request_cb(pa_stream *s, size_t length, void *userdata) {
|
||||
latency = 0;
|
||||
|
||||
}
|
||||
+
|
||||
PULSE_DEBUG( "Pulse stream request latency=%"PRId64"", latency);
|
||||
next_date = mdate() + latency;
|
||||
|
||||
-
|
||||
if(p_sys->start_date < next_date + AOUT_PTS_TOLERANCE ){
|
||||
- /*
|
||||
- vlc_mutex_lock( &p_aout->output_fifo_lock );
|
||||
- p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo );
|
||||
- vlc_mutex_unlock( &p_aout->output_fifo_lock );
|
||||
- */
|
||||
p_buffer = aout_OutputNextBuffer( p_aout, next_date, 0);
|
||||
}
|
||||
}
|
||||
diff --git a/modules/control/http/http.c b/modules/control/http/http.c
|
||||
index 5bce03b..75f24c2 100644
|
||||
--- a/modules/control/http/http.c
|
||||
+++ b/modules/control/http/http.c
|
||||
@@ -555,18 +555,11 @@ int HandlerCallback( httpd_handler_sys_t *p_args,
|
||||
int i_env = 0;
|
||||
char **ppsz_env = NULL;
|
||||
char *psz_tmp;
|
||||
- char sep;
|
||||
size_t i_buffer;
|
||||
char *p_buffer;
|
||||
char *psz_cwd, *psz_file = NULL;
|
||||
int i_ret;
|
||||
|
||||
-#ifdef WIN32
|
||||
- sep = '\\';
|
||||
-#else
|
||||
- sep = '/';
|
||||
-#endif
|
||||
-
|
||||
/* Create environment for the CGI */
|
||||
TAB_APPEND( i_env, ppsz_env, strdup("GATEWAY_INTERFACE=CGI/1.1") );
|
||||
TAB_APPEND( i_env, ppsz_env, strdup("SERVER_PROTOCOL=HTTP/1.1") );
|
||||
@@ -677,7 +670,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args,
|
||||
}
|
||||
}
|
||||
|
||||
- psz_file = strrchr( p_args->file.file, sep );
|
||||
+ psz_file = strrchr( p_args->file.file, DIR_SEP_CHAR );
|
||||
if( psz_file != NULL )
|
||||
{
|
||||
psz_file++;
|
||||
@@ -694,7 +687,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args,
|
||||
NULL );
|
||||
|
||||
psz_tmp = strdup( p_args->file.file );
|
||||
- p = strrchr( psz_tmp, sep );
|
||||
+ p = strrchr( psz_tmp, DIR_SEP_CHAR );
|
||||
if( p != NULL )
|
||||
{
|
||||
*p = '\0';
|
||||
diff --git a/modules/control/http/util.c b/modules/control/http/util.c
|
||||
index a8b7861..69de4a6 100644
|
||||
--- a/modules/control/http/util.c
|
||||
+++ b/modules/control/http/util.c
|
||||
@@ -120,14 +120,6 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
|
||||
|
||||
int i_dirlen;
|
||||
|
||||
- char sep;
|
||||
-
|
||||
-#if defined( WIN32 )
|
||||
- sep = '\\';
|
||||
-#else
|
||||
- sep = '/';
|
||||
-#endif
|
||||
-
|
||||
if( ( p_dir = utf8_opendir( psz_dir ) ) == NULL )
|
||||
{
|
||||
if( errno != ENOENT && errno != ENOTDIR )
|
||||
@@ -145,7 +137,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
|
||||
|
||||
msg_Dbg( p_intf, "dir=%s", psz_dir );
|
||||
|
||||
- snprintf( dir, sizeof( dir ), "%s%c.access", psz_dir, sep );
|
||||
+ snprintf( dir, sizeof( dir ), "%s"DIR_SEP".access", psz_dir );
|
||||
if( ( file = utf8_fopen( dir, "r" ) ) != NULL )
|
||||
{
|
||||
char line[1024];
|
||||
@@ -179,7 +171,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
|
||||
fclose( file );
|
||||
}
|
||||
|
||||
- snprintf( dir, sizeof( dir ), "%s%c.hosts", psz_dir, sep );
|
||||
+ snprintf( dir, sizeof( dir ), "%s"DIR_SEP".hosts", psz_dir );
|
||||
p_acl = ACL_Create( p_intf, false );
|
||||
if( ACL_LoadFile( p_acl, dir ) )
|
||||
{
|
||||
@@ -210,7 +202,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
|
||||
continue;
|
||||
}
|
||||
|
||||
- snprintf( dir, sizeof( dir ), "%s%c%s", psz_dir, sep, psz_filename );
|
||||
+ snprintf( dir, sizeof( dir ), "%s"DIR_SEP"%s", psz_dir, psz_filename );
|
||||
free( psz_filename );
|
||||
|
||||
if( ParseDirectory( p_intf, psz_root, dir ) )
|
||||
@@ -912,13 +904,12 @@ char *RealPath( const char *psz_src )
|
||||
char *psz_dir;
|
||||
char *p;
|
||||
int i_len = strlen(psz_src);
|
||||
- const char sep = DIR_SEP_CHAR;
|
||||
|
||||
psz_dir = malloc( i_len + 2 );
|
||||
strcpy( psz_dir, psz_src );
|
||||
|
||||
/* Add a trailing sep to ease the .. step */
|
||||
- psz_dir[i_len] = sep;
|
||||
+ psz_dir[i_len] = DIR_SEP_CHAR;
|
||||
psz_dir[i_len + 1] = '\0';
|
||||
|
||||
#if (DIR_SEP_CHAR != '/')
|
||||
@@ -926,18 +917,18 @@ char *RealPath( const char *psz_src )
|
||||
p = psz_dir;
|
||||
while( (p = strchr( p, '/' )) != NULL )
|
||||
{
|
||||
- *p = sep;
|
||||
+ *p = DIR_SEP_CHAR;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* FIXME: this could be O(N) rather than O(N²)... */
|
||||
/* Remove multiple separators and /./ */
|
||||
p = psz_dir;
|
||||
- while( (p = strchr( p, sep )) != NULL )
|
||||
+ while( (p = strchr( p, DIR_SEP_CHAR )) != NULL )
|
||||
{
|
||||
- if( p[1] == sep )
|
||||
+ if( p[1] == DIR_SEP_CHAR )
|
||||
memmove( &p[1], &p[2], strlen(&p[2]) + 1 );
|
||||
- else if( p[1] == '.' && p[2] == sep )
|
||||
+ else if( p[1] == '.' && p[2] == DIR_SEP_CHAR )
|
||||
memmove( &p[1], &p[3], strlen(&p[3]) + 1 );
|
||||
else
|
||||
p++;
|
||||
@@ -955,13 +946,13 @@ char *RealPath( const char *psz_src )
|
||||
{
|
||||
/* Fix all .. dir */
|
||||
p = psz_dir + 3;
|
||||
- while( (p = strchr( p, sep )) != NULL )
|
||||
+ while( (p = strchr( p, DIR_SEP_CHAR )) != NULL )
|
||||
{
|
||||
- if( p[-1] == '.' && p[-2] == '.' && p[-3] == sep )
|
||||
+ if( p[-1] == '.' && p[-2] == '.' && p[-3] == DIR_SEP_CHAR )
|
||||
{
|
||||
char *q;
|
||||
p[-3] = '\0';
|
||||
- if( (q = strrchr( psz_dir, sep )) != NULL )
|
||||
+ if( (q = strrchr( psz_dir, DIR_SEP_CHAR )) != NULL )
|
||||
{
|
||||
memmove( q + 1, p + 1, strlen(p + 1) + 1 );
|
||||
p = q + 1;
|
||||
@@ -979,8 +970,8 @@ char *RealPath( const char *psz_src )
|
||||
|
||||
/* Remove trailing sep if there are at least 2 sep in the string
|
||||
* (handles the C:\ stuff) */
|
||||
- p = strrchr( psz_dir, sep );
|
||||
- if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, sep ) )
|
||||
+ p = strrchr( psz_dir, DIR_SEP_CHAR );
|
||||
+ if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, DIR_SEP_CHAR ) )
|
||||
*p = '\0';
|
||||
|
||||
return psz_dir;
|
||||
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
|
||||
index ab0eb9a..8baf686 100644
|
||||
--- a/modules/gui/qt4/main_interface.cpp
|
||||
+++ b/modules/gui/qt4/main_interface.cpp
|
||||
@@ -637,7 +637,7 @@ QSize MainInterface::sizeHint() const
|
||||
*/
|
||||
void MainInterface::doComponentsUpdate()
|
||||
{
|
||||
- if( isFullScreen() ) return;
|
||||
+ if( isFullScreen() || isMaximized() ) return;
|
||||
|
||||
msg_Dbg( p_intf, "Updating the geometry" );
|
||||
/* Here we resize to sizeHint() and not adjustsize because we want
|
||||
diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c
|
||||
index 9b7ef96..0f5f82c 100644
|
||||
--- a/modules/misc/playlist/xspf.c
|
||||
+++ b/modules/misc/playlist/xspf.c
|
||||
@@ -34,11 +34,14 @@
|
||||
#include <vlc_playlist.h>
|
||||
#include <vlc_input.h>
|
||||
#include <vlc_strings.h>
|
||||
-#include <vlc_charset.h>
|
||||
+#include <vlc_url.h>
|
||||
#include "xspf.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
+static void xspf_export_item( playlist_item_t *, FILE *, int * );
|
||||
+static void xspf_extension_item( playlist_item_t *, FILE *, int * );
|
||||
+
|
||||
/**
|
||||
* \brief Prints the XSPF header to file, writes each item by xspf_export_item()
|
||||
* and closes the open xml elements
|
||||
@@ -139,7 +142,7 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file,
|
||||
|
||||
if( psz_uri && *psz_uri )
|
||||
{
|
||||
- psz = assertUTF8URI( psz_uri );
|
||||
+ psz = make_URI( psz_uri );
|
||||
fprintf( p_file, "\t\t\t<location>%s</location>\n", psz );
|
||||
free( psz );
|
||||
}
|
||||
@@ -209,7 +212,7 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file,
|
||||
if( psz == NULL ) psz = strdup( "" );
|
||||
if( !EMPTY_STR( psz ) )
|
||||
{
|
||||
- psz_uri = assertUTF8URI( psz );
|
||||
+ psz_uri = make_URI( psz );
|
||||
fprintf( p_file, "\t\t\t<image>%s</image>\n", psz_uri );
|
||||
free( psz_uri );
|
||||
}
|
||||
@@ -284,89 +287,3 @@ static void xspf_extension_item( playlist_item_t *p_item, FILE *p_file,
|
||||
|
||||
return;
|
||||
}
|
||||
-
|
||||
-/**
|
||||
- * \param psz_name the location of the media ressource (e.g. local file,
|
||||
- * device, network stream, etc.)
|
||||
- * \return a new char buffer which asserts that the location is valid UTF-8
|
||||
- * and a valid URI
|
||||
- * \note the returned buffer must be freed, when it isn't used anymore
|
||||
- */
|
||||
-static char *assertUTF8URI( char *psz_name )
|
||||
-{
|
||||
- char *psz_ret = NULL; /**< the new result buffer to return */
|
||||
- char *psz_s = NULL, *psz_d = NULL; /**< src & dest pointers for URI conversion */
|
||||
- bool b_uri_is_file = false; /**< we do additional %-encoding if the URI is a file:// one */
|
||||
-
|
||||
- if( !psz_name || !*psz_name )
|
||||
- return NULL;
|
||||
-
|
||||
- /* check that string is valid UTF-8 */
|
||||
- /* XXX: Why do we even need to do that ? (all strings in core are UTF-8 encoded */
|
||||
- if( !( psz_s = EnsureUTF8( psz_name ) ) )
|
||||
- return NULL;
|
||||
-
|
||||
- /* max. 3x for URI conversion (percent escaping) and
|
||||
- 8 bytes for "file://" and NULL-termination */
|
||||
- psz_ret = (char *)malloc( strlen(psz_name)*6*3+8 );
|
||||
- if( !psz_ret )
|
||||
- return NULL;
|
||||
-
|
||||
- /** \todo check for a valid scheme part preceding the colon */
|
||||
- if( strstr( psz_s, "://") != NULL )
|
||||
- {
|
||||
- size_t i_delim = strcspn( psz_s, ":" );
|
||||
- i_delim++; /* skip the ':' */
|
||||
- strncpy( psz_ret, psz_s, i_delim );
|
||||
- psz_d = psz_ret + i_delim;
|
||||
-
|
||||
- if( !strncmp( psz_s, "file://", 7 ) )
|
||||
- b_uri_is_file = true;
|
||||
-
|
||||
- psz_s += i_delim;
|
||||
- }
|
||||
- /* assume "file" scheme if no scheme-part is included */
|
||||
- else
|
||||
- {
|
||||
- strcpy( psz_ret, "file://" );
|
||||
- psz_d = psz_ret + 7;
|
||||
- b_uri_is_file = true;
|
||||
- }
|
||||
-
|
||||
- while( *psz_s )
|
||||
- {
|
||||
- /* percent-encode all non-ASCII and the XML special characters and the percent sign itself */
|
||||
- if( *psz_s & B10000000 ||
|
||||
- *psz_s == '<' ||
|
||||
- *psz_s == '>' ||
|
||||
- *psz_s == '&' ||
|
||||
- *psz_s == ' ' ||
|
||||
- *psz_s == '+' ||
|
||||
- *psz_s == '%' ||
|
||||
- *psz_s == '\\' ||
|
||||
- ( b_uri_is_file && (
|
||||
- *psz_s == ':' ||
|
||||
- *psz_s == '"' ||
|
||||
- *psz_s == '?' ||
|
||||
- *psz_s == '#' ||
|
||||
- *psz_s == '[' ||
|
||||
- *psz_s == ']' ||
|
||||
- *psz_s == '@' )
|
||||
- )
|
||||
- )
|
||||
- {
|
||||
- *psz_d++ = '%';
|
||||
- *psz_d++ = hexchars[(*psz_s >> 4) & B00001111];
|
||||
- *psz_d++ = hexchars[*psz_s & B00001111];
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *psz_d++ = *psz_s;
|
||||
- }
|
||||
-
|
||||
- psz_s++;
|
||||
- }
|
||||
- *psz_d = '\0';
|
||||
-
|
||||
- return (char *)realloc( psz_ret, strlen( psz_ret ) + 1 );
|
||||
-}
|
||||
diff --git a/modules/misc/playlist/xspf.h b/modules/misc/playlist/xspf.h
|
||||
index 9a8ac6b..adfaa90 100644
|
||||
--- a/modules/misc/playlist/xspf.h
|
||||
+++ b/modules/misc/playlist/xspf.h
|
||||
@@ -33,6 +33,3 @@ const char hexchars[16] = "0123456789ABCDEF";
|
||||
|
||||
/* prototypes */
|
||||
int xspf_export_playlist( vlc_object_t * );
|
||||
-static void xspf_export_item( playlist_item_t *, FILE *, int * );
|
||||
-static void xspf_extension_item( playlist_item_t *, FILE *, int * );
|
||||
-static char *assertUTF8URI( char * );
|
||||
diff --git a/modules/misc/screensaver.c b/modules/misc/screensaver.c
|
||||
index 24448bc..b5d8946 100644
|
||||
--- a/modules/misc/screensaver.c
|
||||
+++ b/modules/misc/screensaver.c
|
||||
@@ -50,6 +50,10 @@
|
||||
#define GS_PATH "/org/gnome/ScreenSaver"
|
||||
#define GS_INTERFACE "org.gnome.ScreenSaver"
|
||||
|
||||
+#define FDS_SERVICE "org.freedesktop.ScreenSaver"
|
||||
+#define FDS_PATH "/ScreenSaver"
|
||||
+#define FDS_INTERFACE "org.freedesktop.ScreenSaver"
|
||||
+
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -67,8 +71,11 @@ static void poke_screensaver( intf_thread_t *p_intf,
|
||||
DBusConnection *p_connection );
|
||||
static void screensaver_send_message_void ( intf_thread_t *p_intf,
|
||||
DBusConnection *p_connection,
|
||||
+ const char *psz_service,
|
||||
+ const char *psz_path,
|
||||
+ const char *psz_interface,
|
||||
const char *psz_name );
|
||||
-static bool screensaver_is_running( DBusConnection *p_connection );
|
||||
+static bool screensaver_is_running( DBusConnection *p_connection, const char *psz_service );
|
||||
|
||||
|
||||
struct intf_sys_t
|
||||
@@ -235,34 +242,47 @@ static DBusConnection * dbus_init( intf_thread_t *p_intf )
|
||||
static void poke_screensaver( intf_thread_t *p_intf,
|
||||
DBusConnection *p_connection )
|
||||
{
|
||||
- if( screensaver_is_running( p_connection ) )
|
||||
+ if( screensaver_is_running( p_connection, GS_SERVICE ) )
|
||||
{
|
||||
# ifdef SCREENSAVER_DEBUG
|
||||
msg_Dbg( p_intf, "found a running gnome-screensaver instance" );
|
||||
# endif
|
||||
/* gnome-screensaver changed it's D-Bus interface, so we need both */
|
||||
- screensaver_send_message_void( p_intf, p_connection, "Poke" );
|
||||
- screensaver_send_message_void( p_intf, p_connection,
|
||||
- "SimulateUserActivity" );
|
||||
+ screensaver_send_message_void( p_intf, p_connection, GS_SERVICE, GS_PATH,
|
||||
+ GS_INTERFACE, "Poke" );
|
||||
+ screensaver_send_message_void( p_intf, p_connection, GS_SERVICE, GS_PATH,
|
||||
+ GS_INTERFACE, "SimulateUserActivity" );
|
||||
+ }
|
||||
+ else if( screensaver_is_running( p_connection, FDS_SERVICE ) )
|
||||
+ {
|
||||
+# ifdef SCREENSAVER_DEBUG
|
||||
+ msg_Dbg( p_intf, "found a running freedesktop-screensaver instance" );
|
||||
+# endif
|
||||
+ screensaver_send_message_void( p_intf, p_connection, FDS_SERVICE, FDS_PATH,
|
||||
+ FDS_INTERFACE, "SimulateUserActivity" );
|
||||
}
|
||||
# ifdef SCREENSAVER_DEBUG
|
||||
else
|
||||
{
|
||||
- msg_Dbg( p_intf, "found no running gnome-screensaver instance" );
|
||||
+ msg_Dbg( p_intf, "found no running (gnome|freedesktop)-screensaver instance" );
|
||||
}
|
||||
# endif
|
||||
+
|
||||
}
|
||||
|
||||
static void screensaver_send_message_void ( intf_thread_t *p_intf,
|
||||
DBusConnection *p_connection,
|
||||
+ const char *psz_service,
|
||||
+ const char *psz_path,
|
||||
+ const char *psz_interface,
|
||||
const char *psz_name )
|
||||
{
|
||||
DBusMessage *p_message;
|
||||
|
||||
if( !p_connection || !psz_name ) return;
|
||||
|
||||
- p_message = dbus_message_new_method_call( GS_SERVICE, GS_PATH,
|
||||
- GS_INTERFACE, psz_name );
|
||||
+ p_message = dbus_message_new_method_call( psz_service, psz_path,
|
||||
+ psz_interface, psz_name );
|
||||
if( p_message == NULL )
|
||||
{
|
||||
msg_Err( p_intf, "DBUS initialization failed: message initialization" );
|
||||
@@ -279,7 +299,7 @@ static void screensaver_send_message_void ( intf_thread_t *p_intf,
|
||||
dbus_message_unref( p_message );
|
||||
}
|
||||
|
||||
-static bool screensaver_is_running( DBusConnection *p_connection )
|
||||
+static bool screensaver_is_running( DBusConnection *p_connection, const char *psz_service )
|
||||
{
|
||||
DBusError error;
|
||||
bool b_return;
|
||||
@@ -287,7 +307,7 @@ static bool screensaver_is_running( DBusConnection *p_connection )
|
||||
if( !p_connection ) return false;
|
||||
|
||||
dbus_error_init( &error );
|
||||
- b_return = dbus_bus_name_has_owner( p_connection, GS_SERVICE, &error );
|
||||
+ b_return = dbus_bus_name_has_owner( p_connection, psz_service, &error );
|
||||
if( dbus_error_is_set( &error ) ) dbus_error_free (&error);
|
||||
|
||||
return b_return;
|
||||
diff --git a/src/control/video.c b/src/control/video.c
|
||||
index 567532c..81c0052 100644
|
||||
--- a/src/control/video.c
|
||||
+++ b/src/control/video.c
|
||||
@@ -104,7 +104,7 @@ void libvlc_toggle_fullscreen( libvlc_media_player_t *p_mi,
|
||||
}
|
||||
|
||||
void
|
||||
-libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, char *psz_filepath,
|
||||
+libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, const char *psz_filepath,
|
||||
unsigned int i_width, unsigned int i_height, libvlc_exception_t *p_e )
|
||||
{
|
||||
vout_thread_t *p_vout = GetVout( p_mi, p_e );
|
||||
diff --git a/src/test/url.c b/src/test/url.c
|
||||
index a097aca..d03e48c 100644
|
||||
--- a/src/test/url.c
|
||||
+++ b/src/test/url.c
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <assert.h>
|
||||
|
||||
typedef char * (*conv_t) (const char *);
|
||||
|
||||
@@ -60,8 +61,15 @@ static inline void test_b64 (const char *in, const char *out)
|
||||
test (vlc_b64_encode, in, out);
|
||||
}
|
||||
|
||||
+static inline void test_path (const char *in, const char *out)
|
||||
+{
|
||||
+ test (make_URI, in, out);
|
||||
+}
|
||||
+
|
||||
int main (void)
|
||||
{
|
||||
+ int val;
|
||||
+
|
||||
(void)setvbuf (stdout, NULL, _IONBF, 0);
|
||||
test_decode ("this_should_not_be_modified_1234",
|
||||
"this_should_not_be_modified_1234");
|
||||
@@ -93,5 +101,24 @@ int main (void)
|
||||
test_b64 ("fooba", "Zm9vYmE=");
|
||||
test_b64 ("foobar", "Zm9vYmFy");
|
||||
|
||||
+ /* Path test */
|
||||
+ test_path ("file:///", "file:///");
|
||||
+ test_path ("http://www.example.com/%7Ejohn/",
|
||||
+ "http://www.example.com/%7Ejohn/");
|
||||
+ test_path ("/", "file:///");
|
||||
+ test_path ("/home/john/", "file:///home/john/");
|
||||
+ test_path ("/home/john/music.ogg", "file:///home/john/music.ogg");
|
||||
+ //test_path ("\\\\server/pub/music.ogg", "file://server/pub/music.ogg");
|
||||
+
|
||||
+ /*int fd = open (".", O_RDONLY);
|
||||
+ assert (fd != -1);*/
|
||||
+ val = chdir ("/tmp");
|
||||
+ assert (val != -1);
|
||||
+ test_path ("movie.ogg", "file:///tmp/movie.ogg");
|
||||
+ test_path (".", "file:///tmp/.");
|
||||
+ test_path ("", "file:///tmp/");
|
||||
+ /*val = fchdir (fd);
|
||||
+ assert (val != -1);*/
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/text/strings.c b/src/text/strings.c
|
||||
index 8a0229c..860aae7 100644
|
||||
--- a/src/text/strings.c
|
||||
+++ b/src/text/strings.c
|
||||
@@ -130,7 +131,7 @@ void unescape_URI( char *psz )
|
||||
}
|
||||
|
||||
/**
|
||||
- * Decode encoded URI string
|
||||
+ * Decode encoded URI component. See also decode_URI().
|
||||
* \return decoded duplicated string
|
||||
*/
|
||||
char *decode_URI_duplicate( const char *psz )
|
||||
@@ -141,14 +142,23 @@ char *decode_URI_duplicate( const char *psz )
|
||||
}
|
||||
|
||||
/**
|
||||
- * Decode encoded URI string in place
|
||||
- * \return nothing
|
||||
+ * Decode an encoded URI component in place.
|
||||
+ * <b>This function does NOT decode entire URIs.</b>
|
||||
+ * It decodes components (e.g. host name, directory, file name).
|
||||
+ * Decoded URIs do not exist in the real world (see RFC3986 §2.4).
|
||||
+ * Complete URIs are always "encoded" (or they are syntaxically invalid).
|
||||
+ *
|
||||
+ * Note that URI encoding is different from Javascript escaping. Especially,
|
||||
+ * white spaces and Unicode non-ASCII code points are encoded differently.
|
||||
+ *
|
||||
+ * \return psz on success, NULL if it was not properly encoded
|
||||
*/
|
||||
-void decode_URI( char *psz )
|
||||
+char *decode_URI( char *psz )
|
||||
{
|
||||
unsigned char *in = (unsigned char *)psz, *out = in, c;
|
||||
+
|
||||
if( psz == NULL )
|
||||
- return;
|
||||
+ return NULL;
|
||||
|
||||
while( ( c = *in++ ) != '\0' )
|
||||
{
|
||||
@@ -160,14 +170,14 @@ void decode_URI( char *psz )
|
||||
|
||||
if( ( ( hex[0] = *in++ ) == 0 )
|
||||
|| ( ( hex[1] = *in++ ) == 0 ) )
|
||||
- return;
|
||||
+ return NULL;
|
||||
|
||||
hex[2] = '\0';
|
||||
*out++ = (unsigned char)strtoul( hex, NULL, 0x10 );
|
||||
break;
|
||||
}
|
||||
|
||||
- case '+':
|
||||
+ case '+': /* This is HTTP forms, not URI decoding... */
|
||||
*out++ = ' ';
|
||||
break;
|
||||
|
||||
@@ -182,6 +192,7 @@ void decode_URI( char *psz )
|
||||
}
|
||||
*out = '\0';
|
||||
EnsureUTF8( psz );
|
||||
+ return psz;
|
||||
}
|
||||
|
||||
static inline bool isurisafe( int c )
|
||||
@@ -193,23 +204,13 @@ static inline bool isurisafe( int c )
|
||||
|| ( strchr( "-._~", c ) != NULL );
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Encodes an URI component (RFC3986 §2).
|
||||
- *
|
||||
- * @param psz_uri nul-terminated UTF-8 representation of the component.
|
||||
- * Obviously, you can't pass an URI containing a nul character, but you don't
|
||||
- * want to do that, do you?
|
||||
- *
|
||||
- * @return encoded string (must be free()'d), or NULL for ENOMEM.
|
||||
- */
|
||||
-char *encode_URI_component( const char *psz_uri )
|
||||
+static char *encode_URI_bytes (const char *psz_uri, size_t len)
|
||||
{
|
||||
- char *psz_enc = malloc ((3 * strlen (psz_uri)) + 1), *out = psz_enc;
|
||||
-
|
||||
+ char *psz_enc = malloc (3 * len + 1), *out = psz_enc;
|
||||
if (psz_enc == NULL)
|
||||
return NULL;
|
||||
|
||||
- while (*psz_uri)
|
||||
+ for (size_t i = 0; i < len; i++)
|
||||
{
|
||||
static const char hex[16] = "0123456789ABCDEF";
|
||||
uint8_t c = *psz_uri;
|
||||
@@ -232,6 +233,21 @@ char *encode_URI_component( const char *psz_uri )
|
||||
return out ? out : psz_enc; /* realloc() can fail (safe) */
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * Encodes an URI component (RFC3986 §2).
|
||||
+ *
|
||||
+ * @param psz_uri nul-terminated UTF-8 representation of the component.
|
||||
+ * Obviously, you can't pass an URI containing a nul character, but you don't
|
||||
+ * want to do that, do you?
|
||||
+ *
|
||||
+ * @return encoded string (must be free()'d), or NULL for ENOMEM.
|
||||
+ */
|
||||
+char *encode_URI_component( const char *psz_uri )
|
||||
+{
|
||||
+ return encode_URI_bytes (psz_uri, strlen (psz_uri));
|
||||
+}
|
||||
+
|
||||
+
|
||||
static const struct xml_entity_s
|
||||
{
|
||||
char psz_entity[8];
|
||||
@@ -1120,3 +1136,78 @@ void path_sanitize( char *str )
|
||||
str++;
|
||||
}
|
||||
}
|
||||
+
|
||||
+#include <vlc_url.h>
|
||||
+
|
||||
+/**
|
||||
+ * Convert a file path to an URI. If already an URI, do nothing.
|
||||
+ */
|
||||
+char *make_URI (const char *path)
|
||||
+{
|
||||
+ if (path == NULL)
|
||||
+ return NULL;
|
||||
+ if (strstr (path, "://") != NULL)
|
||||
+ return strdup (path); /* Already an URI */
|
||||
+ /* Note: VLC cannot handle URI schemes without double slash after the
|
||||
+ * scheme name (such as mailto: or news:). */
|
||||
+
|
||||
+ char *buf;
|
||||
+#ifdef WIN32
|
||||
+ if (isalpha (path[0]) && (path[1] == ':'))
|
||||
+ {
|
||||
+ if (asprintf (&buf, "file:///%c:", path[0]) == -1)
|
||||
+ buf = NULL;
|
||||
+ path += 2;
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
+#if 0
|
||||
+ /* Windows UNC paths (file://host/share/path instead of file:///path) */
|
||||
+ if (!strncmp (path, "\\\\", 2))
|
||||
+ {
|
||||
+ path += 2;
|
||||
+ buf = strdup ("file://");
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
+ if (path[0] != DIR_SEP_CHAR)
|
||||
+ { /* Relative path: prepend the current working directory */
|
||||
+ char cwd[PATH_MAX];
|
||||
+
|
||||
+ if (getcwd (cwd, sizeof (cwd)) == NULL) /* FIXME: UTF8? */
|
||||
+ return NULL;
|
||||
+ if (asprintf (&buf, "%s/%s", cwd, path) == -1)
|
||||
+ return NULL;
|
||||
+ char *ret = make_URI (buf);
|
||||
+ free (buf);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ else
|
||||
+ buf = strdup ("file://");
|
||||
+ if (buf == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ assert (path[0] == DIR_SEP_CHAR);
|
||||
+
|
||||
+ /* Absolute file path */
|
||||
+ for (const char *ptr = path + 1;; ptr++)
|
||||
+ {
|
||||
+ size_t len = strcspn (ptr, DIR_SEP);
|
||||
+ char *component = encode_URI_bytes (ptr, len);
|
||||
+ if (component == NULL)
|
||||
+ {
|
||||
+ free (buf);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ char *uri;
|
||||
+ int val = asprintf (&uri, "%s/%s", buf, component);
|
||||
+ free (component);
|
||||
+ free (buf);
|
||||
+ if (val == -1)
|
||||
+ return NULL;
|
||||
+ buf = uri;
|
||||
+ ptr += len;
|
||||
+ if (*ptr == '\0')
|
||||
+ return buf;
|
||||
+ }
|
||||
+}
|
@ -1,225 +0,0 @@
|
||||
diff -up vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c.libmpeg2_out vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c
|
||||
--- vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c.libmpeg2_out 2009-02-15 12:36:51.000000000 +0100
|
||||
+++ vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c 2009-04-09 21:39:18.000000000 +0200
|
||||
@@ -41,9 +41,9 @@
|
||||
#endif
|
||||
|
||||
#include "mpeg2.h"
|
||||
-#include "attributes.h"
|
||||
+//#include "attributes.h"
|
||||
#include "mpeg2_internal.h"
|
||||
-#include "xvmc_vld.h"
|
||||
+//#include "xvmc_vld.h"
|
||||
|
||||
/* Aspect ratio (ISO/IEC 13818-2 section 6.3.3, table 6-3) */
|
||||
#define AR_SQUARE_PICTURE 1 /* square pixels */
|
||||
@@ -277,7 +277,7 @@ static picture_t *DecodeBlock( decoder_t
|
||||
if ( p_sys->b_slice_i )
|
||||
{
|
||||
decoder_SynchroNewPicture( p_sys->p_synchro,
|
||||
- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate,
|
||||
+ I_CODING_TYPE, 2, 0, 0,
|
||||
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
|
||||
decoder_SynchroDecode( p_sys->p_synchro );
|
||||
decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 );
|
||||
@@ -396,7 +396,7 @@ static picture_t *DecodeBlock( decoder_t
|
||||
decoder_SynchroNewPicture( p_sys->p_synchro,
|
||||
p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE,
|
||||
p_sys->p_info->current_picture->nb_fields,
|
||||
- 0, 0, p_sys->i_current_rate,
|
||||
+ 0, 0,
|
||||
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
|
||||
|
||||
if( p_sys->b_skip )
|
||||
@@ -422,7 +422,7 @@ static picture_t *DecodeBlock( decoder_t
|
||||
/* Intra-slice refresh. Simulate a blank I picture. */
|
||||
msg_Dbg( p_dec, "intra-slice refresh stream" );
|
||||
decoder_SynchroNewPicture( p_sys->p_synchro,
|
||||
- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate,
|
||||
+ I_CODING_TYPE, 2, 0, 0,
|
||||
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
|
||||
decoder_SynchroDecode( p_sys->p_synchro );
|
||||
decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 );
|
||||
@@ -457,7 +457,7 @@ static picture_t *DecodeBlock( decoder_t
|
||||
decoder_SynchroNewPicture( p_sys->p_synchro,
|
||||
p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE,
|
||||
p_sys->p_info->current_picture->nb_fields, i_pts,
|
||||
- 0, p_sys->i_current_rate,
|
||||
+ 0,
|
||||
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
|
||||
|
||||
if ( !(p_sys->b_slice_i
|
||||
@@ -486,8 +486,8 @@ static picture_t *DecodeBlock( decoder_t
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- p_sys->p_mpeg2dec->ptr_forward_ref_picture = p_sys->p_mpeg2dec->fbuf[2]->id;
|
||||
- p_sys->p_mpeg2dec->ptr_backward_ref_picture = p_sys->p_mpeg2dec->fbuf[1]->id;
|
||||
+ //p_sys->p_mpeg2dec->ptr_forward_ref_picture = p_sys->p_mpeg2dec->fbuf[2]->id;
|
||||
+ //p_sys->p_mpeg2dec->ptr_backward_ref_picture = p_sys->p_mpeg2dec->fbuf[1]->id;
|
||||
|
||||
if ((p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE) != B_CODING_TYPE)
|
||||
{
|
||||
@@ -495,9 +495,9 @@ static picture_t *DecodeBlock( decoder_t
|
||||
// p_sys->p_mpeg2dec->ptr_forward_ref_picture != picture->backward_reference_frame)
|
||||
// p_pic->forward_reference_frame->free (p_pic->forward_reference_frame);
|
||||
|
||||
- p_sys->p_mpeg2dec->ptr_forward_ref_picture =
|
||||
- p_sys->p_mpeg2dec->ptr_backward_ref_picture;
|
||||
- p_sys->p_mpeg2dec->ptr_backward_ref_picture = (void *)p_pic;
|
||||
+ //p_sys->p_mpeg2dec->ptr_forward_ref_picture =
|
||||
+ // p_sys->p_mpeg2dec->ptr_backward_ref_picture;
|
||||
+ //p_sys->p_mpeg2dec->ptr_backward_ref_picture = (void *)p_pic;
|
||||
}
|
||||
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
|
||||
}
|
||||
@@ -595,7 +595,7 @@ static picture_t *DecodeBlock( decoder_t
|
||||
if( p_sys->b_slice_i )
|
||||
{
|
||||
decoder_SynchroNewPicture( p_sys->p_synchro,
|
||||
- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate,
|
||||
+ I_CODING_TYPE, 2, 0, 0,
|
||||
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
|
||||
decoder_SynchroDecode( p_sys->p_synchro );
|
||||
decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 );
|
||||
@@ -644,7 +644,7 @@ static double get_aspect_ratio( decoder_
|
||||
{
|
||||
/* these hardcoded values are defined on mpeg2 standard for
|
||||
* aspect ratio. other values are reserved or forbidden. */
|
||||
- switch( p_sys->p_mpeg2dec->decoder.aspect_ratio_information )
|
||||
+ /*switch( p_sys->p_mpeg2dec->decoder.aspect_ratio_information )
|
||||
{
|
||||
case 2:
|
||||
ratio = 4.0/3.0;
|
||||
@@ -656,16 +656,16 @@ static double get_aspect_ratio( decoder_
|
||||
ratio = 2.11/1.0;
|
||||
break;
|
||||
case 1:
|
||||
- default:
|
||||
+ default:*/
|
||||
ratio = (double)p_sys->p_mpeg2dec->decoder.width/(double)p_sys->p_mpeg2dec->decoder.height;
|
||||
- break;
|
||||
- }
|
||||
+ /* break;
|
||||
+ }*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/* mpeg1 constants refer to pixel aspect ratio */
|
||||
ratio = (double)p_sys->p_mpeg2dec->decoder.width/(double)p_sys->p_mpeg2dec->decoder.height;
|
||||
- ratio /= mpeg1_pel_ratio[p_sys->p_mpeg2dec->decoder.aspect_ratio_information];
|
||||
+ /* ratio /= mpeg1_pel_ratio[p_sys->p_mpeg2dec->decoder.aspect_ratio_information]; */
|
||||
}
|
||||
return ratio;
|
||||
}
|
||||
@@ -730,8 +730,8 @@ static picture_t *GetNewPicture( decoder
|
||||
p_dec->fmt_out.video.i_height,
|
||||
p_dec->fmt_out.video.i_aspect,
|
||||
format, flags);
|
||||
-#endif
|
||||
mpeg2_xxmc_choose_coding( p_dec, &p_sys->p_mpeg2dec->decoder, p_pic,
|
||||
get_aspect_ratio(p_dec), 0 );
|
||||
+#endif
|
||||
return p_pic;
|
||||
}
|
||||
diff -up vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c.libmpeg2_out vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c
|
||||
--- vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c.libmpeg2_out 2009-03-17 21:06:54.000000000 +0100
|
||||
+++ vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c 2009-04-10 01:19:01.000000000 +0200
|
||||
@@ -116,16 +116,7 @@ static void DestroyWindow ( vout_thread
|
||||
static int NewPicture ( vout_thread_t *, picture_t * );
|
||||
static void FreePicture ( vout_thread_t *, picture_t * );
|
||||
|
||||
-#ifndef MODULE_NAME_IS_glx
|
||||
-static IMAGE_TYPE *CreateImage ( vout_thread_t *,
|
||||
- Display *, EXTRA_ARGS, int, int );
|
||||
-#endif
|
||||
-
|
||||
#ifdef HAVE_SYS_SHM_H
|
||||
-#ifndef MODULE_NAME_IS_glx
|
||||
-IMAGE_TYPE *CreateShmImage ( vout_thread_t *,
|
||||
- Display *, EXTRA_ARGS_SHM, int, int );
|
||||
-#endif
|
||||
static int i_shm_major = 0;
|
||||
#endif
|
||||
|
||||
@@ -428,7 +419,7 @@ int Activate ( vlc_object_t *p_this )
|
||||
if( checkXvMCCap( p_vout ) == VLC_EGENERIC )
|
||||
{
|
||||
msg_Err( p_vout, "no XVMC capability found" );
|
||||
- Deactivate( p_vout );
|
||||
+ Deactivate( p_this );
|
||||
return VLC_EGENERIC;
|
||||
}
|
||||
subpicture_t sub_pic;
|
||||
@@ -1076,7 +1067,7 @@ static void DisplayVideo( vout_thread_t
|
||||
if( p_vout->p_sys->i_shm_opcode )
|
||||
{
|
||||
/* Display rendered image using shared memory extension */
|
||||
-# if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
|
||||
+#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
|
||||
XvShmPutImage( p_vout->p_sys->p_display, p_vout->p_sys->i_xvport,
|
||||
p_vout->p_sys->p_win->video_window,
|
||||
p_vout->p_sys->p_win->gc, p_pic->p_sys->p_image,
|
||||
@@ -1086,7 +1077,7 @@ static void DisplayVideo( vout_thread_t
|
||||
p_vout->fmt_out.i_visible_height,
|
||||
0 /*dest_x*/, 0 /*dest_y*/, i_width, i_height,
|
||||
False /* Don't put True here or you'll waste your CPU */ );
|
||||
-# else
|
||||
+#else
|
||||
XShmPutImage( p_vout->p_sys->p_display,
|
||||
p_vout->p_sys->p_win->video_window,
|
||||
p_vout->p_sys->p_win->gc, p_pic->p_sys->p_image,
|
||||
@@ -1096,7 +1087,7 @@ static void DisplayVideo( vout_thread_t
|
||||
p_vout->fmt_out.i_visible_width,
|
||||
p_vout->fmt_out.i_visible_height,
|
||||
False /* Don't put True here ! */ );
|
||||
-# endif
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_SYS_SHM_H */
|
||||
@@ -1922,13 +1913,13 @@ static int NewPicture( vout_thread_t *p_
|
||||
/* Create image using XShm extension */
|
||||
p_pic->p_sys->p_image =
|
||||
CreateShmImage( p_vout, p_vout->p_sys->p_display,
|
||||
-# if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
|
||||
+#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
|
||||
p_vout->p_sys->i_xvport,
|
||||
VLC2X11_FOURCC(p_vout->output.i_chroma),
|
||||
-# else
|
||||
+#else
|
||||
p_vout->p_sys->p_visual,
|
||||
p_vout->p_sys->i_screen_depth,
|
||||
-# endif
|
||||
+#endif
|
||||
&p_pic->p_sys->shminfo,
|
||||
p_vout->output.i_width, p_vout->output.i_height );
|
||||
}
|
||||
diff -up vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h.libmpeg2_out vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h
|
||||
--- vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h.libmpeg2_out 2009-04-10 00:23:24.000000000 +0200
|
||||
+++ vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h 2009-04-10 01:19:07.000000000 +0200
|
||||
@@ -395,4 +395,12 @@ typedef struct mwmhints_t
|
||||
# define MAX_DIRECTBUFFERS 2
|
||||
#endif
|
||||
|
||||
+#ifndef MODULE_NAME_IS_glx
|
||||
+static IMAGE_TYPE *CreateImage ( vout_thread_t *,
|
||||
+ Display *, EXTRA_ARGS, int, int );
|
||||
+#ifdef HAVE_SYS_SHM_H
|
||||
+IMAGE_TYPE *CreateShmImage ( vout_thread_t *,
|
||||
+ Display *, EXTRA_ARGS_SHM, int, int );
|
||||
+#endif
|
||||
+#endif
|
||||
|
||||
diff -up vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c.libmpeg2_out vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c
|
||||
--- vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c.libmpeg2_out 2009-02-14 13:39:08.000000000 +0100
|
||||
+++ vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c 2009-04-09 21:39:18.000000000 +0200
|
||||
@@ -1304,7 +1304,7 @@ void xxmc_do_update_frame( picture_t *pi
|
||||
/* Wait a little till frame is being displayed */
|
||||
while( status & XVMC_DISPLAYING )
|
||||
{
|
||||
- msleep(1);
|
||||
+ /* msleep(1); */
|
||||
|
||||
XvMCGetSurfaceStatus( p_vout->p_sys->p_display,
|
||||
picture->p_sys->xvmc_surf,
|
@ -0,0 +1,15 @@
|
||||
diff -up vlc-1.0.0-rc1/configure.ac.pkglibd vlc-1.0.0-rc1/configure.ac
|
||||
--- vlc-1.0.0-rc1/configure.ac.pkglibd 2009-05-12 14:39:52.000000000 +0200
|
||||
+++ vlc-1.0.0-rc1/configure.ac 2009-05-12 14:40:02.000000000 +0200
|
||||
@@ -144,11 +144,6 @@ AC_ARG_WITH(contrib,
|
||||
CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include"
|
||||
OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
|
||||
OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include"
|
||||
- if test $build = $host -o "$PKG_CONFIG_LIBDIR"; then
|
||||
- export PKG_CONFIG_PATH=${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
- else
|
||||
- export PKG_CONFIG_LIBDIR=${CONTRIB_DIR}/lib/pkgconfig
|
||||
- fi
|
||||
LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
|
||||
LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib"
|
||||
|
Loading…
Reference in new issue