videoDecoder ,

This commit is contained in:
JIe Jie 2024-02-22 18:05:00 +08:00
parent 04008c0ef8
commit 146a955841
3 changed files with 7 additions and 4 deletions

View File

@ -1,11 +1,12 @@
#include <iostream>
#include <thread>
#include <SDL2/SDL.h>
#include <filesystem>
#include <opencv2/opencv.hpp>
#define SDL_MAIN_HANDLED
#include <SDL2/SDL.h>
#include "util.h"
#include "decoder.h"
#include "videoDecoder.h"
#include "shaderService.h"
#include "shader.h"
using std::cout;
@ -151,7 +152,8 @@ void OpenglRenderVideo(VideoParam& videoParam, const OpenglVideoParam& openglVid
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, nullptr);
}
int main(int argc, char** const argv)
int main(int argc, char** argv)
{
// Check File
const char* targetFilepath = argv[1];

View File

@ -1,4 +1,4 @@
#include "decoder.h"
#include "videoDecoder.h"
#include <thread>
#include <chrono>
using namespace std::literals::chrono_literals;
@ -37,6 +37,7 @@ void RequestPacket(VideoParam& param) {
std::this_thread::sleep_for(100ms);
continue;
}
//FIX:
const int ret = av_read_frame(fmtCtx, packet);
if (param.eof) {
std::this_thread::sleep_for(100ms);