mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-08 12:24:09 +00:00
cc-plus-plusdirectshowfacebook-liveffmpeggame-capturelive-streamingscreen-capturetwitch-tvvideo-recordingyoutube-live
The `mp_media::obsframe` varaible is a variable used to store the current frame, or the first frame on stop. However, it's never cleared, and while decoding a frame, it's invalid. The variable was added for delayed preloading of the first frame for stingers. Now, for more context, when media sources stop, it stores the first frame of the video so it can set the source's current async texture to that frame, effectively preloading the first frame into the backend, making it so that when you play back that media, it's able to start playback instantly without having to wait for the thread to play back that frame, causing seamless playback. Normally, preload happens right when first frame is finished decoding, thus it wasn't a problem before these variables and delayed preloading was added. However, with stingers, I delayed that preload further because stingers are kind of a special case because the stinger does not clear itself right away on stop. Because of that, it was causing it to flash the first frame at the end of the stinger. This is why `obsframe` and `request_preload` were added: it's a way of signaling the media source to preload the first frame when the stinger itself is fully completed. It was added to fix that stinger bug. However, if the user interrupts playback of the stinger (e.g. swaps to another scene while in the middle of the transition), that `request_preload` might still be queued and happen while the media source is still decoding, and thus, while `obsframe` is invalid. I realize that we should probably refactor and clean up the media-playback lib. |
||
---|---|---|
.github | ||
additional_install_files | ||
build-aux | ||
CI | ||
cmake | ||
deps | ||
docs/sphinx | ||
libobs | ||
libobs-d3d11 | ||
libobs-opengl | ||
libobs-winrt | ||
plugins | ||
test | ||
UI | ||
.cirrus.yml | ||
.clang-format | ||
.cmake-format.json | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.mailmap | ||
.swift-format | ||
AUTHORS | ||
buildspec.json | ||
CMakeLists.txt | ||
CMakePresets.json | ||
COC.rst | ||
COMMITMENT | ||
CONTRIBUTING.rst | ||
COPYING | ||
INSTALL | ||
README.rst |
OBS Studio <https://obsproject.com> =================================== .. image:: https://github.com/obsproject/obs-studio/actions/workflows/main.yml/badge.svg?branch=master&event=push :alt: OBS Studio Build Status - GitHub Actions :target: https://github.com/obsproject/obs-studio/actions/workflows/main.yml?query=event%3Apush+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.rst - 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 - 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.