From c4019f7916b6e148e3f9a0e3c7dece422d78c342 Mon Sep 17 00:00:00 2001 From: pans <pans@454eff88-639b-444f-9e54-f578c98de674> Date: 星期三, 09 八月 2017 12:35:20 +0800 Subject: [PATCH] update capnp --- RtspFace/PL_Paint.cpp | 34 ++++++++-------------------------- 1 files changed, 8 insertions(+), 26 deletions(-) diff --git a/RtspFace/PL_Paint.cpp b/RtspFace/PL_Paint.cpp index 5e98665..acfd90c 100644 --- a/RtspFace/PL_Paint.cpp +++ b/RtspFace/PL_Paint.cpp @@ -5,7 +5,6 @@ #include <string.h> // for memcpy #include <opencv2/core/mat.hpp> #include <opencv2/imgproc.hpp> - #ifdef ENABLE_WTEXT #include "CvUtil/CvxText.h" #endif @@ -309,7 +308,7 @@ #endif } -bool plplExecutor_YUV(PL_Paint_Internal *in) +bool plpl_executor(PL_Paint_Internal *in) { MB_Frame* paintMb = &(in->lastMbfBuffOrigin); int ret = true; @@ -427,7 +426,7 @@ in->lastMbfBuffOrigin.height = frame->height; in->lastMbfBuffOrigin.pts = frame->pts; - in->payError = !plplExecutor_YUV(in); + in->payError = !plpl_executor(in); return false; } @@ -436,29 +435,12 @@ { PL_Paint_Internal* in = (PL_Paint_Internal*)internal; in->payError = true; - - if (pm.type != PipeMaterial::PMT_FRAME) - { - LOG_ERROR << "Only support PMT_FRAME" << LOG_ENDL; - return false; - } - - if (pm.buffer == nullptr) - return false; - - MB_Frame* frame = (MB_Frame*)pm.buffer; - switch(frame->type) - { - case MB_Frame::MBFT_YUV420: - case MB_Frame::MBFT_NV12: - case MB_Frame::MBFT_RGB565: - pm.breake(PipeMaterial::PMT_FRAME, MB_Frame::MBFT_RGB565, PL_Paint::pay_breaker_MBFT, in); - return !(in->payError); - default: - LOG_ERROR << "Only support MBFT_YUV420 / MBFT_NV12 / MBFT_RGB565" << LOG_ENDL; - in->payError = true; - break; - } + if (in->payError) + pm.breake(PipeMaterial::PMT_FRAME, MB_Frame::MBFT_YUV420, PL_Paint::pay_breaker_MBFT, in); + if (in->payError) + pm.breake(PipeMaterial::PMT_FRAME, MB_Frame::MBFT_NV12, PL_Paint::pay_breaker_MBFT, in); + if (in->payError) + pm.breake(PipeMaterial::PMT_FRAME, MB_Frame::MBFT_RGB565, PL_Paint::pay_breaker_MBFT, in); return !(in->payError); } -- Gitblit v1.8.0