WO2014063297A1 - 一种播放流媒体文件的方法和装置 - Google Patents

一种播放流媒体文件的方法和装置 Download PDF

Info

Publication number
WO2014063297A1
WO2014063297A1 PCT/CN2012/083333 CN2012083333W WO2014063297A1 WO 2014063297 A1 WO2014063297 A1 WO 2014063297A1 CN 2012083333 W CN2012083333 W CN 2012083333W WO 2014063297 A1 WO2014063297 A1 WO 2014063297A1
Authority
WO
WIPO (PCT)
Prior art keywords
streaming media
data
media file
downloaded
record table
Prior art date
Application number
PCT/CN2012/083333
Other languages
English (en)
French (fr)
Inventor
匡运生
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to CN201280002878.8A priority Critical patent/CN103181143B/zh
Priority to EP12877605.1A priority patent/EP2744169B1/en
Priority to PCT/CN2012/083333 priority patent/WO2014063297A1/zh
Priority to US14/107,133 priority patent/US9380095B2/en
Publication of WO2014063297A1 publication Critical patent/WO2014063297A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/762Media network packet handling at the source 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1083In-session procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/148Migration or transfer of sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64707Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless for transferring content from a first network to a second network, e.g. between IP and wireless
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/10Architectures or entities
    • H04L65/1059End-user terminal functionalities specially adapted for real-time communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1096Supplementary features, e.g. call forwarding or call holding

