It's a sad day when I realize that I did not add any null pointer
checking to any of the functions in this file. Discovered it while
checking all the different languages, happened when there was a missing
locale file for a certain module that hadn't had the language uploaded
yet.
These macros are used as easy helper functions to load/unload module
locale that's based upon the text_lookup system. You simple place the
OBS_MODULE_USE_DEFAULT_LOCALE macro once in the module, call
OBS_MODULE_FREE_DEFAULT LOCALE in obs_module_unload, and then
call obs_module_text anywhere in your module where you need to look up
text.
By default, it will look for a locale directory in your module's data
directory, and look for language files within it (INI locale format)
This function is used to simplify the process when using the default
locale handling for modules. It will automatically search in the plugin
data directory associated with the specific module specified, load the
default locale text (for example english if its default language is
english), and then it will load the set locale on top of the default
locale, which will cause text to use the default locale if the desired
locale text is not found.
Because we're using .ini format, the translation servies spit out files
with .ini extensions, so this makes it so we don't necessarily have to
rename those files from .ini to .txt before merging.
The status bar now displays:
- Auto-reconnect information (reconnecting and reconnect success)
- Dropped frames (as well as percentage of total video frames)
- Duration of session
- CPU usage of the program
- Kbp/s
The OBSBasic class is getting a bit big, so I separated out the
status bar code to its own class derived from QStatusBar.
Total bytes, total frames, and frames dropped. Total frames is
generated automatically, but total bytes and total dropped frames are
returned via callbacks.
Before it would assign the encoder/media callbacks directly to the
output's callbacks, so instead of doing that, it now goes through
intermediary functions for the sake of counting the frames.
Usually if you are reconnecting after network outage, it will give a
different code (such as OBS_OUTPUT_CONNECT_FAILED). So, if already
reconnecting, ignore the code unless it's OBS_OUTPUT_SUCCESS.