[gstreamer-bugs] [Bug 557171] New: enhance filesrc to support progressive download
bugzilla-daemon at bugzilla.gnome.org
Mon Oct 20 18:23:23 PDT 2008
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
GStreamer | gstreamer (core) | Ver: 0.10.21
Summary: enhance filesrc to support progressive download
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: w20711 at motorola.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
Progressive Download is a very popular feature supported by nearly all
commercial players. The typical user case is:
- User click an http URL, which link to a media content (such as a mp3 file),
- Browser downloads the mp3 file, and starts a player to play it.
- The player shall start playback as soon as enough data is available, before
everything has been downloaded.
This feature can provide better user experience than normal RTSP / HTTP
streaming, especially, if user want to replay the content later. This
technology has been used by a lot of video share community, such as YouTube.
Currently filesrc only supports to read from a local file. Motorola enhances
filesrc to support to read from a progressive downloading file, whose filesize
is incremental. If the player wants to access data outside downloaded range,
filesrc will block pipeline, until the all needed data is arrived. So, the
pipeline can play a downloading file step by step. Filesrc shall run in push
mode while enable PD. A protocol of "pd://" is added for this feautre, the uri
parser is also enchaned, I add a suffix "?pd-filesize=xxx" to the file name,
which indicates the file size of a completed progressive downloaded file.
3 properties are added to support PD:
is-pd, whether to use PD mode
pd-filesize, indicate predefined file size, is-pd will be set to true if
pd-filesize is set
pd-downloadedsize, indicate incremental downloaded size
This patch uses a macro of GST_DISABLE_FILESRC_PD to enable/disable
PD(Progressive Download) feature. Default is disable GST_DISABLE_FILESRC_PD.
This feature is conflicted with use-mmap, that is use-mmap must be false when
Now, do_seek hasn't been implemented yet, will be implemented in the future.
local disk, the temp file name is
You can use gst-launch and playbin2 to play it.
./gst-launch-0.10 playbin2 -v
It works well while filesrc runs in push mode.
While filesrc runs in pull mode, I've met following issues:
1) typefind will read the last 32 bytes, which hasn't be downloaded yet, the
whole pipeline will blocks.
2) if filesrc blocks before the pipeline enters playing state, a deadlock
occurs. This is because the timer in filesrc runs in GMainLoop, which hasn't
been started yet, as a result, the timer cannot be launched, then the
downloaded data cannot be updated.
Motorola would like to contribute the patch to the Gstreamer open source
community project. Please find attached the patch applicable for Gstreamer. For
any questions, please feel free to contact (Zhao Liang "e3423c at motorola.com",
Shi Ling "w20230 at motorola.com", Wang Xuefeng "w20711 at motorola.com").
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=557171.
More information about the Gstreamer-bugs