byuarus / gstreamerswift Goto Github PK
View Code? Open in Web Editor NEWExample of GStreamer with Swift
Example of GStreamer with Swift
Hey @byuarus,
I have just started playing around with GStreamer and was working on porting the tutorials to Swift when I stumbled over your repository. Great work!
I managed to get it working but the code is breaking inside check_media_size
(GStreamerBackend.m):
g_object_get (self->pipeline, "video-sink", &video_sink, NULL);
triggers the following warning:
(:22803): GLib-GObject-�[1;33mWARNING�[0m **: �[34m08:43:06.226�[0m: g_object_get_is_valid_property: object class 'GstPipeline' has no property named 'video-sink'
As a result, the next 2 lines of code also fail:
video_sink_pad = gst_element_get_static_pad (video_sink, "sink");
caps = gst_pad_get_current_caps (video_sink_pad);
(:22803): GStreamer-�[1;35mCRITICAL�[0m **: �[34m08:43:06.226�[0m: gst_element_get_static_pad: assertion 'GST_IS_ELEMENT (element)' failed.
(:22803): GStreamer-�[1;35mCRITICAL�[0m **: �[34m08:43:06.226�[0m: gst_pad_get_current_caps: assertion 'GST_IS_PAD (pad)' failed
and finally, the instruction in the if(...)
block always returns false
if (gst_video_info_from_caps (&info, caps))
therefore, the code inside the if-block is never executed and there's no way to receive the media info (e.g. width & height) of the video being played.
The same method is also part of the official GStreamer tutorials, but I never got those properly set up and running beyond Tutorial-3.
Do you happen to have an idea, why this piece of code is not working? Did you maybe even face the same problems?
I tested the behaviour with GStreamer 1.19.3 as well as 1.20.2.
Any help would be appreciated!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.