CN113905025B - Method, device, medium and computer equipment for transmitting stream data - Google Patents

Method, device, medium and computer equipment for transmitting stream data Download PDF

Info

Publication number
CN113905025B
CN113905025B CN202111137373.XA CN202111137373A CN113905025B CN 113905025 B CN113905025 B CN 113905025B CN 202111137373 A CN202111137373 A CN 202111137373A CN 113905025 B CN113905025 B CN 113905025B
Authority
CN
China
Prior art keywords
callback
data
audio
information
media
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202111137373.XA
Other languages
Chinese (zh)
Other versions
CN113905025A (en
Inventor
何水霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN202111137373.XA priority Critical patent/CN113905025B/en
Publication of CN113905025A publication Critical patent/CN113905025A/en
Application granted granted Critical
Publication of CN113905025B publication Critical patent/CN113905025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method, a device, a medium and a computer device for transmitting stream data, wherein the method comprises the following steps: acquiring media head information of audio and video stream data through a callback media head function pointer, and callback the media head information to a player module by using a callback interface; acquiring data packet information of the audio and video stream data through a callback data function pointer, and callback the data packet information to the player module by using the callback interface; therefore, when the P2P module transmits audio and video stream data to the player module, the corresponding function pointer can be utilized to acquire the corresponding audio and video data, then the audio and video data is directly recalled to the player module through the callback interface, the local HTTP service is not required to be utilized for transfer and retransmission, the data transmission time is reduced, and the data transmission efficiency is improved.

Description

Method, device, medium and computer equipment for transmitting stream data
Technical Field
The present invention relates to the field of streaming data playing technologies, and in particular, to a method, an apparatus, a medium, and a computer device for transmitting streaming data.
Background
At present, P2P technology is introduced into streaming media transmission to form P2P streaming media technology, and the method has two advantages. Firstly, the technology does not need the support of an internet router and a network infrastructure, so that the cost performance is high and the deployment is easy; second, in this technique, the streaming media user not only downloads the media stream, but also uploads the media stream to other users, and thus, this method can enlarge the size of the user group.
In the prior art, a player includes a P2P module and a player module, and when the P2P module and the player module perform data transmission, a local HyperText transfer (HTTP, hyperText Transfer Protocol) proxy mode is generally adopted to perform data transmission, but this mode needs to be transferred and sent through a local HTTP service, which consumes a long time for data transmission, resulting in low stream data transmission efficiency.
Disclosure of Invention
Aiming at the problems existing in the prior art, the embodiment of the invention provides a method, a device, a medium and computer equipment for transmitting stream data, which are used for solving the technical problem that the transmission efficiency is lower when a P2P module transmits stream data to a player module in the prior art.
In a first aspect, the present invention provides a method of transmitting streaming data, the method comprising:
acquiring media head information of audio and video stream data through a callback media head function pointer, and callback the media head information to a player module by using a callback interface;
and acquiring the data packet information of the audio and video stream data through a callback data function pointer, and callback the data packet information to the player module by using the callback interface.
In the above scheme, before the media head information of the audio/video stream data is obtained by calling back the media head function pointer, the method further includes:
and when the P2P module is started, receiving callback interface parameters, the media head function pointer and the data function pointer which are sent by the player module.
In the above scheme, the obtaining the media header information of the audio/video stream data by calling back the media header function pointer includes:
calling a corresponding media head acquisition function by using the media head function pointer, and reading a first group of pictures GOP from a content distribution network by using the media head acquisition function;
and analyzing the first picture group to obtain the media head information.
In the above scheme, the obtaining the packet information of the audio/video stream data through the callback data function pointer includes:
calling a corresponding data packet acquisition function by using the data function pointer, and acquiring each piece of data from a content distribution network by using the data packet acquisition function;
and reorganizing the fragment data to form data packet information of the audio and video stream data.
In the above scheme, the media head function pointer includes: a first type pointer for indicating the processing of the media header information and the media header structure for storing the parameter information of the audio/video stream data; the callback interface is utilized to callback the media header information to the player module, and the callback interface comprises:
based on the callback interface, the media head information and the media head structural body for storing the parameter information of the audio and video stream data are callback to a media head callback object by utilizing the first type pointer; and enabling the media head callback object to initialize an audio-video decoder based on the media head information and the parameter information of the audio-video stream data.
In the above scheme, the data function pointer includes: the second type pointer is used for indicating to process the audio and video data information, and the data structure body is used for storing the audio and video stream data packets; and callback the data packet information to the player module, including:
based on the callback interface, callback the audio and video data information and the audio and video stream data packet to a data callback object of the player module by using the second type pointer; and enabling the data callback object to decode the audio and video stream data packet.
In a second aspect, the present invention provides an apparatus for transmitting streaming data, the apparatus comprising:
the first callback unit acquires media head information of the audio and video stream data through a callback media head function pointer, and the media head information is callback to the player module by using a callback interface;
and the second callback unit acquires the data packet information of the audio and video stream data through a callback data function pointer, and the callback interface is utilized to callback the data packet information to the player module.
In the above scheme, the device further includes:
and the receiving unit is used for receiving the callback interface parameter, the media head function pointer and the data function pointer which are sent by the player module when the P2P module is started.
In a third aspect, the invention also provides a computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, implements the method according to any of the first aspects.
In a fourth aspect, the invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of the first aspects when executing the program.
The invention provides a method, a device, a medium and a computer device for transmitting stream data, wherein the method comprises the following steps: acquiring media head information of audio and video stream data through a callback media head function pointer, and callback the media head information to a player module by using a callback interface; acquiring data packet information of the audio and video stream data through a callback data function pointer, and callback the data packet information to the player module by using the callback interface; therefore, when the P2P module transmits audio and video stream data to the player module, the corresponding function pointer can be utilized to acquire the corresponding audio and video data, then the audio and video data is directly recalled to the player module through the callback interface, the local HTTP service is not required to be utilized for transfer and retransmission, the data transmission time is reduced, and the data transmission efficiency is improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 is a schematic flow chart of a method for transmitting stream data according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an apparatus structure for transmitting stream data according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to solve the technical problem of low transmission efficiency when a P2P module transmits stream data to a player module in the prior art, the invention provides a method, a device, a medium and computer equipment for transmitting stream data.
In order to better understand the technical solutions described above, the technical solutions of the embodiments of the present specification are described in detail below through the accompanying drawings and the specific embodiments, and it should be understood that the specific features of the embodiments of the present specification and the specific features of the embodiments of the present specification are detailed descriptions of the technical solutions of the embodiments of the present specification, and not limit the technical solutions of the present specification, and the technical features of the embodiments of the present specification may be combined without conflict.
The present embodiment provides a method for transmitting stream data, as shown in fig. 1, the method includes:
s110, media head information of audio and video stream data is obtained through a callback media head function pointer, and the media head information is called back to a player module by a callback interface;
in this step, before obtaining the media header information of the audio and video stream data by calling back the media header function pointer, the structure and the function pointer required by the transport stream data need to be preset.
The structure of the present invention comprises: a media header information structure and a data structure; the media header information structure body mainly defines key parameter information of the audio and video stream, for example: sampling rate, number of channels, pulse code modulation (PCM, pulse Code Modulation) audio and video data storage format, video width, height, storage format, etc.;
the data structure body is mainly defined with a memory storage format of audio and video data, such as a cache address of the data in a memory, whether the data is a key frame, a data length, a data packet time stamp and other information.
Specifically, the media header information structure mainly includes: headerInfo and HeaderBase; the specific structure of the media header information structure is as follows:
Figure BDA0003282567190000051
the specific structure of the data structure is as follows:
Figure BDA0003282567190000052
Figure BDA0003282567190000061
the function pointer types in this embodiment also include two types: a media head function pointer and a data function pointer; wherein the media head function pointer is:
typedef void(*av_header_callback_t)(void*user_data,HeaderInfo*header_info);
the data function pointer is:
typedef void(*av_packet_callback_t)(void*user_data,PackageData*data);
after the required structural body and function pointer are determined, media head information of audio and video stream data is obtained through callback of the media head function pointer, and the media head information is callback to the player module through a callback interface.
Specifically, when the player module starts the P2P module, the player module sends the callback interface parameter, the media head function pointer and the data function pointer to the P2P module, that is, before the media head information of the audio/video stream data is obtained by the callback media head function pointer, the method further includes:
and when the P2P module is started, receiving callback interface parameters, a media head function pointer and a data function pointer which are sent by the player module.
The code implementation is as follows:
m_dyp2p_callback.on_av_packet=dyp2p_demux_callback;
m_dyp2p_callback.on_av_header=dyp2p_header_callback;
m_dyp2p_callback.user_data=(void*)this;
dyp2p_play_channel_with_webrtc2(m_dyp2p_params,m_dyp2p_callback,m_play_url);
and then, the P2P module can acquire the media head information of the audio and video stream data through the callback media head function pointer, and the media head information is called back to the player module by using the callback interface.
In an alternative embodiment, obtaining media header information of the audio-video stream data by calling back a media header function pointer includes:
calling a corresponding media head acquisition function by using a media head function pointer, and reading a first Group Of Pictures (GOP) from a content distribution network (PCDN, P2P Content Delivery Network) by using the media head acquisition function;
and analyzing the first picture group to obtain the media head information.
And then the callback interface is utilized to callback the media head information to the player module.
In this embodiment, the code for callback of the media header information to the player module by using the callback interface is implemented as follows:
Figure BDA0003282567190000071
in the above code, on_av_header is a media head function pointer, which corresponds to the typedef void (void_user_data, header_info) above.
The media head function pointer includes two parameters: the first parameter callback_data1 is a first type pointer for indicating processing the media header information, the second parameter header_info is a media header structure for storing parameter information of the audio/video stream data, and the second parameter is a media header information structure defined above.
Then, callback media header information is called back to the player module by using the callback interface, including:
based on the callback interface, callback the media head information and the data structure body for storing the parameter information of the audio and video stream data into a media head callback object by using the first type pointer; and enabling the media head callback object to initialize the audio-video decoder based on the media head information and the parameter information of the audio-video stream data.
Specifically, the decoding and rendering modes of the audio and video stream are determined by the parameter information of the audio and video stream data, and the initialization work of the audio and video encoder can be performed after the player module receives the media header information and the parameter information of the audio and video stream data.
Further, the code for the player module to process the media header information is implemented as follows:
Figure BDA0003282567190000081
the function of the HandleP2pHea derInfo parameter is mainly to initialize an audio/video decoder according to the parameter information of the audio/video stream data in the header_info.
The step is to obtain and transmit the media head information by presetting the media head structure, the data structure and the corresponding function pointer by using the function pointer and the callback interface, and the transmission time of the media head information is reduced without using local HTTP service to transfer the media head information and then to transmit the media head information.
S111, acquiring the data packet information of the audio and video stream data through a callback data function pointer, and callback the data packet information to the player module by using the callback interface.
Because the complete audio and video stream data comprises the media head information and the subsequent data information, the step also needs to acquire the data packet information of the audio and video stream data through a callback data function pointer, and the callback interface is utilized to callback the data packet information to the player module.
In an alternative embodiment, obtaining packet information of the audio-video stream data through the callback data function pointer includes:
calling a corresponding data packet acquisition function by using a data function pointer, and acquiring each piece of data from a content distribution network or a peer by using the data packet acquisition function;
and reorganizing the fragment data to form data packet information of the audio and video stream data.
And then callback the data packet information to the player module by using the callback interface.
In this embodiment, the code for callback of the packet information to the player module by using the callback interface is implemented as follows:
Figure BDA0003282567190000091
in the above codes, on_av_packet is a data function pointer, which corresponds to typedef void (void_packet_callback_t) (void_user_data, packagedata_data) above.
Two parameters are also included in the data function pointer: the first parameter callback_data2 is a second type of pointer for indicating processing of audio-video data information, the second parameter data is a data structure for storing audio-video stream data, and the second parameter is a media header information structure as defined above.
Then, callback the packet information to the player module by using the callback interface, including:
based on the callback interface, callback the audio and video data information and the audio and video stream data packet to a data callback object of the player module by using a second type pointer; causing the data callback object to decode the audio video stream data packet.
Specifically, the data structure body stores the audio and video data packets after recombination, and when the data callback object in the player module receives the audio and video stream data packets, the audio and video stream data packets can be decoded and rendered.
Further, the code for processing the audio/video stream data packet by the player module is implemented as follows:
Figure BDA0003282567190000092
Figure BDA0003282567190000101
the function of the HandleP2pData parameter is mainly that the data packet of each callback is sent to the initialized audio decoder for decoding, and the decoder decodes and then renders the data packet.
The step obtains and transmits the audio and video stream data packet information by using the function pointer and the callback interface through the preset data structure body and the corresponding function pointer, and the transmission time length of the data packet is reduced without using local HTTP service to transfer the media header information and then transmitting the media header information.
Based on the same inventive concept, this embodiment further provides an apparatus for transmitting streaming data, as shown in fig. 2, where the apparatus includes:
the first callback unit 21 acquires media head information of the audio and video stream data through callback media head function pointers, and callback the media head information to the player module through a callback interface;
the second callback unit 22 obtains the data packet information of the audio and video stream data through the callback data function pointer, and uses the callback interface to callback the data packet information to the player module.
Specifically, before media head information of audio and video stream data is obtained by calling back a media head function pointer, a structure body and a function pointer required by the transmission stream data need to be preset.
The structure of the present invention comprises: a media header information structure and a data structure; the media header information structure body mainly defines key parameter information of the audio and video stream, for example: sampling rate, number of channels, pulse code modulation (PCM, pulse Code Modulation) audio and video data storage format, video width, height, storage format, etc.;
the data structure body is mainly defined with a memory storage format of audio and video data, such as a cache address of the data in a memory, whether the data is a key frame, a data length, a data packet time stamp and other information.
Specifically, the media header information structure mainly includes: headerInfo and HeaderBase; the specific structure of the media header information structure is as follows:
Figure BDA0003282567190000102
Figure BDA0003282567190000111
the specific structure of the data structure is as follows:
Figure BDA0003282567190000112
Figure BDA0003282567190000121
the function pointer types in this embodiment also include two types: a media head function pointer and a data function pointer; wherein the media head function pointer is:
typedef void(*av_header_callback_t)(void*user_data,HeaderInfo*header_info);
the data function pointer is:
typedef void(*av_packet_callback_t)(void*user_data,PackageData*data);
after the required structural body and function pointer are determined, media head information of audio and video stream data is obtained through callback of the media head function pointer, and the media head information is callback to the player module through a callback interface.
Specifically, when the P2P module is started, the player module sends the callback interface parameter, the media head function pointer and the data function pointer to the P2P module. With continued reference to fig. 2, the apparatus further comprises: the receiving unit 23: and the device is used for receiving callback interface parameters, media head function pointers and data function pointers sent by the player module when the P2P module is started.
The code implementation is as follows:
m_dyp2p_callback.on_av_packet=dyp2p_demux_callback;
m_dyp2p_callback.on_av_header=dyp2p_header_callback;
m_dyp2p_callback.user_data=(void*)this;
dyp2p_play_channel_with_webrtc2(m_dyp2p_params,m_dyp2p_callback,m_play_url);
then, the first callback unit 21 may obtain the media header information of the audio and video stream data through the callback media header function pointer, and callback the media header information to the player module by using the callback interface.
The first callback unit 21 obtains media header information of the audio and video stream data by callback media header function pointers, including:
calling a corresponding media head acquisition function by using a media head function pointer, and reading a first Group Of Pictures (GOP) from a content distribution network (PCDN, P2P Content Delivery Network) by using the media head acquisition function;
and analyzing the first picture group to obtain the media head information.
And then the callback interface is utilized to callback the media head information to the player module.
In this embodiment, the code implementation of the first callback unit 21 for callback of the media header information to the player module by using the callback interface is as follows:
Figure BDA0003282567190000131
in the above codes, on_av_header is the media head function pointer defined above, and corresponds to typedef void (void_user_data, header_info) above.
The media head function pointer includes two parameters: the first parameter callback_data1 is a first type pointer for indicating processing the media header information, the second parameter header_info is a media header structure for storing parameter information of the audio/video stream data, and the second parameter is a media header information structure defined above.
Then, the first callback unit 21 callback the media header information to the player module using the callback interface, including:
based on the callback interface, callback the media head information and the data structure body for storing the parameter information of the audio and video stream data into a media head callback object by using the first type pointer; and enabling the media head callback object to initialize the audio-video decoder based on the media head information and the parameter information of the audio-video stream data.
Specifically, the decoding and rendering modes of the audio and video stream are determined by the parameter information of the audio and video stream data, and the initialization work of the audio and video encoder can be performed after the player module receives the media header information and the parameter information of the audio and video stream data.
Further, the code for the player module to process the media header information is implemented as follows:
Figure BDA0003282567190000141
the function of the HandleP2pHea derInfo parameter is mainly to initialize an audio/video decoder according to the parameter information of the audio/video stream data in the header_info.
The step is to obtain and transmit the media head information by presetting the media head structure, the data structure and the corresponding function pointer by using the function pointer and the callback interface, and the transmission time of the media head information is reduced without using local HTTP service to transfer the media head information and then to transmit the media head information.
Because the complete audio and video stream data includes the media header information and the subsequent data information, the second callback unit 22 in this embodiment needs to obtain the packet information of the audio and video stream data through the callback data function pointer, and uses the callback interface to callback the packet information to the player module.
The second callback unit 22 obtains packet information of the audio and video stream data through the callback data function pointer, including:
calling a corresponding data packet acquisition function by using a data function pointer, and acquiring each piece of data from a content distribution network or a peer by using the data packet acquisition function;
and reorganizing the fragment data to form data packet information of the audio and video stream data.
And then callback the data packet information to the player module by using the callback interface.
In this embodiment, the code implementation of the second callback unit 22 for callback of the packet information to the player module by using the callback interface is as follows:
Figure BDA0003282567190000142
Figure BDA0003282567190000151
in the above code, on_av_packet is the data function pointer defined above, which corresponds to typedef void (void_packet_callback_t) (void_user_data, packageData) above.
Two parameters are also included in the data function pointer: the first parameter callback_data2 is a second type of pointer for indicating processing of audio-video data information, the second parameter data is a data structure for storing audio-video stream data, and the second parameter is a media header information structure as defined above.
Then, the second callback unit 22 uses the callback interface to callback the packet information to the player module, including:
based on the callback interface, callback the audio and video data information and the audio and video stream data packet to a data callback object of the player module by using a second type pointer; causing the data callback object to decode the audio video stream data packet.
Specifically, because the audio data structure body stores the audio and video data packets after recombination, when the data callback object in the player module receives the audio and video stream data packets, decoding and rendering can be performed on the audio and video stream data packets.
Further, the code for processing the audio/video stream data packet by the player module is implemented as follows:
Figure BDA0003282567190000152
the function of the HandleP2pData parameter is mainly that the data packet of each callback is sent to the initialized audio decoder for decoding, and the decoder decodes and then renders the data packet.
The step obtains and transmits the audio and video stream data packet information by using the function pointer and the callback interface through the preset data structure body and the corresponding function pointer, and the transmission time length of the data packet is reduced without using local HTTP service to transfer the media header information and then transmitting the media header information.
Based on the same inventive concept, this embodiment provides a computer device 300, as shown in fig. 3, including a memory 310, a processor 320, and a computer program 311 stored on the memory 310 and executable on the processor 320, wherein the processor 320 implements the following steps when executing the computer program 311:
acquiring media head information of audio and video stream data through a callback media head function pointer, and callback the media head information to a player module by using a callback interface;
and acquiring the data packet information of the audio and video stream data through a callback data function pointer, and callback the data packet information to the player module by using the callback interface.
In a specific implementation, when the processor 320 executes the computer program 311, any implementation of the second embodiment may be implemented.
Since the computer device described in this embodiment is a device for implementing a method for transmitting streaming data according to the embodiment of the present application, based on the method described in the foregoing embodiment of the present application, those skilled in the art will be able to understand the specific implementation of the computer device of this embodiment and various modifications thereof, so how the method in the embodiment of the present application is implemented by the server will not be described in detail herein. The apparatus used to implement the methods of the embodiments of the present application are within the scope of what is intended to be protected by the present application.
Based on the same inventive concept, the present embodiment provides a computer-readable storage medium 400, as shown in fig. 4, having stored thereon a computer program 411, which computer program 411, when executed by a processor, realizes the steps of:
acquiring media head information of audio and video stream data through a callback media head function pointer, and callback the media head information to a player module by using a callback interface;
and acquiring the data packet information of the audio and video stream data through a callback data function pointer, and callback the data packet information to the player module by using the callback interface.
In a specific implementation, the computer program 411 may implement any of the foregoing embodiments when executed by a processor.
The invention provides a method, a device, a medium and computer equipment for transmitting stream data, which have the following beneficial effects:
the invention provides a method, a device, a medium and a computer device for transmitting stream data, wherein the method comprises the following steps: acquiring media head information of audio and video stream data through a callback media head function pointer, and callback the media head information to a player module by using a callback interface; acquiring data packet information of the audio and video stream data through a callback data function pointer, and callback the data packet information to the player module by using the callback interface; therefore, when the P2P module transmits audio and video stream data to the player module, the corresponding function pointer can be utilized to acquire the corresponding audio and video data, then the audio and video data is directly recalled to the player module through the callback interface, the local HTTP service is not required to be utilized for transfer and retransmission, the data transmission time is reduced, and the transmission efficiency of the stream data is improved.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
The above description is not intended to limit the scope of the invention, but is intended to cover any modifications, equivalents, and improvements within the spirit and principles of the invention.

Claims (7)

1. A method of transmitting streaming data, the method comprising:
acquiring media head information of audio and video stream data through a callback media head function pointer, and callback the media head information to a player module by using a callback interface;
acquiring data packet information of the audio and video stream data through a callback data function pointer, and callback the data packet information to the player module by using the callback interface; wherein, the liquid crystal display device comprises a liquid crystal display device,
the obtaining the media head information of the audio and video stream data through the callback media head function pointer comprises the following steps:
calling a corresponding media head acquisition function by using the media head function pointer, and reading a first group of pictures GOP from a content distribution network by using the media head acquisition function;
analyzing the first picture group to obtain the media head information;
the media head function pointer includes: a media head structure for indicating a first type pointer for processing the media head information and for storing parameter information of the audio/video stream data; the callback interface is utilized to callback the media header information to the player module, and the callback interface comprises:
based on the callback interface, the media head information and the media head structural body for storing the parameter information of the audio and video stream data are callback to a media head callback object by utilizing the first type pointer; the media head callback object initializes an audio-video decoder based on the media head information and the parameter information of the audio-video stream data;
the data function pointer includes: a second type pointer for indicating processing audio and video data information and a data structure for storing the audio and video stream data packet; and callback the data packet information to the player module, including:
based on the callback interface, callback the audio and video data information and the audio and video stream data packet to a data callback object of the player module by using the second type pointer; and enabling the data callback object to decode the audio and video stream data packet.
2. The method of claim 1, wherein before the obtaining the media header information of the audio-video stream data by calling back the media header function pointer, the method further comprises:
and when the P2P module is started, receiving callback interface parameters, the media head function pointer and the data function pointer which are sent by the player module.
3. The method of claim 1, wherein the obtaining the packet information of the av stream data by the callback data function pointer comprises:
calling a corresponding data packet acquisition function by using the data function pointer, and acquiring each piece of data from a content distribution network by using the data packet acquisition function;
and reorganizing the fragment data to form data packet information of the audio and video stream data.
4. An apparatus for transmitting streaming data, the apparatus comprising:
the first callback unit acquires media head information of the audio and video stream data through a callback media head function pointer, and the media head information is callback to the player module by using a callback interface;
the second callback unit acquires the data packet information of the audio and video stream data through a callback data function pointer, and the callback interface is utilized to callback the data packet information to the player module; wherein, the liquid crystal display device comprises a liquid crystal display device,
the obtaining the media head information of the audio and video stream data through the callback media head function pointer comprises the following steps:
calling a corresponding media head acquisition function by using the media head function pointer, and reading a first group of pictures GOP from a content distribution network by using the media head acquisition function;
analyzing the first picture group to obtain the media head information;
the media head function pointer includes: a media head structure for indicating a first type pointer for processing the media head information and for storing parameter information of the audio/video stream data; the callback interface is utilized to callback the media header information to the player module, and the callback interface comprises:
based on the callback interface, the media head information and the media head structural body for storing the parameter information of the audio and video stream data are callback to a media head callback object by utilizing the first type pointer; the media head callback object initializes an audio-video decoder based on the media head information and the parameter information of the audio-video stream data;
the data function pointer includes: a second type pointer for indicating processing audio and video data information and a data structure for storing the audio and video stream data packet; and callback the data packet information to the player module, including:
based on the callback interface, callback the audio and video data information and the audio and video stream data packet to a data callback object of the player module by using the second type pointer; and enabling the data callback object to decode the audio and video stream data packet.
5. The apparatus of claim 4, wherein the apparatus further comprises:
and the receiving unit is used for receiving the callback interface parameter, the media head function pointer and the data function pointer which are sent by the player module when the P2P module is started.
6. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method of any one of claims 1 to 3.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 3 when executing the program.
CN202111137373.XA 2021-09-27 2021-09-27 Method, device, medium and computer equipment for transmitting stream data Active CN113905025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111137373.XA CN113905025B (en) 2021-09-27 2021-09-27 Method, device, medium and computer equipment for transmitting stream data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111137373.XA CN113905025B (en) 2021-09-27 2021-09-27 Method, device, medium and computer equipment for transmitting stream data

Publications (2)

Publication Number Publication Date
CN113905025A CN113905025A (en) 2022-01-07
CN113905025B true CN113905025B (en) 2023-06-16

Family

ID=79029686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111137373.XA Active CN113905025B (en) 2021-09-27 2021-09-27 Method, device, medium and computer equipment for transmitting stream data

Country Status (1)

Country Link
CN (1) CN113905025B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030938A (en) * 2007-02-05 2007-09-05 北京大学 System and method for organizing and transmitting QoS self-adaptive P2P flow medium data
CN101668178A (en) * 2008-09-04 2010-03-10 杨良海 Method for realizing network streaming media unbuffered technology in electronic products
CN103595694A (en) * 2012-08-14 2014-02-19 腾讯科技(深圳)有限公司 A stream media playing method, a stream media playing system, and an internal memory server
CN106649084A (en) * 2016-09-14 2017-05-10 腾讯科技(深圳)有限公司 Function call information obtaining method and apparatus, and test device
CN111031117A (en) * 2019-12-02 2020-04-17 深圳市迅雷网络技术有限公司 Multimedia file downloading method and related device
WO2020078165A1 (en) * 2018-10-15 2020-04-23 Oppo广东移动通信有限公司 Video processing method and apparatus, electronic device, and computer-readable medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2408474A1 (en) * 2002-10-17 2004-04-17 Ibm Canada Limited-Ibm Canada Limitee Apparatus and method for enabling efficient multi-protocol database transaction processing
US20060069800A1 (en) * 2004-09-03 2006-03-30 Microsoft Corporation System and method for erasure coding of streaming media
US20080252490A1 (en) * 2007-04-10 2008-10-16 Chiluk David R Merging A Codec With A Digital Media File and Playing A Digital Media File On A Playback Device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030938A (en) * 2007-02-05 2007-09-05 北京大学 System and method for organizing and transmitting QoS self-adaptive P2P flow medium data
CN101668178A (en) * 2008-09-04 2010-03-10 杨良海 Method for realizing network streaming media unbuffered technology in electronic products
CN103595694A (en) * 2012-08-14 2014-02-19 腾讯科技(深圳)有限公司 A stream media playing method, a stream media playing system, and an internal memory server
CN106649084A (en) * 2016-09-14 2017-05-10 腾讯科技(深圳)有限公司 Function call information obtaining method and apparatus, and test device
WO2020078165A1 (en) * 2018-10-15 2020-04-23 Oppo广东移动通信有限公司 Video processing method and apparatus, electronic device, and computer-readable medium
CN111031117A (en) * 2019-12-02 2020-04-17 深圳市迅雷网络技术有限公司 Multimedia file downloading method and related device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
P2P流媒体系统多点下载技术的实现研究;蒋雪玲;;沈阳大学学报(04);全文 *
复杂系统中不可达函数调用路径检测方法研究;潘璐;牟永敏;张志华;;计算机仿真(09);全文 *
智能电视TV播放器的设计与实现;吴进强;苏凯雄;;电视技术(21);全文 *

Also Published As

Publication number Publication date
CN113905025A (en) 2022-01-07

Similar Documents

Publication Publication Date Title
CN102055717B (en) Quick playing method, terminal and server
US20160337424A1 (en) Transferring media data using a websocket subprotocol
CN102196001B (en) Movie file downloading device and method
US20180054649A1 (en) Method and device for switching video streams
CN107277081A (en) Section method for down loading and device, the stream media system of stream medium data
CN102752669B (en) The transfer processing method of multichannel real time flow medium file and system, receiving system
EP2383941A1 (en) Stream media server, client terminal and method and system for downloading stream media
US20140143437A1 (en) Converting Live Streaming Content to Video-on-Demand Streaming Content
CN108063769B (en) Method and device for realizing content service and content distribution network node
CN110870282B (en) Processing media data using file tracks of web content
TW201129040A (en) Systems, methods and apparatuses for media file streaming
CN104683884A (en) Live method and system for stream medium
WO2008061416A1 (en) A method and a system for supporting media data of various coding formats
CA2783592A1 (en) Apparatus and methods for describing and timing representations in streaming media files
WO2018014691A1 (en) Method and device for acquiring media data
Lei et al. Design and implementation of streaming media processing software based on RTMP
CN107534793B (en) Receiving apparatus, transmitting apparatus, and data processing method
WO2012151865A1 (en) Data transmission method and system
WO2018118710A1 (en) Detecting and signaling new initialization segments during manifest-file-free media streaming
CN103763588A (en) Stream forwarding method, device, server and system for video advertising insertion
CN108632642A (en) Streaming Media method for pushing and device
CN112616065A (en) Screen image initiating method and device, computer equipment, readable storage medium and screen image presenting system
CN102378001A (en) Mobile terminal supporting picture live broadcast mode, video live broadcast method thereof and system thereof
EP3099069B1 (en) Method for processing video, terminal and server
CN110996160A (en) Video processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20220107

Assignee: Yidu Lehuo Network Technology Co.,Ltd.

Assignor: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Contract record no.: X2023980041384

Denomination of invention: A method, device, medium, and computer equipment for transmitting stream data

Granted publication date: 20230616

License type: Common License

Record date: 20230908

EE01 Entry into force of recordation of patent licensing contract