WO2014015688A1 - Method, device and system for processing multimedia data - Google Patents

Method, device and system for processing multimedia data Download PDF

Info

Publication number
WO2014015688A1
WO2014015688A1 PCT/CN2013/074634 CN2013074634W WO2014015688A1 WO 2014015688 A1 WO2014015688 A1 WO 2014015688A1 CN 2013074634 W CN2013074634 W CN 2013074634W WO 2014015688 A1 WO2014015688 A1 WO 2014015688A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
queue
encoding
address
transmission
Prior art date
Application number
PCT/CN2013/074634
Other languages
French (fr)
Chinese (zh)
Inventor
李昭早
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2014015688A1 publication Critical patent/WO2014015688A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/236Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/436Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation using parallelised computational arrangements

Definitions

  • the present invention relates to the field of information technology, and in particular, to a method, device and system for processing multimedia data. Background technique
  • multi-channel multimedia data is collected by a single chip, and the collected multimedia data is encoded to obtain encoded data, and then the encoded data is transmitted to an external storage device or transmitted through a network.
  • the prior art has at least the following problems: Since the prior art processes multimedia data, its data acquisition, data encoding, and code stream transmission processes are all implemented on one chip, for multiple paths. In the case of video surveillance, the amount of data of the multimedia data is large, which results in excessive chip coding load in the prior art, and thus the processing efficiency of the multimedia data is low. Summary of the invention
  • embodiments of the present invention provide a method, apparatus, and system for processing multimedia data.
  • the technical solution is as follows:
  • a method for processing multimedia data comprising: encoding, by each of a plurality of encoding devices, multimedia data through a multi-pass encoding channel Packing the multiplexed encoded data, and transmitting the packed data to a corresponding DMA (Direct Memory Access) cache in the transmission device, and disassembling the packed data in the DMA cache by the transmitting device And transfer the disassembled data.
  • DMA Direct Memory Access
  • the packetizing the multiple encoded data includes:
  • the encoded data outputted by each coding channel is sequentially obtained, and after the obtained encoded data reaches a threshold, the obtained encoded data is packaged into one data packet.
  • the packet data is sent to a corresponding direct memory access DMA buffer in the transmission device, Specifically include:
  • the empty queue of the corresponding DMA cache Querying the empty queue of the corresponding DMA cache, and acquiring the address of the empty queue; sending the packetized data to the empty queue of the corresponding DMA buffer according to the address of the empty queue, and converting the empty queue to A data queue, the address of the data queue is the same as the address of the empty queue.
  • the sending according to the address of the empty queue, the packet data to the empty queue of the corresponding DMA cache After the empty queue is converted into a data queue, the method further includes:
  • the method further includes:
  • an encoding apparatus comprising:
  • An encoding module configured to encode multimedia data through a multi-pass encoding channel to obtain multiplexed encoded data
  • a packet module configured to package the multiplexed data encoded by the coding module, where the first sending module is configured to send the packaged data obtained by the packaging module to a corresponding direct memory access DMA buffer in the transmission device,
  • the transmitting device disassembles the packed data in the DMA buffer and transmits the disassembled data.
  • the packetizing module is specifically configured to sequentially obtain the encoded data output by each coding channel, and obtain the encoded data output by each coding channel.
  • the packets are respectively packaged into one data packet; or, the encoded data output by each coding channel is sequentially obtained, and after the obtained encoded data reaches a threshold, the obtained encoded data is packaged into one data packet.
  • the first sending module includes:
  • a query unit configured to query an empty queue of the corresponding DMA cache
  • An obtaining unit configured to obtain an address of an empty queue that is queried by the query unit
  • a sending unit configured to send the packetized data to the empty queue of the corresponding DMA buffer according to the address of the empty queue acquired by the acquiring unit, to convert the empty queue into a data queue, where the address of the data queue is The addresses of the empty queues are the same.
  • the device further includes:
  • a second sending module configured to send a data transmission completion notification to the transmission device, where the data transmission completion notification carries an address of the data queue, so that the transmission device disassembles the address according to an address of the data queue The packed data in the corresponding DMA buffer.
  • a receiving module configured to receive, by the transmitting device, a data transmission completion notification sent after the disassembled data transmission, where the data transmission completion notification carries an address of the data queue;
  • a release module configured to release the data queue of the corresponding DMA cache according to an address of the data queue received by the receiving module, to convert the data queue into an empty queue.
  • a method for processing multimedia data comprising: Transmitting means acquiring, by the each of the plurality of encoding devices, the packed data sent to the corresponding direct memory access DMA buffer in the transmitting device;
  • the transmitting device acquires, by each of the plurality of encoding devices, the packet sent to the corresponding direct memory access DMA buffer in the transmitting device Before the data, it also includes:
  • the packet data sent by each of the encoding devices to the corresponding direct memory access DMA buffer in the transmitting device includes:
  • the method further includes:
  • a transmission device comprising:
  • An obtaining module configured to acquire, by using each of the plurality of encoding devices, the packed data sent by the corresponding direct memory access DMA buffer in the transmitting device; wherein the packed data is multi-channel for each encoding device After the encoding channel encodes the multimedia data to obtain the multiplexed encoded data, the data obtained by packing the multiplexed encoded data;
  • a disassembling module configured to disassemble the packaged data in the DMA cache acquired by the obtaining module
  • a transmission module configured to transmit data disassembled by the disassembly module.
  • the device further includes:
  • a receiving module configured to receive a data transmission completion notification sent by the encoding device, where the data is sent
  • the address of the data queue of the corresponding DMA cache is carried in the notification, and the packaged data is stored in the data queue;
  • the acquiring module is configured to acquire, according to the address of the data queue of the corresponding DMA cache carried in the data sending completion notification, each encoding device of the plurality of encoding devices to the corresponding direct memory in the transmitting device Access the packed data sent by the DMA cache.
  • the device in a second possible implementation manner of the fourth aspect, the device,
  • a sending module configured to send a data transmission completion notification to the corresponding encoding device, where the data transmission completion notification carries an address of the data queue, so that the encoding device releases the corresponding DMA according to the address of the data queue
  • the cached data queue causes the data queue to be converted to an empty queue.
  • a system for processing multimedia data comprising: a plurality of encoding devices and a transmitting device;
  • Each of the plurality of encoding devices is an encoding device as described above;
  • the transmission device is a transmission device as described above.
  • the multi-channel video encoding is distributed to a plurality of encoding devices, thereby solving the problem that the encoding power of the single encoding device is too heavy; in addition, by adopting a DMA transmission mechanism, The encoding device controls to send the packed data to the corresponding DMA buffer in the transmitting device, so that the encoding device can uniformly manage the queue in the DMA buffer in the transmitting device, not only can ensure the stability of the code stream transmission of each encoding device, but also can The multi-thread parallel processing code stream is realized, thereby improving the processing efficiency of the multimedia data.
  • FIG. 1 is a flowchart of a method for processing multimedia data according to an embodiment of the present invention
  • FIG. 2 is a flow chart of another method for processing multimedia data according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for processing multimedia data according to another embodiment of the present invention
  • FIG. 4 is another embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a second encoding apparatus according to another embodiment of the present invention
  • FIG. 1 is a schematic structural diagram of a second encoding apparatus according to another embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a third encoding apparatus according to another embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a fourth encoding apparatus according to another embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a first transmission apparatus according to another embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a second transmission apparatus according to another embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a third transmission apparatus according to another embodiment of the present invention
  • FIG. 11 is a schematic structural diagram of a system for processing multimedia data according to another embodiment of the present invention. detailed description
  • the embodiment of the present invention provides a method for processing multimedia data.
  • the method for performing the method by the encoding device is taken as an example. Referring to FIG. 1 , the process of the method provided by the embodiment of the present invention is as follows:
  • each of the plurality of encoding devices encodes the multimedia data through the multi-pass encoding channel to obtain the multiplexed encoded data
  • the multi-channel encoded data is packaged, including but not limited to:
  • the encoded data outputted by each coding channel is sequentially obtained, and after the obtained encoded data reaches a threshold, the obtained encoded data is packaged into one data packet.
  • the packet data is sent to the corresponding direct memory access DMA buffer in the transmission device, which specifically includes:
  • the packed data is sent to the empty queue of the corresponding DMA buffer according to the address of the empty queue, so that the empty queue is converted into the data queue, and the address of the data queue is the same as the address of the empty queue.
  • the method further includes: The data transmission completion notification is sent to the transmission device, and the data transmission completion notification carries the address of the data queue, so that the transmission device disassembles the packaged data in the corresponding DMA buffer according to the address of the data queue.
  • the packet is sent to the empty queue of the corresponding DMA buffer according to the address of the empty queue, and after the empty queue is converted into the data queue, the method further includes:
  • the receiving transmission device notifies the data transmission completion after the disassembled data transmission, and the data transmission completion notification carries the address of the data queue;
  • the data queue of the corresponding DMA buffer is released according to the address of the data queue, and the data queue is turned into an empty queue.
  • the method of the method provided by the embodiment of the present invention is as follows:
  • the transmitting device acquires the packed data sent by each of the plurality of encoding devices to the corresponding direct memory access DMA buffer in the transmitting device;
  • the transmitting device acquires the packed data sent by each of the plurality of encoding devices to the direct memory access DMA buffer corresponding to the transmitting device, the transmitting device further includes:
  • the data transmission completion notification carries the address of the corresponding DMA buffer data queue, and the data queue stores the packed data
  • the transmitting device acquires the packetized data sent by each of the plurality of encoding devices to the corresponding direct memory access DMA buffer in the transmitting device, and specifically includes:
  • the packed data sent by each of the plurality of encoding devices to the corresponding direct memory access DMA buffer in the transmitting device is acquired according to the address of the data queue of the corresponding DMA buffer carried in the data transmission completion notification.
  • the method further includes:
  • the data transmission completion notification is sent to the corresponding coding apparatus, and the data transmission completion notification carries the address of the data queue, so that the coding apparatus releases the corresponding DMA buffer data queue according to the address of the data queue, and the data queue is turned into an empty queue.
  • the method provided by the embodiment of the present invention achieves the problem that the multi-channel video coding is over-committed by using a plurality of coding devices and the transmission device to be cascaded, thereby solving the problem that the coding load of the single-encoding device is too heavy;
  • the encoding device can uniformly manage the queues in the DMA buffer in the transmission device, and can not only ensure the code stream of each encoding device. Transmission stability, and It is also possible to implement multi-thread parallel processing of the code stream, thereby improving the processing efficiency of the multimedia data.
  • the method for processing multimedia data is exemplified by taking the following embodiments as an example.
  • Another embodiment of the present invention provides a process.
  • the method for the multimedia data is combined with the content of the foregoing embodiment.
  • the method for processing the multimedia data is implemented by using two encoding devices and one transmitting device as an example, and the method provided by the embodiment of the present invention is exemplified in detail. Referring to FIG. 3, the process of the method provided by the embodiment of the present invention is specifically as follows:
  • each of the two encoding devices encodes the multimedia data through the multi-pass encoding channel to obtain the multi-channel encoded data.
  • the manner in which the encoding device encodes the multimedia data can be implemented by encoding the multimedia data according to the existing encoding chip, which is not specifically limited in this embodiment.
  • each encoding device corresponds to four encoding channels, and the multimedia data is encoded by each encoding channel to obtain four encoded data.
  • each encoding device packages the multi-coded data, and sends the packed data to a corresponding DMA buffer in the transmission device;
  • the DMA buffer is a DMA buffer in the transmission device.
  • the DMA corresponding to each encoding device may be separately set in the transmission device.
  • Cache that is, one encoding device corresponds to one DMA buffer in the transmitting device, and the number of encoding devices is the same as the number of DMA buffers in the transmitting device, so that different encoding devices send their packed data to their respective DMA buffers. in.
  • the packaging manner adopted includes, but is not limited to, one of the following two methods:
  • the first mode sequentially obtaining the encoded data outputted by each coding channel, and packaging the obtained encoded data of each coding channel into a data packet;
  • the encoding device has three encoding channels as an example, and the encoding device obtains the encoded data obtained by encoding the first encoding channel, and packs it into a data packet, and then acquires the second encoding.
  • the coded channel encodes the encoded data, and packs it into a data packet, and then obtains the encoded data obtained by the third coding channel coding, and packs it into a data packet.
  • the encoded data obtained by encoding the 3 channels of the coding channel are respectively obtained, and then the obtained 3 channels of the encoded data are respectively packaged into one data packet.
  • the second method sequentially obtains the encoded data outputted by each coding channel, and after the obtained encoded data reaches the threshold, packages the obtained encoded data into a data packet.
  • the specific process is: if one coding channel outputs no encoded data at the time of acquiring the encoded data, immediately jumps to the next coding channel to obtain the encoded data; When one code channel receives the coded data at the time of acquiring the coded data, the coded data is immediately taken out; and the data is sequentially taken from each code channel.
  • the coding device when there are three coding channels in the coding device, respectively, channel 1, channel 2 and channel 3, data is taken from channel 1 first, and if channel 1 has coded data at this time, the coded data in channel 1 is obtained, and Skip to the next channel to continue to obtain the encoded data; if channel 1 has no encoded data at this time, immediately jump to the next channel to obtain the encoded data; sequentially loop the encoded data from the 3 channels until the size of the encoded data is obtained.
  • the threshold is reached, and the obtained encoded data is packaged into one data packet.
  • the specific threshold size may be 100 megabytes, 150 megabytes or other values. This embodiment does not specifically limit the threshold size.
  • the empty queue of the corresponding DMA buffer may be queried first, and the address of the empty queue is obtained; and the packaged data is sent to the address according to the address of the empty queue.
  • the empty queue of the corresponding DMA buffer the empty queue is converted into a data queue, and the address of the data queue is the same as the address of the empty queue.
  • the encoding device may also send the packed data to the DMA buffer by using another sending manner. This embodiment does not specifically limit the sending manner in which the packed data is sent to the corresponding DMA buffer in the transmitting device.
  • the encoding device packs the encoded data outputted by each encoding channel into one data packet respectively. It can be sent to the corresponding DMA buffer in the transmission device immediately. Since the encoded data outputted by each coding channel is separately packaged into one data packet, it is transmitted immediately, so that the output of each coding channel can be guaranteed.
  • the encoded data can be transmitted in time; for the second packing mode, after the size of the acquired encoded data reaches a threshold, the encoding device packs the obtained encoded data into a data packet, and then sends the encoded data to a corresponding device in the transmission device.
  • the encoding device packs the encoded data reaching the threshold into one data packet for transmission, the transmission of the large data is realized, which not only can reduce the data transmission efficiency and the number of transmissions, but also reduce the waste due to multiple data transmission.
  • the CPU Central Processing Unit
  • the transmitting device acquires the packed data sent by the encoding device to the corresponding DMA buffer in the transmitting device.
  • the manner in which the transmitting device obtains the packetized data sent by the encoding device to the corresponding DMA buffer in the transmitting device includes but is not limited to one of the following two methods:
  • the first mode the transmitting device actively acquires the packaged data sent by the encoding device to the corresponding DMA buffer in the transmitting device every preset period;
  • the transmission device acquires data from the DMA buffer in the transmission device every 5 seconds, taking the DMA buffer with 10 queues as an example, and the 10 queues are sequentially numbered 1 To 10.
  • the transmission device traverses all queues in the DMA buffer every 5 seconds. If the transmitting device queries the queue 5 as a data queue, including the packed data sent by the encoding device to the corresponding DMA buffer in the transmitting device, the packed data is immediately acquired and disassembled.
  • the preset period size may be other sizes in addition to the above 5 seconds. This embodiment does not limit the specific size of the preset period.
  • the second mode triggering, by a preset trigger condition, the transmitting device to passively acquire the packed data sent by the encoding device to the corresponding DMA buffer in the transmitting device;
  • the data transmission completion notification is sent to the transmission device, and the data queue is carried in the data transmission completion notification.
  • the transmission device receives the data transmission completion notification sent by the coding device, and the trigger transmission device acquires the packaged data in the data queue corresponding to the DMA buffer according to the address of the data queue.
  • other trigger conditions may be preset.
  • the trigger transmission device does not passively acquire the corresponding DMA in the transmission device from the encoding device.
  • the trigger condition for the packaged data sent by the cache is limited.
  • the transmission device may obtain the packetized data by using other acquisition methods.
  • the acquisition device does not acquire the method for obtaining the packaged data by the encoding device to the corresponding DMA buffer in the transmission device. Specific restrictions are made.
  • the transmitting device disassembles the packed data in the DMA buffer and transmits the disassembled data.
  • the packetized data is disassembled, and the specific disassembly method can be implemented according to the existing unpacking mode, which is not specifically limited in this embodiment.
  • each encoded data can be disassembled, and the disassembled encoded data is transmitted, for example, the disassembled data is transmitted to the storage space. Save the file or transfer it to the network.
  • the transmission device transmits the disassembled data
  • the data queue storing the packaged data corresponding to the disassembled data can be released, thereby realizing resource reuse.
  • the transmission device sends a data transmission completion notification to the corresponding coding device, and carries the address of the data queue in the data transmission completion notification, so that the coding device is enabled.
  • the data queue corresponding to the DMA buffer in the transmission device is released according to the address of the data queue, even if the data queue is turned into an empty queue for subsequent reuse.
  • other notification manners may be adopted, which is not specifically limited in this embodiment.
  • each encoding device corresponds to a DMA buffer in one transmission device, or corresponds to a part of a DMA buffer, in order to enable the transmission device to specify which encoding device the data queue to be released currently corresponds to, which embodiment, the embodiment In the above step 303, when the encoding device transmits a data transmission completion notification to the transmission device, the identifier of the encoding device carrying the packetized data may be notified by the data transmission completion, so that the transmission device distinguishes which one is by the identifier. The encoding device transmits the packed data to the transmitting device, that is, which encoding device the data queue currently to be released corresponds to.
  • the specific identifier of the encoding device may be the number, MAC address or other identifier of the encoding device. This embodiment does not limit the specific identifier of the encoding device.
  • the coding device number is used as an example of the coding device, and the coding device numbered 1 transmits the packet data to the transmission device, and then transmits a data transmission completion notification to the transmission device.
  • the transmitting device sends the encoded data in the data queue to the encoding device numbered 1 after the packet data is disassembled and transmitted.
  • the above content is only described by using two encoding devices and one transmission device to process multimedia data.
  • the number of encoding devices may be other numbers, which may be set according to actual coding requirements. This embodiment does not limit the specific number of encoding devices. Set.
  • an encoding device and a transmitting device can implement the processing of the multimedia data by using the foregoing method.
  • the specific implementation process is consistent with the foregoing steps 301 to 304, and details are not described herein again.
  • the method provided in this embodiment achieves the problem that the multi-channel video coding is distributed to multiple coding devices by using multiple coding devices and the transmission device to be cascaded, thereby solving the problem that the coding load of the single coding device is too heavy;
  • the DMA transmission mechanism is adopted, and the encoding device controls the transmission of the packet data to the corresponding DMA buffer in the transmission device, so that the encoding device can uniformly manage the queues in the DMA buffer in the transmission device, and can not only ensure the code stream transmission of each encoding device.
  • the stability but also enables multi-threaded parallel processing of the code stream, thereby improving the processing efficiency of multimedia data.
  • Another embodiment of the present invention provides an encoding apparatus for performing the functions of the encoding apparatus in the method for processing multimedia data provided by the above embodiments. Referring to FIG. 4, the apparatus includes:
  • the encoding module 41 is configured to encode the multimedia data through the multi-pass encoding channel to obtain the multi-channel encoded data;
  • the packetizing module 42 is configured to package the multiplexed encoded data obtained by the encoding module 41, and the first sending module 43 is configured to send the packed data obtained by the packing module 42 to the corresponding direct memory access DMA buffer in the transmitting device, The transmitting device disassembles the packed data in the DMA buffer and transmits the disassembled data.
  • the packing module 42 is specifically configured to sequentially obtain the encoded data output by each encoding channel, and package the encoded data output by each encoded channel into one data packet respectively; or, sequentially obtain the encoding of each encoding channel output. Data, and after the size of the obtained encoded data reaches a threshold, the obtained encoded data is packaged into one data packet.
  • the first sending module 43 specifically includes:
  • a query unit 431, configured to query an empty queue of the corresponding DMA buffer
  • the obtaining unit 432 is configured to obtain an address of the empty queue that is queried by the query unit 431.
  • the sending unit 433 is configured to send the packed data to the empty queue of the corresponding DMA buffer according to the address of the empty queue acquired by the obtaining unit 432, and convert the empty queue into a data queue, where the address of the data queue is the same as the address of the empty queue.
  • the device further includes:
  • the second sending module 44 is configured to send a data transmission completion notification to the transmission device, where the data transmission completion notification carries the address of the data queue, so that the transmission device disassembles the corresponding data according to the address of the data queue. Packed data in the DMA cache.
  • the device also includes:
  • the receiving module 45 is configured to receive, by the transmitting device, a data transmission completion notification sent after the disassembled data transmission, and the data transmission completion notification carries the address of the data queue;
  • the release module 46 is configured to release the data queue of the corresponding DMA cache according to the address of the data queue received by the receiving module 45, so that the data queue is converted into an empty queue.
  • the encoding apparatus realizes that the multi-channel video coding is distributed to a plurality of encoding apparatuses by means of cascading a plurality of encoding apparatuses and the transmitting apparatus, thereby solving the problem that the encoding power of the single encoding apparatus is too heavy;
  • the DMA transmission mechanism is adopted, and the encoding device controls the transmission of the packet data to the corresponding DMA buffer in the transmission device, so that the encoding device can uniformly manage the queues in the DMA buffer in the transmission device, and can not only ensure the code stream transmission of each encoding device.
  • the stability but also enables multi-threaded parallel processing of the code stream, thereby improving the processing efficiency of multimedia data.
  • the apparatus includes: an obtaining module 81, configured to acquire packetized data sent by each of the plurality of encoding devices to a corresponding direct memory access DMA buffer in the transmitting device; wherein the packed data is each encoding device After the multimedia data is encoded by the multi-pass encoding channel to obtain the multi-channel encoded data, the data obtained by packing the multi-channel encoded data is obtained;
  • the disassembling module 82 is configured to disassemble the packed data in the DMA cache acquired by the obtaining module 81;
  • the transmission module 83 is configured to transmit the disassembled data of the disassembly module 82.
  • the device further includes:
  • the receiving module 84 is configured to receive a data transmission completion notification sent by the encoding device, where the data transmission completion notification carries an address of a corresponding DMA buffer data queue, and the data queue stores the packet data;
  • the obtaining module 81 is configured to acquire, according to the address of the data queue of the corresponding DMA cache carried in the data sending completion notification, the packed data sent by each of the plurality of encoding devices to the corresponding direct memory access DMA buffer in the transmitting device. .
  • the device further includes:
  • the sending module 85 is configured to send a data transmission completion notification to the corresponding encoding device, where the data transmission is The completion notification carries the address of the data queue, so that the encoding device releases the data queue of the corresponding DMA buffer according to the address of the data queue, so that the data queue is converted into an empty queue.
  • the transmission device provided in this embodiment realizes that the multi-channel video coding is distributed to a plurality of coding devices by means of a plurality of coding devices and the cascade thereof, thereby solving the problem that the coding load of the single coding device is excessively heavy;
  • the DMA transmission mechanism is adopted, and the encoding device controls the transmission of the packed data to the corresponding DMA buffer in the transmission device, so that the encoding device can uniformly manage the queues in the DMA buffer in the transmission device, and not only can ensure the code stream transmission of each encoding device.
  • the stability but also enables multi-threaded parallel processing of the code stream, thereby improving the processing efficiency of multimedia data.
  • Another embodiment of the present invention provides a system for processing multimedia data. Referring to FIG. 11, the system includes:
  • the encoding device 1101 is the encoding device provided by the above embodiment.
  • Transmission device 1102 is a transmission device as provided by the above embodiments.
  • the system provided in this embodiment realizes the problem that the multi-channel video coding is distributed to multiple coding devices by means of cascading a plurality of coding devices and the transmission device, thereby solving the problem that the coding load of the single coding device is too heavy; a DMA transfer mechanism, and the encoding device controls the sending of the packed data to the corresponding DMA buffer in the transmitting device, so that the encoding device can uniformly manage the queues in the DMA buffer in the transmitting device, and can not only ensure the code stream transmission of each encoding device. Stability, but also enable multi-threaded parallel processing of the code stream, thereby improving the processing efficiency of multimedia data.
  • the transmission device may be cascaded with one coding device, or may be cascaded with multiple coding devices.
  • multiple coding devices are cascaded with the transmission device, the media data is processed.
  • the encoding device and the transmitting device provided in the above embodiments are only illustrated by the division of the above functional modules when processing the multimedia data. In actual applications, the function allocation may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to perform all or part of the functions described above.
  • the coding apparatus, the transmission apparatus, the system for processing the multimedia data, and the method for processing the multimedia data are in the same concept, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • the completion of the hardware may also be performed by a program to instruct related hardware.
  • the program may be stored in a computer readable storage medium.
  • the storage medium mentioned above may be a read only memory, a magnetic disk or an optical disk.

