After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679571 - File source from memory
File source from memory
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-07 23:35 UTC by gstqlt
Modified: 2017-11-10 10:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gstqlt 2012-07-07 23:35:37 UTC
Originally at the gstreamer-devel mail-list:
http://gstreamer-devel.966125.n4.nabble.com/File-source-from-memory-tc967708.html#a4655472

A good job for you all, and thank you.
(Don't forget the python binding then please...)
Bye, Zoltan

Jul 03, 2012; 11:35pm Tim-Philipp Müller-2 Tim-Philipp Müller-2
On Tue, 2012-07-03 at 14:03 -0700, gstqlt wrote:

Hi,
> I'm not an experienced user, but I really agree with that.
> There shouldn't be any difference between filesrc and a hypothetic 'memsrc'.
> Feeding from a file - which is a byte-sequence with seek feature - is the
> same as feeding the same data from a memory area (identified by a pointer).

Well, I'm sure you can always find a level of abstraction where
everything is the same as everything else ;)

> So I think, using appsrc (and the complex protocol of it in the user's code)
> is not what we need for this. Anything what I have read about this (appsrc,
> mmap) seems to be a blind alley for me. I have the mp3 data in the memory.
> I'd like to play it, instead of the original file.
> Maybe fakesrc is a better approach? But that also seems to have a lot of
> unnecessary parameters.

Ok, so you find appsrc too complicated for your special case where you
have the data in memory as one giant blob already. That's fair enough, I
wouldn't object to an element that makes this easier. Basically
something like the "dataurisrc" element without the URI diversion. Feel
free to file a feature request in bugzilla.

Cheers
 -Tim
Comment 1 Sebastian Dröge (slomo) 2012-07-09 08:00:15 UTC
You can use giostreamsrc and use a GMemoryInputStream. See this example here:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/tests/check/pipelines/gio.c#n60
Comment 2 Edward Hervey 2017-11-10 10:13:58 UTC
or appsrc. Anyway, obsolete.