-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrameWriter.h
More file actions
38 lines (29 loc) · 764 Bytes
/
Copy pathFrameWriter.h
File metadata and controls
38 lines (29 loc) · 764 Bytes
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
//
// Created by yuitora . on 13/08/2020.
//
#ifndef CVFFMPEG_FRAMEWRITER_H
#define CVFFMPEG_FRAMEWRITER_H
#include "cap_ffmpeg_legacy_api.h"
#include <stdint.h>
#include <vector>
class FrameWriter {
private:
bool initialized = false;
public:
CvVideoWriter_FFMPEG* framewriter;
uint8_t *data;
int width;
int height;
double fps;
int n_channel = 3;
int step;
FrameWriter();
FrameWriter(const char* filename, const char *codec_name, double fps, int width, int height, const char *ffmpegcmd, uint8_t *buf);
int write_frame();
void close_video();
bool is_opened();
~FrameWriter();
};
std::vector<const char *> getcodecname();
std::vector<const char *> getcodeclongname();
#endif //CVFFMPEG_FRAMEWRITER_H