[streaming source plugin] : Info needed
satish pattar
satish.pattar at gmail.com
Wed Apr 6 02:46:54 PDT 2011
Hello Stefan,
I don't want to use playbin2 since I see playbin2 is beffering & playing.
Let me explain my set up to make you understand my problem.
I am mounting the media files residing on my phone (twonkey server is
running on my phone) on to my PC using djmount client running on my pc over
WiFi.
Once mount is successful , I see all the media files look like a regular
file (i can do open/seek etc on the files).
For example I see the files mounted in my pc at
/home/upnp/Twonkey_Mobile/Music/All_tracks/*.mp3
I don't know how to find out the URI associated with each file to provide it
to souphttpsrc plugin.
One more experiment I did , I just tried fdsrc instead of filesrc by opening
an upnp mp3 file & providing it's "fd" to it. This plays fine without any
buffering & there are no breaks in the audio.
Do you see any limitation in making use of this plugin ?
Also with fdsrc I am able to seek forward correctly but on seek backward say
for "n" sec , I am hearing no sound for "n" sec & exactly after n sec,
playback starts from the new seeked position in the stream. Is there any
thing wrong I am doing in passing the seek event? or Is it the limitation
of fdsrc. ?
// code snippet for seeking
void seek_handler (double displacement) // displacement is in second
{
GstFormat fmt = GST_FORMAT_TIME;
gint64 cur_pos;
gst_element_query_position (pipeline, &fmt, &cur_pos);
double new_pos_sec = cur_pos * (1.0 / GST_SECOND) + displacement;
seek (new_pos_sec * GST_SECOND);
}
void seek (gint64 new_pos)
{
if (new_pos < 0)
new_pos = 0;
gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET,
new_pos, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
}
Thanks & Regards
Satish
On Wed, Apr 6, 2011 at 1:52 AM, Stefan Kost <ensonic at hora-obscura.de> wrote:
> Am 05.04.2011 13:30, schrieb satish pattar:
> > Hello Stefan,
> >
> > Thanks for your very good input. I see "souphttpsrc" plugin installed in
> my pc
> > . Do you think it can straightway be used as source plugin to stream
> UPnP media
> > file. Also , I learnt that UPnP share uses SSDP protocol hence I am
> doubting
> > whether I can use souphttpsrc or not.
>
> You can use libgupnp to handle the upnp parts. Once you got a media url,
> use
> gstreamer to play from it (just use playbin2 and set the http url you got
> from
> the upnp side).
>
> Stefan
> >
> >
> >
> > Please provide your inputs.
> >
> > Thanks & Regards
> > Sateesh P
> >
> >
> > On Tue, Apr 5, 2011 at 2:09 AM, Stefan Kost <ensonic at hora-obscura.de
> > <mailto:ensonic at hora-obscura.de>> wrote:
> >
> > Am 28.03.2011 14:16, schrieb satish pattar:
> > > Hello All,
> > >
> > > I need to develop a some source plugin that can generate source
> from a
> > > file(*.mp3 , which is not a file residing on the local machine,
> but instead a
> > > file mounted from some remote machine using djmount).
> >
> > (for other djmount is a fuse thingy to mount a upnp share).
> >
> > Satish, maybe you are needing some larger buffering after filesrc.
> Also why
> > don't you just use some httpsrc to play from the upnp share?
> >
> > Stefan
> >
> > >
> > > I thought of using "filesrc" plugin along with decodebin to play
> the file. it
> > > plays fine when the network condition is good but in case of
> Wireless i
> > observe
> > > there is some cut in the playing for every certian interval
> > > (,say 8 sec). Please let me know what could be the problem. your
> inputs are
> > > highly appreciated.
> > >
> > >
> > >
> > > --
> > > Thanks & Regards,
> > >
> > > Satish Pattar
> > >
> > >
> > >
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > gstreamer-devel at lists.freedesktop.org
> > <mailto:gstreamer-devel at lists.freedesktop.org>
> > > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> >
> >
> >
> > --
> > Thanks & Regards,
> >
> > Satish Pattar
> >
> >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
--
Thanks & Regards,
Satish Pattar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110406/93c71c11/attachment-0001.htm>
More information about the gstreamer-devel
mailing list