Home | History | Annotate | Download | only in android

Lines Matching refs:mtsp

107 _mts_port_free(AndroidMTSPort* mtsp)
109 if (mtsp != NULL) {
110 if (mtsp->fb_packet != NULL) {
111 sdkctl_direct_packet_release(mtsp->fb_packet);
113 if (mtsp->jpeg_compressor != NULL) {
114 jpeg_compressor_destroy(mtsp->jpeg_compressor);
116 if (mtsp->sdkctl != NULL) {
117 sdkctl_socket_release(mtsp->sdkctl);
119 AFREE(mtsp);
361 AndroidMTSPort* mtsp;
363 ANEW0(mtsp);
364 mtsp->opaque = opaque;
367 multitouch_init(mtsp);
372 mtsp->jpeg_compressor =
375 mtsp->sdkctl = sdkctl_socket_new(SDKCTL_MT_TIMEOUT, "multi-touch",
378 _on_multitouch_message, mtsp);
379 sdkctl_init_recycler(mtsp->sdkctl, 64, 8);
383 mtsp->fb_packet = sdkctl_direct_packet_new(mtsp->sdkctl);
386 sdkctl_socket_connect(mtsp->sdkctl, SDKCTL_DEFAULT_TCP_PORT,
389 return mtsp;
393 mts_port_destroy(AndroidMTSPort* mtsp)
395 _mts_port_free(mtsp);
404 * mtsp - Multi-touch port descriptor with initialized JPEG compressor.
412 _fb_compress(const AndroidMTSPort* mtsp,
420 jpeg_compressor_compress_fb(mtsp->jpeg_compressor, fmt->x, fmt->y, fmt->w,
426 mts_port_send_frame(AndroidMTSPort* mtsp,
434 if (!sdkctl_socket_is_port_ready(mtsp->sdkctl)) {
440 _fb_compress(mtsp, fmt, fb, 10, ydir);
444 sizeof(MTFrameHeader) + jpeg_compressor_get_jpeg_size(mtsp->jpeg_compressor);
448 uint8_t* const msg = (uint8_t*)jpeg_compressor_get_buffer(mtsp->jpeg_compressor);
457 const float comp_rate = ((float)jpeg_compressor_get_jpeg_size(mtsp->jpeg_compressor) / (fmt->w * fmt->h * fmt->bpp)) * 100;
464 sdkctl_direct_packet_send(mtsp->fb_packet, msg, cb, cb_opaque);