Abstract

Disclosed are a method, device and system for processing multimedia data, which belong to the field of information technology. The method comprises: each coding device in a plurality of coding devices coding multimedia data by means of a multi-path coding channel to obtain multi-path coded data; and packetizing the multi-path coded data and sending the packetized data to a corresponding direct memory access (DMA) cache in a transmission device, and unpacking the packetized data in the DMA cache and transmitting the unpacked data by the transmission device. By adopting the method of cascading a plurality of coding devices and a transmission device, the present invention realizes apportioning multi-path video coding among the plurality of coding devices, which can solve the problem of excessive load of a single coding device. By adopting a DMA transmission mechanism, not only the stability of code stream transmission of each coding device can be ensured, but also the multithread parallel processing of a code stream can be realized. By adopting the method of packetization sending, the efficiency of DMA transmission is improved, and the power consumption of the CPU is lowered.

Description

处理多媒体数据的方法、 装置及系统 本申请要求于 2012 年 07 月 25 日提交中国专利局、 申请号为 201210258841.3、 发明名称为 "处理多媒体数据的方法、 装置及系统" 的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域  Method, device and system for processing multimedia data The present application claims priority to Chinese patent application filed on July 25, 2012 by the Chinese Patent Office, Application No. 201210258841.3, entitled "Method, Apparatus and System for Processing Multimedia Data" The entire contents of which are incorporated herein by reference. Technical field
本发明涉及信息技术领域, 特别涉及一种处理多媒体数据的方法、 装置及 系统。 背景技术  The present invention relates to the field of information technology, and in particular, to a method, device and system for processing multimedia data. Background technique
随着多媒体技术的迅速发展, 视频已经进入高清时代, 其应用范围也越来 越广。 通过对多媒体数据进行编码及传输等处理以实现多路视频监控, 是目前 应用范围较广的一种视频应用。 为了向用户提供更清晰的视频画面, 使视频画 面达到高清分辨率, 如何对多媒体数据进行编码及传输处理, 成为了多路视频 监控应用中的一个关键问题。  With the rapid development of multimedia technology, video has entered the high-definition era, and its application range has become wider and wider. It is a video application with a wide range of applications by processing multimedia data and encoding it to achieve multi-channel video surveillance. In order to provide users with clearer video images and high-definition video images, how to encode and transmit multimedia data has become a key issue in multi-channel video surveillance applications.
现有技术在对多媒体数据进行编码及传输处理时, 通过单芯片采集多路多 媒体数据, 并对采集到的多媒体数据进行编码得到编码数据后, 将编码数据传 输至外部存储设备或进行网络传输。  In the prior art, when encoding and transmitting multimedia data, multi-channel multimedia data is collected by a single chip, and the collected multimedia data is encoded to obtain encoded data, and then the encoded data is transmitted to an external storage device or transmitted through a network.
在实现本发明的过程中, 发明人发现现有技术至少存在以下问题: 由于现有技术在处理多媒体数据时, 其数据采集、 数据编码和码流传输过 程都在一个芯片上实现, 对于多路视频监控而言, 多媒体数据的数据量较大, 导致现有技术中的芯片编码负荷过重, 因而对多媒体数据的处理效率较低。 发明内容  In the process of implementing the present invention, the inventors have found that the prior art has at least the following problems: Since the prior art processes multimedia data, its data acquisition, data encoding, and code stream transmission processes are all implemented on one chip, for multiple paths. In the case of video surveillance, the amount of data of the multimedia data is large, which results in excessive chip coding load in the prior art, and thus the processing efficiency of the multimedia data is low. Summary of the invention
为了解决现有技术的问题, 本发明实施例提供了一种处理多媒体数据的方 法、 装置及系统。 所述技术方案如下:  In order to solve the problems of the prior art, embodiments of the present invention provide a method, apparatus, and system for processing multimedia data. The technical solution is as follows:
第一方面, 提供了一种处理多媒体数据的方法, 所述方法包括: 多个编码装置中的每个编码装置通过多路编码通道对多媒体数据进行编 将所述多路编码数据打包, 并将打包数据发送至传输装置中对应的 DMA ( Direct Memory Access ,直接内存访问 )緩存中,由所述传输装置对所述 DMA 緩存中的打包数据进行拆解, 并传输拆解后的数据。 In a first aspect, a method for processing multimedia data is provided, the method comprising: encoding, by each of a plurality of encoding devices, multimedia data through a multi-pass encoding channel Packing the multiplexed encoded data, and transmitting the packed data to a corresponding DMA (Direct Memory Access) cache in the transmission device, and disassembling the packed data in the DMA cache by the transmitting device And transfer the disassembled data.
结合第一方面, 在第一方面的第一种可能的实现方式中, 所述将所述多路 编码数据打包, 具体包括:  With reference to the first aspect, in a first possible implementation manner of the first aspect, the packetizing the multiple encoded data includes:
依次获取各路编码通道输出的编码数据, 并将获取到的每路编码通道输出 的编码数据分别打包成一个数据包;  Acquiring the encoded data outputted by each coding channel in turn, and packaging the obtained encoded data of each coding channel into a data packet;
或者, 依次获取各路编码通道输出的编码数据, 并在获取到的编码数据的 大小达到阈值后, 将获取到的编码数据打包成一个数据包。  Or, the encoded data outputted by each coding channel is sequentially obtained, and after the obtained encoded data reaches a threshold, the obtained encoded data is packaged into one data packet.
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种 可能的实现方式中, 所述将打包数据发送至传输装置中对应的直接内存访问 DMA緩存中, 具体包括:  In conjunction with the first aspect or the first possible implementation of the first aspect, in a second possible implementation manner of the first aspect, the packet data is sent to a corresponding direct memory access DMA buffer in the transmission device, Specifically include:
查询所述对应的 DMA緩存的空队列, 并获取所述空队列的地址; 根据所述空队列的地址将打包数据发送至所述对应的 DMA緩存的空队列 中, 使所述空队列转为数据队列, 所述数据队列的地址与所述空队列的地址相 同。  Querying the empty queue of the corresponding DMA cache, and acquiring the address of the empty queue; sending the packetized data to the empty queue of the corresponding DMA buffer according to the address of the empty queue, and converting the empty queue to A data queue, the address of the data queue is the same as the address of the empty queue.
结合第一方面的第二种可能的实现方式, 在第一方面的第三种可能的实现 方式中, 所述根据所述空队列的地址将打包数据发送至所述对应的 DMA緩存 的空队列中, 使所述空队列转为数据队列之后, 还包括:  In conjunction with the second possible implementation of the first aspect, in a third possible implementation manner of the first aspect, the sending, according to the address of the empty queue, the packet data to the empty queue of the corresponding DMA cache After the empty queue is converted into a data queue, the method further includes:
向所述传输装置发送数据发送完毕通知, 所述数据发送完毕通知中携带了 所述数据队列的地址,使所述传输装置根据所述数据队列的地址拆解所述对应 的 DMA緩存中的打包数据。  Sending a data transmission completion notification to the transmission device, where the data transmission completion notification carries an address of the data queue, so that the transmission device disassembles the package in the corresponding DMA buffer according to the address of the data queue data.
结合第一方面的第二种可能的实现方式或第一方面的第三种可能的实现 方式, 在第一方面的第四种可能的实现方式中, 所述根据所述空队列的地址将 打包数据发送至所述对应的 DMA緩存的空队列中, 使所述空队列转为数据队 列之后, 还包括:  With the second possible implementation of the first aspect or the third possible implementation of the first aspect, in a fourth possible implementation manner of the first aspect, the After the data is sent to the empty queue of the corresponding DMA cache, and after the empty queue is converted into the data queue, the method further includes:
接收所述传输装置将拆解后的数据传输后发送的数据传输完毕通知, 所述 数据传输完毕通知中携带了所述数据队列的地址;  Receiving, by the transmitting device, a data transmission completion notification sent after the disassembled data transmission, where the data transmission completion notification carries an address of the data queue;
根据所述数据队列的地址释放所述对应的 DMA緩存的数据队列, 使所述 数据队列转为空队列。 第二方面, 还提供了一种编码装置, 所述装置包括: Release the data queue of the corresponding DMA cache according to the address of the data queue, and turn the data queue into an empty queue. In a second aspect, an encoding apparatus is provided, the apparatus comprising:
编码模块, 用于通过多路编码通道对多媒体数据进行编码, 得到多路编码 数据;  An encoding module, configured to encode multimedia data through a multi-pass encoding channel to obtain multiplexed encoded data;
打包模块, 用于将所述编码模块编码得到的多路编码数据打包; 第一发送模块, 用于将所述打包模块得到的打包数据发送至传输装置中对 应的直接内存访问 DMA緩存中, 由所述传输装置对所述 DMA緩存中的打包 数据进行拆解, 并传输拆解后的数据。  a packet module, configured to package the multiplexed data encoded by the coding module, where the first sending module is configured to send the packaged data obtained by the packaging module to a corresponding direct memory access DMA buffer in the transmission device, The transmitting device disassembles the packed data in the DMA buffer and transmits the disassembled data.
结合第二方面, 在第二方面的第一种可能的实现方式中, 所述打包模块, 具体用于依次获取各个编码通道输出的编码数据, 并将获取到的每个编码通道 输出的编码数据分别打包成一个数据包; 或者, 依次获取各个编码通道输出的 编码数据, 并在获取到的编码数据的大小达到阈值后, 将获取到的编码数据打 包成一个数据包。  With reference to the second aspect, in a first possible implementation manner of the second aspect, the packetizing module is specifically configured to sequentially obtain the encoded data output by each coding channel, and obtain the encoded data output by each coding channel. The packets are respectively packaged into one data packet; or, the encoded data output by each coding channel is sequentially obtained, and after the obtained encoded data reaches a threshold, the obtained encoded data is packaged into one data packet.
结合第二方面或第二方面的第一种可能的实现方式,在第二方面的第二种 可能的实现方式中, 所述第一发送模块, 具体包括:  With reference to the second aspect, or the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, the first sending module includes:
查询单元, 用于查询所述对应的 DMA緩存的空队列;  a query unit, configured to query an empty queue of the corresponding DMA cache;
获取单元, 用于获取所述查询单元查询到的空队列的地址;  An obtaining unit, configured to obtain an address of an empty queue that is queried by the query unit;
发送单元, 用于根据所述获取单元获取到的空队列的地址将打包数据发送 至所述对应的 DMA緩存的空队列中, 使所述空队列转为数据队列, 所述数据 队列的地址与所述空队列的地址相同。  a sending unit, configured to send the packetized data to the empty queue of the corresponding DMA buffer according to the address of the empty queue acquired by the acquiring unit, to convert the empty queue into a data queue, where the address of the data queue is The addresses of the empty queues are the same.
结合第二方面的第二种可能的实现方式, 在第二方面的第三种可能的实现 方式中, 所述装置, 还包括:  With reference to the second possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the device further includes:
第二发送模块, 用于向所述传输装置发送数据发送完毕通知, 所述数据发 送完毕通知中携带了所述数据队列的地址,使所述传输装置根据所述数据队列 的地址拆解所述对应的 DMA緩存中的打包数据。  a second sending module, configured to send a data transmission completion notification to the transmission device, where the data transmission completion notification carries an address of the data queue, so that the transmission device disassembles the address according to an address of the data queue The packed data in the corresponding DMA buffer.
结合第二方面的第二种可能的实现方式或第二方面的第三种可能的实现 方式, 在第二方面的第四种可能的实现方式中, 所述装置, 还包括:  With reference to the second possible implementation of the second aspect, or the third possible implementation of the second aspect, in a fourth possible implementation manner of the second aspect, the apparatus,
接收模块, 用于接收所述传输装置将拆解后的数据传输后发送的数据传输 完毕通知, 所述数据传输完毕通知中携带了所述数据队列的地址;  a receiving module, configured to receive, by the transmitting device, a data transmission completion notification sent after the disassembled data transmission, where the data transmission completion notification carries an address of the data queue;
释放模块, 用于根据所述接收模块接收到的数据队列的地址释放所述对应 的 DMA緩存的数据队列, 使所述数据队列转为空队列。  And a release module, configured to release the data queue of the corresponding DMA cache according to an address of the data queue received by the receiving module, to convert the data queue into an empty queue.
第三方面, 还提供了一种处理多媒体数据的方法, 所述方法包括: 传输装置获取多个编码装置中的每个编码装置向所述传输装置中对应的 直接内存访问 DMA緩存发送的打包数据; In a third aspect, a method for processing multimedia data is provided, the method comprising: Transmitting means acquiring, by the each of the plurality of encoding devices, the packed data sent to the corresponding direct memory access DMA buffer in the transmitting device;
对所述 DMA緩存中的打包数据进行拆解, 并传输拆解后的数据; 其中, 所述打包数据为所述每个编码装置通过多路编码通道对多媒体数据 进行编码得到多路编码数据后, 对所述多路编码数据进行打包得到的数据。  Disassembling the packed data in the DMA buffer, and transmitting the disassembled data; wherein the packed data is that each of the encoding devices encodes the multimedia data through the multi-pass encoding channel to obtain the multi-channel encoded data. And data obtained by packing the multiplexed encoded data.
结合第三方面, 在第三方面的第一种可能的实现方式中, 所述传输装置获 取多个编码装置中的每个编码装置向所述传输装置中对应的直接内存访问 DMA緩存发送的打包数据之前, 还包括:  With reference to the third aspect, in a first possible implementation manner of the third aspect, the transmitting device acquires, by each of the plurality of encoding devices, the packet sent to the corresponding direct memory access DMA buffer in the transmitting device Before the data, it also includes:
接收编码装置发送的数据发送完毕通知, 所述数据发送完毕通知中携带了 所述对应的 DMA緩存的数据队列的地址, 所述数据队列中存储了打包数据; 所述传输装置获取多个编码装置中的每个编码装置向所述传输装置中对 应的直接内存访问 DMA緩存发送的打包数据, 具体包括:  Receiving, by the receiving device, a data transmission completion notification, where the data transmission completion notification carries an address of the data queue of the corresponding DMA buffer, the data queue stores the packed data; and the transmission device acquires multiple coding devices The packet data sent by each of the encoding devices to the corresponding direct memory access DMA buffer in the transmitting device includes:
根据所述数据发送完毕通知中携带的所述对应的 DMA緩存的数据队列的 地址获取多个编码装置中的每个编码装置向所述传输装置中对应的直接内存 访问 DMA緩存发送的打包数据。  Obtaining, according to the address of the data queue of the corresponding DMA buffer carried in the data transmission completion notification, the packet data sent by each of the plurality of encoding devices to the corresponding direct memory access DMA buffer in the transmitting device.
结合第三方面的第一种可能的实现方式, 在第三方面的第二种可能的实现 方式中, 所述传输拆解后的数据之后, 还包括:  With the first possible implementation of the third aspect, in the second possible implementation manner of the third aspect, after the disassembling the data, the method further includes:
向对应的编码装置发送数据传输完毕通知, 所述数据传输完毕通知中携带 了所述数据队列的地址,使所述编码装置根据所述数据队列的地址释放所述对 应的 DMA緩存的数据队列, 使所述数据队列转为空队列。  Sending a data transmission completion notification to the corresponding coding apparatus, where the data transmission completion notification carries the address of the data queue, so that the coding apparatus releases the data queue of the corresponding DMA buffer according to the address of the data queue. Turn the data queue into an empty queue.
第四方面, 还提供了一种传输装置, 所述装置包括:  In a fourth aspect, a transmission device is provided, the device comprising:
获取模块, 用于获取多个编码装置中的每个编码装置向所述传输装置中对 应的直接内存访问 DMA緩存发送的打包数据; 其中, 所述打包数据为所述每 个编码装置通过多路编码通道对多媒体数据进行编码得到多路编码数据后, 对 所述多路编码数据进行打包得到的数据;  An obtaining module, configured to acquire, by using each of the plurality of encoding devices, the packed data sent by the corresponding direct memory access DMA buffer in the transmitting device; wherein the packed data is multi-channel for each encoding device After the encoding channel encodes the multimedia data to obtain the multiplexed encoded data, the data obtained by packing the multiplexed encoded data;
拆解模块, 用于对所述获取模块获取到的所述 DMA緩存中的打包数据进 行拆解;  a disassembling module, configured to disassemble the packaged data in the DMA cache acquired by the obtaining module;
传输模块, 用于传输所述拆解模块拆解后的数据。  a transmission module, configured to transmit data disassembled by the disassembly module.
结合第四方面, 在第四方面的第一种可能的实现方式中, 所述装置, 还包 括:  With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the device further includes:
接收模块, 用于接收编码装置发送的数据发送完毕通知, 所述数据发送完 毕通知中携带了所述对应的 DMA緩存的数据队列的地址, 所述数据队列中存 储了打包数据; a receiving module, configured to receive a data transmission completion notification sent by the encoding device, where the data is sent The address of the data queue of the corresponding DMA cache is carried in the notification, and the packaged data is stored in the data queue;
所述获取模块, 具体用于根据所述数据发送完毕通知中携带的所述对应的 DMA緩存的数据队列的地址获取多个编码装置中的每个编码装置向所述传输 装置中对应的直接内存访问 DMA緩存发送的打包数据。  The acquiring module is configured to acquire, according to the address of the data queue of the corresponding DMA cache carried in the data sending completion notification, each encoding device of the plurality of encoding devices to the corresponding direct memory in the transmitting device Access the packed data sent by the DMA cache.
结合第四方面的第一种可能的实现方式, 在第四方面的第二种可能的实现 方式中, 所述装置, 还包括:  With reference to the first possible implementation of the fourth aspect, in a second possible implementation manner of the fourth aspect, the device,
发送模块, 用于向对应的编码装置发送数据传输完毕通知, 所述数据传输 完毕通知中携带了所述数据队列的地址,使所述编码装置根据所述数据队列的 地址释放所述对应的 DMA緩存的数据队列, 使所述数据队列转为空队列。  a sending module, configured to send a data transmission completion notification to the corresponding encoding device, where the data transmission completion notification carries an address of the data queue, so that the encoding device releases the corresponding DMA according to the address of the data queue The cached data queue causes the data queue to be converted to an empty queue.
第五方面, 还提供了一种处理多媒体数据的系统, 所述系统包括: 多个编 码装置及一个传输装置;  In a fifth aspect, a system for processing multimedia data is provided, the system comprising: a plurality of encoding devices and a transmitting device;
所述多个编码装置中的每个编码装置如上面所述的编码装置;  Each of the plurality of encoding devices is an encoding device as described above;
所述传输装置如上面所述的传输装置。  The transmission device is a transmission device as described above.
本发明实施例提供的技术方案带来的有益效果是:  The beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
通过采用多个编码装置与传输装置级联的方式, 实现将多路视频编码分摊 到多个编码装置上, 解决了单编码装置编码负荷过重的问题; 另外, 通过采用 DMA传输机制, 并由编码装置来控制向传输装置中对应的 DMA緩存发送打 包数据, 使编码装置可以统一管理传输装置中的 DMA緩存中的队列, 不但能 够保证每个编码装置的码流传输的稳定性, 而且还能够实现多线程并行处理码 流, 进而提高多媒体数据的处理效率。 附图说明  By cascading a plurality of encoding devices and a transmitting device, the multi-channel video encoding is distributed to a plurality of encoding devices, thereby solving the problem that the encoding power of the single encoding device is too heavy; in addition, by adopting a DMA transmission mechanism, The encoding device controls to send the packed data to the corresponding DMA buffer in the transmitting device, so that the encoding device can uniformly manage the queue in the DMA buffer in the transmitting device, not only can ensure the stability of the code stream transmission of each encoding device, but also can The multi-thread parallel processing code stream is realized, thereby improving the processing efficiency of the multimedia data. DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中所 需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图 1是本发明实施例提供的一种处理多媒体数据的方法流程图;  FIG. 1 is a flowchart of a method for processing multimedia data according to an embodiment of the present invention;
图 2是本发明实施例提供的另一种处理多媒体数据的方法流程图; 图 3是本发明另一实施例提供的一种处理多媒体数据的方法流程图; 图 4是本发明另一实施例提供的第一种编码装置结构示意图; 图 5是本发明另一实施例提供的第二种编码装置的结构示意图; 2 is a flow chart of another method for processing multimedia data according to an embodiment of the present invention; FIG. 3 is a flowchart of a method for processing multimedia data according to another embodiment of the present invention; FIG. 4 is another embodiment of the present invention; A schematic diagram of the structure of the first encoding device provided; FIG. 5 is a schematic structural diagram of a second encoding apparatus according to another embodiment of the present invention; FIG.
图 6是本发明另一实施例提供的第三种编码装置的结构示意图;  6 is a schematic structural diagram of a third encoding apparatus according to another embodiment of the present invention;
图 7是本发明另一实施例提供的第四种编码装置的结构示意图;  FIG. 7 is a schematic structural diagram of a fourth encoding apparatus according to another embodiment of the present invention; FIG.
图 8是本发明另一实施例提供的第一种传输装置的结构示意图;  FIG. 8 is a schematic structural diagram of a first transmission apparatus according to another embodiment of the present invention; FIG.
图 9是本发明另一实施例提供的第二种传输装置的结构示意图;  FIG. 9 is a schematic structural diagram of a second transmission apparatus according to another embodiment of the present invention; FIG.
图 10是本发明另一实施例提供的第三种传输装置的结构示意图; 图 11是本发明另一实施例提供的一种处理多媒体数据的系统结构示意图。 具体实施方式  FIG. 10 is a schematic structural diagram of a third transmission apparatus according to another embodiment of the present invention; FIG. 11 is a schematic structural diagram of a system for processing multimedia data according to another embodiment of the present invention. detailed description
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明 实施方式作进一步地详细描述。 本发明实施例提供了一种处理多媒体数据的方法, 以编码装置执行该方法 的角度为例, 参见图 1 , 本发明实施例提供的方法流程具体如下:  The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. The embodiment of the present invention provides a method for processing multimedia data. The method for performing the method by the encoding device is taken as an example. Referring to FIG. 1 , the process of the method provided by the embodiment of the present invention is as follows:
101: 多个编码装置中的每个编码装置通过多路编码通道对多媒体数据进 行编码, 得到多路编码数据;  101: each of the plurality of encoding devices encodes the multimedia data through the multi-pass encoding channel to obtain the multiplexed encoded data;
102: 将多路编码数据打包, 并将打包数据发送至传输装置中对应的 DMA 緩存中, 由传输装置对 DMA緩存中的打包数据进行拆解, 并传输拆解后的数 据。  102: Packet the multi-coded data, and send the packed data to a corresponding DMA buffer in the transmission device, and the transport device disassembles the packed data in the DMA buffer and transmits the disassembled data.
其中, 将多路编码数据打包, 包括但不限于:  Wherein, the multi-channel encoded data is packaged, including but not limited to:
依次获取各路编码通道输出的编码数据, 并将获取到的每路编码通道输出 的编码数据分别打包成一个数据包;  Acquiring the encoded data outputted by each coding channel in turn, and packaging the obtained encoded data of each coding channel into a data packet;
或者, 依次获取各路编码通道输出的编码数据, 并在获取到的编码数据的 大小达到阈值后, 将获取到的编码数据打包成一个数据包。  Or, the encoded data outputted by each coding channel is sequentially obtained, and after the obtained encoded data reaches a threshold, the obtained encoded data is packaged into one data packet.
进一步地, 将打包数据发送至传输装置中对应的直接内存访问 DMA緩存 中, 具体包括:  Further, the packet data is sent to the corresponding direct memory access DMA buffer in the transmission device, which specifically includes:
查询对应的 DMA緩存的空队列, 并获取空队列的地址;  Query the empty queue of the corresponding DMA buffer, and obtain the address of the empty queue;
根据空队列的地址将打包数据发送至对应的 DMA緩存的空队列中, 使空 队列转为数据队列, 数据队列的地址与空队列的地址相同。  The packed data is sent to the empty queue of the corresponding DMA buffer according to the address of the empty queue, so that the empty queue is converted into the data queue, and the address of the data queue is the same as the address of the empty queue.
进一步地, 根据空队列的地址将打包数据发送至对应的 DMA緩存的空队 列中, 使空队列转为数据队列之后, 还包括: 向传输装置发送数据发送完毕通知,数据发送完毕通知中携带了数据队列 的地址,使传输装置根据数据队列的地址拆解对应的 DMA緩存中的打包数据。 Further, after the packet data is sent to the empty queue of the corresponding DMA buffer according to the address of the empty queue, after the empty queue is converted into the data queue, the method further includes: The data transmission completion notification is sent to the transmission device, and the data transmission completion notification carries the address of the data queue, so that the transmission device disassembles the packaged data in the corresponding DMA buffer according to the address of the data queue.
其中,根据空队列的地址将打包数据发送至对应的 DMA緩存的空队列中, 使空队列转为数据队列之后, 还包括:  The packet is sent to the empty queue of the corresponding DMA buffer according to the address of the empty queue, and after the empty queue is converted into the data queue, the method further includes:
接收传输装置将拆解后的数据传输后发送的数据传输完毕通知,数据传输 完毕通知中携带了数据队列的地址;  The receiving transmission device notifies the data transmission completion after the disassembled data transmission, and the data transmission completion notification carries the address of the data queue;
根据数据队列的地址释放对应的 DMA緩存的数据队列, 使数据队列转为 空队列。  The data queue of the corresponding DMA buffer is released according to the address of the data queue, and the data queue is turned into an empty queue.
以传输装置执行该方法的角度为例, 参见图 2, 本发明实施例提供的方法 流程具体如下:  For example, referring to FIG. 2, the method of the method provided by the embodiment of the present invention is as follows:
201: 传输装置获取多个编码装置中的每个编码装置向传输装置中对应的 直接内存访问 DMA緩存发送的打包数据;  201: The transmitting device acquires the packed data sent by each of the plurality of encoding devices to the corresponding direct memory access DMA buffer in the transmitting device;
202: 对 DMA緩存中的打包数据进行拆解, 并传输拆解后的数据。  202: Disassemble the packed data in the DMA buffer and transmit the disassembled data.
进一步地,传输装置获取多个编码装置中的每个编码装置向传输装置中对 应的直接内存访问 DMA緩存发送的打包数据之前, 还包括:  Further, before the transmitting device acquires the packed data sent by each of the plurality of encoding devices to the direct memory access DMA buffer corresponding to the transmitting device, the transmitting device further includes:
接收编码装置发送的数据发送完毕通知,数据发送完毕通知中携带了对应 的 DMA緩存的数据队列的地址, 数据队列中存储了打包数据;  Receiving a data transmission completion notification sent by the encoding device, the data transmission completion notification carries the address of the corresponding DMA buffer data queue, and the data queue stores the packed data;
传输装置获取多个编码装置中的每个编码装置向传输装置中对应的直接 内存访问 DMA緩存发送的打包数据, 具体包括:  The transmitting device acquires the packetized data sent by each of the plurality of encoding devices to the corresponding direct memory access DMA buffer in the transmitting device, and specifically includes:
根据数据发送完毕通知中携带的对应的 DMA緩存的数据队列的地址获取 多个编码装置中的每个编码装置向传输装置中对应的直接内存访问 DMA緩存 发送的打包数据。  The packed data sent by each of the plurality of encoding devices to the corresponding direct memory access DMA buffer in the transmitting device is acquired according to the address of the data queue of the corresponding DMA buffer carried in the data transmission completion notification.
进一步地, 传输拆解后的数据之后, 还包括:  Further, after transmitting the disassembled data, the method further includes:
向对应的编码装置发送数据传输完毕通知,数据传输完毕通知中携带了数 据队列的地址, 使编码装置根据数据队列的地址释放对应的 DMA緩存的数据 队列, 使数据队列转为空队列。  The data transmission completion notification is sent to the corresponding coding apparatus, and the data transmission completion notification carries the address of the data queue, so that the coding apparatus releases the corresponding DMA buffer data queue according to the address of the data queue, and the data queue is turned into an empty queue.
本发明实施例提供的方法, 通过采用多个编码装置与传输装置级联的方 式, 实现将多路视频编码分摊到多个编码装置上, 解决了单编码装置编码负荷 过重的问题; 另外, 通过采用 DMA传输机制, 并由编码装置来控制向传输装 置中对应的 DMA緩存发送打包数据, 使编码装置可以统一管理传输装置中的 DMA緩存中的队列, 不但能够保证每个编码装置的码流传输的稳定性, 而且 还能够实现多线程并行处理码流, 进而提高多媒体数据的处理效率。 The method provided by the embodiment of the present invention achieves the problem that the multi-channel video coding is over-committed by using a plurality of coding devices and the transmission device to be cascaded, thereby solving the problem that the coding load of the single-encoding device is too heavy; By using a DMA transfer mechanism, and by the encoding device to control the transmission of the packed data to the corresponding DMA buffer in the transmission device, the encoding device can uniformly manage the queues in the DMA buffer in the transmission device, and can not only ensure the code stream of each encoding device. Transmission stability, and It is also possible to implement multi-thread parallel processing of the code stream, thereby improving the processing efficiency of the multimedia data.
为了更加清楚地阐述上述实施例提供的方法, 结合上述内容, 以如下实施 例为例, 对处理多媒体数据的方法进行举例说明, 详见如下实施例: 本发明另一实施例提供了一种处理多媒体数据的方法, 结合上述实施例的 内容, 为了便于说明, 本实施例以两个编码装置, 一个传输装置实现处理多媒 体数据为例, 对本发明实施例提供的方法进行详细地举例说明。 参见图 3, 本 发明实施例提供的方法流程具体如下:  In order to clarify the method provided by the foregoing embodiment, the method for processing multimedia data is exemplified by taking the following embodiments as an example. For details, refer to the following embodiments: Another embodiment of the present invention provides a process. The method for the multimedia data is combined with the content of the foregoing embodiment. For the convenience of the description, the method for processing the multimedia data is implemented by using two encoding devices and one transmitting device as an example, and the method provided by the embodiment of the present invention is exemplified in detail. Referring to FIG. 3, the process of the method provided by the embodiment of the present invention is specifically as follows:
301: 两个编码装置中的每个编码装置通过多路编码通道对多媒体数据进 行编码, 得到多路编码数据;  301: each of the two encoding devices encodes the multimedia data through the multi-pass encoding channel to obtain the multi-channel encoded data.
针对该步骤, 编码装置对多媒体数据进行编码的方式可依据现有的编码芯 片对多媒体数据进行编码的方式实现, 本实施例对此不作具体限定。 例如, 每 个编码装置对应 4路编码通道, 通过每路编码通道对多媒体数据进行编码, 得 到 4路编码数据。  For this step, the manner in which the encoding device encodes the multimedia data can be implemented by encoding the multimedia data according to the existing encoding chip, which is not specifically limited in this embodiment. For example, each encoding device corresponds to four encoding channels, and the multimedia data is encoded by each encoding channel to obtain four encoded data.
302: 每个编码装置将多路编码数据打包, 并将打包数据发送至传输装置 中对应的 DMA緩存中;  302: each encoding device packages the multi-coded data, and sends the packed data to a corresponding DMA buffer in the transmission device;
其中, DMA緩存为传输装置中的 DMA緩存, 为了使每个编码装置能够 将打包数据传输至传输装置, 本实施例提供的方法中, 可在传输装置中分别设 置与每个编码装置对应的 DMA緩存, 也就是说, 一个编码装置对应传输装置 中的一个 DMA緩存, 编码装置的个数与传输装置中 DMA緩存的个数相同, 以使不同编码装置将其打包数据发送至各自对应的 DMA緩存中。 除此之外, 还可在传输装置处仅设置一个 DMA緩存, 并区分各个编码装置对应该一个 DMA緩存中的哪部分,由此同样能够实现编码装置将其打包数据发送至 DMA 緩存中的对应位置。 当然, 编码装置与 DMA緩存的对应关系还可以有其他方 式, 本实施例对此不作具体限定。  The DMA buffer is a DMA buffer in the transmission device. In order to enable each encoding device to transmit the packetized data to the transmission device, in the method provided in this embodiment, the DMA corresponding to each encoding device may be separately set in the transmission device. Cache, that is, one encoding device corresponds to one DMA buffer in the transmitting device, and the number of encoding devices is the same as the number of DMA buffers in the transmitting device, so that different encoding devices send their packed data to their respective DMA buffers. in. In addition, it is also possible to set only one DMA buffer at the transmission device and distinguish which part of the DMA buffer each encoding device corresponds to, thereby also enabling the encoding device to send its packed data to the corresponding in the DMA buffer. position. Of course, the corresponding relationship between the encoding device and the DMA buffer may be other methods, which is not specifically limited in this embodiment.
具体地, 每个编码装置将多路编码打包时, 采用的打包方式包括但不限于 如下两种方式中的一种:  Specifically, when each encoding device packages the multi-pass encoding, the packaging manner adopted includes, but is not limited to, one of the following two methods:
第一种方式: 依次获取各路编码通道输出的编码数据, 并将获取到的每路 编码通道输出的编码数据分别打包成一个数据包;  The first mode: sequentially obtaining the encoded data outputted by each coding channel, and packaging the obtained encoded data of each coding channel into a data packet;
针对该种方式, 以编码装置有 3路编码通道为例, 编码装置获取第 1路编 码通道编码得到的编码数据, 并将其打包成一个数据包, 之后再获取第 2路编 码通道编码得到的编码数据, 并将其打包成一个数据包, 之后再获取第 3路编 码通道编码得到的编码数据, 并将其打包成一个数据包。 或者, 分别获取 3路 编码通道编码得到的编码数据,再将获取到的 3路编码数据分别打包成一个数 据包。 For this method, the encoding device has three encoding channels as an example, and the encoding device obtains the encoded data obtained by encoding the first encoding channel, and packs it into a data packet, and then acquires the second encoding. The coded channel encodes the encoded data, and packs it into a data packet, and then obtains the encoded data obtained by the third coding channel coding, and packs it into a data packet. Alternatively, the encoded data obtained by encoding the 3 channels of the coding channel are respectively obtained, and then the obtained 3 channels of the encoded data are respectively packaged into one data packet.
第二种方式: 依次获取各路编码通道输出的编码数据, 并在获取到的编码 数据的大小达到阈值后, 将获取到的编码数据打包成一个数据包。  The second method: sequentially obtains the encoded data outputted by each coding channel, and after the obtained encoded data reaches the threshold, packages the obtained encoded data into a data packet.
针对该种方式, 其在依次获取各路编码通道输出的编码数据时, 具体过程 为: 如果一路编码通道在获取编码数据时刻无编码数据输出, 则立即跳到下一 路编码通道获取编码数据; 如果一路编码通道在获取编码数据时刻有编码数据 输出, 则立即将该编码数据取出; 依次循环从各路编码通道取数据。 例如, 当 编码装置存在 3路编码通道时, 分别为通道 1、 通道 2和通道 3, 先从通道 1 开始取数据, 如果通道 1 此时有编码数据, 则获取通道 1中的编码数据, 并跳 到下一通道继续开始获取编码数据; 如果通道 1此时无编码数据, 则立即跳到 下一通道获取编码数据; 依次循环从 3路通道中取编码数据, 直到获取到的编 码数据的大小达到阈值, 将获取到的编码数据打包成一个数据包。 具体阈值大 小, 可以为 100兆, 150兆或是其他数值, 本实施例不对阈值大小进行具体限 定。  For the method, when the encoded data output by each coding channel is sequentially acquired, the specific process is: if one coding channel outputs no encoded data at the time of acquiring the encoded data, immediately jumps to the next coding channel to obtain the encoded data; When one code channel receives the coded data at the time of acquiring the coded data, the coded data is immediately taken out; and the data is sequentially taken from each code channel. For example, when there are three coding channels in the coding device, respectively, channel 1, channel 2 and channel 3, data is taken from channel 1 first, and if channel 1 has coded data at this time, the coded data in channel 1 is obtained, and Skip to the next channel to continue to obtain the encoded data; if channel 1 has no encoded data at this time, immediately jump to the next channel to obtain the encoded data; sequentially loop the encoded data from the 3 channels until the size of the encoded data is obtained. The threshold is reached, and the obtained encoded data is packaged into one data packet. The specific threshold size may be 100 megabytes, 150 megabytes or other values. This embodiment does not specifically limit the threshold size.
进一步地,编码装置将打包数据发送至传输装置中对应的 DMA緩存中时, 可先查询对应的 DMA緩存的空队列, 并获取该空队列的地址; 根据该空队列 的地址将打包数据发送至对应的 DMA緩存的空队列中, 使该空队列转为数据 队列, 数据队列的地址与该空队列的地址相同。 当然, 除了上述发送方式外, 编码装置还可以采用其他发送方式将打包数据发送至 DMA緩存, 本实施例不 对将打包数据发送至传输装置中对应的 DMA緩存中的发送方式进行具体限 定。  Further, when the encoding device sends the packaged data to the corresponding DMA buffer in the transmission device, the empty queue of the corresponding DMA buffer may be queried first, and the address of the empty queue is obtained; and the packaged data is sent to the address according to the address of the empty queue. In the empty queue of the corresponding DMA buffer, the empty queue is converted into a data queue, and the address of the data queue is the same as the address of the empty queue. Of course, in addition to the foregoing sending manner, the encoding device may also send the packed data to the DMA buffer by using another sending manner. This embodiment does not specifically limit the sending manner in which the packed data is sent to the corresponding DMA buffer in the transmitting device.
无论采用哪种打包方式得到打包数据, 以及采用哪种发送方式将其发送, 针对上述第一种打包方式, 编码装置在将获取到的每路编码通道输出的编码数 据分别打包成一个数据包之后, 可即刻将其发送至传输装置中对应的 DMA緩 存中, 由于在将每路编码通道输出的编码数据分别打包成一个数据包之后, 即 刻将其进行发送, 因而可保证每个编码通道输出的编码数据能够及时传输; 针 对上述第二种打包方式, 编码装置在获取到的编码数据的大小达到阈值后, 将 获取到的编码数据打包成一个数据包, 再将其发送至传输装置中对应的 DMA 緩存中, 由于编码装置是将达到阈值的编码数据打包成一个数据包进行发送, 因而实现了大块数据的传输, 不仅可以降低数据传输效率及传输次数, 还可降 低因多次传输数据而浪费的 CPU(Central Processing Unit, 中央处理器)消耗。 Regardless of which packaging method is used to obtain the packed data, and which transmission method is used to transmit it, for the first packing mode described above, the encoding device packs the encoded data outputted by each encoding channel into one data packet respectively. It can be sent to the corresponding DMA buffer in the transmission device immediately. Since the encoded data outputted by each coding channel is separately packaged into one data packet, it is transmitted immediately, so that the output of each coding channel can be guaranteed. The encoded data can be transmitted in time; for the second packing mode, after the size of the acquired encoded data reaches a threshold, the encoding device packs the obtained encoded data into a data packet, and then sends the encoded data to a corresponding device in the transmission device. DMA In the buffer, since the encoding device packs the encoded data reaching the threshold into one data packet for transmission, the transmission of the large data is realized, which not only can reduce the data transmission efficiency and the number of transmissions, but also reduce the waste due to multiple data transmission. The CPU (Central Processing Unit) is consumed.
303: 传输装置获取编码装置向传输装置中对应的 DMA緩存发送的打包 数据;  303: The transmitting device acquires the packed data sent by the encoding device to the corresponding DMA buffer in the transmitting device.
针对该步骤, 传输装置获取编码装置向传输装置中对应的 DMA緩存发送 的打包数据的方式包括但不限于如下两种方式中的一种:  For this step, the manner in which the transmitting device obtains the packetized data sent by the encoding device to the corresponding DMA buffer in the transmitting device includes but is not limited to one of the following two methods:
第一种方式: 传输装置每隔预设周期主动获取编码装置向传输装置中对应 的 DMA緩存发送的打包数据;  The first mode: the transmitting device actively acquires the packaged data sent by the encoding device to the corresponding DMA buffer in the transmitting device every preset period;
针对该种方式, 以预设周期为 5秒为例, 传输装置每隔 5秒便从传输装置 中的 DMA緩存中获取数据, 以 DMA緩存有 10路队列为例, 10路队列依次 编号为 1至 10。 传输装置每隔 5秒便遍历一次 DMA緩存中的所有队列。 如果 传输装置查询到 5号队列为数据队列,包含编码装置向传输装置中对应的 DMA 緩存发送的打包数据, 则立即将打包数据获取并进行拆解。 其中, 预设周期大 小除上述的 5秒外, 还可以为其他大小, 本实施例不对预设周期的具体大小进 行限定。  For this method, taking the preset period as 5 seconds as an example, the transmission device acquires data from the DMA buffer in the transmission device every 5 seconds, taking the DMA buffer with 10 queues as an example, and the 10 queues are sequentially numbered 1 To 10. The transmission device traverses all queues in the DMA buffer every 5 seconds. If the transmitting device queries the queue 5 as a data queue, including the packed data sent by the encoding device to the corresponding DMA buffer in the transmitting device, the packed data is immediately acquired and disassembled. The preset period size may be other sizes in addition to the above 5 seconds. This embodiment does not limit the specific size of the preset period.
第二种方式: 以预设的触发条件触发传输装置被动获取编码装置向传输装 置中对应的 DMA緩存发送的打包数据;  The second mode: triggering, by a preset trigger condition, the transmitting device to passively acquire the packed data sent by the encoding device to the corresponding DMA buffer in the transmitting device;
针对该种方式, 以预设的触发条件为编码装置将打包数据发送至对应的 DMA緩存的空队列中之后, 向传输装置发送数据发送完毕通知, 在该数据发 送完毕通知中携带了数据队列的地址为例,通过传输装置接收该编码装置发送 的数据发送完毕通知, 触发传输装置根据该数据队列的地址获取对应 DMA緩 存中数据队列中的打包数据。 其中, 除以编码装置向传输装置发送数据发送完 毕通知作为预设的触发条件之外, 还可以预设其他的触发条件, 本实施例不对 触发传输装置被动获取编码装置向传输装置中对应的 DMA緩存发送的打包数 据的触发条件进行限定。  In this manner, after the encoding device sends the packet data to the empty queue of the corresponding DMA buffer by using the preset trigger condition, the data transmission completion notification is sent to the transmission device, and the data queue is carried in the data transmission completion notification. As an example, the transmission device receives the data transmission completion notification sent by the coding device, and the trigger transmission device acquires the packaged data in the data queue corresponding to the DMA buffer according to the address of the data queue. In addition, after the encoding device sends the data transmission completion notification to the transmission device as a preset trigger condition, other trigger conditions may be preset. In this embodiment, the trigger transmission device does not passively acquire the corresponding DMA in the transmission device from the encoding device. The trigger condition for the packaged data sent by the cache is limited.
当然, 除了上述传输装置获取打包数据的两种方式外, 传输装置还可以采 用其他获取方式获取打包数据,本实施例不对传输装置获取编码装置向传输装 置中对应的 DMA緩存发送打包数据的获取方式进行具体限定。  Of course, in addition to the two methods for the foregoing transmission device to obtain the packetized data, the transmission device may obtain the packetized data by using other acquisition methods. In this embodiment, the acquisition device does not acquire the method for obtaining the packaged data by the encoding device to the corresponding DMA buffer in the transmission device. Specific restrictions are made.
304: 传输装置对 DMA緩存中的打包数据进行拆解, 并传输拆解后的数 据。 针对该步骤, 传输装置通过上述步骤 303获取到打包数据后, 将打包数据 进行拆解, 具体拆解方式可按照现有的解包方式实现, 本实施例对此不做具体 限定。无论采用哪种拆解方式对打包数据进行拆解,均可拆解出各路编码数据, 并将拆解后的各路编码数据进行传输, 例如, 将拆解后的数据传输至存储空间 进行存盘处理或将其进行网络传输。 304: The transmitting device disassembles the packed data in the DMA buffer and transmits the disassembled data. For this step, after the transmission device obtains the packetized data through the above-mentioned step 303, the packetized data is disassembled, and the specific disassembly method can be implemented according to the existing unpacking mode, which is not specifically limited in this embodiment. Regardless of which disassembly method is used to disassemble the packed data, each encoded data can be disassembled, and the disassembled encoded data is transmitted, for example, the disassembled data is transmitted to the storage space. Save the file or transfer it to the network.
进一步地, 传输装置将拆解后的数据进行传输后, 存储该拆解后的数据所 对应的打包数据的数据队列可被释放,进而实现资源的重复利用。具体实现时, 在传输装置将拆解后的数据传输完毕后, 由该传输装置向对应的编码装置发送 数据传输完毕通知, 且在该数据传输完毕通知中携带数据队列的地址, 以使编 码装置根据该数据队列的地址释放对应传输装置中的 DMA緩存的数据队列, 即使该数据队列转为空队列, 以便于后续重复利用。 当然, 除上述传输装置通 知编码装置释放数据队列的方式外, 还可以采取其他通知方式, 本实施例对此 不作具体限定。  Further, after the transmission device transmits the disassembled data, the data queue storing the packaged data corresponding to the disassembled data can be released, thereby realizing resource reuse. In a specific implementation, after the transmission device completes the disassembled data transmission, the transmission device sends a data transmission completion notification to the corresponding coding device, and carries the address of the data queue in the data transmission completion notification, so that the coding device is enabled. The data queue corresponding to the DMA buffer in the transmission device is released according to the address of the data queue, even if the data queue is turned into an empty queue for subsequent reuse. Of course, in addition to the manner in which the foregoing transmission device notifies the encoding device to release the data queue, other notification manners may be adopted, which is not specifically limited in this embodiment.
另外, 由于每个编码装置对应一个传输装置中的 DMA緩存, 或是对应一 个 DMA緩存中的一部分, 因此, 为了使传输装置能够明确当前需释放的数据 队列与哪个编码装置相对应, 本实施例提供的方法在上述步骤 303中, 由编码 装置向传输装置发送数据发送完毕通知时, 可通过该数据发送完毕通知携带发 送打包数据的编码装置的标识, 以使传输装置通过该标识区分是哪一个编码装 置向传输装置发送了打包数据, 即当前需释放的数据队列与哪个编码装置相对 应。 编码装置的具体标识, 可以为编码装置的编号、 MAC 地址或其他标识, 本实施例不对编码装置的具体标识进行限定。 以不同编码装置对应不同编号, 将编码装置的编号作为编码装置的标识为例, 编号为 1的编码装置向传输装置 发送打包数据后, 向传输装置发送数据发送完毕通知, 该数据发送完毕通知中 除了携带存储打包数据的数据队列的地址外,还携带了发送该打包数据的编码 装置的编号 1 , 则传输装置在将该数据队列中的打包数据拆解传输之后, 向编 号为 1的编码装置返回携带该数据队列的地址的传输完毕通知,使编号为 1的 编码装置释放数据传输完毕通知中携带的数据队列的地址所对应的数据队列, 即使数据队列转为空队列, 而该空队列可在下次发送打包数据时继续使用。  In addition, since each encoding device corresponds to a DMA buffer in one transmission device, or corresponds to a part of a DMA buffer, in order to enable the transmission device to specify which encoding device the data queue to be released currently corresponds to, which embodiment, the embodiment In the above step 303, when the encoding device transmits a data transmission completion notification to the transmission device, the identifier of the encoding device carrying the packetized data may be notified by the data transmission completion, so that the transmission device distinguishes which one is by the identifier. The encoding device transmits the packed data to the transmitting device, that is, which encoding device the data queue currently to be released corresponds to. The specific identifier of the encoding device may be the number, MAC address or other identifier of the encoding device. This embodiment does not limit the specific identifier of the encoding device. The coding device number is used as an example of the coding device, and the coding device numbered 1 transmits the packet data to the transmission device, and then transmits a data transmission completion notification to the transmission device. In addition to carrying the address of the data queue storing the packed data, carrying the number 1 of the encoding device that transmits the packed data, the transmitting device sends the encoded data in the data queue to the encoding device numbered 1 after the packet data is disassembled and transmitted. Returning the transmission completion notification of the address carrying the data queue, so that the coding device numbered 1 releases the data queue corresponding to the address of the data queue carried in the data transmission completion notification, even if the data queue is turned into an empty queue, and the empty queue can be Continue to use the next time you send the packaged data.
需要说明的是, 以上内容仅以通过两个编码装置与一个传输装置实现处理 多媒体数据为例进行说明, 实际应用中, 编码装置的数量还可以为其他个数, 具体可依据实际编码需求进行设置, 本实施例不对编码装置的具体数量进行限 定。 当编码装置的数量为一个时, 一个编码装置与一个传输装置同样能够采用 上述方法实现处理多媒体数据, 其具体实现过程与上述步骤 301至步骤 304的 流程一致, 此处不再赘述。 It should be noted that the above content is only described by using two encoding devices and one transmission device to process multimedia data. In actual applications, the number of encoding devices may be other numbers, which may be set according to actual coding requirements. This embodiment does not limit the specific number of encoding devices. Set. When the number of the encoding devices is one, an encoding device and a transmitting device can implement the processing of the multimedia data by using the foregoing method. The specific implementation process is consistent with the foregoing steps 301 to 304, and details are not described herein again.
本实施例提供的方法, 通过采用多个编码装置与传输装置级联的方式, 实 现将多路视频编码分摊到多个编码装置上,解决了单编码装置编码负荷过重的 问题; 另外, 通过采用 DMA传输机制, 并由编码装置来控制向传输装置中对 应的 DMA緩存发送打包数据, 使编码装置可以统一管理传输装置中的 DMA 緩存中的队列, 不但能够保证每个编码装置的码流传输的稳定性, 而且还能够 实现多线程并行处理码流, 进而提高多媒体数据的处理效率。 本发明另一实施例提供了一种编码装置, 该装置用于执行上述实施例提供 的处理多媒体数据的方法中编码装置的功能, 参见图 4, 该装置包括:  The method provided in this embodiment achieves the problem that the multi-channel video coding is distributed to multiple coding devices by using multiple coding devices and the transmission device to be cascaded, thereby solving the problem that the coding load of the single coding device is too heavy; The DMA transmission mechanism is adopted, and the encoding device controls the transmission of the packet data to the corresponding DMA buffer in the transmission device, so that the encoding device can uniformly manage the queues in the DMA buffer in the transmission device, and can not only ensure the code stream transmission of each encoding device. The stability, but also enables multi-threaded parallel processing of the code stream, thereby improving the processing efficiency of multimedia data. Another embodiment of the present invention provides an encoding apparatus for performing the functions of the encoding apparatus in the method for processing multimedia data provided by the above embodiments. Referring to FIG. 4, the apparatus includes:
编码模块 41 ,用于通过多路编码通道对多媒体数据进行编码,得到多路编 码数据;  The encoding module 41 is configured to encode the multimedia data through the multi-pass encoding channel to obtain the multi-channel encoded data;
打包模块 42, 用于将编码模块 41编码得到的多路编码数据打包; 第一发送模块 43 , 用于将打包模块 42得到的打包数据发送至传输装置中 对应的直接内存访问 DMA緩存中, 由传输装置对 DMA緩存中的打包数据进 行拆解, 并传输拆解后的数据。  The packetizing module 42 is configured to package the multiplexed encoded data obtained by the encoding module 41, and the first sending module 43 is configured to send the packed data obtained by the packing module 42 to the corresponding direct memory access DMA buffer in the transmitting device, The transmitting device disassembles the packed data in the DMA buffer and transmits the disassembled data.
进一步地,打包模块 42,具体用于依次获取各个编码通道输出的编码数据, 并将获取到的每个编码通道输出的编码数据分别打包成一个数据包; 或者, 依 次获取各个编码通道输出的编码数据, 并在获取到的编码数据的大小达到阈值 后, 将获取到的编码数据打包成一个数据包。  Further, the packing module 42 is specifically configured to sequentially obtain the encoded data output by each encoding channel, and package the encoded data output by each encoded channel into one data packet respectively; or, sequentially obtain the encoding of each encoding channel output. Data, and after the size of the obtained encoded data reaches a threshold, the obtained encoded data is packaged into one data packet.
参见图 5, 第一发送模块 43, 具体包括:  Referring to FIG. 5, the first sending module 43 specifically includes:
查询单元 431 , 用于查询对应的 DMA緩存的空队列;  a query unit 431, configured to query an empty queue of the corresponding DMA buffer;
获取单元 432, 用于获取查询单元 431查询到的空队列的地址;  The obtaining unit 432 is configured to obtain an address of the empty queue that is queried by the query unit 431.
发送单元 433 , 用于根据获取单元 432获取到的空队列的地址将打包数据 发送至对应的 DMA緩存的空队列中, 使空队列转为数据队列, 数据队列的地 址与空队列的地址相同。  The sending unit 433 is configured to send the packed data to the empty queue of the corresponding DMA buffer according to the address of the empty queue acquired by the obtaining unit 432, and convert the empty queue into a data queue, where the address of the data queue is the same as the address of the empty queue.
参见图 6, 该装置, 还包括:  Referring to Figure 6, the device further includes:
第二发送模块 44,用于向传输装置发送数据发送完毕通知,数据发送完毕 通知中携带了数据队列的地址, 使传输装置根据数据队列的地址拆解对应的 DMA緩存中的打包数据。 The second sending module 44 is configured to send a data transmission completion notification to the transmission device, where the data transmission completion notification carries the address of the data queue, so that the transmission device disassembles the corresponding data according to the address of the data queue. Packed data in the DMA cache.
参见图 7, 该装置, 还包括:  Referring to Figure 7, the device also includes:
接收模块 45,用于接收传输装置将拆解后的数据传输后发送的数据传输完 毕通知, 数据传输完毕通知中携带了数据队列的地址;  The receiving module 45 is configured to receive, by the transmitting device, a data transmission completion notification sent after the disassembled data transmission, and the data transmission completion notification carries the address of the data queue;
释放模块 46, 用于根据接收模块 45接收到的数据队列的地址释放对应的 DMA緩存的数据队列, 使数据队列转为空队列。  The release module 46 is configured to release the data queue of the corresponding DMA cache according to the address of the data queue received by the receiving module 45, so that the data queue is converted into an empty queue.
本实施例提供的编码装置, 通过多个编码装置与传输装置级联的方式, 实 现将多路视频编码分摊到多个编码装置上,解决了单编码装置编码负荷过重的 问题; 另外, 通过采用 DMA传输机制, 并由编码装置来控制向传输装置中对 应的 DMA緩存发送打包数据, 使编码装置可以统一管理传输装置中的 DMA 緩存中的队列, 不但能够保证每个编码装置的码流传输的稳定性, 而且还能够 实现多线程并行处理码流, 进而提高多媒体数据的处理效率。 本发明另一实施例提供了一种传输装置, 该装置用于执行上述实施例提供 的处理多媒体数据的方法中传输装置执行的功能。 参见图 8, 该装置包括: 获取模块 81 ,用于获取多个编码装置中的每个编码装置向传输装置中对应 的直接内存访问 DMA緩存发送的打包数据; 其中, 打包数据为每个编码装置 通过多路编码通道对多媒体数据进行编码得到多路编码数据后, 对多路编码数 据进行打包得到的数据;  The encoding apparatus provided in this embodiment realizes that the multi-channel video coding is distributed to a plurality of encoding apparatuses by means of cascading a plurality of encoding apparatuses and the transmitting apparatus, thereby solving the problem that the encoding power of the single encoding apparatus is too heavy; The DMA transmission mechanism is adopted, and the encoding device controls the transmission of the packet data to the corresponding DMA buffer in the transmission device, so that the encoding device can uniformly manage the queues in the DMA buffer in the transmission device, and can not only ensure the code stream transmission of each encoding device. The stability, but also enables multi-threaded parallel processing of the code stream, thereby improving the processing efficiency of multimedia data. Another embodiment of the present invention provides a transmission apparatus for performing the functions performed by the transmission apparatus in the method of processing multimedia data provided by the above embodiments. Referring to FIG. 8, the apparatus includes: an obtaining module 81, configured to acquire packetized data sent by each of the plurality of encoding devices to a corresponding direct memory access DMA buffer in the transmitting device; wherein the packed data is each encoding device After the multimedia data is encoded by the multi-pass encoding channel to obtain the multi-channel encoded data, the data obtained by packing the multi-channel encoded data is obtained;
拆解模块 82, 用于对获取模块 81获取到的 DMA緩存中的打包数据进行 拆解;  The disassembling module 82 is configured to disassemble the packed data in the DMA cache acquired by the obtaining module 81;
传输模块 83, 用于传输拆解模块 82拆解后的数据。  The transmission module 83 is configured to transmit the disassembled data of the disassembly module 82.
参见图 9, 该装置, 还包括:  Referring to Figure 9, the device further includes:
接收模块 84,用于接收编码装置发送的数据发送完毕通知,该数据发送完 毕通知中携带了对应的 DMA緩存的数据队列的地址, 该数据队列中存储了打 包数据;  The receiving module 84 is configured to receive a data transmission completion notification sent by the encoding device, where the data transmission completion notification carries an address of a corresponding DMA buffer data queue, and the data queue stores the packet data;
获取模块 81 ,具体用于根据数据发送完毕通知中携带的对应的 DMA緩存 的数据队列的地址获取多个编码装置中的每个编码装置向传输装置中对应的 直接内存访问 DMA緩存发送的打包数据。  The obtaining module 81 is configured to acquire, according to the address of the data queue of the corresponding DMA cache carried in the data sending completion notification, the packed data sent by each of the plurality of encoding devices to the corresponding direct memory access DMA buffer in the transmitting device. .
参见图 10, 该装置, 还包括:  Referring to Figure 10, the device further includes:
发送模块 85,用于向对应的编码装置发送数据传输完毕通知,该数据传输 完毕通知中携带了数据队列的地址,使编码装置根据该数据队列的地址释放所 述对应的 DMA緩存的数据队列, 使数据队列转为空队列。 The sending module 85 is configured to send a data transmission completion notification to the corresponding encoding device, where the data transmission is The completion notification carries the address of the data queue, so that the encoding device releases the data queue of the corresponding DMA buffer according to the address of the data queue, so that the data queue is converted into an empty queue.
本实施例提供的传输装置, 通过多个编码装置与其级联的方式, 实现将多 路视频编码分摊到多个编码装置上, 解决了单编码装置编码负荷过重的问题; 另外, 通过编码装置采用 DMA传输机制, 并由编码装置来控制向传输装置中 对应的 DMA緩存发送打包数据,使编码装置可以统一管理传输装置中的 DMA 緩存中的队列, 不但能够保证每个编码装置的码流传输的稳定性, 而且还能够 实现多线程并行处理码流, 进而提高多媒体数据的处理效率。 本发明另一实施例提供了一种处理多媒体数据的系统, 参见图 11 ,该系统 包括:  The transmission device provided in this embodiment realizes that the multi-channel video coding is distributed to a plurality of coding devices by means of a plurality of coding devices and the cascade thereof, thereby solving the problem that the coding load of the single coding device is excessively heavy; The DMA transmission mechanism is adopted, and the encoding device controls the transmission of the packed data to the corresponding DMA buffer in the transmission device, so that the encoding device can uniformly manage the queues in the DMA buffer in the transmission device, and not only can ensure the code stream transmission of each encoding device. The stability, but also enables multi-threaded parallel processing of the code stream, thereby improving the processing efficiency of multimedia data. Another embodiment of the present invention provides a system for processing multimedia data. Referring to FIG. 11, the system includes:
多个编码装置 1101及一个传输装置 1102;  a plurality of encoding devices 1101 and a transmitting device 1102;
其中, 编码装置 1101如上述实施例提供的编码装置;  The encoding device 1101 is the encoding device provided by the above embodiment;
传输装置 1102如上述实施例提供的传输装置。  Transmission device 1102 is a transmission device as provided by the above embodiments.
本实施例提供的系统, 通过多个编码装置与传输装置级联的方式, 实现将 多路视频编码分摊到多个编码装置上, 解决了单编码装置编码负荷过重的问 题; 另外, 通过采用 DMA传输机制, 并由编码装置来控制向传输装置中对应 的 DMA緩存发送打包数据, 使编码装置可以统一管理传输装置中的 DMA緩 存中的队列, 不但能够保证每个编码装置的码流传输的稳定性, 而且还能够实 现多线程并行处理码流, 进而提高多媒体数据的处理效率。  The system provided in this embodiment realizes the problem that the multi-channel video coding is distributed to multiple coding devices by means of cascading a plurality of coding devices and the transmission device, thereby solving the problem that the coding load of the single coding device is too heavy; a DMA transfer mechanism, and the encoding device controls the sending of the packed data to the corresponding DMA buffer in the transmitting device, so that the encoding device can uniformly manage the queues in the DMA buffer in the transmitting device, and can not only ensure the code stream transmission of each encoding device. Stability, but also enable multi-threaded parallel processing of the code stream, thereby improving the processing efficiency of multimedia data.
需要说明的是: 上述实施例提供的系统中, 传输装置可与一个编码装置级 联, 也可与多个编码装置级联, 当多个编码装置与传输装置进行级联时, 处理 对媒体数据的方式详见上述方法实施例, 此处不再赘述。 上述实施例提供的编 码装置和传输装置在对多媒体数据进行处理时,仅以上述各功能模块的划分进 行举例说明, 实际应用中, 可以根据需要而将上述功能分配由不同的功能模块 完成, 即将装置的内部结构划分成不同的功能模块, 以完成以上描述的全部或 者部分功能。 另外, 上述实施例提供的编码装置、 传输装置、 处理多媒体数据 的系统与处理多媒体数据的方法实施例属于同一构思, 其具体实现过程详见方 法实施例, 这里不再赘述。  It should be noted that, in the system provided by the foregoing embodiment, the transmission device may be cascaded with one coding device, or may be cascaded with multiple coding devices. When multiple coding devices are cascaded with the transmission device, the media data is processed. For details, refer to the foregoing method embodiments, and details are not described herein again. The encoding device and the transmitting device provided in the above embodiments are only illustrated by the division of the above functional modules when processing the multimedia data. In actual applications, the function allocation may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to perform all or part of the functions described above. In addition, the coding apparatus, the transmission apparatus, the system for processing the multimedia data, and the method for processing the multimedia data are in the same concept, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。  The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通 过硬件来完成, 也可以通过程序来指令相关的硬件完成, 所述的程序可以存储 于一种计算机可读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘 或光盘等。 Those skilled in the art can understand that all or part of the steps of implementing the above embodiments can be The completion of the hardware may also be performed by a program to instruct related hardware. The program may be stored in a computer readable storage medium. The storage medium mentioned above may be a read only memory, a magnetic disk or an optical disk.
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的 精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的 保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims

