mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-06-25 16:13:13 -04:00
19 lines
390 B
C++
19 lines
390 B
C++
#include "../platform.hpp"
|
|
#include <util/apple/cfstring-utils.h>
|
|
|
|
bool DeckLinkStringToStdString(decklink_string_t input, std::string &output)
|
|
{
|
|
const CFStringRef string = static_cast<CFStringRef>(input);
|
|
|
|
char *buffer = cfstr_copy_cstr(string, kCFStringEncodingASCII);
|
|
|
|
if (buffer) {
|
|
output = std::string(buffer);
|
|
}
|
|
|
|
bfree(buffer);
|
|
CFRelease(string);
|
|
|
|
return (buffer != NULL);
|
|
}
|