.dll creation

pierrextardif

New Member
Hi,

I'm trying to get a `.dll` file to work on other installs of OBS Studio.
I have setup my environement to develop a filter in OBS on windows, and i can use OBS in Release mode and test my filter.
However, when I try to get my newly created `.dll` file ( with its `.effect` file and locale folder) into a different OBS install, the filter doesn't appear, :(.

I'm not sure what I'm doing wrong, but my feeling is that something obvious is missing in my dev process.


I have followed this guide, and this one, and successfully built OBS Studio dev from source on windows 10.

When creating my new filter, I go about doing by creating a new folder in the plugins folder ( from the root of obs-studio), then modifying the `CMakeLists.txt` of the plugin folder to include my folder.
Then I use cmake GUI to generate the correct visual studio file solutions.

In visual studio, it compiles fine and runs without any problems - as expected -: while running OBS in release mode - or respectiely in debug mode - when adding a new filter, i can see the filter i have created in the list.

But when moving my `.dll` and `.effect` file from the local dev install to the main OBS studio install, my new filter doesn't show up in the list of filters when i try to add a new filter to my media source.
I have moved my `.dll` file to `obs-plugins/64bit/` and `.effect` to `data/obs-plugins/obs-myFolderFilter/`.

When loading OBS, the log tells me that the `.dll` has been loaded, but nothing else happens, :(.

I would appreciate any pointers,

I can provide some code / `CMakeList.txt`, etc../..

Best,

P
 

pierrextardif

New Member
Please find attached the content of my obs-myFilter folder in my plugins folder in OBS, as well as the CMakeLists.txt in the same folder.

Here are the settings of the solution in VS Studio:


Capture.JPG


Find attached the result of the Build of the filter - Build.log -, as well as the log for adding the filter in the release mode of OBS studio - AddFilter.log -.

Any help will be appreciated, hopefully someone with more experience in building .dll file can replicate and help troubleshoot...?


Best,

P
 

Attachments

  • CMakeLists.txt
    3 KB · Views: 16
  • Build.log
    3.9 KB · Views: 13
  • AddFilter.log
    295 bytes · Views: 14
  • obs-myFilter.zip
    3.8 KB · Views: 22

pierrextardif

New Member
I have tried to build the time warp scan for example, but still no luck, :(:
when building locally, it works fine, when importing into my global install, it's not there.

I have re installed it all, but the problem seem to be the same.
I have tried adding flags to my cmake:
Captur_2.JPG


Such as it would match some of the flags i have found on other repo ( also this one ).

I have also read this, but I already have installed VC Runtime for Visual Studio 2019.

I have tried using a different platform toolset, or downgrading my windows SDK version, no luck.

Not sure what to try next.

Any pointers?
I'm sure I'm missing the obvious, as developing for OBS is new for me...

1620668886874.png
 

pierrextardif

New Member
Any updates..?

I have tried to check my dependencies on my `.dll` file, there is only OBS and KERNEL32. - as referenced here - .

I am now using a seperate install of OBS, and the log tells me that my filter is loaded :
From the log viewer :


```

19:08:52.269: [My First Filter Has Loaded]
19:08:52.269: obs_register_source: Tried to register obs_source_info with size 392 which is more than libobs currently supports (384)
19:08:52.369: VLC found, VLC video source enabled
19:08:52.376: Decklink API Compiled version 11.6
19:08:52.376: Decklink API Installed version 11.6
19:08:52.386: ---------------------------------
19:08:52.386: Loaded Modules:
19:08:52.386: win-wasapi.dll
19:08:52.386: win-mf.dll
19:08:52.386: win-dshow.dll
19:08:52.386: win-decklink.dll
19:08:52.386: win-capture.dll
19:08:52.386: vlc-video.dll
19:08:52.386: text-freetype2.dll
19:08:52.386: rtmp-services.dll
19:08:52.386: obs-x264.dll
19:08:52.386: obs-vst.dll
19:08:52.386: obs-transitions.dll
19:08:52.386: obs-text.dll
19:08:52.386: obs-qsv11.dll
19:08:52.386: obs-outputs.dll
19:08:52.386: obs-myFilter.dll
[...]
```

I've added a mini log in the obs_module_load method :
```

bool obs_module_load()
{

blog(LOG_INFO, "[My First Filter Has Loaded]");
obs_register_source(&my_first_filter);
return true;
}
```


But the filter is still not appearing in the list of filters when trying to apply it on my media source.

Any help?
 

R1CH

Forum Admin
Developer
19:08:52.269: obs_register_source: Tried to register obs_source_info with size 392 which is more than libobs currently supports (384)

If you built your plugin targeting OBS v27 you can't use it on OBS v26.
 
Top