权 利 要 求 书 claims
1、 一种处理多媒体数据的方法, 其特征在于, 所述方法包括: 1. A method for processing multimedia data, characterized in that the method includes:
多个编码装置中的每个编码装置通过多路编码通道对多媒体数据进行编 码, 得到多路编码数据; Each encoding device in the plurality of encoding devices encodes the multimedia data through multiple encoding channels to obtain multi-channel encoded data;
将所述多路编码数据打包, 并将打包数据发送至传输装置中对应的直接内 存访问 DMA緩存中,由所述传输装置对所述 DMA緩存中的打包数据进行拆解, 并传输拆解后的数据。 The multi-channel encoded data is packaged, and the packaged data is sent to the corresponding direct memory access DMA cache in the transmission device. The transmission device disassembles the packaged data in the DMA cache and transmits the disassembled data. The data.
2、 根据权利要求 1所述的方法, 其特征在于, 所述将所述多路编码数据打 包, 具体包括: 2. The method according to claim 1, characterized in that the packaging of the multi-channel encoded data specifically includes:
依次获取各路编码通道输出的编码数据, 并将获取到的每路编码通道输出 的编码数据分别打包成一个数据包; Obtain the encoding data output by each encoding channel in turn, and package the obtained encoding data output by each encoding channel into a data packet;
或者, 依次获取各路编码通道输出的编码数据, 并在获取到的编码数据的 大小达到阈值后, 将获取到的编码数据打包成一个数据包。 Or, obtain the encoded data output by each encoding channel in turn, and after the size of the obtained encoded data reaches the threshold, package the obtained encoded data into a data packet.
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述将打包数据发送至 传输装置中对应的直接内存访问 DMA緩存中, 具体包括: 3. The method according to claim 1 or 2, characterized in that said sending the packaged data to the corresponding direct memory access DMA cache in the transmission device specifically includes:
查询所述对应的 DMA緩存的空队列, 并获取所述空队列的地址; Query the empty queue of the corresponding DMA cache and obtain the address of the empty queue;
根据所述空队列的地址将打包数据发送至所述对应的 DMA緩存的空队列 中, 使所述空队列转为数据队列, 所述数据队列的地址与所述空队列的地址相 同。 Send the packaged data to the corresponding empty queue of the DMA cache according to the address of the empty queue, so that the empty queue is converted into a data queue, and the address of the data queue is the same as the address of the empty queue.
4、 根据权利要求 3所述的方法, 其特征在于, 所述根据所述空队列的地址 将打包数据发送至所述对应的 DMA緩存的空队列中,使所述空队列转为数据队 列之后, 还包括: 4. The method according to claim 3, characterized in that, after the packed data is sent to the corresponding empty queue of the DMA cache according to the address of the empty queue, the empty queue is converted into a data queue. , Also includes:
向所述传输装置发送数据发送完毕通知, 所述数据发送完毕通知中携带了 所述数据队列的地址, 使所述传输装置根据所述数据队列的地址拆解所述对应 的 DMA緩存中的打包数据。 Send a data transmission completion notification to the transmission device. The data transmission completion notification carries the address of the data queue, so that the transmission device can disassemble the packets in the corresponding DMA cache according to the address of the data queue. data.
5、 根据权利要求 3或 4所述的方法, 其特征在于, 所述根据所述空队列的 地址将打包数据发送至所述对应的 DMA緩存的空队列中,使所述空队列转为数 据队列之后, 还包括: 5. The method according to claim 3 or 4, characterized in that: the method according to the empty queue The address sends the packed data to the empty queue of the corresponding DMA cache, and after converting the empty queue into a data queue, it also includes:
接收所述传输装置将拆解后的数据传输后发送的数据传输完毕通知, 所述 数据传输完毕通知中携带了所述数据队列的地址; Receive a data transmission completion notification sent by the transmission device after the disassembled data is transmitted, where the data transmission completion notification carries the address of the data queue;
根据所述数据队列的地址释放所述对应的 DMA緩存的数据队列,使所述数 据队列转为空队列。 The corresponding DMA cached data queue is released according to the address of the data queue, so that the data queue is converted into an empty queue.
6、 一种编码装置, 其特征在于, 所述装置包括: 6. An encoding device, characterized in that the device includes:
编码模块, 用于通过多路编码通道对多媒体数据进行编码, 得到多路编码 数据; An encoding module, used to encode multimedia data through multiple encoding channels to obtain multi-channel encoded data;
打包模块, 用于将所述编码模块编码得到的多路编码数据打包; A packaging module, used to package the multi-channel encoded data encoded by the encoding module;
第一发送模块, 用于将所述打包模块得到的打包数据发送至传输装置中对 应的直接内存访问 DMA緩存中, 由所述传输装置对所述 DMA緩存中的打包数 据进行拆解, 并传输拆解后的数据。 The first sending module is used to send the packaged data obtained by the packaging module to the corresponding direct memory access DMA cache in the transmission device. The transmission device disassembles the packaged data in the DMA cache and transmits it. Disassembled data.
7、 根据权利要求 6所述的装置, 其特征在于, 所述打包模块, 具体用于依 次获取各个编码通道输出的编码数据, 并将获取到的每个编码通道输出的编码 数据分别打包成一个数据包; 7. The device according to claim 6, characterized in that the packaging module is specifically used to obtain the encoded data output by each encoding channel in sequence, and package the obtained encoded data output by each encoding channel into one data pack;
或者, 依次获取各个编码通道输出的编码数据, 并在获取到的编码数据的 大小达到阈值后, 将获取到的编码数据打包成一个数据包。 Alternatively, the encoded data output by each encoding channel is obtained in turn, and after the size of the obtained encoded data reaches the threshold, the obtained encoded data is packaged into a data packet.
8、 根据权利要求 6或 7所述的装置, 其特征在于, 所述第一发送模块, 具 体包括: 8. The device according to claim 6 or 7, characterized in that the first sending module specifically includes:
查询单元, 用于查询所述对应的 DMA緩存的空队列; A query unit, used to query the corresponding empty queue of the DMA cache;
获取单元, 用于获取所述查询单元查询到的空队列的地址; An acquisition unit, used to acquire the address of the empty queue queried by the query unit;
发送单元, 用于根据所述获取单元获取到的空队列的地址将打包数据发送 至所述对应的 DMA緩存的空队列中,使所述空队列转为数据队列,所述数据队 列的地址与所述空队列的地址相同。 A sending unit, configured to send the packaged data to the corresponding empty queue of the DMA cache according to the address of the empty queue obtained by the acquisition unit, so that the empty queue is converted into a data queue, and the address of the data queue is the same as the address of the empty queue. The addresses of the empty queues are the same.
9、 根据权利要求 8所述的装置, 其特征在于, 所述装置, 还包括: 第二发送模块, 用于向所述传输装置发送数据发送完毕通知, 所述数据发 送完毕通知中携带了所述数据队列的地址, 使所述传输装置根据所述数据队列 的地址拆解所述对应的 DMA緩存中的打包数据。 9. The device according to claim 8, characterized in that, the device further includes: a second sending module, configured to send a data sending completion notification to the transmission device, and the data sending module The transmission completion notification carries the address of the data queue, so that the transmission device decomposes the packaged data in the corresponding DMA cache according to the address of the data queue.
10、 根据权利要求 8或 9所述的装置, 其特征在于, 所述装置, 还包括: 接收模块, 用于接收所述传输装置将拆解后的数据传输后发送的数据传输 完毕通知, 所述数据传输完毕通知中携带了所述数据队列的地址; 10. The device according to claim 8 or 9, characterized in that, the device further includes: a receiving module, configured to receive a data transmission completion notification sent by the transmission device after the disassembled data is transmitted, so The data transmission completion notification carries the address of the data queue;
释放模块, 用于根据所述接收模块接收到的数据队列的地址释放所述对应 的 DMA緩存的数据队列, 使所述数据队列转为空队列。 A release module, configured to release the corresponding DMA cached data queue according to the address of the data queue received by the receiving module, so that the data queue becomes an empty queue.
11、 一种处理多媒体数据的方法, 其特征在于, 所述方法包括: 11. A method for processing multimedia data, characterized in that the method includes:
传输装置获取多个编码装置中的每个编码装置向所述传输装置中对应的直 接内存访问 DMA緩存发送的打包数据; The transmission device obtains the packaged data sent by each encoding device in the plurality of encoding devices to the corresponding direct memory access DMA cache in the transmission device;
对所述 DMA緩存中的打包数据进行拆解, 并传输拆解后的数据; 其中, 所述打包数据为所述每个编码装置通过多路编码通道对多媒体数据 进行编码得到多路编码数据后, 对所述多路编码数据进行打包得到的数据。 The packaged data in the DMA cache is disassembled and the disassembled data is transmitted; wherein, the packaged data is obtained after each encoding device encodes multimedia data through multiple encoding channels to obtain multi-channel encoded data. , data obtained by packaging the multi-channel encoded data.
12、 根据权利要求 11所述的方法, 其特征在于, 所述传输装置获取多个编 码装置中的每个编码装置向所述传输装置中对应的直接内存访问 DMA緩存发 送的打包数据之前, 还包括: 12. The method according to claim 11, characterized in that, before the transmission device obtains the packaged data sent by each encoding device in the plurality of encoding devices to the corresponding direct memory access DMA cache in the transmission device, include:
接收编码装置发送的数据发送完毕通知, 所述数据发送完毕通知中携带了 所述对应的 DMA緩存的数据队列的地址, 所述数据队列中存储了打包数据; 所述传输装置获取多个编码装置中的每个编码装置向所述传输装置中对应 的直接内存访问 DMA緩存发送的打包数据, 具体包括: Receive a data transmission completion notification sent by the encoding device, the data transmission completion notification carries the address of the corresponding DMA buffered data queue, and the data queue stores packaged data; the transmission device obtains multiple encoding devices Each encoding device in the transmission device caches the packaged data sent to the corresponding direct memory access DMA, specifically including:
根据所述数据发送完毕通知中携带的所述对应的 DMA緩存的数据队列的 地址获取多个编码装置中的每个编码装置向所述传输装置中对应的直接内存访 问 DMA緩存发送的打包数据。 According to the address of the data queue of the corresponding DMA cache carried in the data transmission completion notification, the packaged data sent by each encoding device in the plurality of encoding devices to the corresponding direct memory access DMA cache in the transmission device is obtained.
13、 根据权利要求 12所述的方法, 其特征在于, 所述传输拆解后的数据之 后, 还包括: 13. The method according to claim 12, characterized in that, after transmitting the disassembled data, it further includes:
向对应的编码装置发送数据传输完毕通知, 所述数据传输完毕通知中携带 了所述数据队列的地址, 使所述编码装置根据所述数据队列的地址释放所述对 应的 DMA緩存的数据队列, 使所述数据队列转为空队列。 Send a data transmission completion notification to the corresponding encoding device. The data transmission completion notification carries the address of the data queue, so that the encoding device releases the pair according to the address of the data queue. The data queue corresponding to the DMA cache is converted into an empty queue.
14、 一种传输装置, 其特征在于, 所述装置包括: 14. A transmission device, characterized in that the device includes:
获取模块, 用于获取多个编码装置中的每个编码装置向所述传输装置中对 应的直接内存访问 DMA緩存发送的打包数据; 其中,所述打包数据为所述每个 编码装置通过多路编码通道对多媒体数据进行编码得到多路编码数据后, 对所 述多路编码数据进行打包得到的数据; An acquisition module, configured to acquire the packaged data sent by each encoding device in the multiple encoding devices to the corresponding direct memory access DMA cache in the transmission device; wherein the packaged data is sent by each encoding device through multiple channels. After the encoding channel encodes the multimedia data to obtain multi-channel encoded data, the multi-channel encoded data is packaged to obtain the data;
拆解模块,用于对所述获取模块获取到的所述 DMA緩存中的打包数据进行 拆解; A disassembly module, used to disassemble the packaged data in the DMA cache obtained by the acquisition module;
传输模块, 用于传输所述拆解模块拆解后的数据。 The transmission module is used to transmit the disassembled data of the disassembly module.
15、 根据权利要求 14所述的装置, 其特征在于, 所述装置, 还包括: 接收模块, 用于接收编码装置发送的数据发送完毕通知, 所述数据发送完 毕通知中携带了所述对应的 DMA緩存的数据队列的地址,所述数据队列中存储 了打包数据; 15. The device according to claim 14, characterized in that, the device further includes: a receiving module, configured to receive a data transmission completion notification sent by the encoding device, and the data transmission completion notification carries the corresponding The address of the DMA cached data queue in which packed data is stored;
所述获取模块, 具体用于根据所述数据发送完毕通知中携带的所述对应的 DMA緩存的数据队列的地址获取多个编码装置中的每个编码装置向所述传输 装置中对应的直接内存访问 DMA緩存发送的打包数据。 The acquisition module is specifically configured to obtain the corresponding direct memory of each encoding device in the transmission device according to the address of the corresponding DMA cached data queue carried in the data transmission completion notification. Access the DMA buffer to send packed data.
16、 根据权利要求 15所述的装置, 其特征在于, 所述装置, 还包括: 发送模块, 用于向对应的编码装置发送数据传输完毕通知, 所述数据传输 完毕通知中携带了所述数据队列的地址, 使所述编码装置根据所述数据队列的 地址释放所述对应的 DMA緩存的数据队列, 使所述数据队列转为空队列。 16. The device according to claim 15, characterized in that, the device further includes: a sending module, configured to send a data transmission completion notification to the corresponding encoding device, and the data transmission completion notification carries the data The address of the queue causes the encoding device to release the corresponding DMA cached data queue according to the address of the data queue, so that the data queue becomes an empty queue.
17、 一种处理多媒体数据的系统, 其特征在于, 所述系统包括: 多个编码 装置及一个传输装置; 17. A system for processing multimedia data, characterized in that the system includes: multiple encoding devices and a transmission device;
其中, 所述多个编码装置中的每个编码装置如所述权利要求 6至 10中任一 权利要求所述的编码装置; Wherein, each encoding device in the plurality of encoding devices is the encoding device according to any one of claims 6 to 10;
所述传输装置如所述权利要求 14至 16中任一权利要求所述的传输装置。 The transmission device is as described in any one of claims 14 to 16.
PCT/CN2013/074634 2012-07-25 2013-04-24 Method, device and system for processing multimedia data WO2014015688A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210258841.3 2012-07-25
CN2012102588413A CN102801969A (en) 2012-07-25 2012-07-25 Method, device and system of processing multimedia data

