Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for managing thread calling in double-buffering technology to prevent memory leakage

A memory leak, double-buffering technology, applied in inter-program communication, image data processing, multi-program installation, etc., can solve problems such as black screen, lag, insufficient memory, etc.

Pending Publication Date: 2022-04-12
四川启睿克科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

With the rapid development of the film and television industry, based on the birth of multi-audio track and multi-screen mixed MKV format files, and the maturity of 3D encoding processing technology, basic streams such as MP4 in the early stage can no longer meet people's basic visual needs. How to ensure more efficient completion Decoding task becomes an important topic
In the game industry, nowadays, with the rapid changes and upgrades of game engines, when developers use the SDK development kits provided by engine developers to game developers to combine their own models, animations, and screen effects to present, they gradually expose certain problems. Some system layers manage the underlying bridging components with serious performance problems, especially on the handheld device side. On the one hand, audio and video decoding or Unity3D game products based on the Android layer solve the huge needs of video game enthusiasts, and on the other hand, they are also used in the application system layer. There are a series of optimization problems in the resources, such as delays, freezes, even black screens, and ANR caused by insufficient memory under severe rendering mechanisms.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for managing thread calling in double-buffering technology to prevent memory leakage
  • Method for managing thread calling in double-buffering technology to prevent memory leakage

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0022] This embodiment provides a method for managing thread calls in double-buffering technology to prevent memory leaks, including avoiding two core application scenarios of frame-by-frame analysis OOM and basic video decoding memory leaks in double-buffering services; specifically, the following steps are included:

[0023] (1) Under the double-buffering mechanism, manage the native loading area frame-by-frame OOM phenomenon:

[0024] ①Customize the SurfaceView template, create the DEFAULT_FRAME_DURATION_MILLISECOND attribute parameter, record the thread behavior of calculating frame data, set the value of this parameter to a negative value, and avoid out-of-bounds exceptions during subsequent frame advancement calculations, and save this attribute in frameDuration, Control the frame refresh frequency, and synchronize this frequency with canvas and isAlive. Record the canvas behavior and activation status. If it is inactive, the canvas content should be recycled. At this t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for preventing memory leakage through thread calling in a management double-buffering technology, according to the scheme, a frame image is displayed on a preloaded media stream file through a double-buffering mechanism based on SurfaceView, and when an active page containing a SurfaceView subset generates a rendering event, HandlerThread is used for performing performmTraversals packaging processing on a thread resource mounting request. In the execution process, the Windows ManagerService is requested to switch different thread associations, meanwhile, the SurfaceView embedded in a window releases resource management to the maximum extent through a series of callback functions, and meanwhile exposed thread tasks are automatically recycled. And the purposes of fluency, no screen sticking and sound and picture synchronization during analysis of large-scale video files or 3D resources in formats such as MKV and the like are achieved.

Description

technical field [0001] The invention relates to the field of computer graphics and graphics rendering based on an Android operating system, and in particular to a method for managing thread calls in double buffering technology and preventing memory leaks. Background technique [0002] Under the current wave of Internet, numerous PC and mobile intelligent application industries are advancing by leaps and bounds. Among them, the rapid rise of the game industry and video codec technology is a huge test for hardware and software rendering algorithms. With the rapid development of the film and television industry, based on the birth of multi-audio track and multi-screen mixed MKV format files, and the maturity of 3D encoding processing technology, basic streams such as MP4 in the early stage can no longer meet people's basic visual needs. How to ensure higher efficiency? The decoding task has become an important topic. In the game industry, nowadays, with the rapid changes and c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/50G06F9/54G06T1/20G06T15/00
Inventor 孔世明
Owner 四川启睿克科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products