Summary of the invention
To the above-mentioned defective of prior art, the interactive audio-video frequency content changing method of a kind of multi-screen is provided and supports the media player that multi-screen is interactive.
The technical scheme that technical solution problem of the present invention is adopted is following:
The audio-video frequency content changing method that a kind of multi-screen is interactive wherein, comprising:
Steps A, source device start media player at local playing audio-video, and the control information data of current institute playing audio-video is recorded in its multi-screen interactive data group of buffers module;
The multi-screen interactive data group of buffers module real-time update of step B, source device media player write down current institute playing audio-video current play position, begin to the original compression data stream of current broadcast tail and parameter and the control information that comprises current institute playing audio-video decoding needs from the last key frame of current broadcast frame;
Step C, when the needs screen switches; Source device and target device are connected; The media player of source device is the current play position of the current institute playing audio-video of record, begin to the original compression data stream of current broadcast tail and comprise that the parameter and the control information of current institute playing audio-video decoding needs generate an audio-video frequency content switch data, are transferred to the media player of target device according to the multi-screen interaction protocol from the last key frame of current broadcast frame;
The media player of step D, target device is according to the audio-video frequency content switch data that receives, and according to said current play position, begins said audio frequency and video are continued to play from the last key frame of current broadcast frame.
The audio-video frequency content changing method that said multi-screen is interactive wherein, also comprises before the said steps A: step a, in advance the address that needs carry out with source device the interactive a plurality of target devices of multi-screen is set, and is stored in the multi-screen interactive data group of buffers module of source device.
The audio-video frequency content changing method that said multi-screen is interactive, wherein, said step a also comprises: the address of said a plurality of target devices comprises the address of the target device of a default setting at least.
The audio-video frequency content changing method that said multi-screen is interactive; Wherein, the parameter that needs of said current institute playing audio-video decoding comprises: the stream media protocol of the audio compression form of current playing media, data sampling rate, sampled data position, video compression format, video resolution, video frame rate, support and version number and file size.
The audio-video frequency content changing method that said multi-screen is interactive, wherein, the address of said target device comprises destination device ID and IP address list.
The audio-video frequency content changing method that said multi-screen is interactive, wherein, said step C also comprises: said source device connects through multi-screen interactive communication module and target device.
A kind of media player of supporting that multi-screen is interactive comprises:
Be used for media formats resolver that the form of the media file play is resolved;
Be used to receive the stream media protocol stack module of the media file of network;
Be used for carrying out the audio/video decoder of audio/video decoding to carrying out media file behind the format analysis;
The audio frequency and video that are used for the decoded media file of decompress(ion) output audio/video decoder are play the decompress(ion) video output module of demonstration to display;
Be used for human-computer interaction module that media player is controled;
Said audio/video decoder is connected with said media formats resolver, stream media protocol stack module, human-computer interaction module respectively;
Wherein, said media player also comprises: the multi-screen interactive data group of buffers module that is connected with said media formats resolver, stream media protocol stack module, audio/video decoder, human-computer interaction module respectively; And
The multi-screen interactive communication module that is connected with multi-screen interactive data group of buffers module, human-computer interaction module respectively;
Said multi-screen interactive data group of buffers module is used for current play position that real-time update writes down current institute playing audio-video, begins to the original compression data stream of current broadcast tail and parameter and the control information that comprises current institute playing audio-video decoding needs from the last key frame of current broadcast frame;
Said multi-screen interactive communication module is used for getting into that screen switches or simultaneously during broadcast state at media player; The current play position of the current institute playing audio-video of said multi-screen interactive data group of buffers module records, begin to generate an audio-video frequency content switch data to the original compression data stream of current broadcast tail and the parameter and the control information of current institute playing audio-video decoding needs from the last key frame of current broadcast frame; Be transferred to the media player of target device according to the multi-screen interaction protocol, to carry out the broadcast after screen switches.
The media player that described support multi-screen is interactive, wherein, said multi-screen interactive data group of buffers module also is used to write down the configuration information from the human-computer interaction module input, comprises the ID and the IP address list of target device; And be used to preserve the player current working state: be that this machine sowing is put, switch and play, still play simultaneously.
The media player that described support multi-screen is interactive; Wherein, Said multi-screen interactive data group of buffers module also is used to write down the form from the current playing media of media formats resolver and stream media protocol stack module, comprising: the stream media protocol of audio compression form, data sampling rate, sampled data position, video compression format, video resolution, video frame rate, support and version number and file size.
Audio-video frequency content changing method that multi-screen provided by the present invention is interactive and the interactive media player of support multi-screen; Owing to adopted and noted the medium next frame packed data of the media formats of the current broadcast of media player of source device, current broadcast and current play position; When the needs screen switches; The media player of source device is gone out these data forwarding, is transferred to the media player of target device, so just can seamlessly switch; Can also continue the broadcast of remote-control target equipment on source device and switch back source device once more to continue to play; And transmission is exactly packed data originally, neither needs source device to compress again, does not also need the very big network bandwidth.The method of the application of the invention; Under the disposal ability that keeps original smart mobile phone, panel computer; Under existing 10M/100M home network bandwidth environment, can realize at low cost that the multi-screen of audio frequency and video is interactive, comprise that high definition is interactive; And the user is arbitrarily switched or is play simultaneously and can accomplish seamless continual experience.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, clear and definite, below develop simultaneously embodiment to further explain of the present invention with reference to accompanying drawing.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
A kind of media player 100 of supporting that multi-screen is interactive that the embodiment of the invention provides; As shown in Figure 1, mainly comprise: media formats resolver 110, stream media protocol stack module 120, audio/video decoder 130, human-computer interaction module 140, decompress(ion) video output module 150.
Said media formats resolver 110 is connected with said audio/video decoder 130, is mainly used in the form of the media file (like the local media file) play is resolved.
Said stream media protocol stack module 120 is connected with said audio/video decoder 130, is mainly used in reception from network of network data (like files in stream media).
The media file that said audio/video decoder 130 is mainly used in carrying out behind the format analysis carries out audio/video decoding.
Said human-computer interaction module 140 is connected with said audio/video decoder 130, and the media player 100 that is mainly used in present embodiment controls.
Decompress(ion) video output module 150 is connected with said audio/video decoder 130, and the audio frequency and video that are mainly used in decompress(ion) output audio/video decoder 130 decoded media files are play demonstration to display 200.
Wherein, as shown in Figure 1, it also comprises the interactive media player of the support multi-screen of present embodiment 100:
The multi-screen interactive data group of buffers module 160 that is connected with said media formats resolver 110, stream media protocol stack module 120, audio/video decoder 130, human-computer interaction module 140 respectively; And
The multi-screen interactive communication module 170 that is connected with multi-screen interactive data group of buffers module 160, human-computer interaction module 140 respectively.
Wherein, said multi-screen interactive data group of buffers module 160 is used for current play position that real-time update writes down current institute playing audio-video, from the last key frame of current broadcast frame (for example: the I frame of MPEG) begin original compression data stream and current institute playing media file decoding parameters needed and control information to current broadcast tail.
Said multi-screen interactive communication module 170 is used for getting into that screens switch or simultaneously during broadcast state at media player 100; The current play position of the current institute playing audio-video of said multi-screen interactive data group of buffers module 160 records, begin to the original compression data stream of current broadcast tail and comprise that the parameter and the control information of current institute playing audio-video decoding needs generate an audio-video frequency content switch data from the last key frame of current broadcast frame; Be transferred to the media player of target device according to the multi-screen interaction protocol, to carry out the broadcast after screen switches.
The media player 100 that described support multi-screen is interactive, wherein, said multi-screen interactive data group of buffers module 160 also is used to write down the configuration information from human-computer interaction module 140 inputs, comprises the ID and the IP address list of target device; And be used to preserve the player current working state: be that this machine sowing is put, switch and play, still play simultaneously.
Further; Said multi-screen interactive data group of buffers module 160 also is used to write down the form from the current playing media file of media formats resolver 110 and stream media protocol stack module 120, comprising: the stream media protocol of audio compression form, data sampling rate, sampled data position, video compression format, video resolution, video frame rate, support and version number and file size.
The interactive media player 100 of support multi-screen that is the embodiment of the invention needs the critical data of storage following in multi-screen interactive data group of buffers module 160:
1), from up-to-date frame intra-frame compression data frame (the key frame I frame of the current playing audio-video of audio/video decoder 130; First frame (start frame) that is every segment Streaming Media in the present embodiment is the I frame) data; And all Frames subsequently; Up to running into next frame I frame data, all Frames that then will cushion in the past empty, and begin buffering from the I frame again.
2), record is from the configuration information of human-computer interaction module 140 input, comprises the ID and the IP address list of target device; And preserve player current working state information: comprise it being that this machine sowing is put, switch and play, still play simultaneously.
3), from the form of the current playing media file of media formats resolver 110 or stream media protocol stack module 120, comprising: the stream media protocol of audio compression form, data sampling rate, sampled data position, video compression format, video resolution, video frame rate, support and version number and file size.
The media player 100 that the support multi-screen of the embodiment of the invention is interactive; In the specific implementation; With reference to shown in Figure 1, on media formats resolver 110, stream media protocol stack module 120, audio/video decoder 130 and human-computer interaction module 140, increase the interface that is connected with multi-screen interactive data group of buffers module 160; And on human-computer interaction module 140, also to increase the interface that is connected with multi-screen interactive communication module 170.
Further; The media player 100 that the support multi-screen of the embodiment of the invention is interactive; Need in human-computer interaction module 140, increase " multi-screen interactive " combination button, through its directly " affirmation " switch to default target equipment, also can drop-down selection or import target device.
When the user starts said media player 100 playing media files; Media player 100 is at first at local playing media file; Each module of media player 100 is sent the phase related control information automatically and is given multi-screen interactive data group of buffers module 160, and multi-screen interactive data group of buffers module 160 also cushions has last I frame data afterwards recently.
When button switched, said media player 100 at first was connected with the first default target equipment when the user clicks " multi-screen is interactive ", got nowhere just to connect next default target equipment, or connected the target device of user's appointment.In case successful connection; Multi-screen interactive communication module 170 is just initiatively obtained the audio-video frequency content switch data from multi-screen interactive data group of buffers module 160; And send to target device with the network data form according to the multi-screen interaction protocol, wherein this audio-video frequency content switch data comprises all parameters, control information of media decodes needs and the original compression data stream of the media file that begins from a last I frame.
The media player 100 that the support multi-screen of the embodiment of the invention is interactive; Screen switches or the while broadcast state in case get into; Audio/video decoder 130 just sends to multi-screen interactive data group of buffers module 160 to the data of its input simultaneously, up to stopping to play or getting back to this machine sowing mode playback.
The media player 100 that the support multi-screen of the embodiment of the invention is interactive; Can be used in the player in smart mobile phone, panel computer and the intelligent television; Media player 100 of the present invention is on the basis of original media player, to increase two modules newly: multi-screen interactive data group of buffers module 160 and multi-screen interactive communication module 170; Make the interactive media player 100 of support multi-screen of the embodiment of the invention; Both supported original media play function, supported again that the multi-screen switching was play or multi-screen is play simultaneously, and can also continue the broadcast of remote-control target equipment on source device and switch back source device once more to continue to play.This shows that the media player 100 that the support multi-screen of the embodiment of the invention is interactive can realize that neatly multi-screen is interactive at each equipment room, can seamlessly carry out the audio frequency and video picture and switch, and it is low to take the network bandwidth, provides users with the convenient.
Based on the interactive media player 100 of above-mentioned support multi-screen, the embodiment of the invention also provides a kind of multi-screen interactive audio-video frequency content changing method, and is as shown in Figure 2, mainly may further comprise the steps:
In step S110, source device starts media player at local playing audio-video, and the control information data that will play current audio frequency and video is recorded in its multi-screen interactive data group of buffers module.
In step S120, the multi-screen interactive data group of buffers module real-time update of source device media player write down current institute playing audio-video current play position, begin original compression data stream and current institute playing audio-video decoding parameters needed and control information from the last key frame of current broadcast frame to current broadcast tail.
In step S130; When the needs screen switches; Source device and target device are connected; And the current play position of the current institute playing audio-video of the player of source device record, begin to generate an audio-video frequency content switch data, be transferred to the media player of target device according to the multi-screen interaction protocol to the original compression data stream of current broadcast tail and current institute playing audio-video media file decoding parameters needed and control information from the last key frame of current broadcast frame.
In step S140, the media player of target device is according to the audio-video frequency content switch data that receives, according to said current play position, begins said audio frequency and video are continued to play from the last key frame of current broadcast frame.
Preferably; In the audio-video frequency content changing method of this multi-screen interaction; Before said step S110, also can comprise step: the address that needs to carry out with source device the interactive a plurality of target devices of multi-screen is set in advance, and is stored in the multi-screen interactive data group of buffers module of source device.Wherein, the address of said a plurality of target devices comprises the address of the target device of a default setting at least, and the address of said target device comprises target device ID and IP address list.
Preferably; In step S130; Said current institute playing media file decoding parameters needed can comprise: the stream media protocol of the audio compression form of current playing media, data sampling rate, sampled data position, video compression format, video resolution, video frame rate, support and version number, file size, current broadcast relative position.
Wherein, said step S130 also comprises: said source device connects through multi-screen interactive communication module and target device.
In sum; Audio-video frequency content changing method that multi-screen provided by the present invention is interactive and the interactive media player of support multi-screen; Because adopted and noted the medium next frame packed data of the media formats of the current broadcast of media player of source device, current broadcast, current play position, when the needs screen switched, the player of source device was gone out these data forwarding; Be transferred to the media player of destination device; So just can seamlessly switch, and transmission is exactly packed data originally, neither needs source device to compress, also do not need the very big network bandwidth again.
Should be understood that application of the present invention is not limited to above-mentioned giving an example, concerning those of ordinary skills, can improve or conversion that all these improvement and conversion all should belong to the protection range of accompanying claims of the present invention according to above-mentioned explanation.