Mixer.h
1.81 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
* File: Mixer.h
* Author: eduardo
*
* Created on 17 de Janeiro de 2012, 15:28
*/
#ifndef MIXER_H
#define MIXER_H
#include "string.h"
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <sstream>
#include <string>
#include <fstream>
#include "logging.h"
//SL Video Position
#define TOP_LEFT 1
#define TOP_RIGHT 2
#define BOTTOM_RIGHT 3
#define BOTTOM_LEFT 4
//SL Video Size
#define SMALL 1
#define MEDIUM 2
#define LARGE 3
//SL Video Width
#define SMALL_HEIGHT 324 //0,3*1080 se fosse full hd
#define MEDIUM_HEIGHT 432 //0,4*1080
#define LARGE_HEIGHT 540 //0.5*1080
#define MAX_SIZE_PATH 256
using namespace std;
using namespace util;
class Mixer {
public:
Mixer(string,string);
Mixer();
virtual ~Mixer();
void adjustVideosFps();
void mixVideos();
void setSize(int);
/* Setters e getters...*/
void setMainVideo(string);
string getMainVideo();
void setSecondaryVideo(string);
string getSecondaryVideo();
void setPositionSecondaryVideo(int);
int getPositionSecondaryVideo();
void setTransparency(int);
int getTransparency();
void setNumThreads(string);
string getNumThreads();
void initialize(string mainVideo, string slVideo, int, int, int, char*, char*, char*);
void setPathFinal();
private:
struct fpsAndLine {
string line;
double fps;
string possibleProgramID;
};
void readFileFPS(fpsAndLine [], int *);
void convertMainVideoFPS(fpsAndLine [], int *);
void convertSecondaryVideoFPS(double);
string mainVideo, secondaryVideo, temporaryTextFile, numThreads, pathFinal, user_id, nameOfMainVideo;
char* contents;
char* uploads;
int positionSecondaryVideo;
double widthSecondaryVideo, heightSecondaryVideo;
int transparency;
};
#endif /* MIXER_H */