Text Overlay plugin example?

hershey

New Member
So, I simply want to show text on the screen over the current scene with a plugin. Can someone show an example?
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Just so you're aware, sources can have sub-sources. So you can create/render the text source from within your own source if you wish, it's perfectly legal. Just make sure to use obs_source_create_private (which may eventually get deprecated if I make everything technically "private")
 

01F0

New Member
I actually wondered the same thing about half a year ago, and got some mighty fine help from Jim. :)

Here's the code to that plugin. I'm not sure if I did everything 'by the book' though, and I didn't use the private thingy, I should implement that as well. But it works.

I created a pointer which I initialized with obs_source_create, pointing out the text source.. Then I used that pointer to modify the text value and to set width/height etc.
 
Top