[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2009033345A1 - Procédé pour télécharger et lire simultanément des supports en flux de transfert hypertexte - Google Patents

Procédé pour télécharger et lire simultanément des supports en flux de transfert hypertexte Download PDF

Info

Publication number
WO2009033345A1
WO2009033345A1 PCT/CN2007/003831 CN2007003831W WO2009033345A1 WO 2009033345 A1 WO2009033345 A1 WO 2009033345A1 CN 2007003831 W CN2007003831 W CN 2007003831W WO 2009033345 A1 WO2009033345 A1 WO 2009033345A1
Authority
WO
WIPO (PCT)
Prior art keywords
media
data
download
segment
terminal
Prior art date
Application number
PCT/CN2007/003831
Other languages
English (en)
French (fr)
Inventor
Gang Liu
Dingyong Gou
Xin Xie
Xiaoyan Huang
Jiangyue Wu
Original Assignee
Zte Corporation
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 Zte Corporation filed Critical Zte Corporation
Publication of WO2009033345A1 publication Critical patent/WO2009033345A1/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/764Media network packet handling at the destination 

Definitions

  • the present invention belongs to the field of multimedia, and in particular, to a method for supporting a terminal hypertext transport (HTTP) streaming media service.
  • HTTP hypertext transport
  • streaming media The main technical feature of streaming media is the use of streaming, that is, the transmission of audio and video programs to the terminal via the Internet.
  • streaming There are currently two methods for implementing streaming: sequential streaming and real-time streaming.
  • sequential streaming since a standard HTTP server can send this form of file without the need for other special protocols, it is often referred to as HTTP streaming; sequential streaming is suitable for high-quality media such as short films, advertisements, and music. Files; and, sequential streaming media files can be placed on standard HTTP or FTP servers for easy management.
  • HTTP streaming has many advantages compared with real-time streaming: Server control is simple and easy to manage; Transmission protocol uses the Internet's most popular HTTP protocol, which is versatile, easy to implement, and fast in response. The control overhead is small, especially suitable for wireless environments, and is not limited by firewalls; the protocol on the mobile phone is simplified, and only needs to use the HTTP protocol like a normal browser, and does not need to implement a complex RTSP protocol cluster. Therefore, HTTP streaming has been widely used, and many internationally renowned operators require mobile phone manufacturers to support HTTP streaming.
  • the system structure of the mobile phone supporting HTTP streaming service is as shown in FIG. 1 , and the mobile phone passes through the base station and the network.
  • the network is connected to the server.
  • the solution for implementing the HTTP streaming service in the above system is generally to download the media data to a local file or a buffer through HTTP, and then play it, specifically including the following steps, as shown in FIG. 2:
  • Step 201 The mobile terminal sends a request to the server, and downloads the URL through the uniform resource locator.
  • Step 202 The server returns a confirmation message to the mobile terminal.
  • Step 203 The mobile terminal requests the server to download the media data.
  • Step 205 Repeat steps 203 and 204 until the entire media file is downloaded.
  • the technical problem to be solved by the present invention is to provide a method for a terminal to download and play HTTP streaming media at the same time, which supports synchronous playback of HTTP streaming media and shortens waiting time on the terminal.
  • the present invention provides a method for a terminal to simultaneously download and play a hypertext transport streaming medium, characterized in that the method comprises the following steps:
  • Step B After the downloading of the first media data is completed, while continuing the downloading, the segmented media data in each storage area in which the full download data has been cached is sequentially decoded and played. Further, the above method may further have the following features: Step B is further divided into the following steps:
  • the terminal starts playing the downloaded media after decoding the first piece of media data that has been downloaded and stored in the first segment of the locally cached storage area;
  • the play read pointer in the play thread cannot point to a storage area that has not yet stored the full download data.
  • the download write pointer in the download thread cannot point to the storage area where the media data that has not been played is located.
  • the downloaded mth segment data is stored in the mth segment of the local cache in the manner of sequential storage; if the m segment data is downloaded, if the playback has finished (m - 1) The media in the segment storage area is paused until the mth segment of data is downloaded and resumed.
  • the above method may also have the following features:
  • the method of cyclic storage is used when storing media data. If m is less than or equal to N, the mth segment data is stored in the mth segment storage area of the local cache; if m is greater than the total number of storage areas allocated by the local cache for the media N, the mth segment data is stored in the
  • the above method may also have the following features:
  • the above method may also have the following features:
  • the local cache is a main memory of the terminal, or a disk placed on the terminal, or a cache space allocated for the downloaded media on the mobile storage device connected to the terminal.
  • the above method may also have the following features:
  • the local cache is a cache space allocated on the main memory of the terminal for the downloaded media.
  • the terminal is a mobile phone.
  • the invention realizes that the terminal supports the download and play synchronization of the HTTP streaming media, and the segmentation and recycling of the buffer, thereby greatly shortening the waiting time, greatly improving the user experience, and also reducing the memory resources. demand.
  • Drawing fan
  • FIG. 1 is a schematic structural diagram of a system for supporting a mobile phone HTTP stream
  • FIG. 2 is a flow chart of the system shown in FIG. 1 for implementing HTTP streaming of a mobile phone
  • FIG. 3 is a general flowchart of implementing HTTP streaming of a mobile phone according to an embodiment of the present invention
  • FIG. 4 is a detailed flowchart of implementing HTTP streaming of a mobile phone in FIG. 3;
  • FIG. 5 is a schematic diagram of a cache structure used in the flow shown in FIG. Preferred embodiment of the invention
  • the main idea of the present invention is that the terminal can start playing after downloading a certain amount of data, and realize parallel execution of downloading and playing, which can be separately controlled by using two threads; in addition, downloading and playing need to process the buffer.
  • the optimization scheme of the present invention adopts a scheme of recycling cache; In the process, the playback read pointer cannot exceed the download write pointer; the download write pointer cannot cover the content that has not been read and played, that is, under the premise of dual-thread control, the synchronization of download and play is guaranteed.
  • the cache processing of the present invention is not limited to being stored in a hardware memory such as FLASH or RAM, and includes a file format that is stored in a first in first out (FIFO) manner after the streaming media data is downloaded.
  • the FIFO file format is closely related to the specific operating system. It is not necessarily stored in the main memory such as RAM or FLASH. It can also be stored on a disk or a removable storage device.
  • the operating system ensures storage and reading. First in, first out.
  • the operating system that supports FIFO files on the terminal needs to convert the media files downloaded from the server to the local FIFO file before caching. This also allows the first to get the streaming media data to be played first, while the FIFO-enabled file format is available in existing technologies, such as Qualcomm's Brew platform.
  • Step 301 After the mobile terminal decodes the first piece of media data that has been downloaded and stored in the first segment of the local cache, the mobile terminal starts playing the downloaded media.
  • Synchronous playback is achieved through dual-thread control, that is, the download thread and the play thread are executed in parallel. OK, but the playback read pointer in the playback thread cannot point to a memory area where the full download data has not yet been stored. At the same time, the download write pointer in the download thread cannot point to the storage area where the media data that has not been played is located.
  • Step 303 Repeat step 302 until the entire media file download is completed.
  • the memory for buffering the downloaded data may be any existing storage, and may be stored in a circular storage manner or in a sequential storage manner. In order to save resources, it is better to use a cyclic storage method.
  • the downloaded mth segment data is stored in the mth segment storage area of the local cache; if the mth segment is stored, the (m - 1) segment storage area is already played. The media is paused until the mth segment of data is downloaded and resumed.
  • Step 401 The mobile phone sends a request to the HTTP server to download the media specified by the URL, for example: http://xyzw/media/testvideo.mp4;
  • the mobile phone may be used by an existing application software such as a media player. Implementation, the following downloads and other operations are also implemented by the corresponding application software, no longer - specified.
  • Step 402 After receiving the request, the HTTP server returns a confirmation message to the mobile phone application software; the above steps 401-402 are the same as the prior art.
  • Step 403 After the mobile phone receives the confirmation message of the HTTP server; if the given resource does not exist, the error message is prompted; otherwise, the download thread is started, and the HTTP server is requested to download the first piece of media data;
  • the structure of the local cache described in this step is as shown in FIG. 5;
  • Step 405 After successfully downloading the first data block, the mobile phone starts the playing thread, starts decoding the downloaded media data, and then plays the same;
  • Step 407 The mobile phone downloads the requested mth segment data from the HTTP server. If m is not greater than N, the mth segment data is stored in the mth segment cache, otherwise the mth segment data is stored in the
  • the play thread After the play thread is started, while the mobile phone requests to download the media data, the play thread is not interrupted, and is executed concurrently with the download thread. If the download speed is slow, the data of the i-th buffer to be played is not downloaded, the playback is paused, and the playback is resumed until the media data of the i-th buffer is downloaded. If m is greater than N and the download speed is fast, When the media data in the lmod(m/N) segment cache is not played, the download thread waits until the data in the
  • Step 408 The HTTP server returns a confirmation message to the mobile phone, indicating that all the media data has been downloaded, stopping the downloading thread, and continuing to play the media data in the cache that has been downloaded;
  • Step 409 The playback ends.
  • the cache structure used in the above method is as shown in FIG. 5, and the cache is divided into N segments and can be used cyclically.
  • the capacity of each segment of the storage area is determined by the user as the case may be. In this embodiment, each storage area is 1 ⁇ 0.
  • the present invention can also convert downloaded data into a FIFO file and store it. It is not necessary to write code related to read and write pointer control when downloading and playing. Synchronization of download and playback is possible with the operating system. It can be stored on a disk or on a removable storage device.
  • the present invention can also be applied to other terminals that use the HTTP stream to download media data and have limited resources.
  • the invention can be applied to terminals such as mobile phones, supports the synchronization of downloading and playing of HTTP streaming media, can greatly shorten the waiting time, greatly improves the user experience, and reduces the demand for memory resources.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Description

一种终端同时下载和播放超文本传输流媒体的方法
技术领域
本发明属于多媒体领域, 特别涉及一种支持终端超文体传输(HTTP ) 流媒体业务的方法。
背景技术
随着手机等终端的普及,移动网络的不断完善,以手机电视、视频广告、 在线视频、在线音乐等为代表的流媒体业务逐渐成为了中高端手机的必备应 用之一。
流媒体的主要技术特征就是采用流式传输, 即通过 Internet将影音节目 传送到终端。目前实现流式传输有两种方法:顺序流式传输和实时流式传输。 对于顺序流式传输, 由于标准的 HTTP服务器可发送这种形式的文件, 而不 需要其他特殊协议, 常被称作 HTTP流式传输; 顺序流式传输适合高质量的 短片、 广告以及音乐等媒体文件; 并且, 顺序流式媒体文件可放置在标准 HTTP或 FTP服务器上, 易于管理。
对于实时流式, 其保证媒体信号带宽与网络连接相匹配,使媒体可被实 时观看到。 与 HTTP流不同, 这种方式的传输需要专用的流媒体服务器与传 输协议。 实时流式传输特别适合现场事件, 也支持随机访问, 用户可快进或 后退以观看前面或后面的内容。 理论上, 实时流一经播放就可不停地收看, 但实际上, 可能会发生周期暂停, 特别是无线环境。
结合手机软硬件资源受限情况,与实时流相比, HTTP流具有众多优势: 服务器控制简单、 易于管理; 传输协议采用了互联网最流行的 HTTP协议, 通用性好、 易于实现、 响应速度快、 控制开销小, 特别适合无线环境, 并且 不受防火墙等限制;手机端的协议简化,只需要和普通浏览器一样使用 HTTP 协议即可, 不需要实现复杂的 RTSP协议簇。 因此, HTTP流得到了广泛的 应用, 不少国际知名运营商都要求手机厂商必须支持 HTTP流媒体。
目前手机支持 HTTP流业务的系统结构如图 1所示, 手机通过基站、 网 絡与服务器相连。 上迷系统实现 HTTP流传输业务的方案一般是通过 HTTP把媒体数据全 部下载到本地文件或缓冲区中存储, 然后再播放, 具体包括以下步骤, 如图 2所示:
步骤 201: 手机终端向服务器发送请求, 下载通过统一资源定位符 URL
( Uniform Resource Location )指定的媒体;
步骤 202: 服务器向手机终端返回确认信息;
步驟 203: 手机终端向服务器请求下载媒体数据;
步驟 204: 服务器发送所请求的数据到手机终端;
步骤 205: 重复步骤 203、 204, 直到整个媒体文件下载完毕;
步驟 206: 在成功下载了整个媒体文件之后, 启动媒体播放器解码所下 载的媒体, 对所下载的媒体进行播放。
这种传统的实现方式有一个很大的缺陷就是手机用户必须等到所有数 据下载完毕后才能够欣赏媒体,特别是网络速度慢、媒体数据量大的情况下, 用户体验非常差, 而且还需要緩存所下载的媒体数据, 在文件较大时增大了 对手机资源的要求。对于其它采用 HTTP流下载媒体数据且资源受限的终端 类型也存在同样的问题。
发明内容
本发明所要解决的技术问题是,提供一种终端同时下载和播放 HTTP流 媒体的方法, 在终端上支持 HTTP流媒体的同步播放、 缩短等待时间。
为了解决上述问题,本发明提供了一种终端同时下载和播放超文本传输 流媒体的方法, 其特征在于, 该方法包括以下步 :
A:终端向超文本传输 HTTP服务器请求下载统一资源定位符 URL指定 的媒体, 并将所述媒体数据分段緩存至本地緩存的存储区;
B: 在第一 媒体数据下载完成后, 在继续下载的同时, 顺序解码、 播 放已緩存了完整下载数据的每一存储区中的分段媒体数据。 进一步地, 上述方法还可具有以下特点: 步骤 B进一步分为以下步骤:
B1:终端对已下载并存储在本地緩存的第一段存储区的第一段媒体数据 进行解码后, 开始播放所下载的媒体;
B2: 终端向 HTTP服务器请求并按顺序下载第 m段媒体数据, 然后将 其存储在本地緩存相应的存储区中; 同时, 顺序同步播放已存储在第 i段存 储区的媒体, 其中 i,m为自然数且 i<m;
B3: 并行执行上述下载线程和播放线程, 直到整个媒体文件下载、播放 午。
进一步地, 上述方法还可具有以下特点:
所述播放线程中的播放读指针不能指向还没有存储完整下载数据的存 储区。 同时, 下载线程中的下载写指针不能指向还没有被播放的媒体数据所 在的存储区。
进一步地, 上述方法还可具有以下特点:
在存储媒体数据时采用顺序存储的方式, 将下载的第 m段数据, 存储 在本地緩存的第 m段存储区中; 如果在下载第 m段数据过程中, 若已播放 完毕第 (m - 1 )段存储区的媒体, 则暂停播放, 直到第 m段数据下载完毕 后恢复播放。
进一步地, 上述方法还可具有以下特点:
在存储媒体数据时采用循环存储的方式, 若 m小于等于 N, 则将第 m 段数据存储在本地緩存的第 m段存储区中; 若 m大于本地緩存为所述媒体 分配的存储区总数目 N, 则将第 m段数据存储在第 |mod( /N)|段存储区中, |mod(m/N)|表示将 m和 N相除取余。
进一步地, 上述方法还可具有以下特点:
若 m大于 N, 且将 m和 N相除取余后得到的余数 |mod(/n/N)l等于 i, 则 暂停下载, 直到存储在第 i段存储区的媒体被播放完毕后, 恢复下载;
若 m小于或者等于 Ν, 在下载第 m段数据过程中, 若已播放完第 (m - 1 )段存储区的媒体,则暂停播放,直到第 m段数据下载完毕后恢复播放。 进一步地, 上述方法还可具有以下特点:
所述终端将下载的媒体数据转换为支持 FIFO功能的文件格式后, 存储 为本地緩存中的 FIFO文件, 在同步播放时利用操作系统来读取所述 FIFO 文件, 实现下载与播放的同步。
进一步地, 上述方法还可具有以下特点:
所述本地緩存为所述终端的主存储器, 或所述终端上放入的磁盘,或所 述终端所连接的移动存储设备上为下载的所述媒体分配的緩存空间。
进一步地, 上述方法还可具有以下特点:
所述本地缓存为所述终端的主存储器上为下载的所述媒体分配的緩存 空间。
进一步地, 上述方法还可具有以下特点: 所述终端为手机。
本发明实现了终端支持 HTTP流媒体的下载与播放同步,加上緩冲区的 分段、 循环使用, 从而大大缩短等待时间, 在很大程度上提升用户体验, 同 时还降低了对内存资源的需求。 附图概迷
图 1是现有支持手机 HTTP流的系统结构示意图;
图 2是图 1所示系统实现手机 HTTP流式传输的流程图;
图 3是本发明实施例技实现手机 HTTP流式传输的总体流程图; 图 4是图 3实现手机 HTTP流式传输的详细流程图;
图 5是图 4所示流程中使用的緩存结构示意图。 本发明的较佳实施方式
本发明的主要构思是, 终端在下载了一定量的数据之后就可以开始播 放, 实现下载与播放并行执行, 可以使用双线程分别控制; 另外下载、 播放 需要处理緩存。 本发明的优化方案是采用循环使用緩存的方案; 循环緩存过 程中,播放读指针不能超过下载写指针; 下载写指针也不能覆盖还没有被播 放读取的内容, 即在双线程控制的前提下, 保证了下载、 播放的同步。
其中本发明所述緩存处理, 不限于存储到类似于 FLASH或 RAM等硬 件存储器中,也包括了将流媒体数据下载之后,存储为支持先进先出(FIFO, first in first out ) 功能的文件格式, FIFO文件格式与具体的操作系统息息相 关, 不一定存放在 RAM、 FLASH之类的主存储器中, 也可以存储在磁盘或 可移动的存储设备上, 由操作系统来保证实现存储和读取时的先入先出。 当 使用支持 FIFO功能的文件(也称为 FIFO文件)进行緩存时, 终端上支持 FIFO 文件的操作系统需要先将从服务器上下载到本地的媒体文件转换为 FIFO文件后再緩存。 这样同样可以完成首先获得的流媒体数据将被首先播 放的功能, 而支持 FIFO功能的文件格式为现有技术, 例如高通的 Brew平 台上就支持这种文件格式。
下面以手机为例, 结合附图对本发明釆用的技术方案作进一步详细说 明。
一种支持手机 HTTP流媒体业务的同步下载播放的方法, 如图 3所示, 包括如下步驟:
步骤 301: 手机终端对已下载并存储在本地緩存第一段存储区中的第一 段媒体数据进行解码后, 开始播放所下载的媒体;
步驟 302:手机终端继续向 HTTP服务器请求并按顺序下载第 m段数据, 然后将其存储在本地緩存相应的存储区中; 在下载的同时,顺序同步播放每 一段存储区中存储的媒体数据, 即按顺序同步播放已存储在第 i段存储区的 媒体, 其中 i,m为自然数, i<m;
m为当前下载的媒体数据的分段编号, i为当前播放的媒体数据所在存 储区的编号, i, m从 1开始顺序编号即 i, m = 1,2,3, ......。 所述本地緩存是指 终端在存储器中为本次媒体下载分配的緩存空间。所述顺序播放指按下载的 顺序依次播放。
同步播放是通过双线程控制实现的, 即对下载线程与播放线程并行执 行, 但播放线程中的播放读指针不能指向还没有存储完整下载数据的存储 区。 同时, 下载线程中的下载写指针不能指向还没有被播放的媒体数据所在 的存储区。
步骤 303: 重复步驟 302, 直到整个媒体文件下载播放完毕;
该步骤中,若先下载完毕, 则继续顺序播放未播放的内容至到播放完毕 后, 结束整个流程。
上述方法中, 用于緩存下载数据的存储器可以采用现有的任一种存储 器, 存储时可以采用循环存储的方式, 或者采用顺序存储的方式。 为了节约 资源, 较佳采用循环存储的方式。
当采用循环存储方式时, 若 m大于本地緩存的存储区总数目, 则对 m 和本地緩存的存储区总数目相除取余, 将第 m段数据存储在该取余后所得 数目的存储区中。 如将 m和本地緩存的存储区总数目相除取余后等于 i, 则 暂停下载, 直到存储在第 i段存储区的媒体被播放完毕后, 恢复下载。
若 m小于等于本地緩存的存储区总数目, 则将第 m段数据存储在本地 緩存的第 m段存储区中, 如此时已播放完毕笫 (m - 1 )段存储区的媒体, 则暂停播放, 直到第 m段数据下载完毕后恢复播放。
当采用顺序存储方式时,将下载的第 m段数据,存储在本地緩存的第 m 段存储区中; 如果在下载第 m段数据过程中, 若已播放完毕第 (m - 1 )段 存储区的媒体, 则暂停播放, 直到第 m段数据下载完毕后恢复播放。
下面再提供采用循环緩存实现手机 HTTP流媒体业务的详细流程,如图 4所示, 包括如下步骤:
步骤 401: 手机向 HTTP服务器发送请求, 要求下载通过 URL指定的 媒体, 例如: http://x.y.z.w/media/testvideo.mp4; 具体地, 可以由手机上的如 媒体播放器等现有应用软件来实现,以下的下载等操作也由相应的应用软件 来实现, 不再——指明。
步骤 402: HTTP服务器收到请求后, 向手机应用软件返回确认信息; 上述步骤 401~402同现有技术。 步骤 403:手机收到 HTTP服务器的确认信息后;若给定的资源不存在, 则提示出错信息; 否则启动下载线程, 向 HTTP服务器请求下载第 1段媒体 数据;
步骤 404: 手机从 HTTP服务器下载所请求的第 1段数据, 并存储到本 地緩存区的第 1段存储区中;
该步骤中所述的本地緩存的结构如图 5所示;
步骤 405: 手机在成功下载了第 1段数据块之后, 启动播放线程, 开始 解码所下载的媒体数据, 然后进行播放;
步骤 406: 手机按序请求下载第 m段媒体数据, 其具体操作过程如步骤 403;
步骤 407: 手机从 HTTP服务器下载所请求的第 m段数据, 若 m不大 于 N时,将第 m段数据存储在第 m段緩存中, 否则将第 m段数据存储在第 |mod(m/N)|段緩存中, 其中 mod表示取余, N是为下载数据分配的存储区的 总数目;
播放线程启动后 ,在手机请求下载媒体数据的同时,播放线程并不中断, 与下载线程并发执行。 如果下载速度慢, 要播放的第 i段缓冲区的数据未下 载完毕, 则暂停播放, 直到第 i段緩冲区的媒体数据下载完毕才恢复播放; 如果 m大于 N, 且下载速度快时, 第 lmod(m/N)l段緩存中的媒体数据未播放 结束, 则下载线程等待, 直到第 |mod( /N)|段緩存中的数据播放完毕才开始 下载。
步骤 408: HTTP服务器向手机返回确认信息, 表明所有媒体数据已经 下载完毕, 则停止下载线程, 继续播放已经下载完毕的緩存中的媒体数据; 步骤 409: 播放结束。
上述方法中所使用的缓存结构如图 5所示, 该緩存分为 N段, 可循环 使用。每段存储区的容量由用户视具体情况而定,本实施例中每段存储区为 1ΚΒ0
以上所述仅为本发明的一个具体的实施例, 并不用于限制本发明,对于 本领域的技术人员来说,本发明可以有各种更改和变化, 本发明的保护范围 以权利要求为准。
例如, 本发明也可以将下载数据转换为 FIFO文件后再存储, 此时不必 再编写实现下载和播放时, 与读、 写指针控制相关的代码。 利用操作系统即 可实现下载与播放的同步。 且可存储在磁盘或可移动的存储设备上。
又如,本发明也可以用于其它采用 HTTP流下载媒体数据且资源受限的 终端。
工业实用性
本发明可以应用于手机等终端上, 支持 HTTP 流媒体的下载与播放同 步, 可以大大缩短等待时间, 在很大程度上提升用户体验, 同时还降低了对 内存资源的需求。

Claims

权 利 要 求 书
1、 一种终端同时下载和播放超文本传输流媒体的方法, 其特征在于, 该方法包括以下步骤:
A:终端向超文本传输 HTTP服务器请求下载统一资源定位符 URL指定 的媒体, 并将所述媒体数据分段緩存至本地緩存的存储区;
B: 在第一段媒体数据下载完成后, 在继续下载的同时, 顺序解码、 播 放已緩存了完整下载数据的每一存储区中的分段媒体数据。
2、 如权利要求 1所述的方法, 其特征在于, 步骤 B进一步分为以下步 驟:
B1 :终端对已下载并存储在本地緩存的第一段存储区的第一段媒体数据 进行解码后, 开始播放所下载的媒体;
B2: 终端向 HTTP服务器请求并按顺序下载第 m段媒体数据, 然后将 其存储在本地緩存相应的存储区中; 同时, 顺序同步播放已存储在第 i段存 储区的媒体, 其中 i,m为自然数且 i<m;
B3: 并行执行上述下载线程和播放线程, 直到整个媒体文件下载、播放 完毕。
3、 如权利要求 2所述的方法, 其特征在于,
所述播放线程中的播放读指针不能指向还没有存储完整下载数据的存 储区。 同时, 下载线程中的下载写指针不能指向还没有被播放的媒体数据所 在的存储区。
4、 如权利要求 3所述的方法, 其特征在于,
在存储媒体数据时采用顺序存储的方式, 将下载的第 m段数据, 存储 在本地緩存的第 m段存储区中; 如果在下载第 m段数据过程中, 若已播放 完毕第 (m - 1 )段存储区的媒体, 则暂停播放, 直到第 m段数据下载完毕 后恢复播放。
5、 如权利要求 3所述的方法, 其特征在于, 在存储媒体数据时采用循环存储的方式, 若 m小于等于 N, 则将第 m 段数据存储在本地緩存的第 m段存储区中; 若 m大于本地緩存为所述媒体 分配的存储区总数目 N, 则将第 m段数据存储在第 lmod(m/N)l段存储区中, |mod(m/N)|表示将 m和 N相除取余。
6、 如权利要求 5所述的方法, 其特征在于,
若 m大于 N, 且将 m和 N相除取余后得到的余数 |mod( /N)|等于 i, 则 暂停下载, 直到存储在第 i段存储区的媒体被播放完毕后, 恢复下载;
若 m小于或者等于 N, 在下载第 m段数据过程中, 若已播放完第 (m - 1 )段存储区的媒体, 则暂停播放, 直到第 m段数据下载完毕后恢复播放。
7、 如权利要求 1所述的方法, 其特征在于,
所述终端将下载的媒体数据转换为支持 FIFO功能的文件格式后, 存储 为本地緩存中的 FIFO文件, 在同步播放时利用操作系统来读取所述 FIFO 文件, 实现下载与播放的同步。
8、 如权利要求 7所述的方法, 其特征在于,
所述本地緩存为所述终端的主存储器, 或所述终端上放入的磁盘, 或所 述终端所连接的移动存储设备上为下载的所述媒体分配的緩存空间。
9、 如权利要求 2所述的方法, 其特征在于,
所述本地緩存为所述终端的主存储器上为下载的所述媒体分配的緩存 空间。
10、 如权利要求 1所述的方法, 其特征在于, 所述终端为手机。
PCT/CN2007/003831 2007-09-11 2007-12-27 Procédé pour télécharger et lire simultanément des supports en flux de transfert hypertexte WO2009033345A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710145373.8 2007-09-11
CN200710145373.8A CN101127989A (zh) 2007-09-11 2007-09-11 一种支持手机超文本传输流媒体业务的方法

Publications (1)

Publication Number Publication Date
WO2009033345A1 true WO2009033345A1 (fr) 2009-03-19

Family

ID=39095876

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/003831 WO2009033345A1 (fr) 2007-09-11 2007-12-27 Procédé pour télécharger et lire simultanément des supports en flux de transfert hypertexte

Country Status (2)

Country Link
CN (1) CN101127989A (zh)
WO (1) WO2009033345A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8364838B2 (en) 2008-05-20 2013-01-29 Htc Corporation Method for playing streaming data, electronic device for performing the same and information storage media for storing the same
US8510375B2 (en) 2009-12-11 2013-08-13 Nokia Corporation Apparatus and methods for time mapping media segments in streaming media files
CN111935535A (zh) * 2019-05-13 2020-11-13 阿里巴巴集团控股有限公司 数据处理方法、装置、终端设备及计算机存储介质
CN114143294A (zh) * 2022-02-08 2022-03-04 广州长嘉电子有限公司 一种流媒体信号处理系统及方法

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420490A (zh) * 2008-05-30 2009-04-29 北京天腾时空信息科技有限公司 一种数据的读取方法和装置
CN101399691B (zh) * 2008-10-21 2011-09-07 北京闪联互动网络科技有限责任公司 移动终端的多媒体在线播放方法和装置及移动终端
JP5642779B2 (ja) * 2009-06-15 2014-12-17 ブラックベリー リミテッド クライアント制御セッションレス適応を促進する方法および装置
CN101656985B (zh) * 2009-08-18 2012-12-19 中兴通讯股份有限公司 一种管理url资源缓存的方法和装置
CN101702728B (zh) * 2009-09-02 2013-04-24 优视科技有限公司 用于移动通讯设备终端的流媒体传输系统及其应用方法
CN101662476A (zh) * 2009-09-29 2010-03-03 中兴通讯股份有限公司 彩信编辑获取媒体资源的方法及其移动终端
CN101702767B (zh) * 2009-10-28 2011-08-31 东方网力科技股份有限公司 一种时基媒体播放方法及系统
CN102404646A (zh) * 2010-09-08 2012-04-04 苏州尚嘉信息技术有限公司 一种无线电视直播系统及其直播方法
CN102137137B (zh) * 2010-09-17 2013-11-06 华为技术有限公司 基于http流的媒体内容动态插播方法、装置及系统
CN103747365B (zh) * 2010-09-17 2017-04-26 华为技术有限公司 基于http流的媒体内容动态插播方法、装置及系统
CN102420840A (zh) * 2010-09-27 2012-04-18 西安龙飞软件有限公司 一种基于brew的Http递进式视频播放器的实现方法
CN101951412B (zh) * 2010-10-15 2013-11-13 上海交通大学 基于http协议的多子流流媒体传输系统及其传输方法
CN102006368B (zh) * 2010-12-03 2013-06-19 重庆新媒农信科技有限公司 基于移动终端记忆卡缓存技术的流媒体音频文件播放方法
CN102123198A (zh) * 2011-01-11 2011-07-13 中国联合网络通信集团有限公司 媒体播放器的内存管理方法和内存管理器
CN103297452B (zh) * 2012-02-24 2016-08-24 北京对角巷科技发展有限公司 一种在互联网发布和直播流媒体的方法及系统
CA2881723C (en) * 2012-08-14 2017-01-10 Telefonaktiebolaget Lm Ericsson (Publ) Processing of multimedia data
CN103391454B (zh) * 2013-07-12 2016-12-28 三星电子(中国)研发中心 一种多线程下载方法和装置
CN103412782B (zh) * 2013-09-04 2017-03-22 广东全通教育股份有限公司 一种基于flash的动态资源加载方法和系统
CN103488717B (zh) * 2013-09-11 2017-02-22 北京华胜天成科技股份有限公司 一种无锁数据汇聚方法及装置
CN103648019A (zh) * 2013-11-29 2014-03-19 乐视致新电子科技(天津)有限公司 一种基于hls协议的视频下载方法及其装置
CN103731676A (zh) * 2013-12-31 2014-04-16 深圳Tcl新技术有限公司 兼容多协议多媒体数据的播放方法及其装置
CN105100172B (zh) * 2014-05-22 2018-03-27 华为技术有限公司 一种http协议的缓存状态更新方法和设备、处理机
CN104184817A (zh) * 2014-08-28 2014-12-03 广州金山网络科技有限公司 一种下载优化方法及装置、终端
CN104240739B (zh) * 2014-09-04 2017-05-24 广东欧珀移动通信有限公司 一种移动终端的音乐播放方法及装置
CN104284204B (zh) * 2014-09-25 2019-02-15 中兴通讯股份有限公司 一种频道快速切换方法、系统及终端、服务器
CN104796741B (zh) * 2015-04-15 2018-03-16 姚世明 一种网络分层和资源分片的媒体分享方法装置
CN105898501A (zh) * 2015-12-30 2016-08-24 乐视致新电子科技(天津)有限公司 视频播放方法、视频播放器及电子装置
CN105872668A (zh) * 2016-03-31 2016-08-17 百度在线网络技术(北京)有限公司 音视频数据处理方法、装置以及车载终端
CN110895515B (zh) * 2018-09-12 2024-11-05 南京中兴新软件有限责任公司 内存缓存管理方法、多媒体服务器及计算机存储介质
CN110213643B (zh) * 2019-06-11 2023-03-24 北京奇艺世纪科技有限公司 一种流媒体缓存方法、装置及终端设备

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1798097A (zh) * 2004-12-24 2006-07-05 腾讯科技(深圳)有限公司 一种缓存流媒体数据的方法
CN1937778A (zh) * 2005-09-20 2007-03-28 腾讯科技(深圳)有限公司 一种流媒体播放方法、系统及设备

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1798097A (zh) * 2004-12-24 2006-07-05 腾讯科技(深圳)有限公司 一种缓存流媒体数据的方法
CN1937778A (zh) * 2005-09-20 2007-03-28 腾讯科技(深圳)有限公司 一种流媒体播放方法、系统及设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8364838B2 (en) 2008-05-20 2013-01-29 Htc Corporation Method for playing streaming data, electronic device for performing the same and information storage media for storing the same
US8510375B2 (en) 2009-12-11 2013-08-13 Nokia Corporation Apparatus and methods for time mapping media segments in streaming media files
CN111935535A (zh) * 2019-05-13 2020-11-13 阿里巴巴集团控股有限公司 数据处理方法、装置、终端设备及计算机存储介质
CN114143294A (zh) * 2022-02-08 2022-03-04 广州长嘉电子有限公司 一种流媒体信号处理系统及方法

Also Published As

Publication number Publication date
CN101127989A (zh) 2008-02-20

Similar Documents

Publication Publication Date Title
WO2009033345A1 (fr) Procédé pour télécharger et lire simultanément des supports en flux de transfert hypertexte
US12058355B2 (en) Low latency and low defect media file transcoding using optimized storage, retrieval, partitioning, and delivery techniques
KR100492567B1 (ko) 이동통신 시스템의 http 기반 비디오 스트리밍 장치및 방법
CN105052160B (zh) 用于向客户端设备流传输媒体内容的方法和装置
CN102006368B (zh) 基于移动终端记忆卡缓存技术的流媒体音频文件播放方法
CN101075949A (zh) 一种改变流媒体文件播放速度的方法
CN109286820B (zh) 基于分布式存储系统的流媒体点播方法及系统
CN112839238B (zh) 投屏播放方法、装置和存储介质
CN110933517B (zh) 码率切换方法、客户端和计算机可读存储介质
WO2019128800A1 (zh) 一种内容服务的实现方法、装置及内容分发网络节点
EP2036346A1 (en) Support for interactive playback devices for performance aware peer-to-peer video-on-demand service
WO2011147352A1 (zh) 一种在动态http流传输方案中支持时移回看的方法和装置
WO2017059450A1 (en) Gapless video looping
CN101582926A (zh) 实现远程媒体播放重定向的方法和系统
CN111447455A (zh) 直播视频流回放处理方法、装置及计算设备
JP2011501504A (ja) ストリーミングメディアコンテンツに対応する広告コンテンツを管理するためのシステム及び方法
US20210021655A1 (en) System and method for streaming music on mobile devices
WO2012146098A1 (zh) 一种流媒体存储、播放方法及相应系统
US20130007863A1 (en) Streaming video to cellular phones
WO2013185514A1 (zh) 一种播放流媒体的系统和方法
WO2014048198A1 (zh) 倍速播放方法、装置及系统
US20150095447A1 (en) Serving method of cache server, cache server, and system
CN104641655A (zh) 一种终端缓存的方法、终端及服务器
JP2004104704A (ja) 映像再生装置、映像再生方法、プログラム
CN107484040A (zh) 一种实现网络加速的方法

Legal Events

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

Ref document number: 07855832

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 07855832

Country of ref document: EP

Kind code of ref document: A1