Definitions

  • the present invention relates to the field of data transmission, and in particular, to a method and apparatus for playing a streaming media file. Background technique
  • the content sharing function can cause the user to push the streaming media file to the screen of any home network device he/she wants to watch through the switching process.
  • the home network device that plays the streaming media file before the playback switch may have acquired the data of the streaming media file after the stop of the playback point, and the home network device that plays the streaming media file after the playback switch still needs to reacquire the network device.
  • the streaming media file stops the data after the playback point, thus making the streaming media file transfer and playback less efficient.
  • Embodiments of the present invention provide a method and apparatus for playing a streaming media file, which can improve the transmission and playback efficiency of a streaming media file.
  • a method of playing a streaming media file comprising:
  • the first device plays the streaming media file from the streaming media server
  • the play command is used to instruct the second device to play part or all of the at least part of the data sent by the first device.
  • the method further includes:
  • the data that has not been played by the first device is specifically data between the stopped streaming point and the position indicated by the first location information in the downloaded streaming media file.
  • the first device after receiving the switching instruction, the method also includes
  • the method further includes:
  • the first device receives the switching instruction, send the updated cache record table to the second device, and the updated cache record table does not The cached segment stores the address information corresponding to the data in the block;
  • the updated cache record table and the data of the uncached fragment storage block are paired
  • the address information is used by the second device to acquire some or all of the data other than the at least part of the data from the streaming server.
  • the method further includes:
  • the first device sends the updated cache record table and address information of the second device to the server after receiving the switch instruction, the updated The cache record table and the address information of the second device are used by the streaming server to send data in the uncached fragment storage block in the updated cache record table to the second device.
  • the first aspect In a five possible implementation manner, at least a part of data of the downloaded streaming media file, when the first device determines that the data amount or duration of the downloaded streaming media file meets a preset condition, The second device sends.
  • a method of playing a streaming media file comprising:
  • the second device receives a play command sent by the first device when receiving the switching instruction, and at least a part of data of the streaming media file that the first device has downloaded from the streaming media server, the at least part of the data including the first device Data that has not been played yet;
  • the second device plays part or all of the at least part of the data sent by the first device according to the play command.
  • the method further includes:
  • the second device receives the first location information sent by the first device and the address information of the downloaded streaming media file, where the first location information indicates the last complete of the downloaded streaming media file The location of the packet; And the second device acquires part or all of the data other than the at least part of the data from the streaming media server according to the first location information and the address information of the downloaded streaming media file.
  • the method further includes:
  • the second device receives the cache record table sent by the first device, and the address information corresponding to the data in the uncached segment storage block in the cache record table;
  • the second device acquires part or all of the data other than the at least part of the data from the streaming media server according to the address information corresponding to the data of the cache record table and the uncached segment storage block.
  • the method further includes:
  • the second device receives data in the uncached segment storage block in the cache record table sent by the streaming media server, where the cache record table is sent by the first device to the server.
  • At least a part of the data of the downloaded streaming media file is sent to the second device when the first device determines that the data amount or duration of the downloaded streaming media file meets a preset condition.
  • an apparatus for playing a streaming media file comprising:
  • a receiver configured to receive a switching instruction
  • a processor configured to: when the receiver receives the switching instruction, generate a play command, and determine at least a part of data of the downloaded streaming media file that needs to be sent to the second device, where the play command And indicating that the second device plays part or all of the at least part of the data sent by the first device, the at least one part
  • the sub-data includes data that the first device has not played yet;
  • a transmitter configured to send the play command to the second device, and at least part of the data of the downloaded streaming media file determined by the processor.
  • the processor is further configured to: if the downloaded streaming media file of the first device is continuous in time, determine a number of the downloaded streaming media file a location information, the first location information indicating a location of a last complete data packet of the downloaded streaming media file.
  • the transmitter is further configured to: when the downloaded streaming media file is incomplete, After receiving the switching instruction, the receiver sends the first location information and the address information of the downloaded streaming media file to the second device; the first location information and the address of the streaming media file The information is used by the second device to acquire some or all of the data other than the at least part of the data to the streaming server.
  • the receiver is further configured to: when the streaming media file downloaded by the first device is discontinuous in time, receive a cache record table sent by the server and update ;
  • the transmitter is further configured to: after the received streaming instruction file is incomplete, send the updated cache record table to the second device after the receiver receives the switching instruction, and Address information corresponding to data in the uncached fragment storage block in the updated cache record table;
  • the address information corresponding to the updated cache record table and the data of the uncached segment storage block is used by the second device to acquire some or all of the data other than the at least part of the data from the streaming media server.
  • the receiver is further configured to: when the streaming media file downloaded by the first device is discontinuous in time, receive a cache record table sent by the server and update ;
  • the transmitter is further configured to: after the received streaming media file is incomplete, send the update to the server after the receiver receives the switching instruction Cache record table and address information of the second device, the updated cache record table and address information of the second device are used by the streaming server to send the updated cache record table to the second device
  • the uncached fragment stores the data in the block.
  • the transmitter is specifically used When the first device determines that the data amount or duration of the downloaded streaming media file meets a preset condition, sending at least a part of the data of the downloaded streaming media file to the second device.
  • an apparatus for playing a streaming media file comprising:
  • a receiver configured to receive a handover command sent by the first device when receiving the handover instruction, and at least a part of data of the streaming media file that the first device has downloaded from the streaming media server, where the at least part of the data includes the first a device that has not yet played data; a player, configured to play part or all of the at least part of the data sent by the first device according to the play command.
  • the receiver is further configured to: when the streaming media file that is downloaded by the first device is continuous in time and incomplete, receive the first device Transmitting the first location information and the address information of the downloaded streaming media file, and acquiring the at least the streaming media server according to the first location information and the address information of the downloaded streaming media file Part or all of the data other than part of the data;
  • the first location information indicates a location of a last complete data packet of the downloaded streaming media file.
  • the receiver is further configured to: when the streaming media file that is downloaded by the first device is discontinuous in time, and is incomplete, receive the first a cache record table sent by the device, and address information corresponding to the data in the uncached segment storage block in the cache record table, and corresponding to the cache record table and the data of the uncached segment storage block
  • the address information is obtained from the streaming server for part or all of the data other than the at least part of the data.
  • the receiver is further configured to: when the streaming media file that is downloaded by the first device is discontinuous in time, and is incomplete, receive the streaming media The data in the uncached fragment storage block in the cache record table sent by the server, the cache record table being sent by the first device to the server.
  • the receiver is specifically configured to: when the first device determines that the data amount or duration of the downloaded streaming media file meets a preset condition, receive the downloaded streaming media sent by the first device At least part of the data for the file.
  • the method and apparatus for playing a streaming media file provided by the embodiment of the present invention, by sending at least a part of data of the downloaded streaming media file to a second device, and the at least part of the data includes the The data that has not been played by the first device, such that the second device can play part or all of the at least part of the data sent by the first device.
  • the data of the part of the downloaded streaming media file stored in the first device is effectively utilized, the amount of data of the streaming media file that the second device needs to acquire is reduced, and the streaming media is improved.
  • FIG. 1 is a flowchart of a method for playing a streaming media file according to an embodiment of the present invention
  • FIG. 2 is a flow chart of another method for playing a streaming media file according to an embodiment of the present invention
  • FIG. 3A is a schematic diagram of a method for playing a streaming media file according to an embodiment of the present invention
  • FIG. 3B is a specific flowchart of a method for playing a streaming media file according to an embodiment of the present invention
  • FIG. 4 is a structural block diagram of an apparatus for playing a streaming media file according to an embodiment of the present invention.
  • FIG. 5 is a block diagram of another structure of an apparatus for playing a streaming media file according to an embodiment of the present invention. detailed description
  • FIG. 1 is a flow chart of a method for playing a streaming media file according to an embodiment of the present invention.
  • an embodiment of the present invention provides a method for playing a streaming media file, where the method may include:
  • the first device plays a streaming media file from the streaming server.
  • the first device may download the streaming media file from the streaming media server, and may store the data of the streaming media file in its cache or temporary file.
  • the first device If the first device receives the switching instruction, the first device sends a play command to the second device, and sends at least a part of the downloaded data of the streaming media file to the second device, where the at least a portion of the data includes data that the first device has not played yet;
  • the play command is used to instruct the second device to play part or all of the at least part of the data sent by the first device.
  • the first device sends a play command to the second device in step 12
  • the first device has downloaded all the data of the streaming media file from the internet media server
  • the first a device can download the streamed file All data is sent to the second device.
  • the playing may start. If the first device sends a play command to the second device in step 12, the first device has not downloaded all the data of the streaming media file from the streaming media server, and the first device may The second device transmits a part of the data of the downloaded streaming media file.
  • the playing device that plays the streaming media file before the switching is referred to as the first device
  • the playing device of the streaming media file after the playback switching is referred to as the second device.
  • the first device may be a small-sized and portable mobile terminal device, including a smart phone, a tablet computer, a personal digital assistant (PDA), etc., which are convenient to operate and are easy to obtain streaming media files from the network side, but The screen size is small and the resolution is low, making it difficult to get a better visual experience.
  • the second device may be some large-sized devices with excellent display characteristics, such as high-definition smart TVs, which have the characteristics of large screen size and high resolution, and can play high-definition media programs, so that users can obtain a better visual experience. .
  • the method for playing a streaming media file provided by the embodiment of the present invention, by sending at least a part of data of the downloaded streaming media file to a second device, where the at least part of the data includes data that has not been played by the first device
  • the second device can play part or all of the at least part of the data sent by the first device.
  • the data of the part of the downloaded streaming media file stored in the first device is effectively utilized, the amount of data of the streaming media file that the second device needs to acquire is reduced, and the streaming media is improved.
  • File transfer and playback efficiency since the data of the part of the downloaded streaming media file stored in the first device is effectively utilized, the amount of data of the streaming media file that the second device needs to acquire is reduced, and the streaming media is improved.
  • the second device and the Internet media server may undergo a series of operations, including establishing a connection, authenticating, capability negotiation, and the like. These operations require a certain amount of time, which may cause buffering, delay, etc. during the switching process, causing interruption of the playback of the media program, affecting the viewing experience of the user.
  • the second device may play the first device while interacting with the streaming server to request to transmit data. Transmitting the data of this part of the downloaded streaming media file, so that the stream can be realized
  • the smooth switching of the media file playback screen avoids the occurrence of buffering and playback interruption during switching.
  • the first device downloads the data of the streaming media file in the following two ways: One is continuous downloading, that is, the data of the streaming media file transmitted by the streaming media server to the first device is continuous in time. The latter data must wait until the previous data has been downloaded before it can be transmitted; the other is discontinuous download, that is, the data of the streaming media file sent by the streaming server to the first device is not continuous in time, in this case
  • the streaming media server segments the data of the entire streaming media file and transmits the data in the media data storage block.
  • the streaming media server sends a cache recording table to the first device, so that the first device can record the media at any time. The state of the data storage block.
  • the first device may determine whether the downloaded streaming media file is continuous in time according to whether the cache record table is obtained or not, to select a subsequent processing manner. Specifically, if the first device obtains the cache record table from the streaming media server, it is determined that the downloaded streaming media file is discontinuous in time; otherwise, if the cache record table is not obtained from the streaming media server, it is determined that the cached record table is downloaded. Streaming files are not continuous in time.
  • the method for playing the streaming media file provided by the embodiment of the present invention includes the foregoing step 11 and In addition to step 12, it may also include:
  • the data that has not been played by the first device is specifically data between the stopped streaming point and the position indicated by the first location information in the downloaded streaming media file.
  • the "complete data packet" may be one frame of data, or one piece of content data fragmentation, or an MPEG TS (Moving Picture Experts Group Transport Stream) packet.
  • the first device may determine, according to the first location information, whether the downloaded streaming media file is complete. Specifically, the first device determines whether the location indicated by the first location information is an end location of the streaming media file, and if the location indicated by the first location information is an ending location of the streaming media file, And determining that the downloaded streaming media file is complete; if the location indicated by the first location information is not the ending location of the streaming media file, determining that the downloaded streaming media file is incomplete.
  • the method may further include:
  • the method for playing the streaming media file includes the steps described above. In addition to 1 1 and step 12, it may also include:
  • the cache record table is updated by the complete data in a fragment storage block: The fragment storage block is identified as cached from the cache record table.
  • the data that has not been played by the first device is specifically that the data in the fragment storage block that is cached but not released is identified in the cache record table;
  • the first device receives the switching instruction, sending an updated cache record table to the second device, and the updated cache record table is not cached.
  • the fragment stores the address information corresponding to the data in the block;
  • the updated cache record table and the data of the uncached fragment storage block are paired
  • the address information is used by the second device to acquire some or all of the data other than the at least part of the data from the streaming server.
  • the first device may determine, according to the cache record table, whether the downloaded streaming media file is complete. Specifically, if there is no uncached fragment storage block in the cache record table, it indicates that the downloaded streaming media file is complete; otherwise, if there is an uncached fragment storage block in the cache record table, The downloaded streaming media file is incomplete.
  • the address information corresponding to the data in the uncached fragment storage block in the cache record table may be included in the cache record table, and sent to the second device along with the cache record table.
  • the complete streaming media file is segmented in chronological order, and the data corresponding to each segment is referred to as a segment storage block.
  • a fragment storage block is composed of one or several complete data packets, and data is transmitted from the streaming server to the receiving device in units of fragment storage blocks during data transmission.
  • the "unreleased fragment storage block” refers to a fragment storage block that has been stored in the storage medium of the receiving device and has not been discarded. If the media content corresponding to the segment storage block has been played, the data of the segment storage block will be discarded.
  • the method for playing a streaming media file provided in this embodiment is applicable to a situation in which data acquired from a network media server is not continuously downloaded in time series, and the amount of data of the streaming media file acquired by the second device from the Internet media server can be reduced.
  • the method for playing the streaming media file includes the steps described above. In addition to 1 1 and step 12, it may also include:
  • the data that has not been played by the first device is specifically: the identifier in the cache record table.
  • the first device sends an updated cache record table and address information of the second device to the server after receiving the switch instruction, the updated cache record The table and the address information of the second device are used by the streaming server to send data in the uncached fragment storage block in the updated cache record table to the second device.
  • the server After receiving the updated cache record table and the address information of the second device, the server communicates with the streaming media server to inform the streaming media server of the data of the streaming media file that needs to be sent to the second device.
  • the address information of the second device may be the IP address information of the second device, and may also be other address information that may identify the second device.
  • the method for playing a streaming media file is applicable to the case that the data acquired from the network media server is not continuously downloaded in time series, and the data of the streaming media file sent by the streaming media server to the second device can be reduced. the amount.
  • the first device may determine Whether the data amount or duration of the downloaded streaming media file meets the preset condition. And the first device sends at least a part of the data of the downloaded streaming media file to the second device when determining that the data amount or duration of the downloaded streaming media file meets a preset condition.
  • the preset condition may be, for example, whether: the duration of the downloaded streaming media file reaches a specified threshold, and the specified threshold may take any value within a certain range that needs to be set, for example. For example, any of the values of 2-5 seconds, etc.; for example, the preset condition may be: whether the data amount of the downloaded streaming media file reaches a specified threshold, and the specified threshold is exemplified
  • the words are 1 M-5M and so on.
  • the first device determines that the data amount or the duration of the downloaded streaming media file does not meet the preset condition
  • the first device sends the address information of the streaming media file and the second location information to the The second device, wherein the second location information indicates a location of a first data packet of an unplayed portion of the streaming media file.
  • the second device may request the streaming server to transmit the corresponding data of the streaming media file according to the address information and the second location information.
  • the location information in the embodiment of the present invention is not limited to the location in time, and may also be a location on other metrics.
  • the first device and the second device may be in the same local area network. Since the data transmission rate of the two devices in the same local area network is 4 ⁇ , it is generally higher than the bandwidth of the ADSL (Asymmetric Digital Subscriber Line) network on the network side, so that the storage (for example, storage) can be made. This portion of the data in the cache or temporary file can be transferred to the second device at a faster transfer rate, ultimately enabling the streaming media file to continue to play smoothly during the switching process.
  • ADSL Asymmetric Digital Subscriber Line
  • the "server” is configured to send a cache record table and address information of the streaming media file to be played to the first device, and the server may not provide the streaming media file to the first device, but A dedicated “streaming server” provides streaming media files to the first device; or, the “server” may also have the functionality of a “streaming server”, ie, the “server” may provide streaming media files to the first device.
  • the “streaming server” in this document is for transmitting a streaming file to the first device according to the request message of the first device. Streaming media files are stored in the streaming server. It should be noted here that the "server” and “streaming server” in this article are logical devices, not real physical devices.
  • the "server” and “streaming server” can be either a physical entity or a different physical entity. When the server and the streaming server are different physical entities, they can communicate and deliver the necessary information.
  • 2 is a flow chart of a method for playing a streaming media file according to an embodiment of the present invention. Referring to FIG. 2, an embodiment of the present invention provides a method for playing a streaming media file, where the method may include:
  • the second device receives a play command sent by the first device when receiving the switch instruction, and at least a part of data of the stream media file that the first device has downloaded from the streaming media server, where the at least part of the data includes the first A device that has not yet played back data. 22. The second device plays part or all of the at least part of the data sent by the first device according to the play command.
  • the method for playing a streaming media file provided by the embodiment of the present invention, by sending at least a part of data of the downloaded streaming media file to a second device, where the at least part of the data includes data that has not been played by the first device
  • the second device can play part or all of the at least part of the data sent by the first device.
  • the data of the part of the downloaded streaming media file stored in the first device is effectively utilized, the amount of data of the streaming media file that the second device needs to acquire is reduced, and the streaming media is improved.
  • File transfer and playback efficiency since the data of the part of the downloaded streaming media file stored in the first device is effectively utilized, the amount of data of the streaming media file that the second device needs to acquire is reduced, and the streaming media is improved.
  • the second device and the Internet media server may undergo a series of operations, including establishing a connection, authenticating, capability negotiation, and the like. These operations require a certain amount of time, which may cause buffering, delay, etc. during the switching process, causing interruption of the playback of the media program, affecting the viewing experience of the user.
  • the second device may play the first device while interacting with the streaming server to request to transmit data. This part of the downloaded streaming media file is transmitted, so that the smooth switching of the streaming media playback screen can be realized, and the buffering and playback interruption phenomenon during switching is avoided.
  • the first device may select whether the downloaded streaming media file is continuous in time according to whether the cache record table is obtained or not, to select a subsequent processing mode. Specifically, if the first device obtains the cache record table from the streaming media server, it is determined that the downloaded streaming media file is discontinuous in time; otherwise, if the cache record table is not obtained from the streaming media server, it is determined that the cached record table is downloaded. Streaming files are not continuous in time.
  • the method for playing the streaming media file includes In addition to steps 21 and 22 described above, Includes:
  • the second device receives the first location information sent by the first device and the address information of the downloaded streaming media file, where the first location information indicates the last complete of the downloaded streaming media file The location of the packet;
  • the second device acquires part or all of the data other than the at least part of the data from the streaming server according to the first location information and the address information of the downloaded streaming media file.
  • the method for playing the streaming media file includes In addition to step 21 and step 22, the method may further include
  • the second device receives the cache record table sent by the first device, and the address information corresponding to the data in the uncached segment storage block in the cache record table;
  • the second device acquires part or all of the data other than the at least part of the data from the streaming media server according to the address information corresponding to the data of the cache record table and the uncached segment storage block.
  • the method for playing the streaming media file includes In addition to step 21 and step 22, the method may further include
  • the second device receives data in the uncached segment storage block in the cache record table sent by the streaming media server, where the cache record table is sent by the first device to the server.
  • At least a part of the data of the downloaded streaming media file may be determined by the first device to determine a data amount or duration of the downloaded streaming media file. And sending to the second device.
  • the first device and the second device may be in the same local area network. Due to data from two devices in the same LAN The transmission rate is 4 ⁇ , which is generally higher than the bandwidth of the ADSL (Asymmetric Digital Subscriber Line) network, so that this part of the storage (for example, stored in a cache or temporary file) can be made.
  • the data can be transmitted to the second device at a faster transfer rate, ultimately allowing the streaming media file to continue to play smoothly during the switching process.
  • the present invention will be further described by way of specific examples. It is also to be noted that the embodiments exemplified below are only a part of the embodiments of the present invention, and those skilled in the art can easily conceive other embodiments, which are within the scope of the present invention.
  • FIG. 3A is a schematic diagram of a method for playing a streaming media file according to an embodiment of the present invention. Referring to FIG. 3A, the method includes:
  • the streaming media server on the WAN (Wide Area Network) side sends a streaming media file to the first device, and the first device plays the streaming media file from the streaming media server;
  • the first device after receiving the switching instruction, the first device triggers a play command by the control point thereon, and switches the streaming media file to the second device for playing;
  • the first device and the second device establish an RTSP (Real Time Streaming Protocol) connection;
  • RTSP Real Time Streaming Protocol
  • the first device sends an ANNOUNCE request to the second device, where the message includes an SDP (Session Description Protocol) description information of the media file (including information such as a code format, size, resolution, and the like) of the media file;
  • SDP Session Description Protocol
  • the first device sends a SETUP request to the second device to negotiate a port for transmitting the streaming media file data; 7) The first device finds location information corresponding to the last complete data packet of the streaming media file data stored in the cache, the first location information;
  • the first device sends a RECORD request to the second device, where the RECORD request includes the stop play point and the first location information of the streaming media file, and informs the second device of the time zone to be played (from the stop play point to the first Position), the second device opens the data link in the corresponding RECORD response;
  • the first device sends a SET_PARAMETER request to the second device, and informs the second device of the address information (URL) of the streaming media file and the first location information (rtptime);
  • the first device starts to transmit at least a part of the downloaded data of the streaming media file to the second device;
  • the second device performs DNS domain name resolution on the URL information of the received streaming media file, and parses out the corresponding IP address information;
  • the second device establishes a session connection with the streaming server according to the address information and the corresponding first location information, and after the TCP three-way handshake, requests the streaming media server for the data of the streaming media file after the first location information.
  • the method for playing the streaming media file may include:
  • Step (1) ⁇ (6) is the same as steps 1) to 6) above;
  • step (1) the first device updates the state information of the segment storage block in the cache record table according to the segment storage block of the streaming media file received from the streaming server;
  • the first device stops updating the cache data table when disconnecting the streaming media file with the streaming server, and saves the latest cache record table
  • the first device sends a RECORD request to the second device, where the RECORD request includes a stop play point of the streaming media file, and the second device is notified of the start time to be played, and the second device opens the data in the corresponding RECORD response.
  • the first device sends a SET_PARAMETER request to the second device, and notifies the second device of the address information (URL) of the streaming media file;
  • a step is added between the step (9) and the step (10): the first device sends the saved latest cache record table to the second device;
  • Steps (10), (1 1 ) are the same as steps 10) and 1 1 above;
  • the second device establishes a session connection with the streaming media server according to the address information and the cache record table, and after the TCP three-way handshake, requests the data of the streaming media file from the streaming media server according to the state information of the segment storage block indicated in the cache record table. .
  • the method for playing a streaming media file provided by the embodiment of the present invention on the one hand, effectively utilizes the data of the part of the streaming media file stored in the first device, and reduces the amount of data requested by the second device to the network side server. Improve the efficiency of streaming media file transfer and playback.
  • the second device when the streaming media file is switched from the first device to the second device, the second device can play the part of the streaming media transmitted by the first device while interacting with the Internet media server to request to transmit data.
  • the data of the file realizes a smooth switching of the media picture, avoiding the occurrence of buffering and playback interruption during switching.
  • the method of FIG. 3A has comprehensively described the method for playing a streaming media file provided by the embodiment of the present invention.
  • the embodiment provides a method for playing a streaming media file.
  • the method includes :
  • the home network device 1 (the first device) downloads the streaming media file from the streaming server and plays it.
  • the home network device 1 When receiving the switching instruction input by the user, the home network device 1 sends a play command to the home network device 2 (second device) to switch the streaming media file being played on the home network device 1 to the home network device 2 Play on.
  • the home network device 1 and the home network device 2 belong to a subnet of a home network, and the home network device 1 has discovered the home network device 2 and acquired the capability of the home network device 2 before executing the handover instruction.
  • the information determines that the home network device 2 has the ability to play the streaming media file acquired by the home network device 1.
  • the trigger of the switching instruction can be embedded in the media playing of the home network device 1 In the control list of the device, it appears as an icon, a menu bar, and the like.
  • the user wants to switch the streaming media file played on the home network device 1 to the home network device 2 simply click on the corresponding icon or menu bar, and then select the device name to be played (home network device 2).
  • the triggering of the switching instruction is completed.
  • Home network device 1 Acquire information about the data stored in the cache file by the streaming media file.
  • the information of the data includes the size of the data stored in the cache by the streaming media file or the time that the streaming media file stores the data stored in the cache to support playback, and the data stored in the cache by the streaming media file. Time points and deadlines, etc.
  • the starting time point is a timestamp 2 (ie, an implementation manner of the second location information) that the streaming media file is playing when the home network device 1 receives the switching instruction; the deadline is that the streaming media file is stored in the The timestamp 1 corresponding to the last complete packet of data in the cache (ie, an implementation of the first location information).
  • the duration of the downloaded streaming media file can be played as the difference between timestamp 1 and timestamp 2.
  • Home network device 1 Determine if the amount of data stored in the cache by the streaming media file is sufficient.
  • step 33 1 is performed, and the home network device 1 sends the URL of the streaming media file and the value of the timestamp 2 to the home network device 2, and the home network device 2 directly requests the timestamp 2 from the streaming server on the network side. Future streaming files.
  • the home network device 1 determines whether the amount of data stored in the cache is sufficient by the information of the acquired data. If the amount of data of the streaming media stored in the cache of the home network device 1 is insufficient, the streaming media cannot be guaranteed to maintain smooth playback when switching to the device 2, and then the data in the cache is subsequently transmitted to the device through the home network. The effect of the operation on 2 is not significant. In this case, the home network device 1 sends the URL of the streaming media and the timestamp 2 to the home network device 2, and the home network device 2 can directly request the media server on the network side to obtain the streaming media file according to the two parameters. data.
  • the home network device 1 determines whether the value of timestamp 1 is the end position of the streaming media file.
  • step 341 is executed, and the home network device 1 transmits the data stored in the cache to the cache of the home network device 2 through the home network, and the home network device 2 can play the received data.
  • the home network device 2 For example, during the playback of the streaming media file on the home network device 1, when the playback switching operation is performed, it is possible that all subsequent data of the streaming media has been downloaded to the cache of the home network device 1. If this happens, when the streaming media file is played back to the home network device 2, at this time, the home network device 2 is not required to request the streaming media server of the network side to transmit the data of the streaming media file.
  • the home network device 1 proceeds to perform steps 35 and 36.
  • the home network device 1 transmits the data of the streaming media file in the cache of the home network device 1 to the cache of the home network device 2 through the home network, and sends the URL of the streaming media file and the value of the timestamp 1 to the home.
  • Network device 2 transmits the data of the streaming media file in the cache of the home network device 1 to the cache of the home network device 2 through the home network, and sends the URL of the streaming media file and the value of the timestamp 1 to the home.
  • Network device 2
  • the home network device 2 requests the streaming media server to obtain data of the streaming media file after the timestamp 1 according to the two parameter information.
  • the home network device 2 when the home network device 2 establishes a data connection with the media server on the network side, performs interaction and negotiation, and requests and acquires data of the streaming media, the home network device 2 is playing the cache of the home network device 1. Stored data timestamps 1 to 2 time media content during this time. When the media content is played to timestamp 1, that is, the data in the cache of the home network device 1 is exhausted, the data connection between the home network device 2 and the media server on the network side has been established, and may have been acquired from the media server. The subsequent data can not only solve the problem that the playback of the streaming media is not smooth when switching between network devices, but also reduce the probability of buffering and interrupting the Internet media program when the device is switched.
  • the location information in the embodiment of the present invention may be a location in time, or may be a location on a data capacity.
  • location information ie, location information in time
  • data capacity can also be used as the location information. Since this situation is similar to the case of the embodiment, it will not be described herein.
  • an embodiment of the present invention further provides an apparatus 40 for playing a streaming media file.
  • the apparatus 40 includes a receiver 41, a memory 42, a player 43, a processor 44, and a transmitter 45. among them:
  • a receiver 41 configured to receive a switching instruction
  • a memory 42 for buffering a streaming media file from the streaming server; a player 43 for playing a streaming media file from the streaming server; and a processor 44, configured to: when the receiver receives the switching instruction, Generating a play command, and determining at least a portion of the downloaded streaming media file that needs to be sent to the second device, wherein the play command is used to instruct the second device to play the Part or all of at least a portion of the data, the at least a portion of the data including data not yet played by the first device;
  • the transmitter 45 is configured to send the play command to the second device, and at least part of the data of the downloaded streaming media file determined by the processor.
  • the apparatus for playing a streaming media file provided by the embodiment of the present invention, by transmitting at least a part of data of the downloaded streaming media file to a second device, where the at least part of the data includes data that has not been played by the first device
  • the second device can play part or all of the at least part of the data sent by the first device.
  • the data of the part of the downloaded streaming media file stored in the first device is effectively utilized, the amount of data of the streaming media file that the second device needs to acquire is reduced, and the streaming media is improved.
  • File transfer and playback efficiency since the data of the part of the downloaded streaming media file stored in the first device is effectively utilized, the amount of data of the streaming media file that the second device needs to acquire is reduced, and the streaming media is improved.
  • the second device and the Internet media server may undergo a series of operations, including establishing a connection, authenticating, capability negotiation, and the like. These operations require a certain amount of time, which may cause buffering, delay, etc. during the switching process, causing interruption of the playback of the media program, affecting the viewing experience of the user.
  • the second device may play the first device while interacting with the streaming server to request to transmit data. The data of the downloaded streaming media file is transmitted, so that the smooth switching of the streaming media playback screen can be realized, and the buffering and playback interruption phenomenon during switching is avoided.
  • the processor 44 is further configured to: if the downloaded streaming media file of the first device is consecutive in time, determine the number of the downloaded streaming media file a location information, the first location information indicating a location of a last complete data packet of the downloaded streaming media file.
  • the transmitter 45 is further configured to: when the downloaded streaming media file is incomplete, send the first location information to the second device after the receiver receives the switching instruction. And the address information of the downloaded streaming media file; the first location information and the address information of the streaming media file are used by the second device to acquire, by the second media device, a portion other than the at least part of the data Or all data.
  • the receiver 41 is further configured to: when the streaming media file downloaded by the first device is discontinuous in time, receive a cache record table sent by the server and perform Update
  • the transmitter 45 is further configured to: after the received streaming media file is incomplete, send the updated cache record table to the second device after the receiver receives the switching instruction, And address information corresponding to the data in the uncached fragment storage block in the updated cache record table;
  • the receiver 41 is further configured to: when the streaming media file downloaded by the first device is discontinuous in time, receive a cache record table sent by the server and perform Update
  • the transmitter 45 is further configured to: after the received streaming instruction file is incomplete, send the updated cache record table and the The address information of the second device, the updated cache record table and the address information of the second device are used by the streaming server to send the uncached fragment storage in the updated cache record table to the second device The data in the block.
  • the transmitter 45 may be specifically configured to: determine, by the first device, that the data amount or duration of the downloaded streaming media file meets a preset condition. And transmitting, to the second device, at least a portion of the data of the downloaded streaming media file.
  • an embodiment of the present invention further provides an apparatus 50 for playing a streaming media file, and the apparatus 50 includes a receiver 51 and a player 52. among them:
  • the receiver 5 1 is configured to receive a handover command sent by the first device when receiving the handover instruction, and at least a part of data of the streaming media file that the first device has downloaded from the streaming media server, where the at least part of the data includes The data is not played by the first device; the player 52 is configured to play part or all of the at least part of the data sent by the first device according to the play command.
  • the apparatus for playing a streaming media file provided by the embodiment of the present invention, by transmitting at least a part of data of the downloaded streaming media file to a second device, where the at least part of the data includes data that has not been played by the first device
  • the second device can play part or all of the at least part of the data sent by the first device.
  • the streaming media message that the second device needs to acquire is reduced.
  • the amount of data of the piece improves the transmission and playback efficiency of streaming media files.
  • the second device and the Internet media server may undergo a series of operations, including establishing a connection, authenticating, capability negotiation, and the like. These operations require a certain amount of time, which may cause buffering, delay, etc. during the switching process, causing interruption of the playback of the media program, affecting the viewing experience of the user.
  • the second device may play the first device while interacting with the streaming server to request to transmit data. The data of the downloaded streaming media file is transmitted, so that the smooth switching of the streaming media playback screen can be realized, and the buffering and playback interruption phenomenon during switching is avoided.
  • the receiver 51 is further configured to: when the streaming media file that has been downloaded by the first device is consecutive in time and incomplete, receive the first The first location information sent by the device and the address information of the downloaded streaming media file, and acquiring, according to the first location information and the address information of the downloaded streaming media file, the streaming media server At least some or all of the data other than the data;
  • the first location information indicates a location of a last complete data packet of the downloaded streaming media file.
  • the receiver 51 is further configured to: when the streaming media file that has been downloaded by the first device is discontinuous in time and is incomplete, a cache record table sent by the first device, and address information corresponding to data in the uncached segment storage block in the cache record table, and according to the cache record table and the data of the uncached segment storage block Corresponding address information, obtaining part or all of the data other than the at least part of the data from the streaming server.
  • the receiver 51 is further configured to: when the streaming media file that has been downloaded by the first device is discontinuous in time and is incomplete, The data in the uncached fragment storage block in the cache record table sent by the streaming media server, the cache record table being sent by the first device to the server.
  • the receiver 51 is specifically configured to determine, at the first device, that the data amount or duration of the downloaded streaming media file meets a preset condition. Receiving at least a portion of data of the downloaded streaming media file sent by the first device.
  • the device 50 for playing a streaming media file and the first device may preferably be in the same local area network.
  • the apparatus for playing a streaming media file corresponds to the method for playing a streaming media file described herein. Since the method for playing a streaming media file has been described in detail in the foregoing, the foregoing method is implemented. The related description in the example is also applicable to the embodiment of the above device, and details are not described herein again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本发明实施例提供一种播放流媒体文件的方法,能够提高流媒体文件的传输和播放效率。所述方法包括:第一装置播放来自流媒体服务器的流媒体文件;若所述第一装置收到切换指令,所述第一装置向第二装置发送播放命令,并向所述第二装置发送已下载的所述流媒体文件的至少一部分数据,所述至少一部分数据包括所述第一装置还未播放的数据;所述播放命令用于指示所述第二装置播放所述第一装置发送的所述至少一部分数据的部分或全部。本发明还提供相应的装置。

