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 <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <time.h> | |
#include <windows.h> | |
#include <libavcodec/avcodec.h> | |
#include <libavformat/avformat.h> | |
//#include <libavutil/frame.h> | |
#include <SDL2/SDL.h> |
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 <iostream> | |
#include <thread> | |
struct pipe | |
{ | |
pipe() | |
{ | |
SECURITY_ATTRIBUTES sa = { sizeof(sa), nullptr,true}; | |
CreatePipe(&read, &write, &sa, 0); |
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 <sys/time.h> | |
/** | |
* Returns the current time in microseconds. | |
*/ | |
long getMicrotime(){ | |
struct timeval currentTime; | |
gettimeofday(¤tTime, NULL); | |
return currentTime.tv_sec * (int)1e6 + currentTime.tv_usec; | |
} |