commit 66b900fe122a995f6cdb18334af3136fab817bf0 Author: Moritz Martinius Date: Wed Mar 9 11:22:03 2022 +0100 Empty Gstreamer project diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d163863 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..efbe8dd --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.1...3.22) + +project( + gst-threads + VERSION 0.1 + LANGUAGES CXX) + +add_definitions(-DCMAKE_EXPORT_COMPILE_COMMANDS=ON) + +# Find packages go here. +find_package(PkgConfig) +find_package(Threads REQUIRED) +pkg_search_module(GLIB REQUIRED glib-2.0) +pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0) + + +#set(THREADS_PREFER_PTHREAD_FLAG TRUE) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread") + +add_executable(gst-threads src/main.cpp) + +# Additional include directories. +target_include_directories(gst-threads PUBLIC ${GLIB_INCLUDE_DIRS} ${GSTREAMER_INCLUDE_DIRS}) + +# Make sure you link your targets with this command. It can also link libraries and +# even flags, so linking a target that does not exist will not give a configure-time error. + +target_link_libraries(gst-threads ${GSTREAMER_LIBRARIES}) +target_link_libraries(gst-threads ${GSTREAMER_APP_LIBRARIES}) +target_link_libraries(gst-threads ${GSTREAMER_VIDEO_LIBRARIES} ) +target_link_libraries(gst-threads Threads::Threads) diff --git a/compile_commands.json b/compile_commands.json new file mode 120000 index 0000000..25eb4b2 --- /dev/null +++ b/compile_commands.json @@ -0,0 +1 @@ +build/compile_commands.json \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..fd58714 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,31 @@ +#include +#include +#include + +extern "C" { +#include +#include +#include +} + + +void newPipeline(const char * addr) { + + GstElement *pipeline = nullptr; + GstBus *bus = nullptr; + GstMessage *msg = nullptr; + + // gstreamer initialization + gst_init(nullptr, nullptr); + + + return; +} + +int main(void) { + + std::cout << "Hello GStreamer-Peek" << std::endl; + + + return 0; +}