Giter VIP home page Giter VIP logo

Comments (5)

ford-prefect avatar ford-prefect commented on September 17, 2024

You can do this easily enough -- you instantiate a playbin, set the video-sink property with the element you want (or you use a gst_parse_launch() variant), and then set the pipeline property on the GstSyncClient to that playbin instance.

from gst-sync-server.

cosismo avatar cosismo commented on September 17, 2024

Solved. Thanks.
TLDR; I followed your suggestion + moved to RaspOS Bullseye 64 bits with gstreamer 1.18

The detailed solution:
I added:
GstElement *sinkk = gst_element_factory_make("kmssink", "video-output");
g_object_set(G_OBJECT(self->pipeline), "video-sink", sinkk, NULL);
here: sync-client after instantiate playbin

And it works, but only ~ 1 in 10 times, usually throws a segmentation fault.
Before I tried more changes, I tested the same code modification on my x86 setup and it works without problems.
So I conclude that this was a raspi platform specific problem and changed my RaspOS lite Buster 32 bits gstreamer 1.14 to RaspOS Bullseye lite 64bit gstreamer 1.18.

It seems to work now.

In fact the autovideosink works with this setup, but there are a weird color problem (i believe there area swap in the reds and blues or something like that), so I use the kmssink.

Thank you very much again!

PS I have zero experience with the gst API so I ask ChatGPT for an example setting video-sink and use it with some deductions to apply an ugly AI-enabled-glue-coding. :D

from gst-sync-server.

ford-prefect avatar ford-prefect commented on September 17, 2024

Nice! Just for reference, how you might do this in the client (rather than the library code) is to change the code over here:

  // Put this at the top with other declarations
  GstElement *pipeline, *sink;

  // Now scroll down to this line
  client = gst_sync_client_new (addr, port);

  // And add these lines
  sink = gst_element_factory_make("kmssink", "video-output");
  g_object_get (G_OBJECT (client), "pipeline", &pipeline, NULL);
  g_object_set (G_OBJECT (pipeline), "video-sink", sink, NULL);
  gst_object_unref (pipeline);

from gst-sync-server.

cosismo avatar cosismo commented on September 17, 2024

I tested and it works with my RPi setup.
Obviously to not touch the library code is a preferred option, so I will use this solution.

Audio is not working, but I suspect that is an alsasink related problem that perhaps could be solved changing some alsa config or moving to pulseaudiosink.
However for this particular project I don't need audio, so I will not go deep for now.
But when I have a little more time I will check it and report it for other users.

Meanwhile, again, thanks for your work and generosity.

EDIT: Changing to Fake KMS and installing pulseaudio solves the problem with hdmi audio. (In /boot/config/txt, replace dtoverlay=vc4-kms-v3d with dtoverlay=vc4-fkms-v3d )

from gst-sync-server.

ford-prefect avatar ford-prefect commented on September 17, 2024

That's good to hear -- happy to help!

from gst-sync-server.

Related Issues (12)

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.