GithubHelp home page GithubHelp logo

gstreamerswift's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

eugene-wang

gstreamerswift's Issues

Code inside check_media_size always failing

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.