At first GStreamer is a multimedia framework allow you to do tons of thing with media content (video, audio, streaming, capture, camera, screencapture, ..etc..) in the case you don't know what is it. 😋.
Bonus:
I will have an additional post to guide you how to make a free screen
recording app for you and by you, so then you don't have to pay any
piece of coin for the screenrecording app any more.. oh nooooo.. 😮 so
bad for them, but so good for you 🤤🤤. As a developer, why you have to
pay money for the thing you can do, right? 🤣🤣
Download and install GStreamer packages
https://gstreamer.freedesktop.org/download/
Access
the link above and select appropriate packages with your windows system
(32 or 64 bit), as we are talking about Visual Studio (VS), so we
download the packages for VS. Download and install both of "runtime and
development installer"
Configure Environment variables
Open your "Environment variables" and config below variables if they don't have:
NOTE: It's up to where GStreamer was installed on system, you have to config with appropriate directory.
GST_ROOT_X86 : C:\gstreamer\1.0\msvc_x86_64
GSTREAMER_ROOT_X86 : %GST_ROOT_X86%
GSTREAMER_ROOT_X86_64 : %GST_ROOT_X86%
GSTREAMER_1_0_ROOT_MSVC_X86_64 : %GST_ROOT_X86%
GST_PLUGIN_PATH : %GST_ROOT_X86%\lib\gstreamer-1.0
Add 1 more line in PATH variable with "%GSTREAMER_1_0_ROOT_MSVC_X86_64%\bin"
Download Tutorials and configure Visual Studio 2019
NOTE: I'm using VS 2019 Community edition
Download tutorials
Clone the tutorial projects to your workspace from link: gst-docs
From directory ${your_workspace}\gst-docs\examples\tutorials\vs2010, open tutorials.sln with VS.
Configure VS
I guide you configure the all the neccessary properties for project basic-tutorial-1 and then you can do all the samething for the others.
Select Project's Properties -> C/C++ -> Additional Include Directories,set with below value:
$(GSTREAMER_1_0_ROOT_MSVC_X86_64)/include;$(GSTREAMER_1_0_ROOT_MSVC_X86_64)/include/gstreamer-1.0;$(GSTREAMER_1_0_ROOT_MSVC_X86_64)/lib/glib-2.0/include;$(GSTREAMER_1_0_ROOT_MSVC_X86_64)/lib/graphene-1.0/include;$(GSTREAMER_1_0_ROOT_MSVC_X86_64)/lib/gstreamer-1.0/include;$(GSTREAMER_1_0_ROOT_MSVC_X86_64)/include/glib-2.0
Project's Properties -> Linker -> Additional Library Directories:
$(GSTREAMER_1_0_ROOT_MSVC_X86_64)/lib;$(GSTREAMER_1_0_ROOT_MSVC_X86_64)/bin;%(AdditionalLibraryDirectories)
Project's Properties -> Linker -> Input -> Additional Dependencies:
gobject-2.0.lib;glib-2.0.lib;gstreamer-1.0.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
Build and run the first project
Now we're all ready for the running a first project. 🐱👤🐱🏍
Select project basic-tutorial-1 which we already configured all the thing and build it (Ctrl+B).
Run: press the combination keys Ctrl+F5 or menu Debug -> Start without Debugging. The execution will fetch a video and stream it from internet so it will start with a bit latency, just patients for few seconds with the black console and video will be shown up.
Recap
We did:
- Download and installs GStreamer packages
- Configure neccessary environment variables
- Download Tutorials and configure Visual Studio 2019 to build and run the first project