Publications (1)

Publication Number Publication Date
WO2014015688A1 true WO2014015688A1 (en) 2014-01-30

Family

ID=47200924

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/074634 WO2014015688A1 (en) 2012-07-25 2013-04-24 Method, device and system for processing multimedia data

Country Status (2)

Country Link
CN (1) CN102801969A (en)
WO (1) WO2014015688A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102801969A (en) * 2012-07-25 2012-11-28 华为技术有限公司 Method, device and system of processing multimedia data
CN105306949B (en) * 2015-12-04 2020-05-26 中星技术股份有限公司 Video encoding method and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662637A (en) * 2009-09-25 2010-03-03 深圳创维数字技术股份有限公司 Method for playing all packaged programs in transmission code stream and set-top box
CN101668160A (en) * 2009-09-10 2010-03-10 深圳华为通信技术有限公司 Video image data processing method, device, video conference system and terminal
US20100091888A1 (en) * 2008-10-13 2010-04-15 General Instrument Corporation Multi-Rate Encoder with GOP Alignment
CN102801969A (en) * 2012-07-25 2012-11-28 华为技术有限公司 Method, device and system of processing multimedia data

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101150485A (en) * 2007-11-15 2008-03-26 曙光信息产业(北京)有限公司 A management method for network data transmission of zero copy buffer queue
WO2012106898A1 (en) * 2011-07-18 2012-08-16 华为技术有限公司 Method, device and system for transmitting and processing multi-channel audio-video

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100091888A1 (en) * 2008-10-13 2010-04-15 General Instrument Corporation Multi-Rate Encoder with GOP Alignment
CN101668160A (en) * 2009-09-10 2010-03-10 深圳华为通信技术有限公司 Video image data processing method, device, video conference system and terminal
CN101662637A (en) * 2009-09-25 2010-03-03 深圳创维数字技术股份有限公司 Method for playing all packaged programs in transmission code stream and set-top box
CN102801969A (en) * 2012-07-25 2012-11-28 华为技术有限公司 Method, device and system of processing multimedia data

