mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-18 21:38:29 -04:00
dba426630a2152fe8d4f0dc331447b14b7c7a963
With v1 of this function, it's unclear where exactly the data pointer comes from or what it is. In fact, this is not determined by libobs, but the consumer. libobs assumes that the caller of obs_property_button_clicked passes an obs_context_data pointer, and then passes the data pointer of that obs_context_data as the data pointer to the callback. In OBS Studio, this is always the private data of the associated object. However, this assumes that there even is such an object (source/encoder/ etc), even though properties are meant to be free-standing. This is not just philosophical, because with obs_get_source_properties you can actually get an obs_properties_t that isn't associated with any specific source, at which point you have no idea what the data pointer will be. For this reason, obs_properties_add_button v1 needs to go. obs_properties_add_button2 can be used as a drop-in replacement. With v2, it's well-defined that the pointer you're passing as priv is the pointer you get back in the callback as data. If you don't care about it, simply pass NULL/nullptr. Once v1 is removed in the future, obs_property_button_clicked should be replaced with a variant that doesn't take a second argument, as that argument will no longer be used anywhere.
OBS Studio <https://obsproject.com> =================================== .. image:: https://github.com/obsproject/obs-studio/actions/workflows/push.yaml/badge.svg?branch=master :alt: OBS Studio Build Status - GitHub Actions :target: https://github.com/obsproject/obs-studio/actions/workflows/push.yaml?query=branch%3Amaster .. image:: https://badges.crowdin.net/obs-studio/localized.svg :alt: OBS Studio Translation Project Progress :target: https://crowdin.com/project/obs-studio .. image:: https://img.shields.io/discord/348973006581923840.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2 :alt: OBS Studio Discord Server :target: https://obsproject.com/discord What is OBS Studio? ------------------- OBS Studio is software designed for capturing, compositing, encoding, recording, and streaming video content, efficiently. It's distributed under the GNU General Public License v2 (or any later version) - see the accompanying COPYING file for more details. Quick Links ----------- - Website: https://obsproject.com - Help/Documentation/Guides: https://github.com/obsproject/obs-studio/wiki - Forums: https://obsproject.com/forum/ - Build Instructions: https://github.com/obsproject/obs-studio/wiki/Install-Instructions - Developer/API Documentation: https://obsproject.com/docs - Donating/backing/sponsoring: https://obsproject.com/contribute - Bug Tracker: https://github.com/obsproject/obs-studio/issues Contributing ------------ - If you would like to help fund or sponsor the project, you can do so via `Patreon <https://www.patreon.com/obsproject>`_, `OpenCollective <https://opencollective.com/obsproject>`_, or `PayPal <https://www.paypal.me/obsproject>`_. See our `contribute page <https://obsproject.com/contribute>`_ for more information. - If you wish to contribute code to the project, please make sure to read the coding and commit guidelines: https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.md - Code for the project follows the code style guidelines, located here: https://github.com/obsproject/obs-studio/blob/master/CODESTYLE.md - Developer/API documentation can be found here: https://obsproject.com/docs - If you wish to contribute translations, do not submit pull requests. Instead, please use Crowdin. For more information read this page: https://obsproject.com/wiki/How-To-Contribute-Translations-For-OBS - Contributors to OBS Studio and related repositories are expected to follow our Code of Conduct, which can be read here: https://github.com/obsproject/obs-studio/blob/master/COC.rst - Other ways to contribute are by helping people out with support on our forums or in our community chat. Please limit support to topics you fully understand -- bad advice is worse than no advice. When it comes to something that you don't fully know or understand, please defer to the official help or official channels. SAST Tools ---------- `PVS-Studio <https://pvs-studio.com/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source>`_ - static analyzer for C, C++, C#, and Java code.
Description
Languages
C
53.1%
C++
35.7%
CMake
3.5%
Swift
3%
Objective-C
2.7%
Other
1.8%