0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

16 Commits

Author SHA1 Message Date
jp9000
847b3df322 libobs/util: Add os_mkdirs
Recursively creates a directory structure if one or more directories in
the path structure don't exist
2015-07-08 10:00:33 -07:00
GoaLitiuM
2ab4c430e0 libobs: Define snprintf only for Visual Studios prior VS2015
This change is purely cosmetic one. _snprintf is still defined in 2015,
but Microsoft may change this in the future.
2015-05-04 19:33:55 +03:00
jp9000
d44d3b1f0a libobs: Use locale-independent double conversion
Prevents issues on specific locales, especially where decimal points are
represented by commas rather than periods.
2015-03-22 19:18:07 -07:00
Palana
2edac33c58 libobs/util: Write 0 character when converting empty strings
Fixes log_windows_version logging garbage for build when running with
debug heap enabled (assuming osvi.szCSDVersion is an empty string)
2014-10-04 21:48:08 +02:00
jp9000
e796aba928 Set proper output length for string conversions 2014-07-27 13:26:51 -07:00
jp9000
ad6b70e938 Add null pointer checks to platform functions
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.
2014-07-12 04:48:16 -07:00
jp9000
dfdba6636b libobs/util: Fix string conversion functions
There was a fundamental flaw with the string type conversion functions
where the sizes were not being properly accounted for.  They were using
the 'len' value as a value for the output rather than only for the
input, which was bad because the output could have more or less
characters than the input.
2014-05-30 02:42:03 -07:00
jp9000
d536df30b0 Add dst_size parameter to character conv funcs
Character conversion functions did not previously ask for a maximum
buffer size for their 'dst' parameter, it's unsafe to assume some given
destination buffer may have enough size to accommodate a conversion.
2014-05-22 03:46:57 -07:00
jp9000
1d2e5d50a4 Add FLV file output code
This doesn't add FLV file output to the user interface yet, but we'll
get around to that eventually.  This just adds an FLV output type.

Also, removed ftello/fseeko because off_t is a really annoying data
type, and I'd rather have a firm int64_t for large sizes, so I named it
to os_fseeki64 and os_ftelli64 instead, and changed the file size
function to return an int64_t.
2014-05-16 00:18:23 -07:00
Palana
4bb4b859bf Initialize returned pointer to always trigger NULL checks in callers
Also avoid allocation roundtrip if the file is empty after the BOM
2014-04-19 07:37:38 +02:00
jp9000
348588254c Add WASAPI audio capture
- Add WASAPI audio capture for windows, input and output

 - Check for null pointer in os_dlopen

 - Add exception-safe 'WinHandle' and 'CoTaskMemPtr' helper classes that
   will automatically call CloseHandle on handles and call CoTaskMemFree
   on certain types of memory returned from windows functions

 - Changed the wide <-> MBS/UTF8 conversion functions so that you use
   buffers (like these functions are *supposed* to behave), and changed
   the ones that allocate to a different naming scheme to be safe
2014-03-04 07:07:13 -07:00
jp9000
8b8217f68e Fix a some more linux/GCC specific warnings 2014-02-14 15:56:01 -07:00
jp9000
20fd2c82dc Fix UTF-8 signature detection
The signature detection code when reading UTF-8 files was causing the
UTF-8 strings read from file to allocate more data than they were
supposed to, causing the last 3 bytes to be garbage
2014-02-09 08:01:08 -07:00
jp9000
e9ded173f1 add my signal/callback interface from another project, also update license of utility files to ISC 1.3 2013-12-25 22:40:33 -07:00
jp9000
18834c6a45 some static analysis cleanup 2013-10-17 17:21:42 -07:00
jp9000
f255ae1922 first commit 2013-09-30 19:37:13 -07:00