Description

一种播放流媒体文件的方法和装置 技术领域
本发明涉及数据传输领域, 尤其涉及一种播放流媒体文件的方 法和装置。 背景技术
随着互联网技术和服务的快速发展, 包括音乐、 电影、 电视剧、 新闻、 自制短片等在内的流媒体文件的数量和种类越来越丰富, 极 大地丰富了用户的视觉和听觉体验。 目前, 越来越多的家庭网络设 备在播放流媒体文件的同时, 也具备了 内容分享的功能, 即可以把 一个设备上播放的流媒体文件切换到另一个家庭网络设备上进行播 放。
内容分享功能可以通过切换过程使用户将流媒体文件推送到他 /她想要观看的任何一个家庭网络设备的屏幕上进行播放。
但在此切换过程中, 播放切换之前播放流媒体文件的家庭网络 设备可能已经获取了流媒体文件自停止播放点之后的数据, 而播放 切换之后播放流媒体文件的家庭网络设备仍需要重新获取该流媒体 文件自停止播放点之后的数据, 因而造成流媒体文件的传输和播放 效率较低。 发明内容
本发明实施例提供一种播放流媒体文件的方法和装置, 能够提 高流媒体文件的传输和播放效率。
根据本发明的第一方面, 提供一种播放流媒体文件的方法, 所 述方法包括:
第一装置播放来自流媒体服务器的流媒体文件;
若所述第一装置收到切换指令, 所述第一装置向第二装置发送 播放命令, 并向所述第二装置发送已下载的所述流媒体文件的至少 一部分数据, 所述至少一部分数据包括所述第一装置还未播放的数 据;
所述播放命令用于指示所述第二装置播放所述第一装置发送的 所述至少一部分数据的部分或全部。
在第一方面的第一种可能的实现方式中, 若所述第一装置已下 载的流媒体文件在时间上连续, 所述方法还包括:
所述第一装置确定所述已下载的流媒体文件的第一位置信息, 所述第一位置信息指示了所述已下载的流媒体文件的最后一个完整 的数据包的位置;
所述第一装置还未播放的数据具体为, 所述已下载的流媒体文 件中从停止播放点到所述第一位置信息指示的位置之间的数据。
结合第一方面的第一种可能的实现方式, 在第二种可能的实现 方式中, 如果所述已下载的流媒体文件不完整, 所述第一装置在收 到所述切换指令之后, 所述方法还包括,
向所述第二装置发送所述第一位置信息和所述已下载的流媒体 文件的地址信息; 所述第一位置信, 和所述流媒体文件的地址信 , 用于所述第二装置向所述流媒体服务器获取所述至少一部分数据以 外的部分或全部数据。
在第一方面的第三种可能的实现方式中, 若所述第一装置下载 的流媒体文件在时间上不连续, 所述方法还包括:
所述第一装置接收服务器发送的緩存记录表并进行更新; 所述第一装置还未播放的数据具体为, 所述更新的緩存记录表 中标识已緩存但未释放的片段存储块中的数据;
如果所述已下载的流媒体文件不完整, 所述第一装置收到所述 切换指令之后, 向所述第二装置发送所述更新的緩存记录表, 和所 述更新的緩存记录表中未緩存的片段存储块中的数据所对应的地址 信息 ;
所述更新的緩存记录表和所述未緩存的片段存储块的数据所对 应的地址信息用于, 所述第二装置从所述流媒体服务器获取所述至 少一部分数据以外的部分或全部数据。
在第一方面的第四种可能的实现方式中, 若所述第一装置下载 的流媒体文件在时间上不连续, 所述方法还包括:
所述第一装置接收服务器发送的緩存记录表并进行更新; 所述第一装置还未播放的数据具体为, 所述更新的緩存记录表 中标识已緩存但未释放的片段存储块中的数据;
如果所述已下载的流媒体文件不完整, 所述第一装置在收到切 换指令之后, 向所述服务器发送所述更新的緩存记录表和所述第二 装置的地址信息, 所述更新的緩存记录表和所述第二装置的地址信 息用于所述流媒体服务器向所述第二装置发送所述更新的緩存记录 表中未緩存的片段存储块中的数据。
结合第一方面的第一种可能的实现方式至第一方面的第四种可 能的实现方式中的任一种可能的实现方式, 在第五种可能的实现方 式中, 在第一方面的第五种可能的实现方式中, 所述已下载的流媒 体文件的至少一部分数据, 在所述第一装置确定所述已下载的流媒 体文件的数据量或时长满足预设条件时, 向所述第二装置发送。
根据本发明的第二方面, 提供一种播放流媒体文件的方法, 所 述方法包括:
第二装置接收第一装置在收到切换指令时发送的播放命令, 和 所述第一装置从流媒体服务器已下载的流媒体文件的至少一部分数 据, 所述至少一部分数据包括所述第一装置还未播放的数据;
所述第二装置根据所述播放命令, 播放所述第一装置发送的所 述至少一部分数据的部分或全部。
在第二方面的第一种可能的实现方式中, 若所述第一装置已下 载的流媒体文件在时间上连续, 且不完整, 所述方法还包括,
所述第二装置接收所述第一装置发送的第一位置信息和所述已 下载的流媒体文件的地址信息, 所述第一位置信息指示了所述已下 载的流媒体文件的最后一个完整的数据包的位置; 所述第二装置根据所述第一位置信息和所述已下载的流媒体文 件的地址信息, 向所述流媒体服务器获取所述至少一部分数据以外 的部分或全部数据。
在第二方面的第二种可能的实现方式中, 若所述第一装置下载 的流媒体文件在时间上不连续, 且不完整, 所述方法还包括,
所述第二装置接收所述第一装置发送的緩存记录表, 和所述緩 存记录表中未緩存的片段存储块中的数据所对应的地址信息;
所述第二装置根据所述緩存记录表和所述未緩存的片段存储块 的数据所对应的地址信息, 从所述流媒体服务器获取所述至少一部 分数据以外的部分或全部数据。
在第二方面的第三种可能的实现方式中, 若所述第一装置下载 的流媒体文件在时间上不连续, 且不完整, 所述方法还包括,
所述第二装置接收所述流媒体服务器发送的緩存记录表中未緩 存的片段存储块中的数据, 所述緩存记录表为所述第一装置向服务 器发送的。
结合第二方面的第一种可能的实现方式至第二方面的第三种可 能的实现方式中的任一种可能实现方式, 在第二方面的第四种可能 的实现方式中, 所述已下载的流媒体文件的至少一部分数据, 在所 述第一装置确定所述已下载的流媒体文件的数据量或时长满足预设 条件时, 向所述第二装置发送。
根据本发明的第三方面, 提供一种播放流媒体文件的装置, 所 述装置包括:
接收器, 用于接收切换指令;
存储器, 用于緩存来自流媒体服务器的流媒体文件;
播放器, 用于播放来自流媒体服务器的流媒体文件;
处理器, 用于在所述接收器收到所述切换指令时, 生成播放命 令, 并确定需要向第二装置发送的已下载的所述流媒体文件的至少 一部分数据, 其中, 所述播放命令用于指示所述第二装置播放所述 第一装置发送的所述至少一部分数据的部分或全部, 所述至少一部 分数据包括所述第一装置还未播放的数据;
发送器, 用于向第二装置发送所述播放命令, 和所述处理器确 定的已下载的所述流媒体文件的至少一部分数据。
在第三方面的第一种可能的实现方式中, 所述处理器还用于, 若所述第一装置已下载的流媒体文件在时间上连续, 确定所述已下 载的流媒体文件的第一位置信息, 所述第一位置信息指示了所述已 下载的流媒体文件的最后一个完整的数据包的位置。
结合第三方面的第一种可能的实现方式, 在第三方面的第二种 可能的实现方式中, 所述发送器还用于在所述已下载的流媒体文件 不完整时, 在所述接收器收到所述切换指令之后, 向所述第二装置 发送所述第一位置信息和所述已下载的流媒体文件的地址信息; 所 述第一位置信息和所述流媒体文件的地址信息用于所述第二装置向 所述流媒体服务器获取所述至少一部分数据以外的部分或全部数 据。
在第三方面的第三种可能的实现方式中, 所述接收器还用于, 在所述第一装置下载的流媒体文件在时间上不连续时, 接收服务器 发送的緩存记录表并进行更新;
所述发送器还用于, 在所述已下载的流媒体文件不完整时, 在 所述接收器收到所述切换指令之后, 向所述第二装置发送所述更新 的緩存记录表, 和所述更新的緩存记录表中未緩存的片段存储块中 的数据所对应的地址信息;
所述更新的緩存记录表和所述未緩存的片段存储块的数据所对 应的地址信息用于, 所述第二装置从所述流媒体服务器获取所述至 少一部分数据以外的部分或全部数据。
在第三方面的第四种可能的实现方式中, 所述接收器还用于, 在所述第一装置下载的流媒体文件在时间上不连续时, 接收服务器 发送的緩存记录表并进行更新;
所述发送器还用于, 在所述已下载的流媒体文件不完整时, 在 所述接收器收到所述切换指令之后, 向所述服务器发送所述更新的 緩存记录表和所述第二装置的地址信息, 所述更新的緩存记录表和 所述第二装置的地址信息用于所述流媒体服务器向所述第二装置发 送所述更新的緩存记录表中未緩存的片段存储块中的数据。
结合第三方面的第一种可能的实现方式至第三方面的第四种可 能的实现方式中的任一种可能的实现方式, 在第五种可能的实现方 式中, 所述发送器具体用于, 在所述第一装置确定所述已下载的流 媒体文件的数据量或时长满足预设条件时, 向所述第二装置发送所 述已下载的流媒体文件的至少一部分数据。
根据本发明的第四方面, 提供一种播放流媒体文件的装置, 所 述装置包括:
接收器, 用于接收第一装置在收到切换指令时发送的切换命令, 和所述第一装置从流媒体服务器已下载的流媒体文件的至少一部分 数据, 所述至少一部分数据包括所述第一装置还未播放的数据; 播放器, 用于根据所述播放命令, 播放所述第一装置发送的所 述至少一部分数据的部分或全部。
在第四方面的第一种可能的实现方式中, 所述接收器还用于, 在所述第一装置已下载的流媒体文件在时间上连续, 且不完整时, 接收所述第一装置发送的第一位置信息和所述已下载的流媒体文件 的地址信息, 并根据所述第一位置信息和所述已下载的流媒体文件 的地址信息, 向所述流媒体服务器获取所述至少一部分数据以外的 部分或全部数据;
其中, 所述第一位置信息指示了所述已下载的流媒体文件的最 后一个完整的数据包的位置。
在第四方面的第二种可能的实现方式中, 所述接收器还用于, 在所述第一装置已下载的流媒体文件在时间上不连续, 且不完整时, 接收所述第一装置发送的的緩存记录表, 和所述緩存记录表中未緩 存的片段存储块中的数据所对应的地址信息, 并根据所述緩存记录 表和所述未緩存的片段存储块的数据所对应的地址信息, 从所述流 媒体服务器获取所述至少一部分数据以外的部分或全部数据。 在第四方面的第三种可能的实现方式中, 所述接收器还用于, 在所述第一装置已下载的流媒体文件在时间上不连续, 且不完整时, 接收所述流媒体服务器发送的緩存记录表中未緩存的片段存储块中 的数据, 所述緩存记录表为所述第一装置向服务器发送的。
结合第四方面的第一种可能的实现方式至第四方面的第三种可 能的实现方式中的任一种可能实现方式, 在第四方面的第四种可能 的实现方式中, 其特征在于, 所述接收器具体用于, 在所述第一装 置确定所述已下载的流媒体文件的数据量或时长满足预设条件时, 接收所述第一装置发送的所述已下载的流媒体文件的至少一部分数 据。
采用上述技术方案后, 本发明实施例提供的播放流媒体文件的 方法和装置, 通过将已下载的所述流媒体文件的至少一部分数据发 送给第二装置, 且所述至少一部分数据包括所述第一装置还未播放 的数据, 这样, 所述第二装置即可播放所述第一装置发送的所述至 少一部分数据的部分或全部。 如此一来, 由于有效地利用了存储在 第一装置中的这部分已下载的流媒体文件的数据, 因而, 减小了第 二装置需要获取的该流媒体文件的数据量, 提高了流媒体文件的传 输和播放效率。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下 面将对实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于 本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以 根据这些附图获得其他的附图。
图 1 为本发明实施例提供的播放流媒体文件的方法的流程图; 图 2 为本发明实施例提供的另一种播放流媒体文件的方法的流 程图;
图 3A 是本发明实施例提供的一种播放流媒体文件的方法的示 意图;
图 3 B 为本发明实施例提供的播放流媒体文件的方法的一种具 体流程图;
图 4 为本发明实施例提供的播放流媒体文件的装置的一结构框 图;
图 5 为本发明实施例提供的播放流媒体文件的装置的另一结构 框图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例的技术方 案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明的 一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本 领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其 它实施例, 都属于本发明保护的范围。
图 1 是本发明实施例提供的一种播放流媒体文件的方法的流程 图。 参照图 1 , 本发明实施例提供一种播放流媒体文件的方法, 所 述方法可包括:
1 1、 第一装置播放来自流媒体服务器的流媒体文件。
在本步骤之前, 第一装置可从流媒体服务器下载流媒体文件, 并可将所述流媒体文件的数据存放在其緩存或临时文件中。
12、 若所述第一装置收到切换指令, 所述第一装置向第二装置 发送播放命令, 并向所述第二装置发送已下载的所述流媒体文件的 至少一部分数据, 所述至少一部分数据包括所述第一装置还未播放 的数据;
所述播放命令用于指示所述第二装置播放所述第一装置发送的 所述至少一部分数据的部分或全部。
在本发明实施例中, 若在步骤 12所述第一装置向第二装置发送 播放命令时, 所述第一装置已从互联网媒体服务器下载了所述流媒 体文件的全部数据, 则所述第一装置可将已下载的所述流媒体文件 的全部数据发送给所述第二装置。 所述第二装置接收到所述流媒体 文件的全部数据之后, 可开始播放。 若在步骤 12所述第一装置向第 二装置发送播放命令时, 所述第一装置尚没有从流媒体服务器下载 完所述流媒体文件的全部数据, 则所述第一装置可向所述第二装置 发送已下载的所述流媒体文件的一部分数据。
需要指出的是, 在本发明实施例中, 将播放切换之前流媒体文 件的播放设备称为第一装置, 将播放切换之后流媒体文件的播放设 备称为第二装置。 其中, 第一装置可以是一些外形小巧、 携带方便 的移动终端设备, 包括智能手机、 平板电脑、 个人数字助理(PDA) 等等, 这些装置操作方便, 较容易从网络侧获取流媒体文件, 但是 屏幕尺寸小、 分辨率低, 很难获得较好的视觉体验。 第二装置可以 是一些体积较大, 具有优良的显示特性的设备, 比如高清智能电视, 这些设备具有屏幕尺寸大、 分辨率高的特点, 可以播放高清媒体节 目 , 使用户获得较好的视觉体验。
本发明实施例提供的播放流媒体文件的方法, 通过将已下载的 所述流媒体文件的至少一部分数据发送给第二装置, 且所述至少一 部分数据包括所述第一装置还未播放的数据, 这样, 所述第二装置 即可播放所述第一装置发送的所述至少一部分数据的部分或全部。 如此一来, 由于有效地利用 了存储在第一装置中的这部分已下载的 流媒体文件的数据, 因而, 减小了第二装置需要获取的该流媒体文 件的数据量, 提高了流媒体文件的传输和播放效率。
另外, 在从第一装置切换到第二装置播放的过程中, 在现有技 术中, 第二装置与互联网媒体服务器之间可能会经历一系列操作, 包括建立连接、 认证、 能力协商等等, 这些操作需要消耗一定的时 间, 从而导致在切换过程中会出现緩冲、 延时等情况, 造成媒体节 目播放的中断, 影响用户的观赏体验。 而本发明实施例在此种情形 下, 当流媒体文件从第一装置切换到第二装置上播放时, 第二装置 可以在与流媒体服务器进行交互以请求传输数据的同时, 播放第一 装置传输过来的这部分已下载的流媒体文件的数据, 从而可实现流 媒体文件播放画面的平稳切换, 避免了切换时緩冲和播放中断现象 的出现。
需注意的是, 第一装置对于流媒体文件的数据的下载存在以下 两种方式: 一种是连续下载, 即流媒体服务器传给第一装置的流媒 体文件的数据在时间上是连续的, 后面的数据必须等到前面的数据 已下载了才可以传输; 另一种是非连续下载, 即流媒体服务器传给 第一装置的流媒体文件的数据在时间上是不连续的, 在这种情况下, 流媒体服务器将整个流媒体文件的数据进行分段, 以媒体数据存储 块为单位进行传输, 此时流媒体服务器会给第一装置下发緩存记录 表, 用来使第一装置随时记录媒体数据存储块的状态。
因此, 第一装置在收到切换指令之后, 可根据是否获取緩存记 录表来确定已下载的流媒体文件在时间上是否连续, 来选择后续的 处理方式。 具体而言, 如果第一装置从流媒体服务器获取了緩存记 录表, 则确定已下载的流媒体文件在时间上是不连续; 反之, 若没 有从流媒体服务器获取緩存记录表, 则确定已下载的流媒体文件在 时间上是不连续。
下面对已下载的流媒体文件在时间上是连续的和不连续的这两 种情形分别进行说明。
可选地, 在本发明的一个实施例中, 若所述第一装置已下载的 流媒体文件在时间上连续, 本发明实施例提供的播放流媒体文件的 方法除了包括上面的步骤 1 1和步骤 12之外, 还可包括:
所述第一装置确定所述已下载的流媒体文件的第一位置信息, 所述第一位置信息指示了所述已下载的流媒体文件的最后一个完整 的数据包的位置;
所述第一装置还未播放的数据具体为, 所述已下载的流媒体文 件中从停止播放点到所述第一位置信息指示的位置之间的数据。
在本发明实施例中, 所述 "完整的数据包" 可以为一帧数据, 或内容数据分片的一片, 或一个 MPEG TS (运动图象专家组传输流) 包。 进一步地, 所述第一装置在确定所述已下载的流媒体文件的第 一位置信息之后, 即可根据所述第一位置信息来确定所述已下载的 流媒体文件是否完整。 具体而言, 所述第一装置确定所述第一位置 信息指示的位置是否为所述流媒体文件的结束位置, 若所述第一位 置信息指示的位置为所述流媒体文件的结束位置, 则确定所述已下 载的流媒体文件完整; 若所述第一位置信息指示的位置不为所述流 媒体文件的结束位置, 则确定所述已下载的流媒体文件不完整。
如果所述已下载的流媒体文件不完整, 所述第一装置在收到所 述切换指令之后, 所述方法还可包括:
向所述第二装置发送所述第一位置信息和所述已下载的流媒体 文件的地址信息; 所述第一位置信, 和所述流媒体文件的地址信 , 用于所述第二装置向所述流媒体服务器获取所述至少一部分数据以 外的部分或全部数据。 可选地, 在本发明的另一个实施例中, 若所述第一装置下载的 流媒体文件在时间上不连续, 本发明实施例提供的播放流媒体文件 的方法除了包括上面所述的步骤 1 1和步骤 12之外, 还可包括:
所述第一装置接收服务器发送的緩存记录表并可根据从流媒体 服务器下载的流媒体文件的数据对緩存记录表进行更新; 具体而言, 所述第一装置一旦从所述流媒体服务器下载了一个片段存储块中的 完整数据, 就对緩存记录表进行更新: 从緩存记录表中将该片段存 储块标识为已緩存。
所述第一装置还未播放的数据具体为, 所述緩存记录表中标识 已緩存但未释放的片段存储块中的数据;
如果所述已下载的流媒体文件不完整, 所述第一装置收到所述 切换指令之后, 向所述第二装置发送更新的緩存记录表, 和所述经 更新的緩存记录表中未緩存的片段存储块中的数据所对应的地址信 息;
所述更新的緩存记录表和所述未緩存的片段存储块的数据所对 应的地址信息用于, 所述第二装置从所述流媒体服务器获取所述至 少一部分数据以外的部分或全部数据。
其中, 所述第一装置可根据緩存记录表来确定所述已下载的流 媒体文件是否完整。 具体而言, 若緩存记录表中不存在未緩存的片 段存储块, 则表明所述已下载的流媒体文件是完整的; 反之, 若緩 存记录表中存在未緩存的片段存储块, 则表明所述已下载的流媒体 文件是不完整的。
其中, 所述緩存记录表中未緩存的片段存储块中的数据所对应 的地址信息可被包含在緩存记录表中, 随緩存记录表一起发送给第 二装置。
在本发明实施例中, 将完整的流媒体文件按时间顺序进行分段, 每一段(segment)所对应的数据称为一个片段存储块。 一个片段存储 块由一个或者若干个完整的数据包组成, 在数据传输时是以片段存 储块为单位将数据从流媒体服务器传输至接收设备。
所述 "未释放的片段存储块" 是指已经存储在接收设备的存储 介质中且还未丟弃的片段存储块。 如果所述片段存储块所对应的媒 体内容已经播放, 则该片段存储块的数据将被丟弃。
本实施例提供的播放流媒体文件的方法, 适用于从网络媒体服 务器获取的数据并不是按照时间顺序连续下载的情形, 能够减小第 二装置从互联网媒体服务器获取的流媒体文件的数据量。
可选地, 在本发明的又一个实施例中, 若所述第一装置下载的 流媒体文件在时间上不连续, 本发明实施例提供的播放流媒体文件 的方法除了包括上面所述的步骤 1 1和步骤 12之外, 还可包括:
所述第一装置接收服务器发送的緩存记录表并根据从流媒体服 务器下载的流媒体文件的数据对緩存记录表进行更新; 具体而言, 所述第一装置一旦从所述流媒体服务器下载了一个片段存储块中的 完整数据, 就对緩存记录表进行更新: 即从緩存记录表中将该片段 存储块标识为已緩存。
所述第一装置还未播放的数据具体为, 所述緩存记录表中标识 已緩存但未释放的片段存储块中的数据;
如果所述已下载的流媒体文件不完整, 所述第一装置在收到切 换指令之后, 向所述服务器发送更新的緩存记录表和所述第二装置 的地址信息, 所述更新的緩存记录表和所述第二装置的地址信息用 于所述流媒体服务器向所述第二装置发送所述更新的緩存记录表中 未緩存的片段存储块中的数据。
服务器接收到所述更新的緩存记录表和所述第二装置的地址信 息后于流媒体服务器进行通信, 告知流媒体服务器需要向所述第二 装置发送的流媒体文件的数据。
其中, 所述第二装置的地址信息可以为所述第二装置的 IP地址 信息, 还可以为其他可以标识所述第二装置的地址信息。
本实施例提供的播放流媒体文件的方法, 适用于从网络媒体服 务器获取的数据并不是按照时间顺序连续下载的情形, 能够减小流 媒体服务器向所述第二装置发送的流媒体文件的数据量。
需要指出的是, 在上述各个实施例中, 在步骤 12所述第一装置 向所述第二装置发送已下载的所述流媒体文件的至少一部分数据之 前, 所述第一装置可以先确定所述已下载的流媒体文件的数据量或 时长是否满足预设条件时。 所述第一装置在确定所述已下载的流媒 体文件的数据量或时长满足预设条件时, 向所述第二装置发送所述 已下载的流媒体文件的至少一部分数据。 其中, 所述预设条件例如 可以为: 所述已下载的流媒体文件的时长是否达到指定的阀值, 所 述指定的阀值可以取根据需要设定的某一范围内的任何值,举例而 言 2-5 秒中的任一值等; 又例如, 所述预设条件可以为: 所述已下 载的流媒体文件的数据量是否达到指定的阀值, 所述指定的阀值举 例而言为 1 M-5M等。
在所述第一装置确定所述已下载的流媒体文件的数据量或时长 不满足预设条件时, 所述第一装置将所述流媒体文件的地址信 , 和 第二位置信息发送给所述第二装置, 其中, 所述第二位置信息指示 了所述流媒体文件的未播放部分的第一个数据包的位置。 这样, 所 述第二装置可根据所述地址信息和所述第二位置信息请求流媒体服 务器传输所述流媒体文件的相应数据。 需要说明的是, 本发明实施 例中的位置信息不限于时间上的位置, 还可以为其他度量上的位置。
需要指出的是, 在上述各个实施例中, 所述第一装置和所述第 二装置可以在同一局域网内。 由于在同一局域网内的两装置的数据 传输速率 4艮 高 , 一般 高 于 网 络侧 ADSL(Asymmetric Digital Subscriber Line , 非对称数字用户环路)网络的带宽, 这样一来, 能 够使存储(例如,存储在緩存或临时文件中)的这部分数据能以更快的 传输速率传输到第二装置, 最终使得在切换的过程中流媒体文件能 继续保持流畅的播放。
特别需要指出的是, 在本发明实施例中, "服务器" 用于向第一 装置发送待播放流媒体文件的緩存记录表以及地址信息, 服务器可 以不向第一装置提供流媒体文件, 而由专门的 "流媒体服务器" 向 第一装置提供流媒体文件; 或者, "服务器" 也可以具备 "流媒体服 务器" 的功能, 即, "服务器" 可以向第一装置提供流媒体文件。 本 文中的 "流媒体服务器" 用于根据第一装置的请求消息向第一装置 发送流媒体文件。 流媒体文件存储在流媒体服务器中。 这里需要说 明的是, 本文中的 "服务器" 和 "流媒体服务器" 都是逻辑上的设 备, 而非真正的物理设备。 "服务器" 和 "流媒体服务器" 可以是一 个物理实体, 也可以分属于不同的物理实体, 当服务器和流媒体服 务器是不同的物理实体时, 它们之间可以进行通信并传递必要的信 息。 图 2是本发明实施例提供的一种播放流媒体文件的方法的流程 图。 参照图 2 , 本发明实施例提供一种播放流媒体文件的方法, 所 述方法可包括:
21、 第二装置接收第一装置在收到切换指令时发送的播放命令, 和所述第一装置从流媒体服务器已下载的流媒体文件的至少一部分 数据, 所述至少一部分数据包括所述第一装置还未播放的数据。 22、 所述第二装置根据所述播放命令, 播放所述第一装置发送 的所述至少一部分数据的部分或全部。
本发明实施例提供的播放流媒体文件的方法, 通过将已下载的 所述流媒体文件的至少一部分数据发送给第二装置, 且所述至少一 部分数据包括所述第一装置还未播放的数据, 这样, 所述第二装置 即可播放所述第一装置发送的所述至少一部分数据的部分或全部。 如此一来, 由于有效地利用 了存储在第一装置中的这部分已下载的 流媒体文件的数据, 因而, 减小了第二装置需要获取的该流媒体文 件的数据量, 提高了流媒体文件的传输和播放效率。
另外, 在从第一装置切换到第二装置播放的过程中, 在现有技 术中, 第二装置与互联网媒体服务器之间可能会经历一系列操作, 包括建立连接、 认证、 能力协商等等, 这些操作需要消耗一定的时 间, 从而导致在切换过程中会出现緩冲、 延时等情况, 造成媒体节 目播放的中断, 影响用户的观赏体验。 而本发明实施例在此种情形 下, 当流媒体文件从第一装置切换到第二装置上播放时, 第二装置 可以在与流媒体服务器进行交互以请求传输数据的同时, 播放第一 装置传输过来的这部分已下载的流媒体文件, 从而可实现流媒体播 放画面的平稳切换, 避免了切换时緩冲和播放中断现象的出现。
第一装置在收到切换指令之后, 可根据是否获取緩存记录表来 确定已下载的流媒体文件在时间上是否连续, 来选择后续的处理方 式。 具体而言, 如果第一装置从流媒体服务器获取了緩存记录表, 则确定已下载的流媒体文件在时间上是不连续; 反之, 若没有从流 媒体服务器获取緩存记录表, 则确定已下载的流媒体文件在时间上 是不连续。
下面针对第一装置已下载的流媒体文件在时间上是连续的和不 连续的这两种情形分别进行说明。
可选地, 在本发明的一个实施例中, 若所述第一装置已下载的 流媒体文件在时间上连续, 且不完整, 本发明实施例提供的播放流 媒体文件的方法除了包括上面所述的步骤 21 和步骤 22之外, 还可 包括:
所述第二装置接收所述第一装置发送的第一位置信息和所述已 下载的流媒体文件的地址信息, 所述第一位置信息指示了所述已下 载的流媒体文件的最后一个完整的数据包的位置;
所述第二装置根据所述第一位置信息和所述已下载的流媒体文 件的地址信息, 向所述流媒体服务器获取所述至少一部分数据以外 的部分或全部数据。 可选地, 在本发明的另一个实施例中, 若所述第一装置下载的 流媒体文件在时间上不连续, 且不完整, 本发明实施例提供的播放 流媒体文件的方法除了包括上面所述的步骤 21 和步骤 22之外, 还 可包括,
所述第二装置接收所述第一装置发送的緩存记录表, 和所述緩 存记录表中未緩存的片段存储块中的数据所对应的地址信息;
所述第二装置根据所述緩存记录表和所述未緩存的片段存储块 的数据所对应的地址信息, 从所述流媒体服务器获取所述至少一部 分数据以外的部分或全部数据。
可选地, 在本发明的又一个实施例中, 若所述第一装置下载的 流媒体文件在时间上不连续, 且不完整, 本发明实施例提供的播放 流媒体文件的方法除了包括上面所述的步骤 21 和步骤 22之外, 还 可包括,
所述第二装置接收所述流媒体服务器发送的緩存记录表中未緩 存的片段存储块中的数据, 所述緩存记录表为所述第一装置向服务 器发送的。
需要指出的是, 在上述各个实施例中, 所述已下载的流媒体文 件的至少一部分数据, 可以在所述第一装置确定所述已下载的流媒 体文件的数据量或时长满足预设条件时, 向所述第二装置发送。
需要指出的是, 在上述各个实施例中, 所述第一装置和所述第 二装置可以在同一局域网内。 由于在同一局域网内的两装置的数据 传输速率 4艮 高 , 一般 高 于 网 络侧 ADSL(Asymmetric Digital Subscriber Line , 非对称数字用户环路)网络的带宽, 这样一来, 能 够使存储(例如,存储在緩存或临时文件中)的这部分数据能以更快的 传输速率传输到第二装置, 最终使得在切换的过程中流媒体文件能 继续保持流畅的播放。 为更好的理解本发明, 下面以具体实施例为例来对本发明进行 进一步说明。 亦须注意, 以下所列举的实施例只是本发明的一部分 实施例, 本领域技术人员由本发明所述内容, 可易于想到其他实施 例, 它们都在本发明的范围内。
同时需了解的是, 下面的具体实施例重点描述了对下载的流媒 体文件在时间上是连续的情形, 由于对于下载的流媒体文件在时间 上是不连续的情形可根据本文所描述的内容相应得出, 因而, 本文 在此不再作特别详细的描述。
图 3A 是本发明实施例提供的一种播放流媒体文件的方法的示 意图。 参照图 3A , 该方法包括:
1 ) WAN (广域网)侧的流媒体服务器向第一装置发送流媒体文 件, 第一装置播放来自流媒体服务器的该流媒体文件;
2 ) 第一装置在接收到切换指令后, 由其上的控制点触发播放命 令, 将流媒体文件切换到第二装置上播放;
3 )第一装置上的控制点向流媒体服务器发送 TEARDOWN指令, 断开流媒体文件的传输, 同时该会话结束;
4 )第一装置与第二装置建立 RTSP(Real Time Streaming protocol 实时流协议)连接;
5 ) 第一装置向第二装置发送 ANNOUNCE请求, 其报文中包含 媒体文件的 SDP (会话描述协议) 描述信息 ( 包括该媒体文件的编 码格式、 大小、 分辨率等信息);
6 ) 第一装置向第二装置发送 SETUP 请求, 协商传递流媒体文 件数据的端口; 7 )第一装置找到緩存中存储的流媒体文件数据的最后一个完整 的数据包对应的位置信息——第一位置信息;
8 ) 第一装置向第二装置发送 RECORD请求, 所述 RECORD请 求中包含该流媒体文件的停止播放点和第一位置信息, 告知第二装 置所要播放的时间区域(从停止播放点到第一位置), 第二装置在对 应的 RECORD响应中打开数据链路;
9 ) 第一装置向第二装置发送 SET— PARAMETER请求, 告知第 二装置该流媒体文件的地址信息 ( URL )和第一位置信息 ( rtptime );
10 ) 第一装置与第二装置经过 TCP三次握手后, 第一装置开始 向第二装置传输已下载的所述流媒体文件的至少一部分数据;
1 1 ) 第二装置对接收到的流媒体文件的 URL信息进行 DNS 域 名解析, 解析出相应的 IP地址信息;
12 ) 第二装置根据地址信息和对应的第一位置信息与流媒体服 务器建立会话连接, 经过 TCP三次握手之后, 向流媒体服务器请求 第一位置信息之后的流媒体文件的数据。
下面对下载的流媒体文件在时间上是不连续的情形进行说明。 对于下载的流媒体文件在时间上是不连续的情况, 本发明实施 例提供的一种播放流媒体文件的方法可包括:
步骤 ( 1 ) 〜 ( 6 ) 与上面的步骤 1 )〜6)相同;
此外, 在步骤 ( 1 ) 和步骤 ( 2 ) 之间增加步骤: 第一装置根据 从流媒体服务器接收的流媒体文件的片段存储块更新緩存记录表中 的片段存储块的状态信息;
( 7 )第一装置在断开与流媒体服务器的流媒体文件传输时停止 对緩存数据表的更新, 保存最新的緩存记录表;
( 8 ) 第一装置向第二装置发送 RECORD请求, 所述 RECORD 请求中包含流媒体文件的停止播放点, 告知第二装置所要播放的起 始时间, 第二装置在对应的 RECORD响应中打开数据链路;
( 9 ) 第一装置向第二装置发送 SET— PARAMETER请求, 告知 第二装置该流媒体文件的地址信息 ( URL ); 此外, 在步骤 ( 9 ) 和步骤 ( 10 ) 之间增加步骤:: 第一装置将 已保存的最新的緩存记录表发送给第二装置;
步骤 ( 10 )、 ( 1 1 ) 与上面的步骤 10 )、 1 1 ) 相同;
( 12 ) 第二装置根据地址信息和緩存记录表与流媒体服务器建 立会话连接, 经过 TCP三次握手之后, 根据緩存记录表中指示的片 段存储块的状态信息向流媒体服务器请求流媒体文件的数据。
本发明实施例提供的流媒体文件播放的方法, 一方面, 有效地 利用了存储在第一装置中的这部分流媒体文件的数据, 减小了第二 装置向网络侧服务器请求的数据量, 提高了流媒体文件传输和播放 的效率。 另一方面, 当流媒体文件从第一装置切换到第二装置上播 放时, 第二装置在与互联网媒体服务器进行交互以请求传输数据的 同时, 可以播放第一装置传输过来的这部分流媒体文件的数据, 从 而实现了媒体画面平稳的切换, 避免了切换时緩冲和播放中断现象 的出现。 图 3A 所述方法已对本发明实施例提供的播放流媒体文件的方 法的进行了综合性描述。下面结合图 3 B对本发明实施例提供的播放 流媒体文件的方法进行有针对性的说明, 参照图 3B , 本实施例提供 一种播放流媒体文件的方法, 以家庭网络为例, 该方法包括:
30、 家庭网络设备 1 (第一装置)从流媒体服务器下载流媒体文 件, 并进行播放。
3 1、 家庭网络设备 1 在接收到用户输入的切换指令时, 向家庭 网络设备 2(第二装置)发送播放命令, 以将正在家庭网络设备 1上播 放的流媒体文件切换到家庭网络设备 2上进行播放。
在本实施例中, 家庭网络设备 1 和家庭网络设备 2 同属于一个 家庭网络的子网内, 在执行切换指令前, 家庭网络设备 1 已发现家 庭网络设备 2并且获取到家庭网络设备 2 的能力信息, 确定家庭网 络设备 2有能力播放家庭网络设备 1所获取的流媒体文件。
其中, 切换指令的触发可以嵌入在家庭网络设备 1 的媒体播放 器的控制列表中, 以图标、 菜单栏等形式出现。 当用户想把在家庭 网络设备 1 上播放的流媒体文件切换到家庭网络设备 2上播放时, 只需点击所对应的图标或者菜单栏,然后选择播放至的设备名称(家 庭网络设备 2 ) , 就完成了切换指令的触发。
32、 家庭网络设备 1 获取该流媒体文件存储在其緩存内的的数 据的信息。
所述数据的信息包括该流媒体文件存储在緩存中的数据的大小 或者该流媒体文件存储在緩存中的数据对应的能够支撑播放的时 间、 该流媒体文件存储在緩存中的数据的起始时间点和截止时间点 等等。
其中, 起始时间点为家庭网络设备 1 接收到切换指令时该流媒 体文件正在播放的时间戳 2(即, 第二位置信息的一种实现方式); 截 止时间点为该流媒体文件存储在緩存中的数据的最后一个完整的数 据包所对应的时间戳 1 (即, 第一位置信息的一种实现方式)。 已下载 的流媒体文件的能够播放的时长为时间戳 1与时间戳 2之差。
33、 家庭网络设备 1 确定该流媒体文件存储在緩存中的数据量 是否充足。
若不充足, 则执行步骤 33 1 , 家庭网络设备 1 将该流媒体文件 的 URL和时间戳 2的值发送给家庭网络设备 2 , 家庭网络设备 2直 接向网络侧的流媒体服务器请求时间戳 2以后的流媒体文件。
具体而言, 家庭网络设备 1 根据获取的数据的信息, 判断该流 媒体存储在緩存中的数据量是否充足。 如果家庭网络设备 1 在緩存 中存储的流媒体的数据量不充足, 则无法保证该流媒体在切换到设 备 2 上时能够保持流畅的播放, 则后续将緩存中的数据通过家庭网 络传输至设备 2 上的操作的作用并不显著。 在这种情况下家庭网络 设备 1将该流媒体的 URL和时间戳 2发送给家庭网络设备 2 , 家庭 网络设备 2 可根据这两个参数直接向网络侧的媒体服务器请求获取 该流媒体文件的数据。
若充足, 则继续执行下面的步骤。 34、 家庭网络设备 1 判断时间戳 1 的值是否是该流媒体文件的 结束位置。
若是, 则执行步骤 341 , 家庭网络设备 1 将该流媒体文件存储 在緩存中的数据通过家庭网络传输到家庭网络设备 2 的緩存中, 家 庭网络设备 2可以播放接收到的数据。
举例来说, 流媒体文件在家庭网络设备 1 上播放的过程中, 当 执行播放切换操作时, 有可能该流媒体的后续剩余数据已经全部下 载到家庭网络设备 1 的緩存之中。 如果发生这种情况, 则切换到家 庭网络设备 2 上播放该流媒体文件时, 此时, 不需要家庭网络设备 2向网络侧的流媒体服务器请求传输该流媒体文件的数据。
若时间戳 1 的值不是流媒体文件的结束位置, 则家庭网络设备 1执行继续执行步骤 35和 36。
35、 家庭网络设备 1 将家庭网络设备 1 緩存中的该流媒体文件 的数据通过家庭网络传输到家庭网络设备 2 的緩存中, 并将该流媒 体文件的 URL和时间戳 1 的值发送给家庭网络设备 2。
36、 家庭网络设备 2根据这两个参数信息向流媒体服务器请求 获取时间戳 1之后的该流媒体文件的数据。
需指出, 对于下载的流媒体文件在时间上是不连续的情况, 已 在上文进行了说明, 具体可参照上文中对下载的流媒体文件在时间 上是不连续的情况的相应描述。
这里需要说明的是, 在家庭网络设备 2 与网络侧的媒体服务器 建立数据连接, 进行交互和协商以及请求和获取流媒体的数据的同 时, 家庭网络设备 2正在播放家庭网络设备 1 的緩存中所存储的数 据时间戳 1 至时间戳 2这段时间内的媒体内容。 而当该媒体内容播 放至时间戳 1 , 即家庭网络设备 1 緩存中的数据耗尽时, 家庭网络 设备 2 与网络侧的媒体服务器的数据连接已经建立, 并且可能已经 获取到了从媒体服务器下载的后续的数据, 这样不仅能够解决流媒 体在网络设备之间切换时所引起的播放不流畅的问题, 而且降低了 在设备切换时互联网媒体节目发生緩冲和中断的概率。 需要说明的是, 本发明实施例中的位置信息可以为时间上的位 置, 还可以为数据容量上的位置, 本实施例只是以时间戳作为位置 信息(即时间上的位置信息)为例来进行说明, 当然, 显而易见, 还可 以以数据容量作为位置信息, 由于此情形与本实施例的情形类似, 在此不作贅述。
同时需要指出的是, 本实施例仅以流媒体文件的数据存储于緩 存中为例进行说明, 当然, 显而易见, 流媒体文件的数据亦可存储 于临时文件中, 本发明对此不作贅述。 如图 4 所示, 本发明实施例还提供一种播放流媒体文件的装置 40 , 所述装置 40 包括接收器 41、 存储器 42、 播放器 43、 处理器 44 和发送器 45。 其中:
接收器 41 , 用于接收切换指令;
存储器 42 , 用于緩存来自流媒体服务器的流媒体文件; 播放器 43 , 用于播放来自流媒体服务器的流媒体文件; 处理器 44 , 用于在所述接收器收到所述切换指令时, 生成播放 命令, 并确定需要向第二装置发送的已下载的所述流媒体文件的至 少一部分数据, 其中, 所述播放命令用于指示所述第二装置播放所 述第一装置发送的所述至少一部分数据的部分或全部, 所述至少一 部分数据包括所述第一装置还未播放的数据;
发送器 45 , 用于向第二装置发送所述播放命令, 和所述处理器 确定的已下载的所述流媒体文件的至少一部分数据。
本发明实施例提供的播放流媒体文件的装置, 通过将已下载的 所述流媒体文件的至少一部分数据发送给第二装置, 且所述至少一 部分数据包括所述第一装置还未播放的数据, 这样, 所述第二装置 即可播放所述第一装置发送的所述至少一部分数据的部分或全部。 如此一来, 由于有效地利用 了存储在第一装置中的这部分已下载的 流媒体文件的数据, 因而, 减小了第二装置需要获取的该流媒体文 件的数据量, 提高了流媒体文件的传输和播放效率。 另外, 在从第一装置切换到第二装置播放的过程中, 在现有技 术中, 第二装置与互联网媒体服务器之间可能会经历一系列操作, 包括建立连接、 认证、 能力协商等等, 这些操作需要消耗一定的时 间, 从而导致在切换过程中会出现緩冲、 延时等情况, 造成媒体节 目播放的中断, 影响用户的观赏体验。 而本发明实施例在此种情形 下, 当流媒体文件从第一装置切换到第二装置上播放时, 第二装置 可以在与流媒体服务器进行交互以请求传输数据的同时, 播放第一 装置传输过来的这部分已下载的流媒体文件的数据, 从而可实现流 媒体播放画面的平稳切换, 避免了切换时緩冲和播放中断现象的出 现。
可选地, 在本发明的一个实施例中, 所述处理器 44还用于, 若 所述第一装置已下载的流媒体文件在时间上连续, 确定所述已下载 的流媒体文件的第一位置信息, 所述第一位置信息指示了所述已下 载的流媒体文件的最后一个完整的数据包的位置。
进一步地, 所述发送器 45还用于在所述已下载的流媒体文件不 完整时, 在所述接收器收到所述切换指令之后, 向所述第二装置发 送所述第一位置信息和所述已下载的流媒体文件的地址信息; 所述 第一位置信息和所述流媒体文件的地址信息用于所述第二装置向所 述流媒体服务器获取所述至少一部分数据以外的部分或全部数据。
可选地, 在本发明的另一个实施例中, 所述接收器 41还用于, 在所述第一装置下载的流媒体文件在时间上不连续时, 接收服务器 发送的緩存记录表并进行更新;
所述发送器 45还用于, 在所述已下载的流媒体文件不完整时, 在所述接收器收到所述切换指令之后, 向所述第二装置发送所述更 新的緩存记录表, 和所述更新的緩存记录表中未緩存的片段存储块 中的数据所对应的地址信息;
所述更新的緩存记录表和所述更新的未緩存的片段存储块的数 据所对应的地址信息用于, 所述第二装置从所述流媒体服务器获取 所述至少一部分数据以外的部分或全部数据。 可选地, 在本发明的又一个实施例中, 所述接收器 41还用于, 在所述第一装置下载的流媒体文件在时间上不连续时, 接收服务器 发送的緩存记录表并进行更新;
所述发送器 45还用于, 在所述已下载的流媒体文件不完整时, 在所述接收器收到所述切换指令之后, 向所述服务器发送所述更新 的緩存记录表和所述第二装置的地址信息, 所述更新的緩存记录表 和所述第二装置的地址信息用于所述流媒体服务器向所述第二装置 发送所述更新的緩存记录表中未緩存的片段存储块中的数据。
在本发明播放流媒体文件的装置 40的各个实施例中, 所述发送 器 45可具体用于, 在所述第一装置确定所述已下载的流媒体文件的 数据量或时长满足预设条件时, 向所述第二装置发送所述已下载的 流媒体文件的至少一部分数据。
需要指出的是, 在上述实施例中, 所述播放流媒体文件的装置 40和所述第二装置优选地可以在同一局域网内。 上述方法实施例中 的相关说明, 也同样适用于上述装置的实施例, 此处不再贅述。 如图 5 所示, 本发明实施例还提供一种播放流媒体文件的装置 50 , 所述装置 50 包括接收器 5 1和播放器 52。 其中:
接收器 5 1 , 用于接收第一装置在收到切换指令时发送的切换命 令, 和所述第一装置从流媒体服务器已下载的流媒体文件的至少一 部分数据, 所述至少一部分数据包括所述第一装置还未播放的数据; 播放器 52 , 用于根据所述播放命令, 播放所述第一装置发送的 所述至少一部分数据的部分或全部。
本发明实施例提供的播放流媒体文件的装置, 通过将已下载的 所述流媒体文件的至少一部分数据发送给第二装置, 且所述至少一 部分数据包括所述第一装置还未播放的数据, 这样, 所述第二装置 即可播放所述第一装置发送的所述至少一部分数据的部分或全部。 如此一来, 由于有效地利用 了存储在第一装置中的这部分已下载的 流媒体文件的数据, 因而, 减小了第二装置需要获取的该流媒体文 件的数据量, 提高了流媒体文件的传输和播放效率。
另外, 在从第一装置切换到第二装置播放的过程中, 在现有技 术中, 第二装置与互联网媒体服务器之间可能会经历一系列操作, 包括建立连接、 认证、 能力协商等等, 这些操作需要消耗一定的时 间, 从而导致在切换过程中会出现緩冲、 延时等情况, 造成媒体节 目播放的中断, 影响用户的观赏体验。 而本发明实施例在此种情形 下, 当流媒体文件从第一装置切换到第二装置上播放时, 第二装置 可以在与流媒体服务器进行交互以请求传输数据的同时, 播放第一 装置传输过来的这部分已下载的流媒体文件的数据, 从而可实现流 媒体播放画面的平稳切换, 避免了切换时緩冲和播放中断现象的出 现。
可选地, 在本发明的一个实施例中, 所述接收器 5 1还用于, 在 所述第一装置已下载的流媒体文件在时间上连续, 且不完整时, 接 收所述第一装置发送的第一位置信息和所述已下载的流媒体文件的 地址信息, 并根据所述第一位置信息和所述已下载的流媒体文件的 地址信息, 向所述流媒体服务器获取所述至少一部分数据以外的部 分或全部数据;
其中, 所述第一位置信息指示了所述已下载的流媒体文件的最 后一个完整的数据包的位置。
可选地, 在本发明的另一个实施例中, 所述接收器 5 1还用于, 在所述第一装置已下载的流媒体文件在时间上不连续, 且不完整时, 接收所述第一装置发送的的緩存记录表, 和所述緩存记录表中未緩 存的片段存储块中的数据所对应的地址信息, 并根据所述緩存记录 表和所述未緩存的片段存储块的数据所对应的地址信息, 从所述流 媒体服务器获取所述至少一部分数据以外的部分或全部数据。
可选地, 在本发明的又一个实施例中, 所述接收器 5 1还用于, 在所述第一装置已下载的流媒体文件在时间上不连续, 且不完整时, 接收所述流媒体服务器发送的緩存记录表中未緩存的片段存储块中 的数据, 所述緩存记录表为所述第一装置向服务器发送的。 在本发明播放流媒体文件的装置 50的各个实施例中, 所述接收 器 5 1具体用于, 在所述第一装置确定所述已下载的流媒体文件的数 据量或时长满足预设条件时, 接收所述第一装置发送的所述已下载 的流媒体文件的至少一部分数据。
其中, 在上述实施例中, 所述播放流媒体文件的装置 50和所述 第一装置优选地可以在同一局域网内。
指出的是, 本发明实施例提供的播放流媒体文件的装置与本文 中所述播放流媒体文件的方法相对应, 由于在前文中已对播放流媒 体文件的方法进行了详细描述, 上述方法实施例中的相关说明, 也 同样适用于上述装置的实施例, 此处不再贅述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或 部分步骤是可以通过程序来指令相关的硬件完成, 所述的程序可以 存储于一种计算机可读存储介质中, 所述存储介质可以是只读存储 器、 磁盘或光盘等。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围 并不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技 术范围内, 可轻易想到变化或替换, 都应涵盖在本发明的保护范围 之内。 因此, 本发明的保护范围应以权利要求的保护范围为准。

