[Bf-blender-cvs] [9853ecf] temp-decklink: Cleanup: indentation & minor formatting
Campbell Barton
noreply at git.blender.org
Fri Jun 10 11:57:38 CEST 2016
Commit: 9853ecfd54b74d885384f8fb5ffd4c1b5dded25a
Author: Campbell Barton
Date: Fri Jun 10 19:59:52 2016 +1000
Branches: temp-decklink
https://developer.blender.org/rB9853ecfd54b74d885384f8fb5ffd4c1b5dded25a
Cleanup: indentation & minor formatting
===================================================================
M intern/decklink/CMakeLists.txt
M intern/decklink/DeckLinkAPI.h
M intern/gpudirect/CMakeLists.txt
M intern/gpudirect/dvpapi.cpp
M intern/gpudirect/dvpapi.h
M source/blenderplayer/CMakeLists.txt
M source/gameengine/VideoTexture/DeckLink.cpp
M source/gameengine/VideoTexture/VideoDeckLink.cpp
M source/gameengine/VideoTexture/VideoDeckLink.h
===================================================================
diff --git a/intern/decklink/CMakeLists.txt b/intern/decklink/CMakeLists.txt
index 9329ab1..fbef65c 100644
--- a/intern/decklink/CMakeLists.txt
+++ b/intern/decklink/CMakeLists.txt
@@ -42,17 +42,17 @@ if (WIN32)
endif()
if (UNIX AND NOT APPLE)
- list(APPEND SRC
- linux/DeckLinkAPI.h
- linux/DeckLinkAPIConfiguration.h
- linux/DeckLinkAPIDeckControl.h
- linux/DeckLinkAPIDiscovery.h
- linux/DeckLinkAPIDispatch.cpp
- linux/DeckLinkAPIModes.h
- linux/DeckLinkAPIVersion.h
- linux/DeckLinkAPITypes.h
- linux/LinuxCOM.h
- )
+ list(APPEND SRC
+ linux/DeckLinkAPI.h
+ linux/DeckLinkAPIConfiguration.h
+ linux/DeckLinkAPIDeckControl.h
+ linux/DeckLinkAPIDiscovery.h
+ linux/DeckLinkAPIDispatch.cpp
+ linux/DeckLinkAPIModes.h
+ linux/DeckLinkAPIVersion.h
+ linux/DeckLinkAPITypes.h
+ linux/LinuxCOM.h
+ )
endif()
blender_add_lib(bf_intern_decklink "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/intern/decklink/DeckLinkAPI.h b/intern/decklink/DeckLinkAPI.h
index 5c040f5..f6d2b79 100644
--- a/intern/decklink/DeckLinkAPI.h
+++ b/intern/decklink/DeckLinkAPI.h
@@ -35,24 +35,22 @@
/* Include the OS specific Declink headers */
#ifdef WIN32
- #include <windows.h>
- #include <objbase.h>
- #include <comutil.h>
- #include "win/DeckLinkAPI_h.h"
- typedef unsigned int dl_size_t;
+# include <windows.h>
+# include <objbase.h>
+# include <comutil.h>
+# include "win/DeckLinkAPI_h.h"
+ typedef unsigned int dl_size_t;
#elif defined(__APPLE__)
- #error "Decklink not supported in OSX"
+# error "Decklink not supported in OSX"
#else
- #include "linux/DeckLinkAPI.h"
- /* Windows COM API uses BOOL, linux uses bool */
- #define BOOL bool
- typedef uint32_t dl_size_t;
+# include "linux/DeckLinkAPI.h"
+ /* Windows COM API uses BOOL, linux uses bool */
+# define BOOL bool
+ typedef uint32_t dl_size_t;
#endif
-
-
/* OS independent function to get the device iterator */
IDeckLinkIterator* BMD_CreateDeckLinkIterator(void);
-#endif
+#endif /* __DECKLINKAPI_H__ */
diff --git a/intern/gpudirect/CMakeLists.txt b/intern/gpudirect/CMakeLists.txt
index e47be7e..88c09a6 100644
--- a/intern/gpudirect/CMakeLists.txt
+++ b/intern/gpudirect/CMakeLists.txt
@@ -25,6 +25,7 @@
set(INC
.
+ # XXX, bad level include!
../../source/blender/blenlib
)
diff --git a/intern/gpudirect/dvpapi.cpp b/intern/gpudirect/dvpapi.cpp
index 78c58bd..8ae5cdb 100644
--- a/intern/gpudirect/dvpapi.cpp
+++ b/intern/gpudirect/dvpapi.cpp
@@ -81,11 +81,9 @@ DVPStatus dvpGetLibrayVersion(uint32_t *major, uint32_t *minor)
DVPStatus dvpInitGLContext(uint32_t flags)
{
DVPStatus status;
- if (!__dvpLibrary)
- {
+ if (!__dvpLibrary) {
__dvpLibrary = BLI_dynlib_open(KDVPAPI_Name);
- if (!__dvpLibrary)
- {
+ if (!__dvpLibrary) {
return DVP_STATUS_ERROR;
}
// "?dvpInitGLContext@@YA?AW4DVPStatus@@I at Z";
@@ -129,19 +127,21 @@ DVPStatus dvpInitGLContext(uint32_t flags)
!__dvpGetRequiredConstantsGLCtx ||
!__dvpCreateGPUTextureGL ||
!__dvpUnbindFromGLCtx)
- return DVP_STATUS_ERROR;
+ {
+ return DVP_STATUS_ERROR;
+ }
// check that the library version is what we want
if ((status = __dvpGetLibrayVersion(&__dvpMajorVersion, &__dvpMinorVersion)) != DVP_STATUS_OK)
return status;
if (__dvpMajorVersion != DVP_MAJOR_VERSION || __dvpMinorVersion < DVP_MINOR_VERSION)
return DVP_STATUS_ERROR;
- }
- return (!__dvpInitGLContext) ? DVP_STATUS_ERROR : __dvpInitGLContext(flags);
+ }
+ return (!__dvpInitGLContext) ? DVP_STATUS_ERROR : __dvpInitGLContext(flags);
}
DVPStatus dvpCloseGLContext(void)
{
- return (!__dvpCloseGLContext) ? DVP_STATUS_ERROR : __dvpCloseGLContext();
+ return (!__dvpCloseGLContext) ? DVP_STATUS_ERROR : __dvpCloseGLContext();
}
#endif // WIN32
diff --git a/intern/gpudirect/dvpapi.h b/intern/gpudirect/dvpapi.h
index 36c690b..4cc259f 100644
--- a/intern/gpudirect/dvpapi.h
+++ b/intern/gpudirect/dvpapi.h
@@ -54,24 +54,23 @@
typedef uint64_t DVPBufferHandle;
typedef uint64_t DVPSyncObjectHandle;
-typedef enum
-{
- DVP_STATUS_OK = 0,
- DVP_STATUS_INVALID_PARAMETER = 1,
- DVP_STATUS_UNSUPPORTED = 2,
- DVP_STATUS_END_ENUMERATION = 3,
- DVP_STATUS_INVALID_DEVICE = 4,
- DVP_STATUS_OUT_OF_MEMORY = 5,
- DVP_STATUS_INVALID_OPERATION = 6,
- DVP_STATUS_TIMEOUT = 7,
- DVP_STATUS_INVALID_CONTEXT = 8,
- DVP_STATUS_INVALID_RESOURCE_TYPE = 9,
- DVP_STATUS_INVALID_FORMAT_OR_TYPE = 10,
- DVP_STATUS_DEVICE_UNINITIALIZED = 11,
- DVP_STATUS_UNSIGNALED = 12,
- DVP_STATUS_SYNC_ERROR = 13,
- DVP_STATUS_SYNC_STILL_BOUND = 14,
- DVP_STATUS_ERROR = -1,
+typedef enum {
+ DVP_STATUS_OK = 0,
+ DVP_STATUS_INVALID_PARAMETER = 1,
+ DVP_STATUS_UNSUPPORTED = 2,
+ DVP_STATUS_END_ENUMERATION = 3,
+ DVP_STATUS_INVALID_DEVICE = 4,
+ DVP_STATUS_OUT_OF_MEMORY = 5,
+ DVP_STATUS_INVALID_OPERATION = 6,
+ DVP_STATUS_TIMEOUT = 7,
+ DVP_STATUS_INVALID_CONTEXT = 8,
+ DVP_STATUS_INVALID_RESOURCE_TYPE = 9,
+ DVP_STATUS_INVALID_FORMAT_OR_TYPE = 10,
+ DVP_STATUS_DEVICE_UNINITIALIZED = 11,
+ DVP_STATUS_UNSIGNALED = 12,
+ DVP_STATUS_SYNC_ERROR = 13,
+ DVP_STATUS_SYNC_STILL_BOUND = 14,
+ DVP_STATUS_ERROR = -1,
} DVPStatus;
// Pixel component formats stored in the system memory buffer
@@ -83,74 +82,72 @@ typedef enum
// for the transformation. The CUDA types are to be used when
// copying to/from a system memory buffer from-to a CUDA array, as the
// CUDA array implies a memory layout that matches the array.
-typedef enum
-{
- DVP_BUFFER, // Buffer treated as a raw buffer
- // and copied directly into GPU buffer
- // without any interpretation of the
- // stored bytes.
- DVP_DEPTH_COMPONENT,
- DVP_RGBA,
- DVP_BGRA,
- DVP_RED,
- DVP_GREEN,
- DVP_BLUE,
- DVP_ALPHA,
- DVP_RGB,
- DVP_BGR,
- DVP_LUMINANCE,
- DVP_LUMINANCE_ALPHA,
- DVP_CUDA_1_CHANNEL,
- DVP_CUDA_2_CHANNELS,
- DVP_CUDA_4_CHANNELS,
- DVP_RGBA_INTEGER,
- DVP_BGRA_INTEGER,
- DVP_RED_INTEGER,
- DVP_GREEN_INTEGER,
- DVP_BLUE_INTEGER,
- DVP_ALPHA_INTEGER,
- DVP_RGB_INTEGER,
- DVP_BGR_INTEGER,
- DVP_LUMINANCE_INTEGER,
- DVP_LUMINANCE_ALPHA_INTEGER,
+typedef enum {
+ DVP_BUFFER, // Buffer treated as a raw buffer
+ // and copied directly into GPU buffer
+ // without any interpretation of the
+ // stored bytes.
+ DVP_DEPTH_COMPONENT,
+ DVP_RGBA,
+ DVP_BGRA,
+ DVP_RED,
+ DVP_GREEN,
+ DVP_BLUE,
+ DVP_ALPHA,
+ DVP_RGB,
+ DVP_BGR,
+ DVP_LUMINANCE,
+ DVP_LUMINANCE_ALPHA,
+ DVP_CUDA_1_CHANNEL,
+ DVP_CUDA_2_CHANNELS,
+ DVP_CUDA_4_CHANNELS,
+ DVP_RGBA_INTEGER,
+ DVP_BGRA_INTEGER,
+ DVP_RED_INTEGER,
+ DVP_GREEN_INTEGER,
+ DVP_BLUE_INTEGER,
+ DVP_ALPHA_INTEGER,
+ DVP_RGB_INTEGER,
+ DVP_BGR_INTEGER,
+ DVP_LUMINANCE_INTEGER,
+ DVP_LUMINANCE_ALPHA_INTEGER,
} DVPBufferFormats;
// Possible pixel component storage types for system memory buffers
-typedef enum
-{
- DVP_UNSIGNED_BYTE,
- DVP_BYTE,
- DVP_UNSIGNED_SHORT,
- DVP_SHORT,
- DVP_UNSIGNED_INT,
- DVP_INT,
- DVP_FLOAT,
- DVP_HALF_FLOAT,
- DVP_UNSIGNED_BYTE_3_3_2,
- DVP_UNSIGNED_BYTE_2_3_3_REV,
- DVP_UNSIGNED_SHORT_5_6_5,
- DVP_UNSIGNED_SHORT_5_6_5_REV,
- DVP_UNSIGNED_SHORT_4_4_4_4,
- DVP_UNSIGNED_SHORT_4_4_4_4_REV,
- DVP_UNSIGNED_SHORT_5_5_5_1,
- DVP_UNSIGNED_SHORT_1_5_5_5_REV,
- DVP_UNSIGNED_INT_8_8_8_8,
- DVP_UNSIGNED_INT_8_8_8_8_REV,
- DVP_UNSIGNED_INT_10_10_10_2,
- DVP_UNSIGNED_INT_2_10_10_10_REV,
+typedef enum {
+ DVP_UNSIGNED_BYTE,
+ DVP_BYTE,
+ DVP_UNSIGNED_SHORT,
+ DVP_SHORT,
+ DVP_UNSIGNED_INT,
+ DVP_INT,
+ DVP_FLOAT,
+ DVP_HALF_FLOAT,
+ DVP_UNSIGNED_BYTE_3_3_2,
+ DVP_UNSIGNED_BYTE_2_3_3_REV,
+ DVP_UNSIGNED_SHORT_5_6_5,
+ DVP_UNSIGNED_SHORT_5_6_5_REV,
+ DVP_UNSIGNED_SHORT_4_4_4_4,
+ DVP_UNSIGNED_SHORT_4_4_4_4_REV,
+ DVP_UNSIGNED_SHORT_5_5_5_1,
+ DVP_UNSIGNED_SHORT_1_5_5_5_REV,
+ DVP_UNSIGNED_INT_8_8_8_8,
+ DVP_UNSIGNED_INT_8_8_8_8_REV,
+ DVP_UNSIGNED_INT_10_10_10_2,
+ DVP_UNSIGNED_INT_2_10_10_10_REV,
} DVPBufferTypes;
// System memory descriptor describing the size and storage formats
// of the buffer
typedef struct DVPSysmemBufferDescRec {
- uint32_t width; // Buffer Width
- uint32_t height; // Buffer Height
- uint32_t stride; // Stride
- uint32_t size; // Specifies the surface size if
- // format == DVP_BUFFER
- DVPBufferFormats format; // see enum above
- DVPBufferTypes type; // see enum above
- void *bufAddr; // Buffer memory address
+ uint32_t width; // Buffer Width
+ uint32_t height; // Buffer Height
+ uint32_t stride; // Stride
+ uint32_t size; // Specifies the surface size if
+ // format == DVP_BUFFER
+ DVPBufferFormats format; // see enum above
+ DVPBufferTypes type; // see enum above
+ void *bufAddr; // Buffer memory address
} DVPSysmemBufferDesc;
// Flags specified at sync object creation:
@@ -164,22 +161,22 @@ typedef struct DVPSysmemBufferDescRec {
#define DVP_SYNC_OBJECT_FLAGS_USE_EVENTS 0x00000001
typedef struct DVPSyncObjectDescRec {
- uint32_t *sem; // Location to write semaphore value
- uint32_t flags; // See above DVP_SYNC_OBJECT_FLAGS_* bits
- DVPStatus (*externalClientWaitFunc) (DVPSyn
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list