解码后,通过 mpp_buffer_get_fd(mpp_frame_get_buffer(frame))拿到fd 拿到fd之后,使用importbuffer_fd可以转换成功,1920x1080 这个耗时大概5ms void rga_convert_with_fd(int src_fd, int src_size, int dst_fd, int dst_size, int width, int height) { rga_buffer_t src = {}; rga_buffer_t dst...
commit 之后会 dup fd,这样外面 fd 关闭不会影响里面,可以看下 import 之后的 fd,还有可以用 index 做匹配 我在mpp_buffer.h 找到了mpp_buffer_get_index ,我有个疑问就是,纯内部,半内部,纯外部,这三中模式对性能影响如何?,目前我是采用DRM显示,这三种模式好像对我来说都是零拷显示,并且我发现纯内部,半...
mpp_frame_set_eos(frame, 0); MppBufferInfo info; memset(&info, 0, sizeof(MppBufferInfo)); info.type = MPP_BUFFER_TYPE_EXT_DMA; info.fd = dma_fd; info.size = size & 0x07ffffff; info.index = (size & 0xf8000000) >> 27; mpp_buffer_import(&cam_buf, &info); mpp_frame_set_...
std::cerr << "Failed to import buffer (version 1)" << std::endl; return -1; } // 使用第二个版本的 importbuffer_fd rga_buffer_handle_t handle2 = importbuffer_fd(fd, width, height, format); if (handle2 == 0) { std::cerr << "Failed to import buffer (version 2)" << std:...
g_src_handle = importbuffer_virtualaddr((char*)mpp_buffer_get_ptr(buffer), width*height*3);...
StringBuffer buf = new StringBuffer(); List assignments = task.getResourceAssignments(); for (int i = 0; i < assignments.size(); i++) { ResourceAssignment assignment = (ResourceAssignment) assignments .get(i); Resource resource = assignment.getResource(); ...
import time import threading # 使用 pybind11 编译得到的解码库 import mpp_decoder rtsp_infos = { "camera1": {"camera_id": 1, "video_type": 264, "rtsp_address": "rtsp://address_1/h264/ch1/main/av_stream"}, "camera2": {"camera_id": 2, ...
Mpp Buffer Mpp buffer is the warpper of the buffer used by hardware. Hardware usually can not use the buffer malloc by cpu. Then we design MppBuffer for different memory allocator on different platform. Currently it is designed for ion buffer on ...
"+"'sink.buffer-flush.max-rows' = '1000000',"+"'sink.buffer-flush.max-bytes' = '300000000',"+"'sink.buffer-flush.interval-ms' = '2000',"+"'sink.properties.format' = 'json',"+"'sink.properties.strip_outer_array' = 'true'"+")");StreamStatementSetstatementSet=env.createStatement...
StringBufferbuf= newStringBuffer(); List<ResourceAssignment> assignments =task.getResourceAssignments(); for (ResourceAssignmentassignment : assignments) { Resourceresource=assignment.getResource(); if (resource != null) { buf.append(resource.getName()).append(","); } } returnbuf.toString(); }...