-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLiveStreamingCore.h
More file actions
55 lines (50 loc) · 997 Bytes
/
LiveStreamingCore.h
File metadata and controls
55 lines (50 loc) · 997 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
extern "C"
{
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libswscale/swscale.h"
#include "libavutil/imgutils.h"
}
#undef main
#include <fstream>
#include <iostream>
#include <sstream>
#include <iostream>
using namespace std;
struct svideoparams {
int width;
int height;
double fps;
};
struct sdecoded_frame {
uint8_t* data; //data as rgb or yuv format; set the dependencies
int linesize;
int width;
int height;
};
class LiveStreamingCore
{
public:
svideoparams* init(char* filename);
int init_debug();
sdecoded_frame* live_streaming();
int close();
AVCodec* c;
SwsContext* img_convert_ctx;
AVFormatContext* context;
AVCodecContext* ccontext;
AVPacket packet;
AVFormatContext* oc;
AVStream* stream;
AVCodec* codec;
AVFrame* pic;
AVFrame* picrgb;
uint8_t* picture_buf;
uint8_t* picture_buf2;
int size;
int size2;
int video_stream_index;
sdecoded_frame* frame_export;
};