Claims

权 利 要 求 书
1、 一种播放流媒体文件的方法, 其特征在于, 所述方法包括: 第一装置播放来自流媒体服务器的流媒体文件;
若所述第一装置收到切换指令, 所述第一装置向第二装置发送播 放命令, 并向所述第二装置发送已下载的所述流媒体文件的至少一部 分数据, 所述至少一部分数据包括所述第一装置还未播放的数据; 所述播放命令用于指示所述第二装置播放所述第一装置发送的 所述至少一部分数据的部分或全部。
2、 根据权利要求 1所述的方法, 其特征在于, 若所述第一装置 已下载的流媒体文件在时间上连续, 所述方法还包括:
所述第一装置确定所述已下载的流媒体文件的第一位置信息, 所 述第一位置信息指示了所述已下载的流媒体文件的最后一个完整的 数据包的位置;
所述第一装置还未播放的数据具体为, 所述已下载的流媒体文件 中从停止播放点到所述第一位置信息指示的位置之间的数据。
3、 根据权利要求 2所述的方法, 其特征在于,
如果所述已下载的流媒体文件不完整, 所述第一装置在收到所述 切换指令之后, 所述方法还包括,
向所述第二装置发送所述第一位置信息和所述已下载的流媒体 文件的地址信息; 所述第一位置信, 和所述流媒体文件的地址信息用 于所述第二装置向所述流媒体服务器获取所述至少一部分数据以外 的部分或全部数据。
4、 根据权利要求 1 所述的方法, 其特征在于, 若所述第一装置 下载的流媒体文件在时间上不连续, 所述方法还包括:
所述第一装置接收服务器发送的緩存记录表并进行更新; 所述第一装置还未播放的数据具体为, 所述更新的緩存记录表中 标识已緩存但未释放的片段存储块中的数据;
如果所述已下载的流媒体文件不完整, 所述第一装置收到所述切 换指令之后, 向所述第二装置发送所述更新的緩存记录表, 和所述更 新的緩存记录表中未緩存的片段存储块中的数据所对应的地址信息; 所述更新的緩存记录表和所述未緩存的片段存储块的数据所对 应的地址信息用于, 所述第二装置从所述流媒体服务器获取所述至少 一部分数据以外的部分或全部数据。
5、 根据权利要求 1 所述的方法, 其特征在于, 若所述第一装置 下载的流媒体文件在时间上不连续, 所述方法还包括:
所述第一装置接收服务器发送的緩存记录表并进行更新; 所述第一装置还未播放的数据具体为, 所述更新的緩存记录表中 标识已緩存但未释放的片段存储块中的数据;
如果所述已下载的流媒体文件不完整, 所述第一装置在收到切换 指令之后, 向所述服务器发送所述更新的緩存记录表和所述第二装置 的地址信息, 所述更新的緩存记录表和所述第二装置的地址信息用于 所述流媒体服务器向所述第二装置发送所述更新的緩存记录表中未 緩存的片段存储块中的数据。
6、 如权利要求 1 至 5任一项所述的方法, 其特征在于, 所述已 下载的流媒体文件的至少一部分数据, 在所述第一装置确定所述已下 载的流媒体文件的数据量或时长满足预设条件时, 向所述第二装置发 送。
7、 一种播放流媒体文件的方法, 其特征在于, 所述方法包括: 第二装置接收第一装置在收到切换指令时发送的播放命令, 和所 述第一装置从流媒体服务器已下载的流媒体文件的至少一部分数据, 所述至少一部分数据包括所述第一装置还未播放的数据;
所述第二装置根据所述播放命令, 播放所述第一装置发送的所述 至少一部分数据的部分或全部。
8、 根据权利要求 7 所述的方法, 其特征在于, 若所述第一装置 已下载的流媒体文件在时间上连续, 且不完整, 所述方法还包括, 所述第二装置接收所述第一装置发送的第一位置信息和所述已 下载的流媒体文件的地址信息, 所述第一位置信息指示了所述已下载 的流媒体文件的最后一个完整的数据包的位置; 所述第二装置根据所述第一位置信息和所述已下载的流媒体文 件的地址信息, 向所述流媒体服务器获取所述至少一部分数据以夕卜的 部分或全部数据。
9、 根据权利要求 7 所述的方法, 其特征在于, 若所述第一装置 下载的流媒体文件在时间上不连续, 且不完整, 所述方法还包括, 所述第二装置接收所述第一装置发送的緩存记录表, 和所述緩存 记录表中未緩存的片段存储块中的数据所对应的地址信息;
所述第二装置根据所述緩存记录表和所述未緩存的片段存储块 的数据所对应的地址信息, 从所述流媒体服务器获取所述至少一部分 数据以外的部分或全部数据。
10、 根据权利要求 7所述的方法, 其特征在于, 若所述第一装置 下载的流媒体文件在时间上不连续, 且不完整, 所述方法还包括, 所述第二装置接收所述流媒体服务器发送的緩存记录表中未緩 存的片段存储块中的数据, 所述緩存记录表为所述第一装置向服务器 发送的。
1 1、 如权利要求 7- 10 任一项所述的方法, 其特征在于, 所述已 下载的流媒体文件的至少一部分数据, 在所述第一装置确定所述已下 载的流媒体文件的数据量或时长满足预设条件时, 向所述第二装置发 送。
12、 一种播放流媒体文件的装置, 其特征在于, 所述装置包括: 接收器, 用于接收切换指令;
存储器, 用于緩存来自流媒体服务器的流媒体文件;
播放器, 用于播放来自流媒体服务器的流媒体文件;
处理器,用于在所述接收器收到所述切换指令时,生成播放命令, 并确定需要向第二装置发送的已下载的所述流媒体文件的至少一部 分数据, 其中, 所述播放命令用于指示所述第二装置播放所述第一装 置发送的所述至少一部分数据的部分或全部, 所述至少一部分数据包 括所述第一装置还未播放的数据;
发送器, 用于向第二装置发送所述播放命令, 和所述处理器确定 的已下载的所述流媒体文件的至少一部分数据。
13、 根据权利要求 12 所述的装置, 其特征在于, 所述处理器还 用于, 若所述第一装置已下载的流媒体文件在时间上连续, 确定所述 已下载的流媒体文件的第一位置信息, 所述第一位置信息指示了所述 已下载的流媒体文件的最后一个完整的数据包的位置。
14、 根据权利要求 13 所述的装置, 其特征在于, 所述发送器还 用于在所述已下载的流媒体文件不完整时, 在所述接收器收到所述切 换指令之后, 向所述第二装置发送所述第一位置信息和所述已下载的 流媒体文件的地址信息; 所述第一位置信息和所述流媒体文件的地址 信息用于所述第二装置向所述流媒体服务器获取所述至少一部分数 据以外的部分或全部数据。
15、 根据权利要求 12 所述的装置, 其特征在于, 所述接收器还 用于, 在所述第一装置下载的流媒体文件在时间上不连续时, 接收服 务器发送的緩存记录表并进行更新;
所述发送器还用于, 在所述已下载的流媒体文件不完整时, 在所 述接收器收到所述切换指令之后, 向所述第二装置发送所述更新的緩 存记录表, 和所述更新的緩存记录表中未緩存的片段存储块中的数据 所对应的地址信息;
所述更新的緩存记录表和所述未緩存的片段存储块的数据所对 应的地址信息用于, 所述第二装置从所述流媒体服务器获取所述至少 一部分数据以外的部分或全部数据。
16、 根据权利要求 12 所述的装置, 其特征在于, 所述接收器还 用于, 在所述第一装置下载的流媒体文件在时间上不连续时, 接收服 务器发送的緩存记录表并进行更新;
所述发送器还用于, 在所述已下载的流媒体文件不完整时, 在所 述接收器收到所述切换指令之后, 向所述服务器发送所述更新的緩存 记录表和所述第二装置的地址信息, 所述更新的緩存记录表和所述第 二装置的地址信息用于所述流媒体服务器向所述第二装置发送所述 更新的緩存记录表中未緩存的片段存储块中的数据。
17、 根据权利要求 12至 16任一项所述的装置, 其特征在于, 所 述发送器具体用于, 在所述第一装置确定所述已下载的流媒体文件的 数据量或时长满足预设条件时, 向所述第二装置发送所述已下载的流 媒体文件的至少一部分数据。
1 8、 一种播放流媒体文件的装置, 其特征在于, 所述装置包括: 接收器, 用于接收第一装置在收到切换指令时发送的播放命令, 和所述第一装置从流媒体服务器已下载的流媒体文件的至少一部分 数据, 所述至少一部分数据包括所述第一装置还未播放的数据;
播放器, 用于根据所述播放命令, 播放所述第一装置发送的所述 至少一部分数据的部分或全部。
19、 根据权利要求 18 所述的装置, 其特征在于, 所述接收器还 用于, 在所述第一装置已下载的流媒体文件在时间上连续, 且不完整 时, 接收所述第一装置发送的第一位置信息和所述已下载的流媒体文 件的地址信息, 并根据所述第一位置信息和所述已下载的流媒体文件 的地址信息, 向所述流媒体服务器获取所述至少一部分数据以外的部 分或全部数据;
其中, 所述第一位置信息指示了所述已下载的流媒体文件的最后 一个完整的数据包的位置。
20、 根据权利要求 18 所述的装置, 其特征在于, 所述接收器还 用于, 在所述第一装置已下载的流媒体文件在时间上不连续, 且不完 整时, 接收所述第一装置发送的的緩存记录表, 和所述緩存记录表中 未緩存的片段存储块中的数据所对应的地址信息, 并根据所述緩存记 录表和所述未緩存的片段存储块的数据所对应的地址信息, 从所述流 媒体服务器获取所述至少一部分数据以外的部分或全部数据。
21、 根据权利要求 18 所述的装置, 其特征在于, 所述接收器还 用于, 在所述第一装置已下载的流媒体文件在时间上不连续, 且不完 整时, 接收所述流媒体服务器发送的緩存记录表中未緩存的片段存储 块中的数据, 所述緩存记录表为所述第一装置向服务器发送的。
22、 根据权利要求 18-21任一项所述的装置, 其特征在于, 所述 接收器具体用于, 在所述第一装置确定所述已下载的流媒体文件的数 据量或时长满足预设条件时, 接收所述第一装置发送的所述已下载的 流媒体文件的至少一部分数据。
PCT/CN2012/083333 2012-10-22 2012-10-22 一种播放流媒体文件的方法和装置 WO2014063297A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201280002878.8A CN103181143B (zh) 2012-10-22 2012-10-22 一种播放流媒体文件的方法和装置
EP12877605.1A EP2744169B1 (en) 2012-10-22 2012-10-22 Method and apparatus for playing streaming media files
PCT/CN2012/083333 WO2014063297A1 (zh) 2012-10-22 2012-10-22 一种播放流媒体文件的方法和装置
US14/107,133 US9380095B2 (en) 2012-10-22 2013-12-16 Method and apparatus for playing streaming media file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/083333 WO2014063297A1 (zh) 2012-10-22 2012-10-22 一种播放流媒体文件的方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/107,133 Continuation US9380095B2 (en) 2012-10-22 2013-12-16 Method and apparatus for playing streaming media file

Publications (1)

Publication Number Publication Date
WO2014063297A1 true WO2014063297A1 (zh) 2014-05-01

Family

ID=48639403

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/083333 WO2014063297A1 (zh) 2012-10-22 2012-10-22 一种播放流媒体文件的方法和装置

Country Status (4)

Country Link
US (1) US9380095B2 (zh)
EP (1) EP2744169B1 (zh)
CN (1) CN103181143B (zh)
WO (1) WO2014063297A1 (zh)

Families Citing this family (42)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780930A (zh) * 2012-10-25 2014-05-07 中兴通讯股份有限公司 内容切换方法及装置
US9282423B2 (en) * 2013-03-13 2016-03-08 Aliphcom Proximity and interface controls of media devices for media presentations
US11044451B2 (en) 2013-03-14 2021-06-22 Jawb Acquisition Llc Proximity-based control of media devices for media presentations
US20140267148A1 (en) * 2013-03-14 2014-09-18 Aliphcom Proximity and interface controls of media devices for media presentations
JP6277626B2 (ja) 2013-08-08 2018-02-14 株式会社リコー 再生システム、再生制御システム、情報端末、表示装置、再生制御プログラム及び再生制御方法
CN104581361A (zh) * 2013-10-09 2015-04-29 索尼公司 多媒体播放控制方法、装置以及系统
CN103533401B (zh) * 2013-10-22 2016-09-21 中国联合网络通信集团有限公司 流媒体数据切换播放方法和播放器
CN104616675A (zh) * 2013-11-05 2015-05-13 华为终端有限公司 一种切换播放设备的方法及移动终端
US10003840B2 (en) 2014-04-07 2018-06-19 Spotify Ab System and method for providing watch-now functionality in a media content environment
US20150317690A1 (en) 2014-05-05 2015-11-05 Spotify Ab System and method for delivering media content with music-styled advertisements, including use of lyrical information
WO2015180102A1 (en) * 2014-05-29 2015-12-03 Thomson Licensing Method and system for switching and simultaneous replay of home media streaming
US20160050130A1 (en) * 2014-08-18 2016-02-18 Sony Corporation Device switching for a streaming service
CN104244063B (zh) * 2014-09-04 2017-05-31 广东欧珀移动通信有限公司 多播放设备的转换方法和装置
CN104270668B (zh) * 2014-09-26 2018-03-20 广州创维平面显示科技有限公司 一种视频内容续播方法与系统
US10956936B2 (en) 2014-12-30 2021-03-23 Spotify Ab System and method for providing enhanced user-sponsor interaction in a media environment, including support for shake action
US20160189249A1 (en) * 2014-12-30 2016-06-30 Spotify Ab System and method for delivering media content and advertisements across connected platforms, including use of companion advertisements
US20160189232A1 (en) * 2014-12-30 2016-06-30 Spotify Ab System and method for delivering media content and advertisements across connected platforms, including targeting to different locations and devices
US10963430B2 (en) 2015-04-01 2021-03-30 Dropbox, Inc. Shared workspaces with selective content item synchronization
US9922201B2 (en) 2015-04-01 2018-03-20 Dropbox, Inc. Nested namespaces for selective content sharing
US9852147B2 (en) 2015-04-01 2017-12-26 Dropbox, Inc. Selective synchronization and distributed content item block caching for multi-premises hosting of digital content items
CN104811827A (zh) 2015-04-20 2015-07-29 中兴通讯股份有限公司 报文发送方法、码流处理方法及装置
TWI564729B (zh) * 2015-08-07 2017-01-01 廣達電腦股份有限公司 資料分享系統以及其方法
US20170048681A1 (en) * 2015-08-11 2017-02-16 At&T Intellectual Property I, L.P. On-demand time-shifted access of broadcast content
US9479567B1 (en) 2015-10-29 2016-10-25 Dropbox, Inc. Synchronization protocol for multi-premises hosting of digital content items
US10691718B2 (en) 2015-10-29 2020-06-23 Dropbox, Inc. Synchronization protocol for multi-premises hosting of digital content items
US10419583B2 (en) * 2015-11-10 2019-09-17 Bang & Olufsen A/S System and method for initiating content streaming
US9537952B1 (en) * 2016-01-29 2017-01-03 Dropbox, Inc. Apparent cloud access for hosted content items
CN105635175B (zh) * 2016-02-04 2018-11-06 北京奇艺世纪科技有限公司 一种rtmp流服务器的负载均衡方法和系统
US10789038B2 (en) * 2018-07-20 2020-09-29 Logitech Europe S.A. Content streaming apparatus and method
CN110798743A (zh) * 2018-08-02 2020-02-14 腾讯科技(深圳)有限公司 视频播放方法、装置及计算机可读存储介质
CN112133300B (zh) * 2019-06-25 2024-05-07 腾讯科技(深圳)有限公司 多设备的交互方法、相关设备和系统
US11095467B2 (en) 2019-08-16 2021-08-17 Logitech Europe S.A. Video conference system
US11258982B2 (en) 2019-08-16 2022-02-22 Logitech Europe S.A. Video conference system
US11088861B2 (en) 2019-08-16 2021-08-10 Logitech Europe S.A. Video conference system
US11038704B2 (en) 2019-08-16 2021-06-15 Logitech Europe S.A. Video conference system
US11290531B2 (en) 2019-12-04 2022-03-29 Dropbox, Inc. Immediate cloud content item creation from local file system interface
US10904446B1 (en) 2020-03-30 2021-01-26 Logitech Europe S.A. Advanced video conferencing systems and methods
US10972655B1 (en) 2020-03-30 2021-04-06 Logitech Europe S.A. Advanced video conferencing systems and methods
US10951858B1 (en) 2020-03-30 2021-03-16 Logitech Europe S.A. Advanced video conferencing systems and methods
US10965908B1 (en) 2020-03-30 2021-03-30 Logitech Europe S.A. Advanced video conferencing systems and methods
US11418559B2 (en) 2020-09-21 2022-08-16 Logitech Europe S.A. Content distribution system
US11445457B2 (en) 2020-09-21 2022-09-13 Logitech Europe S.A. Content distribution system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668182A (zh) * 2009-10-20 2010-03-10 中国电信股份有限公司 在多类型终端间实现视频节目的位移方法及系统
CN102204219A (zh) * 2011-04-19 2011-09-28 华为技术有限公司 视频切换播放方法、装置和系统
CN102298947A (zh) * 2011-08-23 2011-12-28 百度在线网络技术(北京)有限公司 一种用于在多媒体播放器间进行播放切换的方法与设备
US20120016965A1 (en) * 2010-07-13 2012-01-19 Qualcomm Incorporated Video switching for streaming video data

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7344084B2 (en) * 2005-09-19 2008-03-18 Sony Corporation Portable video programs
US20070153740A1 (en) * 2006-01-04 2007-07-05 Arcadyan Technology Corporation Method and apparatus for media handover in the network
US20100030808A1 (en) * 2008-07-31 2010-02-04 Nortel Networks Limited Multimedia architecture for audio and visual content
KR101678394B1 (ko) * 2009-10-23 2016-11-22 삼성전자 주식회사 Vod 서비스를 제공하는 디지털 방송 시스템에서 데이터 저장 방법 및 그를 수행하는 장치
US8954597B2 (en) * 2010-06-28 2015-02-10 Hulu, LLC Method and apparatus for synchronizing paused playback across platforms
US8614625B2 (en) * 2010-08-31 2013-12-24 Apple Inc. Adaptive media content scrubbing on a remote device
US9485298B2 (en) * 2010-10-28 2016-11-01 Netscout Systems Texas, Llc Device with video buffer modeling and methods for use therewith
US8775664B2 (en) * 2011-02-16 2014-07-08 Sony Corporation Method and apparatus for use in tracking playback of media streams while in stand-by mode
CN102404644B (zh) 2011-11-09 2014-07-30 深圳市同洲电子股份有限公司 一种跨媒体交互方法及系统、终端、服务器
CN102520995B (zh) * 2011-12-06 2014-11-12 北京航空航天大学 软件远程流式加载方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668182A (zh) * 2009-10-20 2010-03-10 中国电信股份有限公司 在多类型终端间实现视频节目的位移方法及系统
US20120016965A1 (en) * 2010-07-13 2012-01-19 Qualcomm Incorporated Video switching for streaming video data
CN102204219A (zh) * 2011-04-19 2011-09-28 华为技术有限公司 视频切换播放方法、装置和系统
CN102298947A (zh) * 2011-08-23 2011-12-28 百度在线网络技术(北京)有限公司 一种用于在多媒体播放器间进行播放切换的方法与设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2744169A4 *

Also Published As

Publication number Publication date
EP2744169A1 (en) 2014-06-18
US9380095B2 (en) 2016-06-28
CN103181143A (zh) 2013-06-26
EP2744169A4 (en) 2014-10-08
US20140115115A1 (en) 2014-04-24
CN103181143B (zh) 2015-07-08
EP2744169B1 (en) 2016-01-13

Similar Documents

Publication Publication Date Title
WO2014063297A1 (zh) 一种播放流媒体文件的方法和装置
JP5588517B2 (ja) データセグメントのオプションのブロードキャスト配信によるストリーミング
EP2391086B1 (en) Method and apparatus for playing live content
US9749373B2 (en) System and method for improved content streaming
CN107819809B (zh) 对内容进行同步操作的方法及装置
WO2013127172A1 (zh) 一种流媒体传输方法、设备及系统
WO2013063941A1 (zh) 家庭网络中dlna终端的屏幕共享方法及系统
US9356985B2 (en) Streaming video to cellular phones
WO2012171507A1 (zh) 向客户端传输数据文件的方法和装置
TWI616097B (zh) 串流裝置及方法、串流服務系統及記錄介質
JP2002330381A (ja) データ再生方法、データ受信端末及びデータ受信方法
WO2009015611A1 (fr) Procédé, système et appareil pour une commutation rapide de source multimédia
WO2014067070A1 (zh) 数据传输方法、切换方法、数据传输装置、切换装置、用户设备、无线接入节点、数据传输系统、切换系统
CN112616065B (zh) 一种屏幕镜像发起方法、装置、系统及可读存储介质
CN108667871B (zh) 基于p2p的传输方法和装置
WO2009012701A1 (en) A notification method, apparatus and system of real time streaming protocol event
WO2013167054A2 (zh) 一种本地通信网络业务切换方法、装置和系统
JP2017517221A (ja) Httpストリーミングを使用するdashストリーミングのための方法及び装置
JP2001242876A (ja) データ受信再生方法、データ受信再生装置、データ送信方法、およびデータ送信装置
WO2010057391A1 (zh) 一种流媒体播放控制方法、设备及系统
KR101548501B1 (ko) 청크 기반의 끊김 없는 스트림 송수신 장치 및 그 방법
WO2012094992A1 (zh) 一种实现数据获取的方法和系统
WO2010025635A1 (zh) 一种播放切换方法、媒体服务器、用户终端和系统
WO2018171567A1 (zh) 播放媒体流的方法、服务器及终端
WO2010075742A1 (zh) 一种p2p网络中获取媒体内容的方法、装置及系统

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2012877605

Country of ref document: EP

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

Ref document number: 12877605

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE