forked from LostmanMing/gs-video-audio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
31 lines (25 loc) · 850 Bytes
/
main.cpp
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
#include "iostream"
#include "memory_resource"
#include "VideoAudioCapture.h"
#include "opencv2/opencv.hpp"
//launch gstreamer
void launch_gs(){
}
int main(){
spdlog::set_level(spdlog::level::debug);
VideoAudioOption option;
auto xx=std::make_unique<VideoAudioOption>();
VideoAudioCapture capture(std::move(xx));
capture.initPipeline();
capture.Open();
while (capture.Capture(imageFormat::IMAGE_RGBA8,1000,nullptr)!=nullptr){
std::cout<<"wait for capture"<<std::endl;
}
//auto data=capture.Capture(imageFormat::IMAGE_RGBA8,1000,nullptr);
//auto mat=cv::Mat(544,960,CV_8UC4,data->data());
//cv::cvtColor(mat,mat,cv::COLOR_RGBA2BGR);
//std::this_thread::sleep_for(std::chrono::seconds(10));
//cv::imwrite("/home/topeet/test.jpg",mat);
std::cout<<"hello"<<std::endl;
return 0;
}