win32ipc: Add WIN32 shared memory videosrc/sink elements
authorSeungha Yang <seungha@centricular.com>
Fri, 18 Nov 2022 17:56:27 +0000 (02:56 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 24 Nov 2022 12:41:18 +0000 (12:41 +0000)
commit4f846540cb02177ad224966f52866f930f46d7d3
treea0708d1dfdd0f219565d66a8e3d185bf0c42ed64
parentca7f66f9b527ccc6f7309237af2fe53debd2e846
win32ipc: Add WIN32 shared memory videosrc/sink elements

Windows supports various IPC methods but that's completely
different form that of *nix from implementation point of view.
So, instead of adding shared memory functionality to existing
shm plugin, new WIN32 shared memory source/sink elements
are implemented in this commit.

Each videosink (server) and videosrc (client) pair will communicate
using WIN32 named pipe and thus user should configure unique/proper
pipe name to them (e.g., \\.\pipe\MyPipeName).
Once connection is established, videosink will create named shared memory
object per frame and client will be able to consume the object
(i.e., memory mapped file handle) without additional copy operation.

Note that implementations under "protocol" directory are almost
pure C/C++ with WIN32 APIs except for a few defines and debug functions.
So, applications can take only the protocol part so that the application
can send/receive shared-memory object from/to the other end
even if it's not an actual GStreamer element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3441>
21 files changed:
subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json
subprojects/gst-plugins-bad/meson_options.txt
subprojects/gst-plugins-bad/sys/meson.build
subprojects/gst-plugins-bad/sys/win32ipc/gstwin32ipcutils.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/gstwin32ipcutils.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/gstwin32ipcvideosink.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/gstwin32ipcvideosink.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/gstwin32ipcvideosrc.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/gstwin32ipcvideosrc.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/meson.build [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/plugin.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcmmf.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcmmf.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcpipeclient.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcpipeclient.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcpipeserver.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcpipeserver.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcprotocol.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcprotocol.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcutils.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcutils.h [new file with mode: 0644]