CN113905025A - 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
CN113905025A
CN113905025A CN202111137373.XA CN202111137373A CN113905025A CN 113905025 A CN113905025 A CN 113905025A CN 202111137373 A CN202111137373 A CN 202111137373A CN 113905025 A CN113905025 A CN 113905025A
Authority
CN
China
Prior art keywords
data
audio
information
media
callback
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.)
Granted
Application number
CN202111137373.XA
Other languages
Chinese (zh)
Other versions
CN113905025B (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 computer equipment for transmitting stream data, wherein the method comprises the following steps: media header information of audio and video stream data is obtained by calling back a media header function pointer, and the media header information is called back to a player module by using a calling back interface; acquiring data packet information of the audio and video streaming data through a callback data function pointer, and calling back the data packet information to the player module by using the callback interface; therefore, when the P2P module transmits audio/video streaming data to the player module, the corresponding audio/video data can be acquired by using the corresponding function pointer, and then the audio/video data is directly called back to the player module through the call-back interface without being forwarded and transmitted by using a local HTTP service, so that the data transmission duration 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
Currently, the introduction of P2P technology into streaming has resulted in P2P streaming, which has two advantages. First, this technology does not require the support of internet routers and network infrastructure, and is therefore cost effective and easy to deploy; second, in this technique, a streaming user not only downloads a media stream but also uploads the media stream to other users, and thus, this method can expand the size of a user group.
In the prior art, a player includes a P2P module and a player module, and when data is transferred between the P2P module and the player module, data transmission is generally performed in a local HyperText Transfer Protocol (HTTP) proxy manner, but this manner requires forwarding and sending through a local HTTP service, which takes a long time for data transmission, resulting in low streaming data transmission efficiency.
Disclosure of Invention
To solve the problems in the prior art, embodiments of the present invention provide a method, an apparatus, a medium, and a computer device for transmitting streaming data, so as to solve the technical problem in the prior art that when a P2P module transmits streaming data to a player module, the transmission efficiency is low.
In a first aspect, the present invention provides a method of transmitting stream data, the method comprising:
media header information of audio and video stream data is obtained by calling back a media header function pointer, and the media header information is called back to a player module by using a calling back interface;
and acquiring data packet information of the audio and video streaming data through a callback data function pointer, and calling back the data packet information to the player module by using the callback interface.
In the above scheme, before the media header information of the audio/video stream data is obtained by recalling the media header function pointer, the method further includes:
when the P2P module is started, the callback interface parameters, the media head function pointer and the data function pointer sent by the player module are received.
In the above scheme, the obtaining of the media header information of the audio/video stream data by recalling the media header function pointer includes:
calling a corresponding media head acquisition function by using the media head function pointer, and reading a first picture group GOP from a content distribution network by using the media head acquisition function;
and analyzing the first picture group to obtain the media header information.
In the above scheme, the obtaining of the data packet information of the audio/video stream data by calling back the data function pointer includes:
calling a corresponding data packet acquisition function by using the data function pointer, and acquiring each fragment data from a content distribution network by using the data packet acquisition function;
and recombining each piece of sliced data to form data packet information of the audio and video stream data.
In the above solution, the media head function pointer includes: the first type of pointer is used for indicating and processing the media head information, and the media head structure is used for storing parameter information of the audio and video stream data; the calling back the media header information to the player module by using the calling back interface comprises the following steps:
based on the callback interface, the media head information and the media head structure used for storing the parameter information of the audio and video stream data are called back to a media head callback object by the first type of 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 solution, the data function pointer includes: the second type of pointer is used for indicating to process audio and video data information, and the data structure body is used for storing the audio and video stream data packet; the calling back the packet information to the player module includes:
based on the callback interface, the audio and video data information and the audio and video streaming data packet are called back 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 streaming data packet.
In a second aspect, the present invention provides an apparatus for transmitting streaming data, the apparatus comprising:
the first callback unit acquires the media header information of the audio and video stream data by calling back the media header function pointer, and calls back the media header information to the player module by using a callback interface;
and the second callback unit acquires the data packet information of the audio and video streaming data through a callback data function pointer and callbacks the data packet information to the player module by using the callback interface.
In the above scheme, the apparatus further comprises:
a receiving unit, configured to receive the callback interface parameter, the media header function pointer, and the data function pointer sent by the player module when the P2P module is started.
In a third aspect, the invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of the first aspects.
In a fourth aspect, the present 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 computer equipment for transmitting stream data, wherein the method comprises the following steps: media header information of audio and video stream data is obtained by calling back a media header function pointer, and the media header information is called back to a player module by using a calling back interface; acquiring data packet information of the audio and video streaming data through a callback data function pointer, and calling back the data packet information to the player module by using the callback interface; therefore, when the P2P module transmits audio/video streaming data to the player module, the corresponding audio/video data can be acquired by using the corresponding function pointer, and then the audio/video data is directly called back to the player module through the call-back interface without being forwarded and transmitted by using a local HTTP service, so that the data transmission duration 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 refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flow chart of a method for transmitting streaming data according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for transmitting streaming data according to an embodiment of the present invention;
FIG. 3 is a schematic structural 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 the stream data.
In order to better understand the technical solutions, the technical solutions of the embodiments of the present specification are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features of the embodiments and embodiments of the present specification are detailed descriptions of the technical solutions of the embodiments of the present specification, and are not limitations of the technical solutions of the present specification, and the technical features of the embodiments and embodiments of the present specification may be combined with each other without conflict.
The present embodiment provides a method for transmitting stream data, as shown in fig. 1, the method includes:
s110, media header information of audio and video stream data is obtained by calling back a media header function pointer, and the media header information is called back to a player module by using a call-back interface;
in this step, before media header information of audio/video stream data is acquired by calling back the media header function pointer, a structure and a function pointer required for transmitting the stream data need to be preset.
The structure of the present invention includes: a media header information structure and a data structure; the media header information structure mainly defines key parameter information of audio and video streams, such as: sampling rate, channel number, Pulse Code Modulation (PCM) audio and video data storage format, video width, height, storage format and the like;
the data structure mainly defines the memory storage format of the audio and video data, such as the information of the cache address of the data in the memory, whether the data is a key frame, the data length, the data packet timestamp and the like.
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 pointers are:
typedef void(*av_packet_callback_t)(void*user_data,PackageData*data);
after the needed structure body and the function pointer are determined, the media head information of the audio and video stream data is obtained by calling back the media head function pointer, and the media head information is called back to the player module by using the call-back interface.
Specifically, when the player module starts the P2P module, the method sends a callback interface parameter, a media header function pointer, and a data function pointer to the P2P module, that is, before media header information of the audio/video stream data is acquired by calling back the media header function pointer, the method further includes:
when the P2P module is started, the callback interface parameters, the media header function pointer and the data function pointer sent by the player module are received.
The code is implemented 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 P2P module may obtain the media header information of the audio/video stream data by calling back the media header function pointer, and call back the media header information to the player module by using the call-back interface.
In an optional embodiment, the obtaining media header information of the audio/video stream data by recalling the 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 media header information.
And then, the media header information is called back to the player module by using the call-back interface.
In this embodiment, the code for calling back the media header information to the player module by using the call-back interface is implemented as follows:
Figure BDA0003282567190000071
in the above codes, the on _ av _ header is a media header function pointer, which corresponds to typedef void (, av _ header _ callback _ t) (void: _ user _ data, header info _ header _ info) of the above text.
The media head function pointer includes two parameters: user _ data1 is a first type of pointer for indicating processing of the media header information, a second parameter header _ info is a media header structure for storing parameter information of the audio/video stream data, and the second parameter is also the media header information structure defined above.
Then, the media header information is called back to the player module by using a call-back interface, which includes:
based on a callback interface, the media head information and a data structure body used for storing parameter information of audio and video stream data are recalled to a media head callback object by using a first type of pointer; and the media head callback object initializes the audio/video decoder based on the media head information and the parameter information of the audio/video stream data.
Specifically, because the parameter information of the audio/video stream data determines the decoding and rendering modes of the audio/video stream, and the media header information, when the player module receives the media header information and the parameter information of the audio/video stream data, the player module can perform initialization work of the audio/video encoder.
Further, the code that the player module processes the media header information is implemented as follows:
Figure BDA0003282567190000081
the function of the Handlep2pHeaderInfo parameter is mainly to initialize the audio/video decoder according to the parameter information of the audio/video stream data in the header _ info.
The media header information is acquired and transmitted by the function pointer and the callback interface through presetting the media header structure body, the data structure body and the corresponding function pointer, and the media header information is not required to be transmitted after being transferred and stored by using a local HTTP service, so that the transmission time of the media header information is shortened.
And S111, obtaining data packet information of the audio and video streaming data through a callback data function pointer, and calling back the data packet information to the player module by using the callback interface.
Since the complete audio/video stream data includes the media header information and the subsequent data information, the data packet information of the audio/video stream data is acquired by calling back the data function pointer in this step, and the data packet information is called back to the player module by using the call-back interface.
In an optional embodiment, obtaining packet information of the audio/video stream data by calling back the data function pointer includes:
calling a corresponding data packet acquisition function by using a data function pointer, and acquiring each fragment data from a content distribution network or a peer by using the data packet acquisition function;
and recombining the fragment data to form data packet information of the audio and video stream data.
And then, the data packet information is called back to the player module by using the call-back interface.
In this embodiment, the code for calling back the packet information to the player module by using the callback interface is implemented as follows:
Figure BDA0003282567190000091
in the above code, on _ av _ packet is a data function pointer, and corresponds to typedef void (, av _ packet _ callback _ t) (void: _ user _ data, PackageData _ data) in the above text.
Two parameters are also included in the data function pointer: user _ data2 is a second type pointer for indicating processing of audio/video data information, a second parameter data is a data structure for storing audio/video stream data, and the second parameter is also a media header information structure defined above.
Then, the data packet information is called back to the player module by using a callback interface, including:
based on a callback interface, the audio and video data information and the audio and video streaming data packet are called back to a data callback object of the player module by using a second type pointer; and the data callback object decodes the audio/video streaming data packet.
Specifically, the reconstructed audio/video data packet is stored in the data structure, and when the data callback object in the player module receives the audio/video stream data packet, the audio/video stream data packet 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 to send the data packet of each callback to the initialized audio decoder for decoding, and the decoder decodes and renders the data packet.
In the step, the audio and video stream data packet information is acquired and transmitted by using the function pointer and the callback interface through the preset data structure body and the corresponding function pointer, and the audio and video stream data packet information is transmitted without using the local HTTP service after the media head information is transferred and stored, so that the transmission time of the data packet is shortened.
Based on the same inventive concept, the present embodiment further provides an apparatus for transmitting streaming data, as shown in fig. 2, the apparatus includes:
the first callback unit 21 obtains the media header information of the audio/video stream data by calling back the media header function pointer, and calls back the media header information to the player module by using the callback interface;
the second callback unit 22 obtains the packet information of the audio/video stream data by calling back the data function pointer, and calls back the packet information to the player module by using the callback interface.
Specifically, before media header information of audio/video stream data is acquired by calling back a media header function pointer, a structural body and a function pointer required for transmitting the stream data need to be preset.
The structure of the present invention includes: a media header information structure and a data structure; the media header information structure mainly defines key parameter information of audio and video streams, such as: sampling rate, channel number, Pulse Code Modulation (PCM) audio and video data storage format, video width, height, storage format and the like;
the data structure mainly defines the memory storage format of the audio and video data, such as the information of the cache address of the data in the memory, whether the data is a key frame, the data length, the data packet timestamp and the like.
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 pointers are:
typedef void(*av_packet_callback_t)(void*user_data,PackageData*data);
after the needed structure body and the function pointer are determined, the media head information of the audio and video stream data is obtained by calling back the media head function pointer, and the media head information is called back to the player module by using the call-back interface.
Specifically, when the P2P module is started, the player module sends the callback interface parameters, the media header function pointer and the data function pointer to the P2P module. Then, with continued reference to fig. 2, the apparatus further comprises: the receiving unit 23: and the callback interface parameter, the media head function pointer and the data function pointer are used for receiving the callback interface parameter, the media head function pointer and the data function pointer sent by the player module when the P2P module is started.
The code is implemented 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/video stream data by calling back the media header function pointer, and call back the media header information to the player module by using the callback interface.
The first callback unit 21 obtains the media header information of the audio/video stream data by callback the media header function pointer, 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 media header information.
And then, the media header information is called back to the player module by using the call-back interface.
In this embodiment, the code for the first callback unit 21 to call back the media header information to the player module by using the callback interface is implemented as follows:
Figure BDA0003282567190000131
in the above codes, the on _ av _ header is the media head function pointer defined in the above text, and corresponds to typedef void (, av _ header _ callback _ t) (void _ user _ data, header info _ header _ info) in the above text.
The media head function pointer includes two parameters: user _ data1 is a first type of pointer for indicating processing of the media header information, a second parameter header _ info is a media header structure for storing parameter information of the audio/video stream data, and the second parameter is also the media header information structure defined above.
Then, the first callback unit 21 callbacks the media header information to the player module by using a callback interface, including:
based on a callback interface, the media head information and a data structure body used for storing parameter information of audio and video stream data are recalled to a media head callback object by using a first type of pointer; and the media head callback object initializes the audio/video decoder based on the media head information and the parameter information of the audio/video stream data.
Specifically, because the parameter information of the audio/video stream data determines the decoding and rendering modes of the audio/video stream, and the media header information, when the player module receives the media header information and the parameter information of the audio/video stream data, the player module can perform initialization work of the audio/video encoder.
Further, the code that the player module processes the media header information is implemented as follows:
Figure BDA0003282567190000141
the function of the Handlep2pHeaderInfo parameter is mainly to initialize the audio/video decoder according to the parameter information of the audio/video stream data in the header _ info.
The media header information is acquired and transmitted by the function pointer and the callback interface through presetting the media header structure body, the data structure body and the corresponding function pointer, and the media header information is not required to be transmitted after being transferred and stored by using a local HTTP service, so that the transmission time of the media header information is shortened.
Since the complete audio/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/video stream data by calling back the data function pointer, and call back the packet information to the player module by using the callback interface.
The second callback unit 22 obtains the data packet information of the audio/video stream data by calling back the data function pointer, including:
calling a corresponding data packet acquisition function by using a data function pointer, and acquiring each fragment data from a content distribution network or a peer by using the data packet acquisition function;
and recombining the fragment data to form data packet information of the audio and video stream data.
And then, the data packet information is called back to the player module by using the call-back interface.
In this embodiment, the code for the second callback unit 22 to call back the packet information to the player module by using the callback interface is implemented as follows:
Figure BDA0003282567190000142
Figure BDA0003282567190000151
in the above codes, on _ av _ packet is the data function pointer defined in the above text, and is equivalent to typedef void (, av _ packet _ callback _ t) (void: _ user _ data, PackageData _ data) in the above text.
Two parameters are also included in the data function pointer: user _ data2 is a second type pointer for indicating processing of audio/video data information, a second parameter data is a data structure for storing audio/video stream data, and the second parameter is also a media header information structure defined above.
Then, the second callback unit 22 uses the callback interface to call back the packet information to the player module, including:
based on a callback interface, the audio and video data information and the audio and video streaming data packet are called back to a data callback object of the player module by using a second type pointer; and the data callback object decodes the audio/video streaming data packet.
Specifically, because the audio/video data structure stores the recombined audio/video data packet, when the data callback object in the player module receives the audio/video stream data packet, the audio/video stream data packet 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 BDA0003282567190000152
the function of the HandlEP2pData parameter is mainly to send the data packet of each callback to the initialized audio decoder for decoding, and the decoder decodes and renders the data packet.
In the step, the audio and video stream data packet information is acquired and transmitted by using the function pointer and the callback interface through the preset data structure body and the corresponding function pointer, and the audio and video stream data packet information is transmitted without using the local HTTP service after the media head information is transferred and stored, so that the transmission time of the data packet is shortened.
Based on the same inventive concept, the present embodiment provides a computer apparatus 300, as shown in fig. 3, including a memory 310, a processor 320, and a computer program 311 stored on the memory 310 and operable on the processor 320, wherein the processor 320 executes the computer program 311 to implement the following steps:
media header information of audio and video stream data is obtained by calling back a media header function pointer, and the media header information is called back to a player module by using a calling back interface;
and acquiring data packet information of the audio and video streaming data through a callback data function pointer, and calling back 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 of the second embodiment may be implemented.
Since the computer device described in this embodiment is a device used for implementing the method for transmitting stream data according to this embodiment, based on the method described in the foregoing embodiment of this application, a person skilled in the art can understand the specific implementation of the computer device of this embodiment and various variations thereof, and therefore, how to implement the method in this embodiment by the server is not described in detail here. The equipment used by those skilled in the art to implement the methods in the embodiments of the present application is within the scope of the present application.
Based on the same inventive concept, the present embodiment provides a computer-readable storage medium 400, as shown in fig. 4, on which a computer program 411 is stored, the computer program 411 implementing the following steps when being executed by a processor:
media header information of audio and video stream data is obtained by calling back a media header function pointer, and the media header information is called back to a player module by using a calling back interface;
and acquiring data packet information of the audio and video streaming data through a callback data function pointer, and calling back 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 a computer device for transmitting stream data, which can bring at least the following beneficial effects:
the invention provides a method, a device, a medium and computer equipment for transmitting stream data, wherein the method comprises the following steps: media header information of audio and video stream data is obtained by calling back a media header function pointer, and the media header information is called back to a player module by using a calling back interface; acquiring data packet information of the audio and video streaming data through a callback data function pointer, and calling back the data packet information to the player module by using the callback interface; therefore, when the P2P module transmits the audio/video streaming data to the player module, the corresponding audio/video data can be acquired by using the corresponding function pointer, and then the audio/video data is directly called back to the player module through the call-back interface without being forwarded and transmitted by using a local HTTP service, so that the data transmission duration is reduced, and the streaming data transmission efficiency is improved.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 the 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. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (10)

1. A method of transmitting stream data, the method comprising:
media header information of audio and video stream data is obtained by calling back a media header function pointer, and the media header information is called back to a player module by using a calling back interface;
and acquiring data packet information of the audio and video streaming data through a callback data function pointer, and calling back the data packet information to the player module by using the callback interface.
2. The method as claimed in claim 1, wherein before the obtaining of the media header information of the audio/video stream data by calling back the media header function pointer, the method further comprises:
when the P2P module is started, the callback interface parameters, the media head function pointer and the data function pointer sent by the player module are received.
3. The method as claimed in claim 1, wherein said obtaining media header information of the audio/video stream data by calling back the media header function pointer comprises:
calling a corresponding media head acquisition function by using the media head function pointer, and reading a first picture group GOP from a content distribution network by using the media head acquisition function;
and analyzing the first picture group to obtain the media header information.
4. The method of claim 1, wherein the obtaining of the packet information of the audio/video stream data by calling back the data function pointer comprises:
calling a corresponding data packet acquisition function by using the data function pointer, and acquiring each fragment data from a content distribution network by using the data packet acquisition function;
and recombining each piece of sliced data to form data packet information of the audio and video stream data.
5. The method of claim 1, wherein the media head function pointer comprises: the first type of pointer is used for indicating and processing the media head information, and the media head structure is used for storing parameter information of the audio and video stream data; the calling back the media header information to the player module by using the calling back interface comprises the following steps:
based on the callback interface, the media head information and the media head structure used for storing the parameter information of the audio and video stream data are called back to a media head callback object by the first type of 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.
6. The method of claim 1, wherein the data function pointer comprises: the second type of pointer is used for indicating to process audio and video data information, and the data structure body is used for storing the audio and video stream data packet; the calling back the packet information to the player module includes:
based on the callback interface, the audio and video data information and the audio and video streaming data packet are called back 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 streaming data packet.
7. An apparatus for transmitting stream data, the apparatus comprising:
the first callback unit acquires the media header information of the audio and video stream data by calling back the media header function pointer, and calls back the media header information to the player module by using a callback interface;
and the second callback unit acquires the data packet information of the audio and video streaming data through a callback data function pointer and callbacks the data packet information to the player module by using the callback interface.
8. The apparatus of claim 7, wherein the apparatus further comprises:
a receiving unit, configured to receive the callback interface parameter, the media header function pointer, and the data function pointer sent by the player module when the P2P module is started.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 6.
10. 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 6 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 true CN113905025A (en) 2022-01-07
CN113905025B 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 (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078377A1 (en) * 2002-10-17 2004-04-22 International Business Machines Corporation System 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
CN101030938A (en) * 2007-02-05 2007-09-05 北京大学 System and method for organizing and transmitting QoS self-adaptive P2P flow medium data
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
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

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078377A1 (en) * 2002-10-17 2004-04-22 International Business Machines Corporation System 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
CN101030938A (en) * 2007-02-05 2007-09-05 北京大学 System and method for organizing and transmitting QoS self-adaptive P2P flow medium data
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
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
吴进强;苏凯雄;: "智能电视TV播放器的设计与实现", 电视技术 *
潘璐;牟永敏;张志华;: "复杂系统中不可达函数调用路径检测方法研究", 计算机仿真 *
蒋雪玲;: "P2P流媒体系统多点下载技术的实现研究", 沈阳大学学报 *

Also Published As

Publication number Publication date
CN113905025B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
JP6981257B2 (en) Information processing equipment and information processing method
EP3056014B1 (en) Method and apparatus for content delivery
EP3114845A1 (en) Systems and methods for media format substitution
WO2016182844A1 (en) Transferring media data using a websocket subprotocol
CN107277081A (en) Section method for down loading and device, the stream media system of stream medium data
US20140032777A1 (en) Method, apparatus, and system for transmitting and processing media content
CN105451071B (en) Video stream processing method, device and system
JP6563424B2 (en) Stream media data transmission method, client and server
WO2008061416A1 (en) A method and a system for supporting media data of various coding formats
EP3734927A1 (en) Content service implementation method and device, and content delivery network node
CN105828096B (en) Method and device for processing media stream file
WO2012151865A1 (en) Data transmission method and system
US20180176278A1 (en) Detecting and signaling new initialization segments during manifest-file-free media streaming
CN108476332B (en) Client, server, receiving method and sending method
CN112616065B (en) Screen image initiating method, device and system and readable storage medium
CN113824925A (en) WEB plug-in-free video monitoring system and method
CN109151614B (en) Method and device for reducing HLS live broadcast delay
CN113938470A (en) Method and device for playing RTSP data source by browser and streaming media server
WO2017071428A1 (en) Fast forward/rewind processing method and terminal
CN110113298A (en) Data transmission method, device, signal server and computer-readable medium
CN112866727B (en) Streaming media live broadcast method and system capable of receiving third party push stream
JP4544029B2 (en) Portable terminal, streaming communication system, streaming communication method, and streaming communication program
WO2019007027A1 (en) Video playing method and system, electronic device and readable storage medium
CN111818361A (en) Method for controlling streaming media service interaction, WEB client device and system
CN112203105A (en) New media mobile live broadcasting method and system

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
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