From 57e6d99e5d0077ec43418c92991408178090e13a Mon Sep 17 00:00:00 2001
From: sujinwen <sujinwen@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 25 七月 2017 16:31:25 +0800
Subject: [PATCH] Failed commit: Default
---
VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.cpp | 44 ++++++++++++++++----------------------------
1 files changed, 16 insertions(+), 28 deletions(-)
diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.cpp b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.cpp
index d7bea59..4d64689 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.cpp
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.cpp
@@ -126,37 +126,25 @@
return false;
}
- ANativeWindow* window = (ANativeWindow*)(windowRender);
- ANativeWindow_Buffer buffer;
- if(windowRender != nullptr && ANativeWindow_lock(window, &buffer, NULL) == 0)
- {
- plScaleCfg.toHeight=buffer.height;
- plScaleCfg.toWidth=buffer.width;
- ANativeWindow_unlockAndPost(window);
- } else
- {
- plScaleCfg.toHeight=480;
- plScaleCfg.toWidth=640;
- }
- PL_Scale* plScale = (PL_Scale*)pipeLineRender->push_elem("PL_Scale");
- ret = plScale->init(&plScaleCfg);
- if (!ret)
- {
- LOG_ERROR << "pipeLineRender.plScale init error" << LOG_ENDL;
- return false;
- }
+ PL_Scale* plScale = (PL_Scale*)pipeLineRender->push_elem("PL_Scale");
+ ret = plScale->init(&plScaleCfg);
+ if (!ret)
+ {
+ LOG_ERROR << "pipeLineRender.plScale init error" << LOG_ENDL;
+ return false;
+ }
- PL_ColorConv_Config PLColorConvCfg;
- PL_ColorConv* plColorConv = (PL_ColorConv*)pipeLineRender->push_elem("PL_ColorConv");
- ret = plColorConv->init(&PLColorConvCfg);
- if (!ret)
- {
- LOG_ERROR << "pipeLineRender.plPaint init error" << LOG_ENDL;
- return false;
- }
+ PL_ColorConv_Config PLColorConvCfg;
+ PL_ColorConv* plColorConv = (PL_ColorConv*)pipeLineRender->push_elem("PL_ColorConv");
+ ret = plColorConv->init(&PLColorConvCfg);
+ if (!ret)
+ {
+ LOG_ERROR << "pipeLineRender.plPaint init error" << LOG_ENDL;
+ return false;
+ }
PL_Paint_Config plPaintCfg;
- plPaintCfg.fontPath = "/data/msyh.ttc";
+ plPaintCfg.fontPath = fontPath;
plPaintCfg.plplCtx = &plplContext;
PL_Paint* plPaint = (PL_Paint*)pipeLineRender->push_elem("PL_Paint");
ret = plPaint->init(&plPaintCfg);
--
Gitblit v1.8.0