mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 20:55:38 +08:00
Set I frame max qp to 22 for nvidia encoder
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "log.h"
|
||||
|
||||
#define SAVE_DECODER_STREAM 1
|
||||
#define SAVE_DECODER_STREAM 0
|
||||
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "log.h"
|
||||
|
||||
#define SAVE_DECODER_STREAM 1
|
||||
#define SAVE_DECODER_STREAM 0
|
||||
|
||||
NvidiaVideoDecoder::NvidiaVideoDecoder() {}
|
||||
NvidiaVideoDecoder::~NvidiaVideoDecoder() {
|
||||
@@ -51,7 +51,7 @@ int NvidiaVideoDecoder::Decode(
|
||||
}
|
||||
|
||||
if ((*(data + 4) & 0x1f) == 0x07) {
|
||||
// LOG_WARN("Receive key frame");
|
||||
LOG_WARN("Receive key frame");
|
||||
}
|
||||
|
||||
int num_frame_returned = decoder->Decode(data, size);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "video_decoder_factory.h"
|
||||
|
||||
#include "ffmpeg/ffmpeg_video_decoder.h"
|
||||
#include "log.h"
|
||||
#include "nvcodec/nvidia_video_decoder.h"
|
||||
|
||||
VideoDecoderFactory::VideoDecoderFactory() {}
|
||||
@@ -26,6 +27,9 @@ bool VideoDecoderFactory::CheckIsHardwareAccerlerationSupported() {
|
||||
CUvideoctxlock cudaCtxLock;
|
||||
cuResult = cuvidCtxLockCreate(&cudaCtxLock, 0);
|
||||
if (cuResult != CUDA_SUCCESS) {
|
||||
LOG_WARN(
|
||||
"System not support hardware accelerated decode, use default software "
|
||||
"decoder");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user