Also Published As

Publication number Publication date
CN102801969A (en) 2012-11-28

Similar Documents

Publication Publication Date Title
WO2016187813A1 (en) Data transmission method and device for photoelectric hybrid network
CN101202707B (en) Method for transmitting message of high speed single board, field programmable gate array and high speed single board
US8261074B2 (en) Verifying a cipher-based message authentication code
US8291130B2 (en) Aligning protocol data units
US20090296683A1 (en) Transmitting a protocol data unit using descriptors
US8873550B2 (en) Task queuing in a multi-flow network processor architecture
WO2009021417A1 (en) A method, system and device for transmitting and receiving the network data
EP2755363B1 (en) Data-fast-distribution method and device
JP2011526476A (en) Method and apparatus for reducing context switching during data transfer and reception in a multiprocessor device
US9179473B2 (en) Receiving and processing protocol data units
WO2014015688A1 (en) Method, device and system for processing multimedia data
US20140281488A1 (en) System and Method for Offloading Cryptographic Functions to Support a Large Number of Clients in a Wireless Access Point
US20090323585A1 (en) Concurrent Processing of Multiple Bursts
CN106549869A (en) Data package processing method and device
CN101777037B (en) Method and system for searching data transmission in engine real-time system
US11347567B2 (en) Methods and apparatus for multiplexing data flows via a single data structure
CN109743350B (en) Unloading implementation method for switching communication mode of scientific computing application image area
US9603052B2 (en) Just in time packet body provision for wireless transmission
CN101720033B (en) Video transmission equipment as well as USB transmission device and method thereof
WO2013086847A1 (en) Inter-core communications method and core processor
Mindur et al. A general purpose Ethernet based readout data acquisition system
US8176117B2 (en) Accelerator for object-oriented communications and method
CN101212452B (en) Real-time transport protocol based multimedia data transmission control method
CN112637027B (en) Frame boundary defining device based on UART (universal asynchronous receiver/transmitter), transmitting method and receiving method
CN116193000B (en) FPGA-based intelligent packet rapid forwarding system and forwarding method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13822193

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13822193

Country of ref document: EP

Kind code of ref document: A1