Blender Git Loki

Git Commits -> Revision 26b1114

Revision 26b1114 by Benoit Bolsee (temp-decklink)
June 10, 2016, 08:09 (GMT)
BGE: DeckLink card support for video capture and streaming.

You can capture and stream video in the BGE using the DeckLink video
cards from Black Magic Design. You need a card and Desktop Video software
version 10.4 or above to use these features in the BGE.
Many thanks to Nuno Estanquiero who tested the patch extensively
on a variety of Decklink products, it wouldn't have been possible without
his help.
You can find a brief summary of the decklink features here: https://wiki.blender.org/index.php/Dev:Source/GameEngine/Decklink
The full API details and samples are in the Python API documentation.

bge.texture.VideoDeckLink(format, capture=0):

Use this object to capture a video stream. the format argument describes
the video and pixel formats and the capture argument the card number.
This object can be used as a source for bge.texture.Texture so that the frame
is sent to the GPU, or by itself using the new refresh method to get the video
frame in a buffer.
The frames are usually not in RGB but in YUV format (8bit or 10bit); they
require a shader to extract the RGB components in the GPU. Details and sample
shaders in the documentation.
3D video capture is supported: the frames are double height with left and right
eyes in top-bottom order. The 'eye' uniform (see setUniformEyef) can be used to
sample the 3D frame when the BGE is also in stereo mode. This allows to composite
a 3D video stream with a 3D scene and render it in stereo.
In Windows, and if you have a nVidia Quadro GPU, you can benefit of an additional
performance boost by using 'GPUDirect': a method to send a video frame to the GPU
without going through the OGL driver. The 'pinned memory' OGL extension is also
supported (only on high-end AMD GPU) with the same effect.

bge.texture.DeckLink(cardIdx=0, format=""):

Use this object to send video frame to a DeckLink card. Only the immediate mode
is supported, the scheduled mode is not implemented.
This object is similar to bge.texture.Texture: you need to attach a image source
and call refresh() to compute and send the frame to the card.
This object is best suited for video keying: a video stream (not captured) flows
through the card and the frame you send to the card are displayed above it (the
card does the compositing automatically based on the alpha channel).
At the time of this commit, 3D video keying is supported in the BGE but not in the
DeckLink card due to a color space issue.

Commit Details:

Full Hash: 26b11140ada2994fd8846fb903e1f6bc90fbe8f6
Parent Commit: 0120e30
Lines Changed: +21133, -1

34 Added Paths:

/doc/python_api/examples/bge.texture.2.py (+239, -0) (View)
/intern/decklink/CMakeLists.txt (+58, -0) (View)
/intern/decklink/DeckLinkAPI.cpp (+50, -0) (View)
/intern/decklink/DeckLinkAPI.h (+58, -0) (View)
/intern/decklink/linux/DeckLinkAPI.h (+767, -0) (View)
/intern/decklink/linux/DeckLinkAPIConfiguration.h (+192, -0) (View)
/intern/decklink/linux/DeckLinkAPIConfiguration_v10_2.h (+60, -0) (View)
/intern/decklink/linux/DeckLinkAPIDeckControl.h (+215, -0) (View)
/intern/decklink/linux/DeckLinkAPIDiscovery.h (+71, -0) (View)
/intern/decklink/linux/DeckLinkAPIDispatch.cpp (+148, -0) (View)
/intern/decklink/linux/DeckLinkAPIDispatch_v7_6.cpp (+109, -0) (View)
/intern/decklink/linux/DeckLinkAPIDispatch_v8_0.cpp (+133, -0) (View)
/intern/decklink/linux/DeckLinkAPIModes.h (+191, -0) (View)
/intern/decklink/linux/DeckLinkAPITypes.h (+110, -0) (View)
/intern/decklink/linux/DeckLinkAPIVersion.h (+37, -0) (View)
/intern/decklink/linux/DeckLinkAPI_v10_2.h (+55, -0) (View)
/intern/decklink/linux/DeckLinkAPI_v7_1.h (+198, -0) (View)
/intern/decklink/linux/DeckLinkAPI_v7_3.h (+173, -0) (View)
/intern/decklink/linux/DeckLinkAPI_v7_6.h (+404, -0) (View)
/intern/decklink/linux/DeckLinkAPI_v7_9.h (+88, -0) (View)
/intern/decklink/linux/DeckLinkAPI_v8_0.h (+63, -0) (View)
/intern/decklink/linux/DeckLinkAPI_v8_1.h (+111, -0) (View)
/intern/decklink/linux/DeckLinkAPI_v9_2.h (+81, -0) (View)
/intern/decklink/linux/DeckLinkAPI_v9_9.h (+98, -0) (View)
/intern/decklink/linux/LinuxCOM.h (+100, -0) (View)
/intern/decklink/win/DeckLinkAPI_h.h (+13323, -0) (View)
/intern/decklink/win/DeckLinkAPI_i.c (+343, -0) (View)
/intern/gpudirect/CMakeLists.txt (+40, -0) (View)
/intern/gpudirect/dvpapi.cpp (+147, -0) (View)
/intern/gpudirect/dvpapi.h (+670, -0) (View)
/source/gameengine/VideoTexture/DeckLink.cpp (+848, -0) (View)
/source/gameengine/VideoTexture/DeckLink.h (+86, -0) (View)
/source/gameengine/VideoTexture/VideoDeckLink.cpp (+1265, -0) (View)
/source/gameengine/VideoTexture/VideoDeckLink.h (+256, -0) (View)

8 Modified Paths:

/build_files/cmake/macros.cmake (+8, -0) (Diff)
/CMakeLists.txt (+1, -0) (Diff)
/doc/python_api/rst/bge.texture.rst (+293, -0) (Diff)
/intern/CMakeLists.txt (+6, -0) (Diff)
/source/blenderplayer/CMakeLists.txt (+8, -0) (Diff)
/source/gameengine/VideoTexture/blendVideoTex.cpp (+15, -0) (Diff)
/source/gameengine/VideoTexture/CMakeLists.txt (+13, -0) (Diff)
/source/gameengine/VideoTexture/Common.h (+2, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021