Lines Matching refs:surface
250 Surface *surface = surfaceList.front();
251 uint32_t width = surface->GetWidth();
256 uint32_t height = surface->GetHeight();
295 static void StreamAttrInitialize(StreamAttr *streamAttr, Surface *surface,
298 if (streamAttr == nullptr || surface == nullptr) {
304 streamAttr->width = surface->GetWidth();
305 streamAttr->height = surface->GetHeight();
319 static int32_t SurfaceSetSize(SurfaceBuffer* surfaceBuf, Surface* surface, uint32_t size)
322 surfaceBuf->SetSize(surface->GetSize() - size);
323 if (surface->FlushBuffer(surfaceBuf) != 0) {
325 surface->CancelBuffer(surfaceBuf);
331 MEDIA_ERR_LOG("Flush surface failed.");
349 for (auto &surface : *surfaceList) {
351 SurfaceBuffer *surfaceBuf = surface->RequestBuffer();
356 MEDIA_ERR_LOG("No available buffer in surface.");
360 uint32_t size = surface->GetSize();
371 MEDIA_ERR_LOG("No available outBuf in surface.");
373 surface->CancelBuffer(surfaceBuf);
381 ret = SurfaceSetSize(surfaceBuf, surface, size);
437 MEDIA_ERR_LOG("the number of surface in frame config must 1 or 2 now.\n");
442 for (auto &surface : surfaceList) {
446 StreamAttrInitialize(&stream, surface, STREAM_VIDEO, fc);
474 list<Surface*> conList({surface});
536 static void GetSurfaceRect(Surface *surface, IRect *attr)
538 attr->x = std::stoi(surface->GetUserData(string("region_position_x")));
539 attr->y = std::stoi(surface->GetUserData(string("region_position_y")));
540 attr->w = std::stoi(surface->GetUserData(string("region_width")));
541 attr->h = std::stoi(surface->GetUserData(string("region_hegiht")));
549 MEDIA_ERR_LOG("Only support one surface in frame config now.");
552 Surface *surface = surfaceList.front();
554 StreamAttrInitialize(&stream, surface, STREAM_PREVIEW, fc);
562 streamInfo.u.pos.x = std::stoi(surface->GetUserData(string("region_position_x")));
563 streamInfo.u.pos.y = std::stoi(surface->GetUserData(string("region_position_y")));
607 MEDIA_ERR_LOG("Only support one surface in frame config now.");
611 MEDIA_ERR_LOG("Frame config with empty surface list.");
615 MEDIA_WARNING_LOG("Capture only fullfill the first surface in frame config.");
617 Surface *surface = surfaceList.front();
620 StreamAttrInitialize(&stream, surface, STREAM_CAPTURE, fc);
636 capSurface_ = surface;
690 MEDIA_ERR_LOG("Flush surface buffer failed.");
717 MEDIA_ERR_LOG("Only support one surface in frame config now.");
724 Surface *surface = surfaceList.front();
726 StreamAttrInitialize(&stream, surface, STREAM_CALLBACK, fc);
734 capSurface_ = surface;
794 MEDIA_ERR_LOG("Flush surface failed.");
885 MEDIA_ERR_LOG("Only support one surface in frame config now");
888 Surface* surface = surfaceList.front();
889 count = surface->GetQueueSize();