Giter Club home page Giter Club logo

Comments (7)

fzwoch avatar fzwoch commented on June 4, 2024 1

Personally I would think of update() as a "restart-with-new-setting-if-running". So it the pipeline is running, restart it with new options. If it is not running, keep low and wait until it gets started.

With the change it starts anyway (when you change a property). Even when it is hidden and the "stop-on-hide" option is set. So it will cause CPU/Network/Whatever usage even if it is not shown - which is not wanted in the case of "stop-on-hide".

I'm not sure about scripting - but perhaps you need to call start() and/or unhide() to start the source once after you created it?

So for your use case I would expect the following: create the source, set "stop-on-hide" to false and start it. Then whenever you update the pipeline string it will restart properly when you set a new pipeline on that source (prior the change).

from obs-gstreamer.

crossan007 avatar crossan007 commented on June 4, 2024

I think it's actually the null check for data->pipe on https://github.com/fzwoch/obs-gstreamer/blob/master/gstreamer.c#L386

If I remove that if statement, then it works as I desire.

I'm still a bit fuzzy on dereferencing pointers, but I believe this null check would prevent new data->pipe from ever being created when a new pipeline text is supplied via static void update(void* data, obs_data_t* settings)?

from obs-gstreamer.

fzwoch avatar fzwoch commented on June 4, 2024

I'm actually unsure about the expectations here. So now when you update the pipeline string it will also start the pipeline - even when the source is actually hidden. Is that intended?

I mean. If it is hidden I would expect you update the string, then I would also expect you to unhide the source to make the changes take effect.

So maybe it was correct in the first place where updating the pipeline string would not automatically start the pipeline?

from obs-gstreamer.

crossan007 avatar crossan007 commented on June 4, 2024

Maybe I'm over-interpreting the setting, but if "stop_on_hide" is unchecked, then I expect that source will always be either "PLAYING" or trying to play. Maybe the setting or alt text should be: "always play source, even when not visible."

That said, my plugin responds to external stimuli - whenever a remote device is discovered, the GStreamer pipeline is automatically negotiated and executed, so I would prefer that text updates to the pipeline are executed, even if the source is not visible.

from obs-gstreamer.

crossan007 avatar crossan007 commented on June 4, 2024

I'd like to avoid any delay in waiting for the pipeline to start when switching to a previously hidden source.

from obs-gstreamer.

crossan007 avatar crossan007 commented on June 4, 2024

It hadn't occurred to me that I could invoke obs-gstreamer start () from my plugin. That would probably do the trick.

Ill try it out later today.

from obs-gstreamer.

crossan007 avatar crossan007 commented on June 4, 2024

resolved by 58315bd

from obs-gstreamer.

Related Issues (20)

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.