-
Notifications
You must be signed in to change notification settings - Fork 0
/
av_input_stream.h
42 lines (32 loc) · 1.15 KB
/
av_input_stream.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
34
35
36
37
38
39
40
41
42
#ifndef AV_INPUT_STREAM_H
#define AV_INPUT_STREAM_H
#include "video_capture.h"
#include "audio_capture.h"
class AVInputStream
{
public:
AVInputStream();
~AVInputStream();
public:
void SetVideoDeviceName(const std::string& fmt_name, const std::string& device_name, bool prefix);
void SetMicrophoneName(const std::string& fmt_name, const std::string& device_name, bool prefix);
void SetSpeakerName(const std::string& fmt_name, const std::string& device_name, bool prefix);
void SetVideoDeviceOpts();
void SetMicrophoneOpts();
void SetSpeakerOpts();
void SetVideoCaptureCB(CaptureCB cb);
void SetMicrophoneCaptureCB(CaptureCB cb);
void SetSpeakerCaptureCB(CaptureCB cb);
int Open();
void Close();
int Start();
void Stop();
int GetVideoOpts(int& width, int& height, int& frame_rate, AVPixelFormat& pix_fmt);
int GetMicrophoneOpts(int& sample_rate, AVSampleFormat& sample_fmt, int& channels);
int GetSpeakerOpts(int& sample_rate, AVSampleFormat& sample_fmt, int& channels);
private:
VideoCapture video_capture_;
AudioCapture microphone_;
AudioCapture speaker_;
};
#endif // AV_INPUT_STREAM_H