WL_EXPORT void weston_output_disable_planes_incr(struct weston_output *output) { output->disable_planes++; /* * If disable_planes changes from 0 to non-zero, it means some type of * recording of content has started, and therefore protection level of * the protected surfaces must be updated to avoid the recording of * the protected content. */ if (output->disable_planes == 1) weston_schedule_surface_protection_update(output->compositor); }
struct content_protection은 누가 만드나 하면서 따라가보니
weston_compositor_enable_content_protection() 함수에서 만들어 주고 해당 함수는
//git\libweston\content-protection.c WL_EXPORT int weston_compositor_enable_content_protection(struct weston_compositor *compositor) { struct content_protection *cp;
SPI The maximum SPI clock speed is 5 MHz with 100 pF maximum loading, and the timing scheme follows clock polarity (CPOL) = 1 and clock phase (CPHA) = 1.
Use of the 3200 Hz and 1600 Hz output data rates is only recommended with SPI communication rates greater than or equal to 2 MHz. The 800 Hz output data rate is recommended only for communication speeds greater than or equal to 400 kHz, and the remaining data rates scale proportionally. For example, the minimum recommended communication speed for a 200 Hz output data rate is 100 kHz
I2C Due to communication speed limitations, the maximum output data rate when using 400 kHz I2C is 800 Hz and scales linearly with a change in the I2C communication speed. For example, using I2C at 100 kHz would limit the maximum ODR to 200 Hz
4 wire는 CS / SCLK / SDI / SDO를 쓴다면
3 wire는 CS / SCLK / SDIO 로 쓰는 듯.
(SDIO Serial Data Input Output의 약자 Secure Digital I/O의 약자이기도 하니.. 주의!)
C Specification void glReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * data); Parameters x, y Specify the window coordinates of the first pixel that is read from the frame buffer. This location is the lower left corner of a rectangular block of pixels.
width, height Specify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel.
24/03/2021 11:09:19 Pixel format for client 192.168.0.6: 24/03/2021 11:09:19 87 bpp, depth 5, little endian 24/03/2021 11:09:19 true colour: max r 47360 g 20997 b 2, shift r 179 g 0 b 77 24/03/2021 11:09:19 rfbSetTranslateFunction: client bits per pixel not 8, 16 or 32 24/03/2021 11:09:19 Client 192.168.0.6 gone
/* This call creates a mask and then a cursor: */ /* rfbScreen->defaultCursor = rfbMakeXCursor(exampleCursorWidth,exampleCursorHeight,exampleCursor,0); */
MakeRichCursor(rfbScreen);
/* initialize the server */ rfbInitServer(rfbScreen);
#ifndef BACKGROUND_LOOP_TEST #ifdef USE_OWN_LOOP { int i; for(i=0;rfbIsActive(rfbScreen);i++) { fprintf(stderr,"%d\r",i); rfbProcessEvents(rfbScreen,100000); } } #else /* this is the blocking event loop, i.e. it never returns */ /* 40000 are the microseconds to wait on select(), i.e. 0.04 seconds */ rfbRunEventLoop(rfbScreen,40000,FALSE); #endif /* OWN LOOP */ #else #if !defined(LIBVNCSERVER_HAVE_LIBPTHREAD) && !defined(LIBVNCSERVER_HAVE_WIN32THREADS) #error "I need pthreads or win32 threads for that." #endif /* catch Ctrl-C to set a flag for the main thread */ signal(SIGINT, intHandler); /* this is the non-blocking event loop; a background thread is started */ rfbRunEventLoop(rfbScreen,-1,TRUE); fprintf(stderr, "Running background loop...\n"); /* now we could do some cool things like rendering in idle time */ while (maintain_connection) { sleep(5); /* render(); */ } fprintf(stderr, "\nShutting down...\n"); rfbShutdownServer(rfbScreen, TRUE); #endif /* BACKGROUND_LOOP */
revind / revind.so / run / websockify 는 websockify 에서 나온거
libvncserver 와 noVNC와 websockify 의 조합으로 어찌 되긴 하는데..
~/libvncserver/webclients $ ls -al total 64 drwxr-xr-x 4 pi pi 4096 Aug 12 11:44 . drwxr-xr-x 16 pi pi 4096 Aug 12 11:03 .. -rwxr-xr-x 1 pi pi 25372 Aug 12 11:02 example -rw-r--r-- 1 pi pi 1601 Aug 12 10:32 index.vnc drwxr-xr-x 10 pi pi 4096 Aug 12 11:00 novnc -rwxr-xr-x 1 pi pi 424 Aug 12 11:39 rebind -rwxr-xr-x 1 pi pi 7508 Aug 12 11:39 rebind.so -rwxr-xr-x 1 pi pi 78 Aug 12 11:39 run drwxr-xr-x 3 pi pi 4096 Aug 12 11:28 websockify
인자는 아래와 같이 하고 실행!
$ ./run 5900 -- ./example
웹 브라우저에서 http://ip:5800 으로 접속하면 아래와 같이 뜨고
별다른 설정을 하지 않았다면 wss(websocket secure)를 안될테니 위에 "Click here to connect using noVNC"를 누른다.
약간의 시간을 기다리면(libvncserver의 웹 서버가 느린지 파일 전송이 좀 느리다)
아래와 같이 쨘~
+
한번 되더니 websockify 없이도 되네.. 머지?
+
runInBackground 의 값을 TRUE 로 해주면 웹 서버가 작동을 안한다 -_-
어떻게 해야 할까..
void rfbRunEventLoop ( rfbScreenInfoPtr screenInfo, long usec, rfbBool runInBackground )
static THREAD_ROUTINE_RETURN_TYPE listenerRun(void *data) { rfbScreenInfoPtr screen=(rfbScreenInfoPtr)data; int client_fd; struct sockaddr_storage peer; rfbClientPtr cl = NULL; socklen_t len; fd_set listen_fds; /* temp file descriptor list for select() */
/* Only checking socket state here and not using rfbIsActive() because: When rfbShutdownServer() is called by the client, it runs in the client-to-server thread's context, resulting in itself calling its own the pthread_join(), returning immediately, leaving the client-to-server thread to actually terminate _after_ the listener thread is terminated, leaving the client list still populated. */ /* TODO: HTTP is not handled */ }