Read-write method and read-write device for shared queue
A technology for sharing queues and queues, applied in the field of reading and writing methods and devices for shared queues, can solve problems such as low efficiency and waste of memory, and achieve the effects of improving efficiency and stability and optimizing memory usage.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0033] figure 1 A flow chart of the method for writing to a shared queue provided by the first embodiment of the present invention is shown, and only parts related to the embodiment of the present invention are shown for convenience of description.
[0034] The writing method of the shared queue provided by this embodiment includes the following steps:
[0035] Step S101, for the media data of the same channel, create a corresponding queue for each session, and different queues share the same media data;
[0036] This step first creates a queue. There may be multiple sessions on the same channel, and a queue is created for each session. The queue is used to store descriptors pointing to data packets, and different queues share media data in the same channel. Add the descriptor to the queue list, initialize the head node of the list, the head node includes the length information of the queue, including all data packet length statistics (that is, the length of all data packets ...
Embodiment 2
[0044] figure 2 The flow of the writing method of the shared queue provided by the second embodiment of the present invention is shown, and only the parts related to the embodiment of the present invention are shown for convenience of description.
[0045] The writing method of the shared queue provided by this embodiment includes the following steps:
[0046] Step S201, for the media data of the same channel, create a corresponding queue for each session, and different queues share the same media data;
[0047] Step S202, before writing the data packet, add 1 to the reference count of the data packet;
[0048] Step S203, create a descriptor pointing to the data packet according to the queue corresponding to the current session, different queues have their own memory management descriptors, and organize them into a linked list, and the descriptors of the same node point to the same piece of media data;
[0049]Step S204, when the queue writing condition is not met, discard ...
Embodiment 3
[0054] image 3 The flow of the writing method of the shared queue provided by the third embodiment of the present invention is shown, and only the parts related to the embodiment of the present invention are shown for convenience of description.
[0055] The writing method of the shared queue provided by this embodiment includes the following steps:
[0056] Step S301, for the media data of the same channel, create a corresponding queue for each session, and different queues share the same media data;
[0057] Step S302, before writing the data packet, add 1 to the reference count of the data packet;
[0058] Step S303, according to the queue corresponding to the current session, create a descriptor pointing to the data packet, different queues have their own memory management descriptors, and organize them into linked lists, and the descriptors of the same node point to the same piece of media data;
[0059] Step S304, when the queue write condition is not met, discard the...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com