Skip to content

Code inside check_media_size always failing #1

@Siegbaert

Description

@Siegbaert

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions