Summary of the invention
Provide a kind of method and apparatus supporting online broadcasting in the embodiment of the present invention, the limitation of the memory capacity of foreign aid's equipment can be overcome, meet the massive demand of user to Media Stream.
In order to solve the problems of the technologies described above, the embodiment of the invention discloses following technical scheme:
First aspect, provides a kind of and supports the online method play, comprising:
The request of the first media file play by receiving terminal;
Judge whether described first media file is virtual file according to the descriptor of described first media file;
If so, the network address that described first media file of pre-stored is corresponding is then obtained;
Set up network to connect;
The second media file corresponding to described first media file is downloaded according to the described network address;
Described second media file downloaded is transferred to described terminal, to make the second media file downloaded described in described terminal plays.
In conjunction with above-mentioned first aspect, in the implementation that the first is possible, described described second media file downloaded is transferred to described terminal, comprising:
While described second media file of download, described second media file synchronization downloaded is transferred to described terminal.
In conjunction with above-mentioned first aspect, and/or the first possible implementation, in the implementation that the second is possible, described described second media file downloaded is transferred to described terminal, comprising:
Described the second media file downloaded is carried out buffer memory;
When the data volume of the second media file downloaded described in buffer memory reaches threshold value, the second media file downloaded described in buffer memory is transferred to described terminal.
In conjunction with above-mentioned first aspect, and/or the first possible implementation, and/or the implementation that the second is possible, in the implementation that the third is possible, described the second media file downloaded described in buffer memory is transferred to described terminal after, also comprise:
Delete described second media file downloaded of described buffer memory.
In conjunction with above-mentioned first aspect, and/or the first possible implementation, and/or the implementation that the second is possible, and/or the third possible implementation, in the 4th kind of possible implementation, described described second media file downloaded is transferred to described terminal, comprising:
By described described second media file storage downloaded to local;
Described terminal is transferred to by being stored in local described second media file.
Second aspect, provides a kind of and supports the online equipment play, comprising:
Receiver module, plays the request of the first media file for receiving terminal;
Judge module, for judging according to the descriptor of described first media file whether described first media file is virtual file;
Address acquisition module, during for judging that described first media file is virtual file when described judge module, obtains the network address that described first media file of pre-stored is corresponding;
Network connecting module, connects for setting up network;
File download module, for downloading the second media file corresponding to described first media file according to the described network address;
Transport module, for described second media file downloaded is transferred to described terminal, to make the second media file downloaded described in described terminal plays.
In conjunction with above-mentioned second aspect, in the implementation that the first is possible, described transport module, while downloading described second media file in described file download module, transfers to described terminal by described second media file synchronization downloaded.
In conjunction with above-mentioned second aspect, and/or the first possible implementation, in the implementation that the second is possible, described transport module comprises:
Buffer unit, for carrying out buffer memory by described the second media file downloaded;
First transmission unit, for when the data volume of the second media file downloaded described in buffer memory reaches threshold value, transfers to described terminal by the second media file downloaded described in buffer memory.
In conjunction with above-mentioned second aspect, and/or the first possible implementation, and/or the implementation that the second is possible, in the implementation that the third is possible, also comprise:
Remove module, for after the second media file downloaded described in buffer memory is transferred to described terminal by described transmission unit, remove described the second media file downloaded that transmission unit described in described buffer unit has been transferred to described terminal.
In conjunction with above-mentioned second aspect, and/or the first possible implementation, and/or the implementation that the second is possible, and/or the third possible implementation, in the 4th kind of possible implementation, described transport module comprises:
Memory cell, for extremely local by described described second media file storage downloaded;
Second transmission unit, for transferring to described terminal by being stored in local described second media file.
The embodiment of the present invention is by the network address at foreign aid's equipment such as USB or terminal inner storing virtual file and correspondence thereof, make equipment or terminal when receiving the request of terminal plays virtual file, entity file corresponding to this virtual file can be obtained in real time according to the network address, thus can the online broadcasting of support terminal.The method overcome the limitation of the memory space of foreign aid's equipment such as USB, meet the massive demand of user to Media Stream.
Embodiment
Technical scheme in the embodiment of the present invention is understood better in order to make those skilled in the art person, and enable the above-mentioned purpose of the embodiment of the present invention, feature and advantage become apparent more, below in conjunction with accompanying drawing, technical scheme in the embodiment of the present invention is described in further detail.
See Fig. 1, support the online method flow diagram play for the embodiment of the present invention is a kind of.
The method that described support is play online can comprise:
Step 101, the request of the first media file play by receiving terminal.
This terminal can be television set, digital camera etc., does not limit herein; The executive agent of the present embodiment can be foreign aid's equipment such as the outer USB be connected in terminal, and also can be an embedded device in the terminal or module, the present embodiment be described for USB device.
USB device by the interface with terminal, as the request of broadcasting first media file that USB interface receiving terminal sends.This first media file can be the file such as video, picture; The title of the first media file or other identification information of the first media file can be comprised in this request.
According to the descriptor of described first media file, step 102, judges whether described first media file is virtual file.
The memory space of USB device is little, in order to meet the massive demand of user to media file etc., in the USB device of the embodiment of the present invention except storage entity file, also fictionalize a large memory space, for storing virtual file, no matter be entity file or virtual file can be all media file, also can be other types file.Wherein, entity file can have descriptor and file data, and virtual file only has descriptor, does not have actual file data.Can comprise in the descriptor of file for identifying the information whether this file is virtual file, such as file name, entity file and virtual file can have different naming rules, and this descriptor can also comprise title and other relevant informations of file.
In this step, USB device by reading terminals ask the descriptor of the first media file play, can judge whether this first media file is virtual file.If not virtual file but entity file, then USB device can obtain this entity file memory address in the usb device according to existing mode, then entity file corresponding for this memory address is transferred to terminal and plays; If virtual file, then perform next step 103 further.
Step 103, obtains the network address that described first media file of pre-stored is corresponding.
The corresponding relation of virtual file and virtual address can also be stored in the usb device, this virtual address is namely for obtaining the network address of the actual file data of this virtual file, and the corresponding relation of this virtual file and virtual address specifically can store in the form of a list.
USB device, can according to the corresponding relation of the virtual file of pre-stored and virtual address after determining that the first media file that terminal request is play is virtual file, obtains this network address corresponding to the first media file.
Step 104, sets up network and connects.
This USB device can pass through Ethernet, WiFi(wireless network communication technique), the mode such as G mobile communication (3rd-generation, 3G), digital subscriber line (Digital Subscriber Line, DSL) sets up network and connects.It can be connected to the Internet that this network connects, and also can be connected to local area network (LAN) etc.
Step 105, downloads the second media file corresponding to described first media file according to the described network address.
After USB device sets up network connection, download the second media file corresponding to the first media file at network side according to this network address.
Wherein, " first ", " second " are only the media file of distinguishing different or different memory location, not refer in particular to or limit.This first media file is different with the memory location of the second media file, but can have identical file name.
Step 106, transfers to described terminal by described second media file downloaded, to make the second media file downloaded described in described terminal plays.
The embodiment of the present invention is by the network address at foreign aid's equipment such as USB or terminal inner storing virtual file and correspondence thereof, make equipment or terminal when receiving the request of terminal plays virtual file, entity file corresponding to this virtual file can be obtained in real time according to the network address, thus can the online broadcasting of support terminal.The method overcome the limitation of the memory space of foreign aid's equipment such as USB, meet the massive demand of user to Media Stream.
The process that the second media file downloaded transfers to terminal can there be is various ways, such as:
In one embodiment, in USB device while download second media file, the second media file synchronization downloaded is transferred to terminal, the second media file play this to make terminal simultaneously and downloaded.In which, USB device does not store the second media file downloaded, but directly by downloading data synchronized transmission to terminal, USB device plays data and downloads and the effect of data retransmission.
In another embodiment, this USB device first can carry out buffer memory to the second media file downloaded, and then is sent to terminal, and as shown in Figure 2, the method can comprise:
Step 201, carries out buffer memory by described the second media file downloaded.
The second media file downloaded can be buffered in the buffering area of this equipment by this USB device, such as, be buffered in the temporary folder of specifying.
Step 202, judges whether the data volume of described second media file downloaded of buffer memory reaches threshold value.
The data volume of the second media file of USB device statistics buffer memory, and compare with the threshold value preset, such as this threshold value is 10MB, when the data volume of the second media file of buffer memory reaches threshold value 10MB, namely step 203 is performed, otherwise, continue to perform step 201 ~ 202.
Step 203, transfers to terminal by the second media file downloaded described in buffer memory.
When the data volume of the second media file of buffer memory reaches threshold value, just the second media file of buffer memory is transferred to terminal.
After the second media file of buffer memory transfers to terminal, can further include:
Step 204, deletes described second media file downloaded of described buffer memory.
Due to the buffering area limited space of USB device, after the second media file of buffer memory is transferred to terminal, the second media file that this has transmitted can be deleted, to discharge the resource in its buffering area taken.
This method being first buffered in transmission does not take the fixed storage space of USB device, and when unstable networks, still can ensure that terminal can Continuous Play media file compared with the mode of the synchronous transmission in previous embodiment.
In another embodiment, as shown in Figure 3, this USB device also can also perform following steps after download second media file:
Step 301, by described described second media file storage downloaded to local.
USB device by the second media file storage of download in this locality, specifically can be able to be stored in specified folder.This storage mode is different from the buffer memory in previous embodiment, buffer memory is interim storage, when stopping downloading or closing USB device, namely data in buffering area can be eliminated, acquisition cannot be searched, and be stored in the storage medium of USB device during storage in the present embodiment, acquisition can be searched at any time after storage.
USB device performs step 302 after can downloading and obtaining the second complete media file again, also after download obtains part second media file, namely can perform step 302.
Step 302, transfers to described terminal by being stored in local described second media file.
If store this second media file in the usb device, the management information of described first media file can be upgraded simultaneously, comprising: the descriptor of the first media file is revised as entity file, and the network address corresponding for the first media file is revised as described second media file memory address in the usb device.
Be more than the description to the inventive method embodiment, below the device realizing said method be introduced.
See Fig. 4, support the structural representation of the online equipment play for the embodiment of the present invention is a kind of.
The equipment 400 that this support is play online can comprise:
Receiver module 401, plays the request of the first media file for receiving terminal;
Judge module 402, for judging according to the descriptor of described first media file whether described first media file is virtual file;
Address acquisition module 403, for when described judge module 402 judges that described first media file is virtual file, obtains the network address that described first media file of pre-stored is corresponding;
Network connecting module 404, connects for setting up network;
File download module 405, for downloading the second media file corresponding to described first media file according to the described network address;
Transport module 406, for described second media file downloaded is transferred to described terminal, to make the second media file downloaded described in described terminal plays.
Receiver module 401 is after the request receiving broadcasting first media file, the descriptor of the first media file is read by judge module 402, and judge whether this first media file is virtual file according in descriptor for the information identifying virtual file, if, then address acquisition module 403 reads the network address corresponding to the first media file of prestoring, then the network address is sent to network connecting module 404, network connecting module 404 is set up network according to this network address and is connected, this network connecting module 404 specifically can be set up network by one of following manner and connect: Ethernet, WiFi, 3G, DSL etc., then file download module 405 downloads the second media file according to this network address, finally by transport module 406, the second media file downloaded is transferred to terminal, terminal can play this second media file.
In the embodiment of the present invention, this equipment is by the network address of above-mentioned module storing virtual file and correspondence thereof, when receiving the request of terminal plays virtual file, entity file corresponding to this virtual file can be obtained in real time according to the network address, thus can the online broadcasting of support terminal.Which overcomes the limitation of memory space, meet the massive demand of user to Media Stream.
In another embodiment of the invention, transport module 406, specifically may be used for, while described file download module downloads described second media file, described second media file synchronization downloaded being transferred to described terminal.
In another embodiment of the invention, as shown in Figure 5, the transport module 406 in the equipment 400 play online of this support may further include:
Buffer unit 501, for carrying out buffer memory by described the second media file downloaded;
First transmission unit 502, for when the data volume of the second media file downloaded described in buffer memory reaches threshold value, transfers to described terminal by the second media file downloaded described in buffer memory.
The equipment 400 that this support is play online can further include:
Remove module 503, for after the second media file downloaded described in buffer memory is transferred to described terminal by described transmission unit 502, remove described the second media file downloaded that transmission unit described in described buffer unit 501 has been transferred to described terminal.
By increasing this cache module, the second media file downloaded is carried out buffer memory, and then transfer to terminal, when unstable networks, still can ensure that terminal can Continuous Play media file.
In another embodiment of the invention, as shown in Figure 6, this transport module 406 can also comprise:
Memory cell 601, for extremely local by described described second media file storage downloaded;
Second transmission unit 602, for transferring to described terminal by being stored in local described second media file.
The descriptor of described first media file can also be revised as entity file by memory cell 601; The network address corresponding for described first media file is revised as the memory address of described second media file.
The equipment that above-mentioned support is play online can be USB device, can also be other equipment, and this equipment can be outer be connected in terminal, also can as one independently module installation at terminal inner, such as, be integrated in inside television.
The embodiment of the invention also discloses a kind of equipment supporting online broadcasting, this equipment can comprise transceiver, memory and processor.
Wherein, transceiver, plays the request of the first media file for receiving terminal; The second media file downloaded is transferred to described terminal, to make the second media file downloaded described in described terminal plays.
Store one section of program in memory, processor, for reading the program in memory, performs following steps:
Judge whether described first media file is virtual file according to the descriptor of described first media file;
If so, the network address that described first media file of pre-stored is corresponding is then obtained;
Set up network to connect;
The second media file corresponding to described first media file is downloaded according to the described network address;
Described second media file downloaded is sent to transceiver.
In the embodiment of the present invention, this equipment passes through the network address of storing virtual file and correspondence thereof, making when receiving the request of terminal plays virtual file, entity file corresponding to this virtual file can be obtained according to the network address in real time, thus can the online broadcasting of support terminal.Which overcomes the limitation of memory space, meet the massive demand of user to Media Stream.
Those of ordinary skill in the art can recognize, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with the combination of electronic hardware or computer software and electronic hardware.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the specific works process of the system of foregoing description, device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that disclosed system, apparatus and method can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.
If described function using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part of the part that technical scheme of the present invention contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. various can be program code stored medium.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with the protection range of claim.