Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gstreamer example code doesn't work with vcpkg Gstreamer; can't create any element #38468

Open
GOKOP opened this issue Apr 29, 2024 · 1 comment
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@GOKOP
Copy link

GOKOP commented Apr 29, 2024

Describe the bug
When using gstreamer from vcpkg with cmake, no pipeline can be created because gstreamer is unable to construct any element. Example code from gstreamer's basic tutorial doesn't work, but it does work with the system installation of gstreamer (I'm on Linux) My guess is that it can't find any plugins whatsoever but I'm not very knowledgeable about gstreamer either

Environment

  • OS: Arch Linux
  • Compiler: GCC 13.2.1 20230801

To Reproduce
Setup a project with vcpkg cloned into a subdirectory and bootstrapped there

CMakeLists.txt:

cmake_minimum_required(VERSION 3.20)
project(gstreamer-test)

find_package(PkgConfig REQUIRED)
pkg_check_modules(gstreamer-1.0 REQUIRED IMPORTED_TARGET gstreamer-1.0)

add_executable(test main.c)
target_link_libraries(test PkgConfig::gstreamer-1.0)

vcpkg.json:

{
	"dependencies": [
		"gstreamer"
	]
}

main.c: any code from gstreamer's basic tutorials

Run cmake with appropriately set -DCMAKE_TOOLCHAIN_FILE, obviously

Expected behavior
The code should work.

Failure logs

Obviously these are logs from gstreamer as there aren't any visible errors from vcpkg (I wouldn't be able to compile the program otherwise)

Output from the hello world example:

$ GST_DEBUG=2 ./test
0:00:00.000650393 541967 0x555b092cf6d0 WARN            GST_REGISTRY gstregistrybinary.c:551:gst_registry_binary_check_magic: Binary registry magic version is different : 1.3.0 != 1.23.90
0:00:00.001519358 541967 0x555b092cf6d0 ERROR           GST_PIPELINE subprojects/gstreamer/gst/parse/grammar.y:570:gst_parse_element_make: no element "playbin"

(test:541967): GStreamer-CRITICAL **: 23:23:43.518: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(test:541967): GStreamer-CRITICAL **: 23:23:43.518: gst_element_get_bus: assertion 'GST_IS_ELEMENT (element)' failed

(test:541967): GStreamer-CRITICAL **: 23:23:43.518: gst_bus_timed_pop_filtered: assertion 'GST_IS_BUS (bus)' failed
zsh: segmentation fault (core dumped)  GST_DEBUG=2 ./test

Output from the manual hello world example:

$ GST_DEBUG=2 ./test
0:00:00.000639124 550754 0x568d6a9236d0 WARN            GST_REGISTRY gstregistrybinary.c:551:gst_registry_binary_check_magic: Binary registry magic version is different : 1.3.0 != 1.23.90
0:00:00.001522758 550754 0x568d6a9236d0 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:765:gst_element_factory_make_valist: no such element factory "videotestsrc"!
0:00:00.001529478 550754 0x568d6a9236d0 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:765:gst_element_factory_make_valist: no such element factory "autovideosink"!
Not all elements could be created.
@GOKOP GOKOP changed the title Gstreamer example code doesn't work with vcpkg Gstreamer example code doesn't work with vcpkg Gstreamer; can't create any element Apr 29, 2024
@jimwang118 jimwang118 added the category:port-bug The issue is with a library, which is something the port should already support label Apr 30, 2024
@jimwang118
Copy link
Contributor

I have reproduced this problem locally, I will locate the problem and try to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

No branches or pull requests

2 participants