This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CoreFoundation/CoreFoundation.h> | |
#include <string> | |
#include <vector> | |
/** | |
* Converts a CFString to a UTF-8 std::string if possible. | |
* | |
* @param input A reference to the CFString to convert. | |
* @return Returns a std::string containing the contents of CFString converted to UTF-8. Returns | |
* an empty string if the input reference is null or conversion is not possible. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <Dshow.h> | |
#include <iostream> | |
using namespace std; | |
// Macro to report success or failure, and return on failure (lazy shorthand... bad habit! :-) | |
#define REPORT_OUTCOME(hr) if (FAILED(hr)) { cout << "failed" << endl; return false; } cout << "success" << endl; | |
// Data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Function echo text to the screen. | |
# There are two ways to invoke this: | |
# | |
# print LEVEL MESSAGE | |
# print MESSAGE | |
# | |
# In the first case, LEVEL can be one of: DEBUG, INFO, SUCCESS, WARNING, or ERROR. | |
# This determines the colour used to display the message. If the level is not recognised then it defaults to INFO. |