-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelpers.h
33 lines (27 loc) · 830 Bytes
/
helpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// Created by Trevor Starick on 2016-02-01.
//
#ifndef GFYTUBE_RENDER_HELPERS_H
#define GFYTUBE_RENDER_HELPERS_H
#include <iostream>
#include <string>
#include <map>
#include <regex>
#include <fstream>
#include <curl/curl.h>
extern std::string pwd;
class Helpers {
public:
Helpers();
~Helpers();
std::string exec(const char* cmd);
std::vector<std::string> split(const std::string& input, const std::string& regex);
std::string replace(const std::string& input, const std::string& regex, const std::string& replace);
std::string mergeAV(std::string start, std::string audio, std::string video);
std::string generateThumbnail(std::string filename);
float getMediaLength(std::string filename);
void init();
private:
CURL *curl = curl_easy_init();
};
#endif //GFYTUBE_RENDER_HELPERS_H