From yinglcs at gmail.com Tue Mar 13 18:46:28 2007
From: yinglcs at gmail.com (ying lcs)
Date: Tue Mar 13 19:21:50 2007
Subject: [Filesystem-dev] CPU usage goes to 100% when use httpfs on helix
server
Message-ID: <568e62a40703131846m70d0aa23wfe189a55106c1d7b@mail.gmail.com>
Hi,
I am trying to use the httpfs on helix server like this:
rtsp://helixserver/httpfs/http://webserver/test.mp3
I see a previous thread with the same result:
http://lists.helixcommunity.org/pipermail/filesystem-dev/2006-June/000679.html
I would like to know what is the fix/wrong around for this issue?
Thank you for any help.
From yinglcs at gmail.com Wed Mar 14 15:26:13 2007
From: yinglcs at gmail.com (ying lcs)
Date: Wed Mar 14 16:01:39 2007
Subject: [Filesystem-dev] Progressive Download Feature
Message-ID: <568e62a40703141526r553ffecard79a36708b812508@mail.gmail.com>
Hi,
When reading the filesystem source code, I see this
'HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS" (e.g. in smplfsys.cpp)
Can you please tell me what is this progressive download feature for?
From ping at real.com Wed Mar 14 16:08:00 2007
From: ping at real.com (Henry Ping)
Date: Wed Mar 14 16:43:01 2007
Subject: [Filesystem-dev] Progressive Download Feature
In-Reply-To: <568e62a40703141526r553ffecard79a36708b812508@mail.gmail.com>
Message-ID:
https://client.helixcommunity.org/2004/devdocs/download.htm
look for the section about Progressive Download
-->Henry
> -----Original Message-----
> From: filesystem-dev-bounces@helixcommunity.org
> [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> Of ying lcs
> Sent: Wednesday, March 14, 2007 3:26 PM Ping
> To: filesystem-dev@helixcommunity.org
> Subject: [Filesystem-dev] Progressive Download Feature
>
> Hi,
>
> When reading the filesystem source code, I see this
> 'HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS" (e.g. in smplfsys.cpp)
>
> Can you please tell me what is this progressive download feature for?
>
> _______________________________________________
> Filesystem-dev mailing list
> Filesystem-dev@helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
From yinglcs at gmail.com Wed Mar 14 21:58:38 2007
From: yinglcs at gmail.com (ying lcs)
Date: Wed Mar 14 22:33:38 2007
Subject: [Filesystem-dev] Httpfs support on helix server
Message-ID: <568e62a40703142158g22f54e77g89a2f2b39430ad65@mail.gmail.com>
Hi,
I have a question about httpfs support in Helix server.
If the http server does not return the file size in the http response
header to Helix, can Helix still stream that file (from the http
server)?
Thank you.
From ken.carlino at gmail.com Thu Mar 15 13:20:14 2007
From: ken.carlino at gmail.com (ken carlino)
Date: Thu Mar 15 13:55:05 2007
Subject: [Filesystem-dev] Question about the smplfsys
Message-ID:
In CSimpleFileObject,
It has an attribute:
IHXDataFile* m_pDataFile
Can you please tell me which classes implement this interface
"IHXDataFile" for CSimpleFileObject?
And in CSimpleFileObject::DoRead(), it calls the Read() of m_pDataFile
ULONG32 actual = m_pDataFile->Read(pBuffer, ulCount);
Can that method 'm_pDataFile->Read' be a blocking method?
Thank you.
From ping at real.com Thu Mar 15 14:11:03 2007
From: ping at real.com (Henry Ping)
Date: Thu Mar 15 14:45:49 2007
Subject: [Filesystem-dev] Question about the smplfsys
In-Reply-To:
Message-ID:
IHXDataFile is implemented by multiple objects in common/fileio depending on
the type of storage preference. It's created by HXDataFileFactory in
datffact.cpp.
"m_pDataFile->Read(pBuffer, ulCount);" is a blocking call, similar to fread.
-->Henry
> -----Original Message-----
> From: filesystem-dev-bounces@helixcommunity.org
> [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> Of ken carlino
> Sent: Thursday, March 15, 2007 1:20 PM Ping
> To: filesystem-dev@helixcommunity.org
> Subject: [Filesystem-dev] Question about the smplfsys
>
> In CSimpleFileObject,
>
> It has an attribute:
>
> IHXDataFile* m_pDataFile
>
> Can you please tell me which classes implement this interface
> "IHXDataFile" for CSimpleFileObject?
>
> And in CSimpleFileObject::DoRead(), it calls the Read() of m_pDataFile
> ULONG32 actual = m_pDataFile->Read(pBuffer, ulCount);
>
> Can that method 'm_pDataFile->Read' be a blocking method?
>
> Thank you.
>
> _______________________________________________
> Filesystem-dev mailing list
> Filesystem-dev@helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
From yinglcs at gmail.com Thu Mar 15 21:04:02 2007
From: yinglcs at gmail.com (ying lcs)
Date: Thu Mar 15 21:38:46 2007
Subject: [Filesystem-dev] How to activate asncfsys in Helix?
Message-ID: <568e62a40703152104q4084d79fh69381ddb76ef5807@mail.gmail.com>
Hi,
Can you please tell me how to activate asncfsys in Helix?
I see it building build, but how can i configure helix to use it?
And is asncfsys is only for local files or remote files?
Thank for any pointers.
From ehyche at real.com Fri Mar 16 05:28:33 2007
From: ehyche at real.com (Eric Hyche)
Date: Fri Mar 16 06:03:13 2007
Subject: [Filesystem-dev] How to activate asncfsys in Helix?
In-Reply-To: <568e62a40703152104q4084d79fh69381ddb76ef5807@mail.gmail.com>
References: <568e62a40703152104q4084d79fh69381ddb76ef5807@mail.gmail.com>
Message-ID: <000001c767c6$9d9dd2a0$db68a8c0@EHYCHED620>
As far I as I know the asyncfsys is simply a local
filesystem that has been implemented asynchronously
(i.e. so that ReadDone() is not called during Read(), etc.).
My understanding is that it is mostly for testing
purposes. The server team at helix-server-dev@lists.helixcommunity.org
can probably answer in more detail.
I don't think there's any advantage of using the
asyncfsys over the simple filesystem (smplfsys)
or the http filesystem (httpfsys).
Eric
=============================================
Eric Hyche (ehyche@real.com)
Technical Lead
RealNetworks, Inc.
> -----Original Message-----
> From: filesystem-dev-bounces@helixcommunity.org
> [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> Of ying lcs
> Sent: Friday, March 16, 2007 12:04 AM
> To: filesystem-dev@helixcommunity.org
> Subject: [Filesystem-dev] How to activate asncfsys in Helix?
>
> Hi,
>
> Can you please tell me how to activate asncfsys in Helix?
> I see it building build, but how can i configure helix to use it?
> And is asncfsys is only for local files or remote files?
>
> Thank for any pointers.
>
> _______________________________________________
> Filesystem-dev mailing list
> Filesystem-dev@helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
>
From dcollins at real.com Fri Mar 16 09:17:25 2007
From: dcollins at real.com (Dean Collins)
Date: Fri Mar 16 09:52:02 2007
Subject: [Filesystem-dev] How to activate asncfsys in Helix?
In-Reply-To: <000001c767c6$9d9dd2a0$db68a8c0@EHYCHED620>
References: <568e62a40703152104q4084d79fh69381ddb76ef5807@mail.gmail.com>
<000001c767c6$9d9dd2a0$db68a8c0@EHYCHED620>
Message-ID: <20070316161725.GM23668@jedi.dev.prognet.com>
asncfsys is a server-specific filesystem designed for network-based
filesystems such as NFS. It is enabled by editing your server config
file, changing "pn-local" to "pn-network" for the mountpoint
you want to configure to use it.
Dean
> > -----Original Message-----
> > From: filesystem-dev-bounces@helixcommunity.org
> > [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> > Of ying lcs
> > Sent: Friday, March 16, 2007 12:04 AM
> > To: filesystem-dev@helixcommunity.org
> > Subject: [Filesystem-dev] How to activate asncfsys in Helix?
> >
> > Hi,
> >
> > Can you please tell me how to activate asncfsys in Helix?
> > I see it building build, but how can i configure helix to use it?
> > And is asncfsys is only for local files or remote files?
> >
> > Thank for any pointers.
> >
> > _______________________________________________
> > Filesystem-dev mailing list
> > Filesystem-dev@helixcommunity.org
> > http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
> >
--
Dean Collins
Server Technical Lead, RealNetworks, Inc. -- http://www.realnetworks.com
Helix Server Project Owner -- http://helix-server.helixcommunity.org
From ken.carlino at gmail.com Sat Mar 17 20:23:56 2007
From: ken.carlino at gmail.com (ken carlino)
Date: Sat Mar 17 20:58:14 2007
Subject: [Filesystem-dev] How to activate asncfsys in Helix?
In-Reply-To: <20070316161725.GM23668@jedi.dev.prognet.com>
References: <568e62a40703152104q4084d79fh69381ddb76ef5807@mail.gmail.com>
<000001c767c6$9d9dd2a0$db68a8c0@EHYCHED620>
<20070316161725.GM23668@jedi.dev.prognet.com>
Message-ID:
On 3/16/07, Dean Collins wrote:
> asncfsys is a server-specific filesystem designed for network-based
> filesystems such as NFS. It is enabled by editing your server config
> file, changing "pn-local" to "pn-network" for the mountpoint
> you want to configure to use it.
>
> Dean
>
Thanks Dean.
I tried your suggestion:
I add this to the config file
And enter this "rtsp://localhost:1554/async/Yuki.mp3" in the real player,
I get this error:
Requested file not found. The link you followed may be outdated or
inaccurate. (rtsp://localhost:1554/async/Yuki.mp3)
I am sure I have the file:
$ ls
Yuki.mp3*
$ pwd
/home/yinglcs/video/helix/install/AsyncContent
Can you please tell me what am I missing?
Thank you.
> > > -----Original Message-----
> > > From: filesystem-dev-bounces@helixcommunity.org
> > > [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> > > Of ying lcs
> > > Sent: Friday, March 16, 2007 12:04 AM
> > > To: filesystem-dev@helixcommunity.org
> > > Subject: [Filesystem-dev] How to activate asncfsys in Helix?
> > >
> > > Hi,
> > >
> > > Can you please tell me how to activate asncfsys in Helix?
> > > I see it building build, but how can i configure helix to use it?
> > > And is asncfsys is only for local files or remote files?
> > >
> > > Thank for any pointers.
> > >
> > > _______________________________________________
> > > Filesystem-dev mailing list
> > > Filesystem-dev@helixcommunity.org
> > > http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
> > >
>
> --
> Dean Collins
> Server Technical Lead, RealNetworks, Inc. -- http://www.realnetworks.com
> Helix Server Project Owner -- http://helix-server.helixcommunity.org
>
> _______________________________________________
> Filesystem-dev mailing list
> Filesystem-dev@helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
>
From dcollins at real.com Sun Mar 18 09:44:12 2007
From: dcollins at real.com (Dean Collins)
Date: Sun Mar 18 10:18:18 2007
Subject: [Filesystem-dev] How to activate asncfsys in Helix?
In-Reply-To:
References: <568e62a40703152104q4084d79fh69381ddb76ef5807@mail.gmail.com>
<000001c767c6$9d9dd2a0$db68a8c0@EHYCHED620>
<20070316161725.GM23668@jedi.dev.prognet.com>
Message-ID: <20070318164411.GC12499@jedi.dev.prognet.com>
Do you see anything in the server's error log? Any error messages
show up if you run the server with the --debug command-line flag?
Does the same clip play if you change "pn-network" to "pn-local"?
Dean
On Sat, Mar 17, 2007 at 10:23:56PM -0500, ken carlino wrote:
> On 3/16/07, Dean Collins wrote:
> >asncfsys is a server-specific filesystem designed for network-based
> >filesystems such as NFS. It is enabled by editing your server config
> >file, changing "pn-local" to "pn-network" for the mountpoint
> >you want to configure to use it.
> >
> >Dean
> >
>
> Thanks Dean.
>
> I tried your suggestion:
> I add this to the config file
>
>
>
>
>
>
> And enter this "rtsp://localhost:1554/async/Yuki.mp3" in the real player,
> I get this error:
> Requested file not found. The link you followed may be outdated or
> inaccurate. (rtsp://localhost:1554/async/Yuki.mp3)
>
> I am sure I have the file:
>
> $ ls
> Yuki.mp3*
> $ pwd
> /home/yinglcs/video/helix/install/AsyncContent
>
> Can you please tell me what am I missing?
>
> Thank you.
>
>
>
>
> >> > -----Original Message-----
> >> > From: filesystem-dev-bounces@helixcommunity.org
> >> > [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> >> > Of ying lcs
> >> > Sent: Friday, March 16, 2007 12:04 AM
> >> > To: filesystem-dev@helixcommunity.org
> >> > Subject: [Filesystem-dev] How to activate asncfsys in Helix?
> >> >
> >> > Hi,
> >> >
> >> > Can you please tell me how to activate asncfsys in Helix?
> >> > I see it building build, but how can i configure helix to use it?
> >> > And is asncfsys is only for local files or remote files?
> >> >
> >> > Thank for any pointers.
> >> >
> >> > _______________________________________________
> >> > Filesystem-dev mailing list
> >> > Filesystem-dev@helixcommunity.org
> >> > http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
> >> >
> >
> >--
> >Dean Collins
> >Server Technical Lead, RealNetworks, Inc. -- http://www.realnetworks.com
> >Helix Server Project Owner -- http://helix-server.helixcommunity.org
> >
> >_______________________________________________
> >Filesystem-dev mailing list
> >Filesystem-dev@helixcommunity.org
> >http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
> >
--
Dean Collins
Server Technical Lead, RealNetworks, Inc. -- http://www.realnetworks.com
Helix Server Project Owner -- http://helix-server.helixcommunity.org
From yinglcs at gmail.com Sun Mar 18 10:07:48 2007
From: yinglcs at gmail.com (ying lcs)
Date: Sun Mar 18 10:41:55 2007
Subject: [Filesystem-dev] How to activate asncfsys in Helix?
In-Reply-To: <20070318164411.GC12499@jedi.dev.prognet.com>
References: <568e62a40703152104q4084d79fh69381ddb76ef5807@mail.gmail.com>
<000001c767c6$9d9dd2a0$db68a8c0@EHYCHED620>
<20070316161725.GM23668@jedi.dev.prognet.com>
<20070318164411.GC12499@jedi.dev.prognet.com>
Message-ID: <568e62a40703181007g68463319x26e26f7f23b90209@mail.gmail.com>
On 3/18/07, Dean Collins wrote:
> Do you see anything in the server's error log? Any error messages
> show up if you run the server with the --debug command-line flag?
> Does the same clip play if you change "pn-network" to "pn-local"?
>
> Dean
>
Thanks for your help.
Here is the error in the error.log. And yes, the file plays if i
change 'pn-network' to 'pn-local'.
8-Mar-2007 12:11:33.352 tmplgpln(2967): Version: Helix DNA Server (CVS
HEAD) (11.0.99.6732)
18-Mar-2007 12:11:33.352 tmplgpln(2967): Platform: linux-2.6-glibc23-i686
18-Mar-2007 12:11:46.357 tmplgpln(2967): Player Connected
18-Mar-2007 12:11:46.391 tmplgpln(2967): 1: Error retrieving URL
`async/Yuki.mp3' (Invalid path)
Thank you for any help in settting up asyncfs.
> On Sat, Mar 17, 2007 at 10:23:56PM -0500, ken carlino wrote:
> > On 3/16/07, Dean Collins wrote:
> > >asncfsys is a server-specific filesystem designed for network-based
> > >filesystems such as NFS. It is enabled by editing your server config
> > >file, changing "pn-local" to "pn-network" for the mountpoint
> > >you want to configure to use it.
> > >
> > >Dean
> > >
> >
> > Thanks Dean.
> >
> > I tried your suggestion:
> > I add this to the config file
> >
> >
> >
> >
> >
> >
> > And enter this "rtsp://localhost:1554/async/Yuki.mp3" in the real player,
> > I get this error:
> > Requested file not found. The link you followed may be outdated or
> > inaccurate. (rtsp://localhost:1554/async/Yuki.mp3)
> >
> > I am sure I have the file:
> >
> > $ ls
> > Yuki.mp3*
> > $ pwd
> > /home/yinglcs/video/helix/install/AsyncContent
> >
> > Can you please tell me what am I missing?
> >
> > Thank you.
> >
> >
> >
> >
> > >> > -----Original Message-----
> > >> > From: filesystem-dev-bounces@helixcommunity.org
> > >> > [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> > >> > Of ying lcs
> > >> > Sent: Friday, March 16, 2007 12:04 AM
> > >> > To: filesystem-dev@helixcommunity.org
> > >> > Subject: [Filesystem-dev] How to activate asncfsys in Helix?
> > >> >
> > >> > Hi,
> > >> >
> > >> > Can you please tell me how to activate asncfsys in Helix?
> > >> > I see it building build, but how can i configure helix to use it?
> > >> > And is asncfsys is only for local files or remote files?
> > >> >
> > >> > Thank for any pointers.
> > >> >
> > >> > _______________________________________________
> > >> > Filesystem-dev mailing list
> > >> > Filesystem-dev@helixcommunity.org
> > >> > http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
> > >> >
> > >
> > >--
> > >Dean Collins
> > >Server Technical Lead, RealNetworks, Inc. -- http://www.realnetworks.com
> > >Helix Server Project Owner -- http://helix-server.helixcommunity.org
> > >
> > >_______________________________________________
> > >Filesystem-dev mailing list
> > >Filesystem-dev@helixcommunity.org
> > >http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
> > >
>
> --
> Dean Collins
> Server Technical Lead, RealNetworks, Inc. -- http://www.realnetworks.com
> Helix Server Project Owner -- http://helix-server.helixcommunity.org
>
From yinglcs at gmail.com Sun Mar 18 21:32:46 2007
From: yinglcs at gmail.com (ying lcs)
Date: Sun Mar 18 22:06:46 2007
Subject: [Filesystem-dev] How to activate asncfsys in Helix?
In-Reply-To: <568e62a40703181007g68463319x26e26f7f23b90209@mail.gmail.com>
References: <568e62a40703152104q4084d79fh69381ddb76ef5807@mail.gmail.com>
<000001c767c6$9d9dd2a0$db68a8c0@EHYCHED620>
<20070316161725.GM23668@jedi.dev.prognet.com>
<20070318164411.GC12499@jedi.dev.prognet.com>
<568e62a40703181007g68463319x26e26f7f23b90209@mail.gmail.com>
Message-ID: <568e62a40703182132j64c51a01r47b6f4841228c34b@mail.gmail.com>
On 3/18/07, ying lcs wrote:
> On 3/18/07, Dean Collins wrote:
> > Do you see anything in the server's error log? Any error messages
> > show up if you run the server with the --debug command-line flag?
> > Does the same clip play if you change "pn-network" to "pn-local"?
> >
> > Dean
> >
> Thanks for your help.
>
> Here is the error in the error.log. And yes, the file plays if i
> change 'pn-network' to 'pn-local'.
>
> 8-Mar-2007 12:11:33.352 tmplgpln(2967): Version: Helix DNA Server (CVS
> HEAD) (11.0.99.6732)
> 18-Mar-2007 12:11:33.352 tmplgpln(2967): Platform: linux-2.6-glibc23-i686
> 18-Mar-2007 12:11:46.357 tmplgpln(2967): Player Connected
> 18-Mar-2007 12:11:46.391 tmplgpln(2967): 1: Error retrieving URL
> `async/Yuki.mp3' (Invalid path)
>
> Thank you for any help in settting up asyncfs.
>
>
I think I know the cause of my problem. i need to manually copy the
'cp ./server/fs/asncfs/dbg/asncfsys.so' to the Plugin directory of the
helix installation.
Thanks for the help.
>
>
> > On Sat, Mar 17, 2007 at 10:23:56PM -0500, ken carlino wrote:
> > > On 3/16/07, Dean Collins wrote:
> > > >asncfsys is a server-specific filesystem designed for network-based
> > > >filesystems such as NFS. It is enabled by editing your server config
> > > >file, changing "pn-local" to "pn-network" for the mountpoint
> > > >you want to configure to use it.
> > > >
> > > >Dean
> > > >
> > >
> > > Thanks Dean.
> > >
> > > I tried your suggestion:
> > > I add this to the config file
> > >
> > >
> > >
> > >
> > >
> > >
> > > And enter this "rtsp://localhost:1554/async/Yuki.mp3" in the real player,
> > > I get this error:
> > > Requested file not found. The link you followed may be outdated or
> > > inaccurate. (rtsp://localhost:1554/async/Yuki.mp3)
> > >
> > > I am sure I have the file:
> > >
> > > $ ls
> > > Yuki.mp3*
> > > $ pwd
> > > /home/yinglcs/video/helix/install/AsyncContent
> > >
> > > Can you please tell me what am I missing?
> > >
> > > Thank you.
> > >
> > >
> > >
> > >
> > > >> > -----Original Message-----
> > > >> > From: filesystem-dev-bounces@helixcommunity.org
> > > >> > [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> > > >> > Of ying lcs
> > > >> > Sent: Friday, March 16, 2007 12:04 AM
> > > >> > To: filesystem-dev@helixcommunity.org
> > > >> > Subject: [Filesystem-dev] How to activate asncfsys in Helix?
> > > >> >
> > > >> > Hi,
> > > >> >
> > > >> > Can you please tell me how to activate asncfsys in Helix?
> > > >> > I see it building build, but how can i configure helix to use it?
> > > >> > And is asncfsys is only for local files or remote files?
> > > >> >
> > > >> > Thank for any pointers.
> > > >> >
> > > >> > _______________________________________________
> > > >> > Filesystem-dev mailing list
> > > >> > Filesystem-dev@helixcommunity.org
> > > >> > http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
> > > >> >
> > > >
> > > >--
> > > >Dean Collins
> > > >Server Technical Lead, RealNetworks, Inc. -- http://www.realnetworks.com
> > > >Helix Server Project Owner -- http://helix-server.helixcommunity.org
> > > >
> > > >_______________________________________________
> > > >Filesystem-dev mailing list
> > > >Filesystem-dev@helixcommunity.org
> > > >http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
> > > >
> >
> > --
> > Dean Collins
> > Server Technical Lead, RealNetworks, Inc. -- http://www.realnetworks.com
> > Helix Server Project Owner -- http://helix-server.helixcommunity.org
> >
>
From yinglcs at gmail.com Mon Mar 19 11:55:07 2007
From: yinglcs at gmail.com (ying lcs)
Date: Mon Mar 19 12:29:03 2007
Subject: [Filesystem-dev] How can I add a new file in file system plugins
Message-ID: <568e62a40703191155l640a0084p16b82de6909d56d4@mail.gmail.com>
Hi,
I am trying to add a new file in the file system plugins.
So in Umakefil, I add this line:
project.AddSources('asncfsys.cpp',
//....
'randproducer.c',
)
And in the asncfsys, I call a method 'initproducer' in randproducer.c.
But when run helix , I get this 'symbol look up error':
./Bin/hlxserver: symbol lookup error:
/home/yinglcs/helix/install/Plugins/asncfsys.so: undefined symbol:
_Z12initproducerPm
I check there is a .o file for randproducer.c, so it does get complied.
Can you please tell me what am I missing?
Thanks for your help.
From ehyche at real.com Wed Mar 21 05:29:22 2007
From: ehyche at real.com (Eric Hyche)
Date: Wed Mar 21 06:02:46 2007
Subject: [Filesystem-dev] How can I add a new file in file system plugins
In-Reply-To: <568e62a40703191155l640a0084p16b82de6909d56d4@mail.gmail.com>
References: <568e62a40703191155l640a0084p16b82de6909d56d4@mail.gmail.com>
Message-ID: <00ad01c76bb4$8f7281c0$db68a8c0@EHYCHED620>
You are using a function in a .c file from
a .cpp file. Whenever you declared initproducerPm
in the .cpp file (usually in a header file), did
you put the declaration of initproducerPm inside
of extern "C", as in:
#if defined(_cplusplus)
extern "C"
{
#endif
// definition of initproducerPm
#if defined(_cplusplus)
};
#endif
Alternatively you could just rename randproducer.c
to randproducer.cpp, unless there's some need for
it to stay a .c file.
Eric
=============================================
Eric Hyche (ehyche@real.com)
Technical Lead
RealNetworks, Inc.
> -----Original Message-----
> From: filesystem-dev-bounces@helixcommunity.org
> [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> Of ying lcs
> Sent: Monday, March 19, 2007 2:55 PM
> To: filesystem-dev@helixcommunity.org
> Subject: [Filesystem-dev] How can I add a new file in file
> system plugins
>
> Hi,
> I am trying to add a new file in the file system plugins.
> So in Umakefil, I add this line:
> project.AddSources('asncfsys.cpp',
> //....
> 'randproducer.c',
>
> )
>
> And in the asncfsys, I call a method 'initproducer' in randproducer.c.
>
> But when run helix , I get this 'symbol look up error':
> ./Bin/hlxserver: symbol lookup error:
> /home/yinglcs/helix/install/Plugins/asncfsys.so: undefined symbol:
> _Z12initproducerPm
>
> I check there is a .o file for randproducer.c, so it does get
> complied.
> Can you please tell me what am I missing?
>
> Thanks for your help.
>
> _______________________________________________
> Filesystem-dev mailing list
> Filesystem-dev@helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
>
From ken.carlino at gmail.com Wed Mar 21 09:32:08 2007
From: ken.carlino at gmail.com (ken carlino)
Date: Wed Mar 21 10:05:30 2007
Subject: [Filesystem-dev] File Seek in the beginning of streaming
Message-ID:
Hi,
I am trying to study the behavior of FileStream in the beginning of
streaming in Helix.
I notice that Helix first tries to seek to end of the file, read 4K
off the file and then re-seek the file to the beginning and start
streaming from there.
My question is why it seeks to the end of the file in the beginning?
Thank you.
From ehyche at real.com Wed Mar 21 10:50:47 2007
From: ehyche at real.com (Eric Hyche)
Date: Wed Mar 21 11:24:10 2007
Subject: [Filesystem-dev] File Seek in the beginning of streaming
In-Reply-To:
References:
Message-ID: <00fa01c76be1$75bca760$db68a8c0@EHYCHED620>
What kind of file is being streamed?
Most likely this is a type of file that doesn't
have the necessary header information at the beginning
of the file (i.e. - mp3). Therefore, the file format
plugin has to seek to the end of the file to get
some information before going back and starting
to deliver packets.
Eric
=============================================
Eric Hyche (ehyche@real.com)
Technical Lead
RealNetworks, Inc.
> -----Original Message-----
> From: filesystem-dev-bounces@helixcommunity.org
> [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> Of ken carlino
> Sent: Wednesday, March 21, 2007 12:32 PM
> To: filesystem-dev@helixcommunity.org
> Subject: [Filesystem-dev] File Seek in the beginning of streaming
>
> Hi,
> I am trying to study the behavior of FileStream in the beginning of
> streaming in Helix.
> I notice that Helix first tries to seek to end of the file, read 4K
> off the file and then re-seek the file to the beginning and start
> streaming from there.
>
> My question is why it seeks to the end of the file in the beginning?
>
> Thank you.
>
> _______________________________________________
> Filesystem-dev mailing list
> Filesystem-dev@helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
>
From Arnel.Periquet at nokia.com Fri Mar 23 14:18:51 2007
From: Arnel.Periquet at nokia.com (Arnel.Periquet@nokia.com)
Date: Fri Mar 23 14:52:02 2007
Subject: [Common-dev][Clientapps-dev][Filesystem-dev] CR: Integration BUG
fixes for Series 60 Progressive Download
Message-ID:
Skipped content of type multipart/alternative-------------- next part --------------
? Makefile
? MmfCtrlLib.mak
? MmfCtrlLib.upp
? Umakefil.upp
? clientapps_symbianMmf_diff.txt
? winscw-dbg32
? audiocontroller/Makefile
? audiocontroller/Umakefil.upp
? audiocontroller/armv5-rel32
? audiocontroller/controllerdll.mak
? audiocontroller/controllerdll.upp
? audiocontroller/controllersis.mak
? audiocontroller/controllersis.upp
? audiocontroller/copyDlls.bat
? audiocontroller/hxaudio-s60-mmf.pkg
? audiocontroller/hxaudio-s60-mmf.sis
? audiocontroller/hxmmfaudioctrl.uid.cpp
? audiocontroller/hxmmfaudioctrl{000a0000}.def
? audiocontroller/winscw-dbg32
? common/Makefile
? common/Umakefil.upp
? common/armv5-rel32
? common/winscw-dbg32
? videocontroller/Makefile
? videocontroller/MmfCtrlDll.mak
? videocontroller/MmfCtrlDll.upp
? videocontroller/MmfSis.mak
? videocontroller/MmfSis.upp
? videocontroller/Umakefil.upp
? videocontroller/copyDlls.bat
? videocontroller/hxmmfctrl.uid.cpp
? videocontroller/hxmmfctrl{000a0000}.def
? videocontroller/mmfplayer-s60-mmf.pkg
? videocontroller/mmfplayer-s60-mmf.sis
? videocontroller/winscw-dbg32
Index: hxmmfstatepaused.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfstatepaused.cpp,v
retrieving revision 1.3.2.6
diff -u -b -r1.3.2.6 hxmmfstatepaused.cpp
--- hxmmfstatepaused.cpp 2 Jan 2007 20:35:27 -0000 1.3.2.6
+++ hxmmfstatepaused.cpp 23 Mar 2007 19:37:04 -0000
@@ -179,7 +179,7 @@
const char* pUserString,
const char* pMoreInfoURL)
{
- HXLOGL2(HXLOG_SMMF, "HXMMFStatePaused::ErrorOccurre\n");
+ HXLOGL2(HXLOG_SMMF, "HXMMFStatePaused::ErrorOccurred\n");
if( (ulHXCode == HXR_AUDIODEVICETAKEN) ||
(ulHXCode == HXR_PARTIALPLAYBACK) )
Index: common/hxmmfbasectrl.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/common/hxmmfbasectrl.cpp,v
retrieving revision 1.1.2.12
diff -u -b -r1.1.2.12 hxmmfbasectrl.cpp
--- common/hxmmfbasectrl.cpp 13 Feb 2007 17:20:09 -0000 1.1.2.12
+++ common/hxmmfbasectrl.cpp 23 Mar 2007 19:37:04 -0000
@@ -138,7 +138,7 @@
{ HXR_SOCK_DISCON, KErrDisconnected },
{ HXR_CORRUPT_FILE, KErrCorrupt },
{ HXR_PROGRESSIVE_DOWNLOAD_TIMEOUT, KErrTimedOut },
- { HXR_FULL_DOWNLOAD_NEEDED, KErrNotSupported },
+ { HXR_FULL_DOWNLOAD_NEEDED, KErrTimedOut },
{ HXR_ACCESSPOINT_NOT_FOUND, KErrAbort },
{ HXR_PE_INTERNAL_SERVER_ERROR, KErrDisconnected },
{ HXR_NOT_AUTHORIZED, KErrPermissionDenied },
@@ -171,7 +171,8 @@
, m_pDataSource(NULL)
#ifdef HELIX_FEATURE_S60_PROGDOWN
, m_pDownloadObserver(NULL)
- , m_lDownloadID(0L)
+ , m_ulDownloadID(0L)
+ , m_ulSavedProgDownError(HXR_OK)
#endif
, m_bEngineCreated(FALSE)
, m_bUpdatePrioritySettings(FALSE)
@@ -858,6 +859,15 @@
{
HX_ADDREF(m_pDataSource);
result = HXR_OK;
+
+#ifdef HELIX_FEATURE_S60_PROGDOWN
+ if ( HXR_OK == result )
+ {
+ // set up to receive a Download Events in the future
+ result = m_pDataSource->QueryInterface(IID_IHXDownloadEventObserver,
+ (void**) &m_pDownloadObserver);
+ }
+#endif //HELIX_FEATURE_S60_PROGDOWN
}
}
}
@@ -1109,20 +1119,6 @@
HXLOGL2(HXLOG_SMMF, "HXMMFBaseCtrl::SendEvent(%s,%lx)",
EventToName(event), status);
-#ifdef HELIX_FEATURE_S60_PROGDOWN
- // capture a MIMETYPE recognition failure that is due to a timeout
- // while waiting for the first few bytes of the file header
- if (event == PrepareComplete && status == HXR_PROGRESSIVE_DOWNLOAD_TIMEOUT)
- {
- HXLOGL2(HXLOG_SMMF,
- "HXMMFBaseCtrl::SendEvent() timeout waiting for mimetype "
- "during progressive download");
-
- // reset status to indicate full download is need
- status = HXR_FULL_DOWNLOAD_NEEDED;
- }
-#endif
-
TMMFEvent mmfEvent;
if ( MapToMMFEvent(event, mmfEvent.iEventType) )
Index: common/hxmmfbasectrl.h
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/common/hxmmfbasectrl.h,v
retrieving revision 1.1.2.4
diff -u -b -r1.1.2.4 hxmmfbasectrl.h
--- common/hxmmfbasectrl.h 26 Jan 2007 21:21:34 -0000 1.1.2.4
+++ common/hxmmfbasectrl.h 23 Mar 2007 19:37:04 -0000
@@ -201,7 +201,8 @@
IHXMMFDataSource* m_pDataSource;
#ifdef HELIX_FEATURE_S60_PROGDOWN
IHXDownloadEventObserver* m_pDownloadObserver;
- TInt m_lDownloadID;
+ TInt m_ulDownloadID;
+ UINT32 m_ulSavedProgDownError;
#endif
HXBOOL m_bEngineCreated;
TMMFPrioritySettings m_PrioritySettings;
Index: videocontroller/hxmmfctrlimpl.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp,v
retrieving revision 1.12.2.46
diff -u -b -r1.12.2.46 hxmmfctrlimpl.cpp
--- videocontroller/hxmmfctrlimpl.cpp 27 Feb 2007 16:29:46 -0000 1.12.2.46
+++ videocontroller/hxmmfctrlimpl.cpp 23 Mar 2007 19:37:05 -0000
@@ -300,19 +300,19 @@
TInt
HXMMFCtrlImpl::GetDownloadID(TMMFMessage& aMessage)
{
- HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::GetDownloadID()");
-
TInt status = KErrNone;
- TPckg downloadID(0L);
+ TPckg downloadID(0L);
- if ( aMessage.ReadData1FromClient(downloadID) != KErrNone )
+ if(aMessage.ReadData1FromClient(downloadID) != KErrNone)
{
- HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::GetDownloadID() DownloadID fail");
+ HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::GetDownloadID failed");
status = KErrNotFound;
}
- m_lDownloadID = downloadID();
+ m_ulDownloadID = downloadID();
+ HXLOGL2(HXLOG_SMMF,
+ "HXMMFCtrlImpl::GetDownloadID downloadID=%u", downloadID());
return status;
}
@@ -320,23 +320,52 @@
TInt
HXMMFCtrlImpl::SetDownloadComplete(TMMFMessage& aMessage)
{
- HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::SetDownloadComplete()");
+ TInt status = KErrNone;
+
+ TPckg downloadComplete(0);
+
+ if(aMessage.SizeOfData1FromClient() != downloadComplete.Length() ||
+ aMessage.ReadData1FromClient(downloadComplete) != KErrNone)
+ {
+ HXLOGL1(HXLOG_SMMF,
+ "HXMMFCtrlImpl::SetDownloadComplete failed");
+ status = KErrNotFound;
+ }
+ else
+ {
+ if(m_pDownloadObserver)
+ {
+ m_pDownloadObserver->SetDownloadComplete(downloadComplete());
+ HXLOGL2(HXLOG_SMMF,
+ "HXMMFCtrlImpl::SetDownloadComplete value=%u",
+ downloadComplete());
+ }
+ }
+ return status;
+}
+
+TInt
+HXMMFCtrlImpl::SetDownloadSize(TMMFMessage& aMessage)
+{
TInt status = KErrNone;
- TPckg downloadComplete(0);
+ TPckg downloadSize(0);
- if ( aMessage.SizeOfData1FromClient() != downloadComplete.Length() ||
- aMessage.ReadData1FromClient(downloadComplete) != KErrNone )
+ if(aMessage.SizeOfData1FromClient() != downloadSize.Length() ||
+ aMessage.ReadData1FromClient(downloadSize) != KErrNone)
{
- HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::SetDownloadComplete() DownloadComplete fail");
+ HXLOGL1(HXLOG_SMMF,
+ "HXMMFCtrlImpl::SetDownloadSize failed");
status = KErrNotFound;
}
else
{
- if ( m_pDownloadObserver )
+ if(m_pDownloadObserver)
{
- m_pDownloadObserver->SetDownloadComplete( downloadComplete() );
+ m_pDownloadObserver->SetDownloadSize( downloadSize() );
+ HXLOGL4(HXLOG_SMMF,
+ "HXMMFCtrlImpl::SetDownloadSize size=%u", downloadSize());
}
}
@@ -437,6 +466,9 @@
case EMMFROPControllerSetDownloadComplete:
status = SetDownloadComplete(aMessage);
break;
+ case EMMFROPControllerSetDownloadSize:
+ status = SetDownloadSize(aMessage);
+ break;
#endif
default:
/*
@@ -468,7 +500,7 @@
#ifdef HELIX_FEATURE_S60_PROGDOWN
// check if this is a Progressive Download case
- if(m_lDownloadID > 0 && m_pFileSource && m_pDataSource && m_pRequest)
+ if(m_ulDownloadID > 0 && m_pDownloadObserver && m_pFileSource && m_pRequest)
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcPrepare(), PROGRESSIVE DOWNLOAD ENABLED");
@@ -478,21 +510,21 @@
m_url = PROGRESSIVE_DOWNLOAD_STRING + CHXSymbianString::DescToString(fileName);
result = m_pRequest->SetURL(m_url);
- if ( HXR_OK == result )
+ // Fail immediately if the file is not progressively downloadable.
+ // This timeout will be reset on PrepareComplete()
+ if(HXR_OK == result)
{
- // set up to received a Download Completed event in the future
- m_pDataSource->QueryInterface(IID_IHXDownloadEventObserver,
- (void**) &m_pDownloadObserver);
+ m_pDownloadObserver->SetUnderflowTimeoutInMillis(0);
}
}
-#endif
+#endif //HELIX_FEATURE_S60_PROGDOWN
- if ( HXR_OK == result )
+ if (HXR_OK == result)
{
result = m_pStateCtrl->Prepare( m_pRequest );
}
- if ( HXR_OK == result )
+ if (HXR_OK == result)
{
m_nextEvent = PrepareComplete;
}
@@ -973,10 +1005,38 @@
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::OnError() - UserString(%s)", pUserString);
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::OnError() - pMoreInfoURL(%s)", pMoreInfoURL);
+ unsigned long ulHXCode_local = ulHXCode;
+
+#ifdef HELIX_FEATURE_S60_PROGDOWN
+ // make sure we only do this when a progressive download is active
+ if(m_ulDownloadID > 0)
+ {
+ if(m_nextEvent == ErrorEvent)
+ {
+ // Save any ErrorEvent error code to be sent again as
+ // a non-ErrorEvent, e.g. PrepareComplete. This is
+ // necessary since Media Player currently ignores ErrorEvents.
+ m_ulSavedProgDownError = ulHXCode_local;
+ }
+ else
+ {
+ // send any previously saved error as a non-ErrorEvent
+ if(m_ulSavedProgDownError != HXR_OK)
+ {
+ ulHXCode_local = m_ulSavedProgDownError;
+
+ HXLOGL1(HXLOG_SMMF,
+ "HXMMFCtrlImpl::OnError() - HXCode changed from %lx to %lx",
+ ulHXCode, ulHXCode_local);
+ }
+ }
+ }
+#endif //HELIX_FEATURE_S60_PROGDOWN
+
//
// Check for RTSP Logging message from engine
//
- if ( ulHXCode == HXR_RTSP_RESP_SINK_MESSAGE )
+ if ( ulHXCode_local == HXR_RTSP_RESP_SINK_MESSAGE )
{
m_pLogSink->LogMessage( KMMFROPErrorLogRTSP, pUserString );
}
@@ -984,17 +1044,17 @@
{
// Hold the last error code. But if the error code is sent to TLC, it
// will be reset. Value reset in SendEvent API
- m_ulLastError = ulHXCode;
+ m_ulLastError = ulHXCode_local;
if (unSeverity != HXLOG_WARNING)
{
- if (ulHXCode == HXR_AUDIODEVICETAKEN)
+ if (ulHXCode_local == HXR_AUDIODEVICETAKEN)
{
- SendEvent( AudioDeviceTaken, ulHXCode );
+ SendEvent( AudioDeviceTaken, ulHXCode_local );
}
else
{
- SendEvent( m_nextEvent, ulHXCode, pUserString);
+ SendEvent( m_nextEvent, ulHXCode_local, pUserString);
if ( m_nextEvent == PlaybackComplete )
{
@@ -1010,6 +1070,15 @@
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::OnPrepareComplete()");
+ #ifdef HELIX_FEATURE_S60_PROGDOWN
+ if(m_pDownloadObserver)
+ {
+ // reset fatal underflow timeout to default (60 seconds)
+ m_pDownloadObserver->SetUnderflowTimeoutInMillis(
+ DEFAULT_UNDERFLOW_TIMEOUT_IN_MILLIS);
+ }
+ #endif //HELIX_FEATURE_S60_PROGDOWN
+
SendEvent(PrepareComplete, m_ulLastError);
m_nextEvent = PlaybackComplete;
Index: videocontroller/hxmmfctrlimpl.h
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.h,v
retrieving revision 1.3.2.18
diff -u -b -r1.3.2.18 hxmmfctrlimpl.h
--- videocontroller/hxmmfctrlimpl.h 8 Jan 2007 23:39:44 -0000 1.3.2.18
+++ videocontroller/hxmmfctrlimpl.h 23 Mar 2007 19:37:05 -0000
@@ -173,6 +173,7 @@
#ifdef HELIX_FEATURE_S60_PROGDOWN
TInt GetDownloadID(TMMFMessage& aMessage);
TInt SetDownloadComplete(TMMFMessage& aMessage);
+ TInt SetDownloadSize(TMMFMessage& aMessage);
#endif
protected:
-------------- next part --------------
? Makefile
? Umakefil.upp
? armv5-rel32
? common_fileio_diff.txt
? winscw-dbg32
Index: platform/symbian/hxdatasourcemmfclip.cpp
===================================================================
RCS file: /cvsroot/common/fileio/platform/symbian/hxdatasourcemmfclip.cpp,v
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.2 hxdatasourcemmfclip.cpp
--- platform/symbian/hxdatasourcemmfclip.cpp 19 Sep 2006 21:08:53 -0000 1.1.2.2
+++ platform/symbian/hxdatasourcemmfclip.cpp 22 Mar 2007 23:35:58 -0000
@@ -56,7 +56,9 @@
CHXDataSourceMMFClip::CHXDataSourceMMFClip(CMMFClip *pImpl):
m_pImpl(pImpl)
#ifdef HELIX_FEATURE_S60_PROGDOWN
- ,m_lDownloadComplete(0L)
+ ,m_ulDownloadComplete(0L)
+ ,m_ulDownloadSize(0L)
+ ,m_ulUnderflowTimeoutInMillis(DEFAULT_UNDERFLOW_TIMEOUT_IN_MILLIS)
#endif
{
}
@@ -225,25 +227,43 @@
#endif
-
STDMETHODIMP CHXDataSourceMMFClip::GetSize(UINT32 &ulSize)
{
ulSize = m_pImpl->Size();
return HXR_OK;
}
+#ifdef HELIX_FEATURE_S60_PROGDOWN
+UINT32 CHXDataSourceMMFClip::IsDownloadComplete()
+{
+ return m_ulDownloadComplete;
+}
+UINT32 CHXDataSourceMMFClip::GetDownloadSize()
+{
+ return m_ulDownloadSize;
+}
-#ifdef HELIX_FEATURE_S60_PROGDOWN
-STDMETHODIMP CHXDataSourceMMFClip::SetDownloadComplete(INT32 downloadComplete)
+UINT32 CHXDataSourceMMFClip::GetUnderflowTimeoutInMillis()
{
- m_lDownloadComplete = downloadComplete;
+ return m_ulUnderflowTimeoutInMillis;
}
-INT32 CHXDataSourceMMFClip::IsDownloadComplete()
+STDMETHODIMP CHXDataSourceMMFClip::SetDownloadComplete(UINT32 downloadComplete)
{
- return m_lDownloadComplete;
+ m_ulDownloadComplete = downloadComplete;
}
+
+STDMETHODIMP CHXDataSourceMMFClip::SetDownloadSize(UINT32 downloadSize)
+{
+ m_ulDownloadSize = downloadSize;
+}
+
+STDMETHODIMP CHXDataSourceMMFClip::SetUnderflowTimeoutInMillis(UINT32 timeout)
+{
+ m_ulUnderflowTimeoutInMillis = timeout;
+}
+
#endif
Index: pub/platform/symbian/hxdatasourcemmfclip.h
===================================================================
RCS file: /cvsroot/common/fileio/pub/platform/symbian/hxdatasourcemmfclip.h,v
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.2 hxdatasourcemmfclip.h
--- pub/platform/symbian/hxdatasourcemmfclip.h 19 Sep 2006 21:07:04 -0000 1.1.2.2
+++ pub/platform/symbian/hxdatasourcemmfclip.h 22 Mar 2007 23:35:58 -0000
@@ -82,14 +82,20 @@
STDMETHOD(GetSize) (THIS_ UINT32 &ulSize);
#ifdef HELIX_FEATURE_S60_PROGDOWN
- STDMETHOD(SetDownloadComplete) (THIS_ INT32 downloadComplete);
- INT32 IsDownloadComplete (THIS);
+ UINT32 IsDownloadComplete (THIS);
+ UINT32 GetDownloadSize (THIS);
+ UINT32 GetUnderflowTimeoutInMillis(THIS);
+ STDMETHOD(SetDownloadComplete) (THIS_ UINT32 downloadComplete);
+ STDMETHOD(SetDownloadSize) (THIS_ UINT32 downloadSize);
+ STDMETHOD(SetUnderflowTimeoutInMillis)(THIS_ UINT32 timeout);
#endif
protected:
CMMFClip* m_pImpl; // actual data source implementation
#ifdef HELIX_FEATURE_S60_PROGDOWN
- INT32 m_lDownloadComplete;
+ UINT32 m_ulDownloadComplete;
+ UINT32 m_ulDownloadSize;
+ UINT32 m_ulUnderflowTimeoutInMillis;
#endif
UINT32 ReadL(THIS_ void *, ULONG32 size, ULONG32 count);
UINT32 WriteL(THIS_ void *, ULONG32 size, ULONG32 count);
-------------- next part --------------
? common_include_diff.txt
Index: ihxdownloadeventobserver.h
===================================================================
RCS file: /cvsroot/common/include/ihxdownloadeventobserver.h,v
retrieving revision 1.1.2.1
diff -u -b -r1.1.2.1 ihxdownloadeventobserver.h
--- ihxdownloadeventobserver.h 24 Aug 2006 19:48:52 -0000 1.1.2.1
+++ ihxdownloadeventobserver.h 22 Mar 2007 23:34:20 -0000
@@ -81,6 +81,8 @@
#undef INTERFACE
#define INTERFACE IHXDownloadEventObserver
+#define DEFAULT_UNDERFLOW_TIMEOUT_IN_MILLIS 60000
+
DECLARE_INTERFACE_(IHXDownloadEventObserver, IUnknown)
{
/*
@@ -95,9 +97,15 @@
/*
* DownloadComplete Event
*/
+ STDMETHOD_(UINT32,IsDownloadComplete) (THIS) PURE;
+ STDMETHOD_(UINT32,GetDownloadSize) (THIS) PURE;
+ STDMETHOD_(UINT32,GetUnderflowTimeoutInMillis) (THIS) PURE;
STDMETHOD(SetDownloadComplete) (THIS_
- INT32 downloadComplete) PURE;
- STDMETHOD_(INT32,IsDownloadComplete) (THIS) PURE;
+ UINT32 downloadComplete) PURE;
+ STDMETHOD(SetDownloadSize) (THIS_
+ UINT32 downloadSize) PURE;
+ STDMETHOD(SetUnderflowTimeoutInMillis)(THIS_
+ UINT32 timeout) PURE;
};
#endif // _IHXDOWNLOADEVENTOBSERVER_H_
-------------- next part --------------
? Makefile
? Umakefil.upp
? filesystem_progdown_diff.txt
? progdownfs.def
? progdownfs.uid.cpp
? progdownfs_dll_stub.c
? progdownfs_ordinal.dat
? progdownfs{000a0000}.def
? winscw-dbg32
? platform/symbian/.pdfileobj.cpp.swp
Index: platform/symbian/pdfileobj.cpp
===================================================================
RCS file: /cvsroot/filesystem/progdown/platform/symbian/pdfileobj.cpp,v
retrieving revision 1.1.1.1.2.2
diff -u -b -r1.1.1.1.2.2 pdfileobj.cpp
--- platform/symbian/pdfileobj.cpp 24 Aug 2006 23:29:20 -0000 1.1.1.1.2.2
+++ platform/symbian/pdfileobj.cpp 22 Mar 2007 23:40:48 -0000
@@ -61,8 +61,8 @@
#include "hxtlogutil.h"
// Time to wait for data if underflow occurs
-#define READ_WAIT_INTERVAL_MS 150
-#define MAX_RETRIES 400
+#define READ_WAIT_INTERVAL_IN_MILLIS 150
+#define DEFAULT_MAX_RETRIES 400
/****************************************************************************
* CHXPDFileObject::CHXPDFileObject
@@ -75,10 +75,11 @@
: CHXMiniFileObject(pClassFactory, pBasePath, pContext)
,CActive(EPriorityStandard)
,m_pDownloadObserver(NULL)
- ,m_lByteOffset(0L)
- ,m_nNumRetries(0)
+ ,m_ulByteOffset(0L)
+ ,m_ulMaxRetries(DEFAULT_MAX_RETRIES)
+ ,m_ulNumRetries(0)
,m_pRetryReadBuffer(NULL)
- ,m_lRetryByteCount(0L)
+ ,m_ulRetryByteCount(0L)
{
HXLOGL2(HXLOG_FILE, "Creating Progressive Download File Object");
@@ -98,7 +99,7 @@
HX_RELEASE(m_pDownloadObserver);
Cancel();
- m_Timer.Close();
+ m_rTimer.Close();
}
@@ -164,11 +165,11 @@
*/
STDMETHODIMP CHXPDFileObject::Init( UINT32 fileAccessMode, IHXFileResponse* pFileResponse )
{
- HXLOGL2(HXLOG_FILE, "CHXPDFileObject::Init() access mode=%lu", fileAccessMode);
+ HXLOGL4(HXLOG_FILE, "CHXPDFileObject::Init() access mode=%lu", fileAccessMode);
HX_RESULT result = HXR_FAIL;
- if(KErrNone == m_Timer.CreateLocal())
+ if(KErrNone == m_rTimer.CreateLocal())
{
result = HXR_OK;
}
@@ -193,9 +194,21 @@
{
HX_RESULT result = HXR_OK;
- UINT32 actualCount = DoRead(pBuffer);
+ UINT32 ulFileSize = m_pDownloadObserver->GetDownloadSize();
- if(actualCount < byteCount && !m_pDownloadObserver->IsDownloadComplete())
+ UINT32 actualCount = 0;
+
+ if(m_ulByteOffset <= ulFileSize-byteCount)
+ {
+ actualCount = DoRead(pBuffer);
+ }
+
+ HXLOGL4(HXLOG_FILE,
+ "CHXPDFileObject::DoReadLoopEx requested=%lu actual=%lu filesize=%lu",
+ byteCount, actualCount, ulFileSize);
+
+ if(actualCount < byteCount &&
+ !m_pDownloadObserver->IsDownloadComplete())
{
// reallocate buffer
if(actualCount > 0)
@@ -205,16 +218,29 @@
if(HXR_OK == result)
{
+ // set current max retries
+ m_ulMaxRetries =
+ m_pDownloadObserver->GetUnderflowTimeoutInMillis() /
+ READ_WAIT_INTERVAL_IN_MILLIS;
+
+ if (m_ulMaxRetries > 0)
+ {
// reset num retries
- m_nNumRetries = 0;
+ m_ulNumRetries = 0;
// save the read buffer
- m_lRetryByteCount = byteCount;
+ m_ulRetryByteCount = byteCount;
m_pRetryReadBuffer = pBuffer;
// try to read again later
DoSetTimer();
}
+ else
+ {
+ ReadDoneError(HXR_PROGRESSIVE_DOWNLOAD_TIMEOUT);
+ result = HXR_PROGRESSIVE_DOWNLOAD_TIMEOUT;
+ }
+ }
}
else
{
@@ -224,7 +250,7 @@
{
// keep track of our current position in case we need
// to undo a partial read in the future
- m_lByteOffset += actualCount;
+ m_ulByteOffset += actualCount;
// Notify the caller that the read is done
HX_RESULT readResult = actualCount > 0 ? HXR_OK : HXR_FAILED;
@@ -248,7 +274,7 @@
if(m_pDataSource)
{
// reset to last offset
- m_pDataSource->Seek(m_lByteOffset, SEEK_SET);
+ m_pDataSource->Seek(m_ulByteOffset, SEEK_SET);
}
return HXR_OK;
@@ -267,7 +293,9 @@
*/
STDMETHODIMP CHXPDFileObject::Seek( UINT32 offset, HXBOOL bIsRelative )
{
- HXLOGL4(HXLOG_FILE, "CHXPDFileObject::Seek()");
+ HXLOGL4(HXLOG_FILE,
+ "CHXPDFileObject::Seek() offset=%lu isRelative=%s",
+ offset, (bIsRelative) ? "TRUE":"FALSE");
// Cancel any pending reads
HX_RELEASE(m_pPendingReadBuf);
@@ -288,11 +316,11 @@
{
if(bIsRelative)
{
- m_lByteOffset += offset;
+ m_ulByteOffset += offset;
}
else
{
- m_lByteOffset = offset;
+ m_ulByteOffset = offset;
}
}
@@ -332,11 +360,11 @@
*/
void CHXPDFileObject::DoSetTimer()
{
- HXLOGL2(HXLOG_FILE, "CHXPDFileObject::DoSetTimer()");
+ HXLOGL4(HXLOG_FILE, "CHXPDFileObject::DoSetTimer()");
if(!IsActive())
{
- m_Timer.After(iStatus, READ_WAIT_INTERVAL_MS * 1000);
+ m_rTimer.After(iStatus, READ_WAIT_INTERVAL_IN_MILLIS * 1000);
SetActive();
}
}
@@ -349,8 +377,9 @@
*/
void CHXPDFileObject::DoCancel()
{
- m_Timer.Cancel();
- ReadDoneError(HXR_READ_ERROR);
+ HXLOGL4(HXLOG_FILE, "CHXPDFileObject::DoCancel()");
+
+ m_rTimer.Cancel();
}
@@ -362,7 +391,7 @@
*/
void CHXPDFileObject::RunL()
{
- HXLOGL2(HXLOG_FILE, "CHXPDFileObject::RunL()");
+ HXLOGL4(HXLOG_FILE, "CHXPDFileObject::RunL()");
if(KErrNone == iStatus.Int())
{
@@ -384,13 +413,23 @@
*/
void CHXPDFileObject::RetryRead()
{
- HXLOGL2(HXLOG_FILE, "CHXPDFileObject::RetryRead()");
-
HX_RESULT result = HXR_OK;
- UINT32 actualCount = DoRead(m_pRetryReadBuffer);
+ UINT32 ulFileSize = m_pDownloadObserver->GetDownloadSize();
+
+ UINT32 actualCount = 0;
+
+ if(m_ulByteOffset <= ulFileSize-m_ulRetryByteCount)
+ {
+ actualCount = DoRead(m_pRetryReadBuffer);
+ }
+
+ HXLOGL2(HXLOG_FILE,
+ "CHXPDFileObject::RetryRead requested=%lu actual=%lu filesize=%lu numRetries=%lu/%lu",
+ m_ulRetryByteCount, actualCount, ulFileSize, m_ulNumRetries, m_ulMaxRetries);
- if(actualCount < m_lRetryByteCount && !m_pDownloadObserver->IsDownloadComplete())
+ if(actualCount < m_ulRetryByteCount &&
+ !m_pDownloadObserver->IsDownloadComplete())
{
if(actualCount > 0)
{
@@ -399,9 +438,9 @@
if(HXR_OK == result)
{
- m_nNumRetries++;
+ m_ulNumRetries++;
- if(m_nNumRetries == MAX_RETRIES)
+ if(m_ulNumRetries == m_ulMaxRetries)
{
HXLOGL2(HXLOG_FILE,
"CHXPDFileObject::RetryRead() timeout waiting for more data");
@@ -422,7 +461,7 @@
{
// keep track of our current position in case we need
// to undo a partial read in the future
- m_lByteOffset += actualCount;
+ m_ulByteOffset += actualCount;
// Notify the caller that the read is done
HX_RESULT readResult = actualCount > 0 ? HXR_OK : HXR_FAILED;
Index: pub/platform/symbian/pdfileobj.h
===================================================================
RCS file: /cvsroot/filesystem/progdown/pub/platform/symbian/pdfileobj.h,v
retrieving revision 1.1.1.1.2.2
diff -u -b -r1.1.1.1.2.2 pdfileobj.h
--- pub/platform/symbian/pdfileobj.h 24 Aug 2006 23:31:14 -0000 1.1.1.1.2.2
+++ pub/platform/symbian/pdfileobj.h 22 Mar 2007 23:40:48 -0000
@@ -108,11 +108,12 @@
IHXDownloadEventObserver* m_pDownloadObserver;
// for delaying calling ReadDone() if data not available
- UINT32 m_lByteOffset;
- RTimer m_Timer;
- UINT16 m_nNumRetries;
+ UINT32 m_ulByteOffset;
+ RTimer m_rTimer;
+ UINT32 m_ulMaxRetries;
+ UINT32 m_ulNumRetries;
IHXBuffer* m_pRetryReadBuffer;
- UINT32 m_lRetryByteCount;
+ UINT32 m_ulRetryByteCount;
/****** Protected Class Methods ******************************************/
From ken.carlino at gmail.com Fri Mar 23 19:05:10 2007
From: ken.carlino at gmail.com (ken carlino)
Date: Fri Mar 23 19:37:57 2007
Subject: [Filesystem-dev] File Seek in the beginning of streaming
In-Reply-To: <00fa01c76be1$75bca760$db68a8c0@EHYCHED620>
References:
<00fa01c76be1$75bca760$db68a8c0@EHYCHED620>
Message-ID:
On 3/21/07, Eric Hyche wrote:
>
> What kind of file is being streamed?
>
> Most likely this is a type of file that doesn't
> have the necessary header information at the beginning
> of the file (i.e. - mp3). Therefore, the file format
> plugin has to seek to the end of the file to get
> some information before going back and starting
> to deliver packets.
>
Thanks. I am trying to stream 3gp.
After reading your response, I use a tool from FFmpeg which moves moov atom
to the front. But after I use this to convert the movie and use Helix
to stream,
i still see Helix to seek to the end of the move before seek back to
the top of the movie and start streaming.
Can you please help me understand why helix still needs to seek to the
end of the move?
Thank you.
// Details of the qt-faststart:
* This utility rearranges a Quicktime file such that the moov atom
* is in front of the data, thus facilitating network streaming.
*
* Compile this program using:
* make qt-faststart
* Invoke the program with:
* qt-faststart
*
* Notes: Quicktime files can come in many configurations of top-level
* atoms. This utility stipulates that the very last atom in the file needs
* to be a moov atom. When given such a file, this utility will rearrange
* the top-level atoms by shifting the moov atom from the back of the file
* to the front, and patch the chunk offsets along the way. This utility
* presently only operates on uncompressed moov atoms.
> Eric
>
> =============================================
> Eric Hyche (ehyche@real.com)
> Technical Lead
> RealNetworks, Inc.
>
> > -----Original Message-----
> > From: filesystem-dev-bounces@helixcommunity.org
> > [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> > Of ken carlino
> > Sent: Wednesday, March 21, 2007 12:32 PM
> > To: filesystem-dev@helixcommunity.org
> > Subject: [Filesystem-dev] File Seek in the beginning of streaming
> >
> > Hi,
> > I am trying to study the behavior of FileStream in the beginning of
> > streaming in Helix.
> > I notice that Helix first tries to seek to end of the file, read 4K
> > off the file and then re-seek the file to the beginning and start
> > streaming from there.
> >
> > My question is why it seeks to the end of the file in the beginning?
> >
> > Thank you.
> >
> > _______________________________________________
> > Filesystem-dev mailing list
> > Filesystem-dev@helixcommunity.org
> > http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
> >
>
>
From Arnel.Periquet at nokia.com Mon Mar 26 15:37:52 2007
From: Arnel.Periquet at nokia.com (Arnel.Periquet@nokia.com)
Date: Mon Mar 26 16:10:22 2007
Subject: RESEND: [Common-dev][Clientapps-dev][Filesystem-dev] CR: Integration
BUGfixes for Series 60 Progressive Download
In-Reply-To:
References:
Message-ID:
________________________________
From: common-dev-bounces@helixcommunity.org
[mailto:common-dev-bounces@helixcommunity.org]
Sent: Friday, March 23, 2007 4:19 PM
To: clientapps-dev@helixcommunity.org;
common-dev@helixcommunity.org; filesystem-dev@helixcommunity.org
Subject: [Common-dev][Clientapps-dev][Filesystem-dev] CR:
Integration BUGfixes for Series 60 Progressive Download
"Nokia submits this code under the terms of a commercial
contribution agreement with RealNetworks, and I am authorized to
contribute this code under said agreement."
Modified by: Arnel.Periquet@nokia.com
Reviewed by:
Date: 03-23-2007
Project: Helix Symbian Plugin
ErrorId: APET-6ZKRNL
Synopsis: Integration BUG fixes for Series 60 Progressive
Download
Previously, a feature was submitted for "Progressive Download
Filesystem Plugin for Series 60". This CR fixes the following problems
associated with that feature:
(1) S60 Download Manager sets the incoming file size to its
total length before it is completely downloaded. This results in Read()s
to the file returning invalid bytes rather than failing, thus negating
the core mechanism for seeking beyond the file. The solution is to
receive current file size through a new custom command ID and check
against this size before we perform a Read().
(2) For files that are not progressively downloadable, needed
data (e.g., mime type) is not be available until the last bytes of the
file are downloaded. Currently, the PD file object will continually
retry the Read() for up to 60 seconds or until the file is completely
downloaded. To resolve this problem, a new function is added on the
DownloadObserver interface that the PD file object queries for the
current timeout. During the MMF Prepare state, the timeout is set to
zero. Upon sending the PrepareComplete event, the timeout is returned to
its default value of 60 seconds. Any non-progressively downloaded files
would then be caught during the MMF Prepare state.
(3) The PD file object sends an error during DoCancel() of the
active object. The DoCancel() in turn sends an error (via
CHXMiniFileObject::ReadDoneError()), in addition to cancelling the timer
object. The results in a shutdown problem. When the PD file object
destructor is called, it calls Cancel() which, if the active object is
active, causes DoCancel() to be called. In that case, when the error is
sent (via ReadDoneError()) , an object (m_pFileResponse) whose reference
will have been released (due to a required Close() call) is accessed
resulting in a NULL pointer access violation. The solution is to remove
the DoReadError() call from the DoCancel().
Root Cause: These problems were revealed during integration
testing. Module-level testing did not reveal the problems.
Files Modified:
Clientapps/symbianMmf/hxmmfstatepaused.cpp
- fix misspelling in log
Clientapps/symbianMmf/common/hxmmfbasectrl.cpp
- QI DownloadObserver in AddDataSource()
- reset underflow timeout exiting prepare state
- save ErrorCode from Report error to resend on
PrepareComplete
Clientapps/symbianMmf/common/hxmmfbasectrl.h
- add saved ErrorCode variable
Clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp
- add custom command for download size
- add custom command helper impl
- set underflow timeout to be 0 while in prepare state
Clientapps/symbainMmf/videocontroller/hxmmfctrlimpl.h
- add custom command helper prototype
Common/fileio/platform/symbian/hxdatasourcemmfclip.cpp
- add download size setter/getter impls
- add underflow timeout setter/getter impls
Common/fileio/pub/platform/symbian/hxdatasourcemmfclip.h
- add download size setter/getter prototypes
- add underflow timeout setter/getter prototypes
Common/include/ihxdownloadobserver.h
- add download size setter/getter to
IHXDownloadEventObserver interface
- add underflow setter/getter to
IHXDownloadEventObserver interface
Filesystem/progdown/platform/symbian/pdfileobj.cpp
- add check for download size range before Reading from
file
- set retry timeout to use current value from download
observer interface
- remove error reporting from DoCancel()
- miscellaneous logs corrections, variable renaming
Filesystem/progdown/pub/platform/symbian/pdfileobj.h
- miscellaneous variable renaming
- add m_ulMaxRetries as a variable to replace the
previous constant
Image Size and Heap Use impact: Minimal.
Module Release testing (STIF): All local cases pass. PDL and
non-PDL also tested on Emulator.
Test case(s) Added: Some STIF cases are coming, but are
performed manually currently.
Memory leak check performed: Yes. No memory leaks are introduced
by this feature.
Platforms and Profiles Build Verified:
Armv5/helix-client-s60-mmf-mdf-dsp
Platforms and Profiles Functionality Verified:
Armv5/helix-client-s60-mmf-mdf-dsp
<> <>
<> <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.helixcommunity.org/pipermail/filesystem-dev/attachments/20070326/efd8f63f/attachment.html
From gwright at real.com Mon Mar 26 16:52:00 2007
From: gwright at real.com (Greg Wright)
Date: Mon Mar 26 17:24:03 2007
Subject: [Common-dev][Clientapps-dev][Filesystem-dev] CR: Integration
BUG fixes for Series 60 Progressive Download
In-Reply-To:
References:
Message-ID: <46085CA0.6070502@real.com>
+ UINT32 m_ulSavedProgDownError;
...
+ , m_ulSavedProgDownError(HXR_OK)
You are initializing a UINT32 with HXR_OK, which is of type HX_RESULT,
one of those should change.
DECLARE_INTERFACE_(IHXDownloadEventObserver, IUnknown)
{
/*
@@ -95,9 +97,15 @@
/*
* DownloadComplete Event
*/
+ STDMETHOD_(UINT32,IsDownloadComplete) (THIS) PURE;
+ STDMETHOD_(UINT32,GetDownloadSize) (THIS) PURE;
I take it that interface has not been published (pushed out in
a release)? If so, you really should change it unless you are
sure no one else is using it (I assume it isn't a private interface
anyway).
rest looks good.
--greg.
Arnel.Periquet@nokia.com wrote:
> "Nokia submits this code under the terms of a commercial contribution
> agreement with RealNetworks, and I am authorized to contribute this code
> under said agreement."
> Modified by: Arnel.Periquet@nokia.com
> Reviewed by:
> Date: 03-23-2007
> Project: Helix Symbian Plugin
> ErrorId: APET-6ZKRNL
> Synopsis: Integration BUG fixes for Series 60 Progressive Download
> Previously, a feature was submitted for "Progressive Download Filesystem
> Plugin for Series 60". This CR fixes the following problems associated
> with that feature:
> (1) S60 Download Manager sets the incoming file size to its total length
> before it is completely downloaded. This results in Read()s to the file
> returning invalid bytes rather than failing, thus negating the core
> mechanism for seeking beyond the file. The solution is to receive
> current file size through a new custom command ID and check against this
> size before we perform a Read().
> (2) For files that are not progressively downloadable, needed data
> (e.g., mime type) is not be available until the last bytes of the file
> are downloaded. Currently, the PD file object will continually retry the
> Read() for up to 60 seconds or until the file is completely downloaded.
> To resolve this problem, a new function is added on the DownloadObserver
> interface that the PD file object queries for the current timeout.
> During the MMF Prepare state, the timeout is set to zero. Upon sending
> the PrepareComplete event, the timeout is returned to its default value
> of 60 seconds. Any non-progressively downloaded files would then be
> caught during the MMF Prepare state.
> (3) The PD file object sends an error during DoCancel() of the active
> object. The DoCancel() in turn sends an error (via
> CHXMiniFileObject::ReadDoneError()), in addition to cancelling the timer
> object. The results in a shutdown problem. When the PD file object
> destructor is called, it calls Cancel() which, if the active object is
> active, causes DoCancel() to be called. In that case, when the error is
> sent (via ReadDoneError()) , an object (m_pFileResponse) whose reference
> will have been released (due to a required Close() call) is accessed
> resulting in a NULL pointer access violation. The solution is to remove
> the DoReadError() call from the DoCancel().
> Root Cause: These problems were revealed during integration testing.
> Module-level testing did not reveal the problems.
>
> Files Modified:
>
> Clientapps/symbianMmf/hxmmfstatepaused.cpp
> - fix misspelling in log
> Clientapps/symbianMmf/common/hxmmfbasectrl.cpp
> - QI DownloadObserver in AddDataSource()
> - reset underflow timeout exiting prepare state
> - save ErrorCode from Report error to resend on PrepareComplete
> Clientapps/symbianMmf/common/hxmmfbasectrl.h
> - add saved ErrorCode variable
> Clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp
> - add custom command for download size
> - add custom command helper impl
> - set underflow timeout to be 0 while in prepare state
> Clientapps/symbainMmf/videocontroller/hxmmfctrlimpl.h
> - add custom command helper prototype
> Common/fileio/platform/symbian/hxdatasourcemmfclip.cpp
> - add download size setter/getter impls
> - add underflow timeout setter/getter impls
> Common/fileio/pub/platform/symbian/hxdatasourcemmfclip.h
> - add download size setter/getter prototypes
> - add underflow timeout setter/getter prototypes
> Common/include/ihxdownloadobserver.h
> - add download size setter/getter to IHXDownloadEventObserver
> interface
> - add underflow setter/getter to IHXDownloadEventObserver
> interface
> Filesystem/progdown/platform/symbian/pdfileobj.cpp
> - add check for download size range before Reading from file
> - set retry timeout to use current value from download observer
> interface
> - remove error reporting from DoCancel()
> - miscellaneous logs corrections, variable renaming
> Filesystem/progdown/pub/platform/symbian/pdfileobj.h
> - miscellaneous variable renaming
> - add m_ulMaxRetries as a variable to replace the previous
> constant
>
> Image Size and Heap Use impact: Minimal.
> Module Release testing (STIF): All local cases pass. PDL and non-PDL
> also tested on Emulator.
> Test case(s) Added: Some STIF cases are coming, but are performed
> manually currently.
> Memory leak check performed: Yes. No memory leaks are introduced by this
> feature.
> Platforms and Profiles Build Verified:
> Armv5/helix-client-s60-mmf-mdf-dsp
> Platforms and Profiles Functionality Verified:
> Armv5/helix-client-s60-mmf-mdf-dsp
>
> <> <>
> <> <>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Common-dev mailing list
> Common-dev@helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/common-dev
From Arnel.Periquet at nokia.com Tue Mar 27 08:35:44 2007
From: Arnel.Periquet at nokia.com (Arnel.Periquet@nokia.com)
Date: Tue Mar 27 09:07:48 2007
Subject: [Common-dev][Clientapps-dev][Filesystem-dev] CN: Integration
BUG fixes for Series 60 Progressive Download
In-Reply-To: <46085CA0.6070502@real.com>
References:
<46085CA0.6070502@real.com>
Message-ID:
Greg,
Thanks for your comments.
As per your comments,
(1) I now have m_ulSavedProgDownError initialized to 0L.
(2) I'm the only one using the interface I changed.
I'm now checked into HEAD and CAY210S.
Thanks again,
Arnel
>-----Original Message-----
>From: ext Greg Wright [mailto:gwright@real.com]
>Sent: Monday, March 26, 2007 6:52 PM
>To: Periquet Arnel (Nokia-TP-MSW/Dallas)
>Cc: clientapps-dev@helixcommunity.org;
>common-dev@helixcommunity.org; filesystem-dev@helixcommunity.org
>Subject: Re: [Common-dev][Clientapps-dev][Filesystem-dev] CR:
>Integration BUG fixes for Series 60 Progressive Download
>
>+ UINT32 m_ulSavedProgDownError;
>...
>+ , m_ulSavedProgDownError(HXR_OK)
>
>
>You are initializing a UINT32 with HXR_OK, which is of type
>HX_RESULT, one of those should change.
>
>DECLARE_INTERFACE_(IHXDownloadEventObserver, IUnknown)
> {
> /*
>@@ -95,9 +97,15 @@
> /*
> * DownloadComplete Event
> */
>+ STDMETHOD_(UINT32,IsDownloadComplete) (THIS) PURE;
>+ STDMETHOD_(UINT32,GetDownloadSize) (THIS) PURE;
>
>
>I take it that interface has not been published (pushed out in
>a release)? If so, you really should change it unless you are
>sure no one else is using it (I assume it isn't a private
>interface anyway).
>
>
>rest looks good.
>
>--greg.
>
>
>
>Arnel.Periquet@nokia.com wrote:
>> "Nokia submits this code under the terms of a commercial
>contribution
>> agreement with RealNetworks, and I am authorized to contribute this
>> code under said agreement."
>> Modified by: Arnel.Periquet@nokia.com Reviewed by:
>> Date: 03-23-2007
>> Project: Helix Symbian Plugin
>> ErrorId: APET-6ZKRNL
>> Synopsis: Integration BUG fixes for Series 60 Progressive Download
>> Previously, a feature was submitted for "Progressive Download
>> Filesystem Plugin for Series 60". This CR fixes the
>following problems
>> associated with that feature:
>> (1) S60 Download Manager sets the incoming file size to its total
>> length before it is completely downloaded. This results in
>Read()s to
>> the file returning invalid bytes rather than failing, thus negating
>> the core mechanism for seeking beyond the file. The solution is to
>> receive current file size through a new custom command ID and check
>> against this size before we perform a Read().
>> (2) For files that are not progressively downloadable, needed data
>> (e.g., mime type) is not be available until the last bytes
>of the file
>> are downloaded. Currently, the PD file object will continually retry
>> the
>> Read() for up to 60 seconds or until the file is completely
>downloaded.
>> To resolve this problem, a new function is added on the
>> DownloadObserver interface that the PD file object queries
>for the current timeout.
>> During the MMF Prepare state, the timeout is set to zero.
>Upon sending
>> the PrepareComplete event, the timeout is returned to its default
>> value of 60 seconds. Any non-progressively downloaded files
>would then
>> be caught during the MMF Prepare state.
>> (3) The PD file object sends an error during DoCancel() of
>the active
>> object. The DoCancel() in turn sends an error (via
>> CHXMiniFileObject::ReadDoneError()), in addition to cancelling the
>> timer object. The results in a shutdown problem. When the PD file
>> object destructor is called, it calls Cancel() which, if the active
>> object is active, causes DoCancel() to be called. In that case, when
>> the error is sent (via ReadDoneError()) , an object
>(m_pFileResponse)
>> whose reference will have been released (due to a required Close()
>> call) is accessed resulting in a NULL pointer access violation. The
>> solution is to remove the DoReadError() call from the DoCancel().
>> Root Cause: These problems were revealed during integration testing.
>> Module-level testing did not reveal the problems.
>>
>> Files Modified:
>>
>> Clientapps/symbianMmf/hxmmfstatepaused.cpp
>> - fix misspelling in log
>> Clientapps/symbianMmf/common/hxmmfbasectrl.cpp
>> - QI DownloadObserver in AddDataSource()
>> - reset underflow timeout exiting prepare state
>> - save ErrorCode from Report error to resend on PrepareComplete
>> Clientapps/symbianMmf/common/hxmmfbasectrl.h
>> - add saved ErrorCode variable
>> Clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp
>> - add custom command for download size
>> - add custom command helper impl
>> - set underflow timeout to be 0 while in prepare state
>> Clientapps/symbainMmf/videocontroller/hxmmfctrlimpl.h
>> - add custom command helper prototype
>> Common/fileio/platform/symbian/hxdatasourcemmfclip.cpp
>> - add download size setter/getter impls
>> - add underflow timeout setter/getter impls
>> Common/fileio/pub/platform/symbian/hxdatasourcemmfclip.h
>> - add download size setter/getter prototypes
>> - add underflow timeout setter/getter prototypes
>> Common/include/ihxdownloadobserver.h
>> - add download size setter/getter to IHXDownloadEventObserver
>> interface
>> - add underflow setter/getter to
>IHXDownloadEventObserver interface
>> Filesystem/progdown/platform/symbian/pdfileobj.cpp
>> - add check for download size range before Reading from file
>> - set retry timeout to use current value from download observer
>> interface
>> - remove error reporting from DoCancel()
>> - miscellaneous logs corrections, variable renaming
>> Filesystem/progdown/pub/platform/symbian/pdfileobj.h
>> - miscellaneous variable renaming
>> - add m_ulMaxRetries as a variable to replace the
>previous constant
>>
>> Image Size and Heap Use impact: Minimal.
>> Module Release testing (STIF): All local cases pass. PDL and non-PDL
>> also tested on Emulator.
>> Test case(s) Added: Some STIF cases are coming, but are performed
>> manually currently.
>> Memory leak check performed: Yes. No memory leaks are introduced by
>> this feature.
>> Platforms and Profiles Build Verified:
>> Armv5/helix-client-s60-mmf-mdf-dsp
>> Platforms and Profiles Functionality Verified:
>> Armv5/helix-client-s60-mmf-mdf-dsp
>>
>> <> <>
>> <> <>
>>
>>
>>
>>
>----------------------------------------------------------------------
>> --
>>
>> _______________________________________________
>> Common-dev mailing list
>> Common-dev@helixcommunity.org
>> http://lists.helixcommunity.org/mailman/listinfo/common-dev
>
>
From gwright at real.com Fri Mar 30 15:13:35 2007
From: gwright at real.com (Greg Wright)
Date: Fri Mar 30 15:44:38 2007
Subject: [Filesystem-dev] CR: Fix crash in httpfsys.
Message-ID: <460D8B8F.1090705@real.com>
Project
=======
Synopsis
========
If you try to stream a SMIL file over HTTP it will crash.
Dies trying lock a mutex that is NULL.
Fix
===
What happens with this is that the stack gets pretty deep, I guess
due to the multiple sources in the SMIL file, and when the
stack is unwinding Close() is called and that mutex is released.
Then, when it returns to the next stack frame it tries to lock
that same mutex and dies.
The fix is to simply not destroy that mutex until the
destructor is called.
All the rest of the diffs are just changes to use
HX_LOCK and HX_UNLOCK.
Files Modified
==============
filesystem/http/httpfsys.cpp
Branch(s)
=========
HEAD only, 150Cay does not have the problem.
--greg.
Index: httpfsys.cpp
===================================================================
RCS file: /cvsroot/filesystem/http/httpfsys.cpp,v
retrieving revision 1.103
diff -u -w -r1.103 httpfsys.cpp
--- httpfsys.cpp 19 Sep 2006 21:10:07 -0000 1.103
+++ httpfsys.cpp 30 Mar 2007 21:49:31 -0000
@@ -262,6 +262,7 @@
CChunkyResMap::~CChunkyResMap()
{
+
delete m_pChunkyResURLMap;
}
@@ -1153,6 +1154,7 @@
m_pContext->AddRef();
CreateInstanceCCF(CLSID_IHXMutex, (void**)&m_pMutex, m_pContext);
+ HX_ASSERT( m_pMutex );
m_pContext->QueryInterface(IID_IHXScheduler, (void**) &m_pScheduler);
m_pContext->QueryInterface(IID_IHXCommonClassFactory, (void **)&m_pCommonClassFactory);
@@ -1182,9 +1184,8 @@
//
// get proxy info for HTTP protocol
//
-
- IHXBuffer* pBuffer = NULL;
UINT32 ulValue = 0;
+ IHXBuffer* pBuffer = NULL;
if (m_pPreferences)
{
@@ -1299,8 +1300,8 @@
}
m_bInDestructor = TRUE;
-
Close();
+ HX_RELEASE(m_pMutex);
}
/************************************************************************
@@ -1318,7 +1319,7 @@
IHXFileResponse* /*IN*/ pFileResponse
)
{
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
HXLOGL1(HXLOG_HTTP, "Init");
@@ -1387,13 +1388,13 @@
_SetCurrentReadPos(0);
m_bServerPresumablyWorksWithByteRangeRequests = TRUE;
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->InitDone(HXR_OK);
return HXR_OK;
}
else
{
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->InitDone(HXR_FAILED);
return HXR_FAILED;
}
@@ -1420,7 +1421,7 @@
m_pFileResponse->InitDone(HXR_FAILED);
}
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
return theErr;
}
@@ -1600,7 +1601,6 @@
m_bClosed = TRUE;
HX_UNLOCK(m_pMutex);
- HX_RELEASE(m_pMutex);
if (m_bInDestructor)
{
@@ -1687,11 +1687,11 @@
{
HXLOGL1(HXLOG_HTTP, "Read (%d) cancelled! Seek is pending!", ulCount);
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
CallReadDone(HXR_SEEK_PENDING ,NULL);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
return HXR_UNEXPECTED;
}
@@ -1750,9 +1750,9 @@
}
}
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
lResult = ProcessPendingReads();
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
return lResult;
}
@@ -1813,9 +1813,9 @@
while (m_PendingReadList.GetCount())
{
m_PendingReadList.RemoveHead();
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->ReadDone(HXR_CANCELLED, NULL);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
if (bRelative)
@@ -1834,9 +1834,9 @@
m_bSeekPending?"Seek":"", m_bReadPending?"Read":"");
m_bSeekPending = FALSE;
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->SeekDone(HXR_CANCELLED);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
if (_GetContiguousLength() > 0)
@@ -1856,18 +1856,18 @@
{
HXLOGL4(HXLOG_HTTP, "Seek: no reconnect necessary, has data already");
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->SeekDone(HXR_OK);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
}
else
{
HXLOGL4(HXLOG_HTTP, "Seek: no byte range support, will wait for data if necessary");
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->SeekDone(HXR_OK);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
}
else
@@ -1879,17 +1879,17 @@
{
HXLOGL2(HXLOG_HTTP, "Seek: at end of read content");
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->SeekDone(HXR_OK);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
else if (m_bKnowContentSize && m_ulCurrentReadPosition == m_nContentSize)
{
HXLOGL2(HXLOG_HTTP, "Seek: at end of content");
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->SeekDone(HXR_OK);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
else
{
@@ -1916,16 +1916,16 @@
// signal the caller about the end of content
if (m_ulCurrentReadPosition == m_nContentRead)
{
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->SeekDone(HXR_OK);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
else
{
HX_ASSERT(m_ulCurrentReadPosition > m_nContentRead);
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->SeekDone(HXR_FAILED);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
}
else /* add it to the seek pending queue...*/
@@ -2683,9 +2683,9 @@
// This prompts client to write Post Data.
if (m_pFileResponse)
{
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
theErr = m_pFileResponse->WriteDone(HXR_OK);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
}
}
@@ -2709,27 +2709,27 @@
HXLOGL2(HXLOG_HTTP, "ProcessIdle notices SeekDone");
m_bSeekPending = FALSE;
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->SeekDone(HXR_OK);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
else if (m_bReadContentsDone)
{
HXLOGL1(HXLOG_HTTP, "ProcessIdle notices SeekDone will fail");
m_bSeekPending = FALSE;
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->SeekDone(HXR_FAILED);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
}
_DoSomeReadingFromSocket(TRUE);
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
HX_RESULT ReadErr = ProcessPendingReads();
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
if(!theErr)
{
@@ -2829,27 +2829,27 @@
if (m_bInitResponsePending && m_pFileResponse)
{
m_bInitResponsePending = FALSE;
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileResponse->InitDone(m_bPartialData ? HXR_RESOURCE_PARTIALCOPY : HXR_OK);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
if (m_bFileExistsResponsePending && m_pFileExistsResponse)
{
AddNoCacheHeader();
m_bFileExistsResponsePending = FALSE;
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pFileExistsResponse->DoesExistDone(TRUE);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
HX_RELEASE(m_pFileExistsResponse);
}
if (m_bMimeResponsePending && m_pMimeMapperResponse)
{
m_bMimeResponsePending = FALSE;
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
m_pMimeMapperResponse->MimeTypeFound(HXR_OK, pMimeType);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
// MimeTypeFound() may cause us to close if the Response object
// decides it doesn't like our mimetype and shuts us down.
@@ -2922,9 +2922,9 @@
// but we have pending reads. The user called too many reads, or the connection
// has died before all data was sent.
HXLOGL1(HXLOG_HTTP, "ProcessPendingReads Read() failure due to insufficient content");
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
CallReadDone(HXR_FAIL , NULL);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
continue; // CallReadDone(HXR_FAIL..) for remaining reads in pending list
}
}
@@ -2966,9 +2966,9 @@
/* Remove from pending list */
m_PendingReadList.RemoveHead();
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
CallReadDone(HXR_OK ,pBuffer);
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
else
{
@@ -3783,9 +3783,9 @@
if (bHandleReadImmediately)
{
- m_pMutex->Unlock();
+ HX_UNLOCK(m_pMutex);
ProcessPendingReads();
- m_pMutex->Lock();
+ HX_LOCK(m_pMutex);
}
}
break;
From ping at real.com Fri Mar 30 16:17:01 2007
From: ping at real.com (Henry Ping)
Date: Fri Mar 30 16:48:03 2007
Subject: [Filesystem-dev] CR: Fix crash in httpfsys.
In-Reply-To: <460D8B8F.1090705@real.com>
Message-ID:
Looks good.
-->Henry
> -----Original Message-----
> From: filesystem-dev-bounces@helixcommunity.org
> [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
> Of Greg Wright
> Sent: Friday, March 30, 2007 3:14 PM Ping
> To: filesystem-dev@helixcommunity.org
> Subject: [Filesystem-dev] CR: Fix crash in httpfsys.
>
> Project
> =======
>
> Synopsis
> ========
> If you try to stream a SMIL file over HTTP it will crash.
> Dies trying lock a mutex that is NULL.
>
> Fix
> ===
> What happens with this is that the stack gets pretty deep, I
> guess due to the multiple sources in the SMIL file, and when
> the stack is unwinding Close() is called and that mutex is released.
> Then, when it returns to the next stack frame it tries to
> lock that same mutex and dies.
>
> The fix is to simply not destroy that mutex until the
> destructor is called.
>
> All the rest of the diffs are just changes to use HX_LOCK and
> HX_UNLOCK.
>
>
> Files Modified
> ==============
> filesystem/http/httpfsys.cpp
>
> Branch(s)
> =========
> HEAD only, 150Cay does not have the problem.
>
> --greg.
>
>
> Index: httpfsys.cpp
> ===================================================================
> RCS file: /cvsroot/filesystem/http/httpfsys.cpp,v
> retrieving revision 1.103
> diff -u -w -r1.103 httpfsys.cpp
> --- httpfsys.cpp 19 Sep 2006 21:10:07 -0000 1.103
> +++ httpfsys.cpp 30 Mar 2007 21:49:31 -0000
> @@ -262,6 +262,7 @@
>
> CChunkyResMap::~CChunkyResMap()
> {
> +
> delete m_pChunkyResURLMap;
> }
>
> @@ -1153,6 +1154,7 @@
> m_pContext->AddRef();
>
> CreateInstanceCCF(CLSID_IHXMutex, (void**)&m_pMutex,
> m_pContext);
> + HX_ASSERT( m_pMutex );
>
> m_pContext->QueryInterface(IID_IHXScheduler,
> (void**) &m_pScheduler);
>
> m_pContext->QueryInterface(IID_IHXCommonClassFactory, (void
> **)&m_pCommonClassFactory); @@ -1182,9 +1184,8 @@
> //
> // get proxy info for HTTP protocol
> //
> -
> - IHXBuffer* pBuffer = NULL;
> UINT32 ulValue = 0;
> + IHXBuffer* pBuffer = NULL;
>
> if (m_pPreferences)
> {
> @@ -1299,8 +1300,8 @@
> }
>
> m_bInDestructor = TRUE;
> -
> Close();
> + HX_RELEASE(m_pMutex);
> }
>
>
> /*************************************************************
> ***********
> @@ -1318,7 +1319,7 @@
> IHXFileResponse* /*IN*/ pFileResponse
> )
> {
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
>
> HXLOGL1(HXLOG_HTTP, "Init");
>
> @@ -1387,13 +1388,13 @@
> _SetCurrentReadPos(0);
> m_bServerPresumablyWorksWithByteRangeRequests = TRUE;
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->InitDone(HXR_OK);
> return HXR_OK;
> }
> else
> {
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->InitDone(HXR_FAILED);
> return HXR_FAILED;
> }
> @@ -1420,7 +1421,7 @@
> m_pFileResponse->InitDone(HXR_FAILED);
> }
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> return theErr;
> }
>
> @@ -1600,7 +1601,6 @@
> m_bClosed = TRUE;
>
> HX_UNLOCK(m_pMutex);
> - HX_RELEASE(m_pMutex);
>
> if (m_bInDestructor)
> {
> @@ -1687,11 +1687,11 @@
> {
> HXLOGL1(HXLOG_HTTP, "Read (%d) cancelled! Seek is
> pending!", ulCount);
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
>
> CallReadDone(HXR_SEEK_PENDING ,NULL);
>
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
>
> return HXR_UNEXPECTED;
> }
> @@ -1750,9 +1750,9 @@
> }
> }
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> lResult = ProcessPendingReads();
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
>
> return lResult;
> }
> @@ -1813,9 +1813,9 @@
> while (m_PendingReadList.GetCount())
> {
> m_PendingReadList.RemoveHead();
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->ReadDone(HXR_CANCELLED, NULL);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
>
> if (bRelative)
> @@ -1834,9 +1834,9 @@
> m_bSeekPending?"Seek":"", m_bReadPending?"Read":"");
>
> m_bSeekPending = FALSE;
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->SeekDone(HXR_CANCELLED);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
>
> if (_GetContiguousLength() > 0)
> @@ -1856,18 +1856,18 @@
> {
> HXLOGL4(HXLOG_HTTP, "Seek: no reconnect
> necessary, has data already");
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->SeekDone(HXR_OK);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> }
> else
> {
> HXLOGL4(HXLOG_HTTP, "Seek: no byte range
> support, will wait for data if necessary");
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->SeekDone(HXR_OK);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> }
> else
> @@ -1879,17 +1879,17 @@
> {
> HXLOGL2(HXLOG_HTTP, "Seek: at end of read content");
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->SeekDone(HXR_OK);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> else if (m_bKnowContentSize &&
> m_ulCurrentReadPosition == m_nContentSize)
> {
> HXLOGL2(HXLOG_HTTP, "Seek: at end of content");
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->SeekDone(HXR_OK);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> else
> {
> @@ -1916,16 +1916,16 @@
> // signal the caller about the end of content
> if (m_ulCurrentReadPosition == m_nContentRead)
> {
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->SeekDone(HXR_OK);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> else
> {
> HX_ASSERT(m_ulCurrentReadPosition >
> m_nContentRead);
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->SeekDone(HXR_FAILED);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> }
> else /* add it to the seek pending queue...*/
> @@ -2683,9 +2683,9 @@
> // This prompts client to write Post Data.
> if (m_pFileResponse)
> {
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> theErr = m_pFileResponse->WriteDone(HXR_OK);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> }
> }
> @@ -2709,27 +2709,27 @@
> HXLOGL2(HXLOG_HTTP, "ProcessIdle notices SeekDone");
>
> m_bSeekPending = FALSE;
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->SeekDone(HXR_OK);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> else if (m_bReadContentsDone)
> {
> HXLOGL1(HXLOG_HTTP, "ProcessIdle notices
> SeekDone will fail");
>
> m_bSeekPending = FALSE;
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->SeekDone(HXR_FAILED);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> }
>
>
> _DoSomeReadingFromSocket(TRUE);
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> HX_RESULT ReadErr = ProcessPendingReads();
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
>
> if(!theErr)
> {
> @@ -2829,27 +2829,27 @@
> if (m_bInitResponsePending && m_pFileResponse)
> {
> m_bInitResponsePending = FALSE;
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileResponse->InitDone(m_bPartialData ?
> HXR_RESOURCE_PARTIALCOPY : HXR_OK);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
>
> if (m_bFileExistsResponsePending &&
> m_pFileExistsResponse)
> {
> AddNoCacheHeader();
> m_bFileExistsResponsePending = FALSE;
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> m_pFileExistsResponse->DoesExistDone(TRUE);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> HX_RELEASE(m_pFileExistsResponse);
> }
>
> if (m_bMimeResponsePending && m_pMimeMapperResponse)
> {
> m_bMimeResponsePending = FALSE;
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
>
> m_pMimeMapperResponse->MimeTypeFound(HXR_OK, pMimeType);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
>
> // MimeTypeFound() may cause us to close if
> the Response object
> // decides it doesn't like our mimetype and
> shuts us down.
> @@ -2922,9 +2922,9 @@
> // but we have pending reads. The user
> called too many reads, or the connection
> // has died before all data was sent.
> HXLOGL1(HXLOG_HTTP, "ProcessPendingReads
> Read() failure due to insufficient content");
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> CallReadDone(HXR_FAIL , NULL);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> continue; // CallReadDone(HXR_FAIL..) for
> remaining reads in pending list
> }
> }
> @@ -2966,9 +2966,9 @@
> /* Remove from pending list */
> m_PendingReadList.RemoveHead();
>
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> CallReadDone(HXR_OK ,pBuffer);
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> else
> {
> @@ -3783,9 +3783,9 @@
>
> if (bHandleReadImmediately)
> {
> - m_pMutex->Unlock();
> + HX_UNLOCK(m_pMutex);
> ProcessPendingReads();
> - m_pMutex->Lock();
> + HX_LOCK(m_pMutex);
> }
> }
> break;
>
>
>
> _______________________________________________
> Filesystem-dev mailing list
> Filesystem-dev@helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
From gwright at real.com Fri Mar 30 16:36:56 2007
From: gwright at real.com (Greg Wright)
Date: Fri Mar 30 17:07:58 2007
Subject: [Filesystem-dev] CR: Fix crash in httpfsys.
Message-ID: <460D9F18.6090706@real.com>
Henry Ping wrote:
> Looks good.
Thanks, now checked into HEAD.
--greg.
>
> -->Henry
>
>> -----Original Message-----
>> From: filesystem-dev-bounces@helixcommunity.org
>> [mailto:filesystem-dev-bounces@helixcommunity.org] On Behalf
>> Of Greg Wright
>> Sent: Friday, March 30, 2007 3:14 PM Ping
>> To: filesystem-dev@helixcommunity.org
>> Subject: [Filesystem-dev] CR: Fix crash in httpfsys.
>>
>> Project
>> =======
>>
>> Synopsis
>> ========
>> If you try to stream a SMIL file over HTTP it will crash.
>> Dies trying lock a mutex that is NULL.
>>
>> Fix
>> ===
>> What happens with this is that the stack gets pretty deep, I
>> guess due to the multiple sources in the SMIL file, and when
>> the stack is unwinding Close() is called and that mutex is released.
>> Then, when it returns to the next stack frame it tries to
>> lock that same mutex and dies.
>>
>> The fix is to simply not destroy that mutex until the
>> destructor is called.
>>
>> All the rest of the diffs are just changes to use HX_LOCK and
>> HX_UNLOCK.
>>
>>
>> Files Modified
>> ==============
>> filesystem/http/httpfsys.cpp
>>
>> Branch(s)
>> =========
>> HEAD only, 150Cay does not have the problem.
>>
>> --greg.
>>
>>
>> Index: httpfsys.cpp
>> ===================================================================
>> RCS file: /cvsroot/filesystem/http/httpfsys.cpp,v
>> retrieving revision 1.103
>> diff -u -w -r1.103 httpfsys.cpp
>> --- httpfsys.cpp 19 Sep 2006 21:10:07 -0000 1.103
>> +++ httpfsys.cpp 30 Mar 2007 21:49:31 -0000
>> @@ -262,6 +262,7 @@
>>
>> CChunkyResMap::~CChunkyResMap()
>> {
>> +
>> delete m_pChunkyResURLMap;
>> }
>>
>> @@ -1153,6 +1154,7 @@
>> m_pContext->AddRef();
>>
>> CreateInstanceCCF(CLSID_IHXMutex, (void**)&m_pMutex,
>> m_pContext);
>> + HX_ASSERT( m_pMutex );
>>
>> m_pContext->QueryInterface(IID_IHXScheduler,
>> (void**) &m_pScheduler);
>>
>> m_pContext->QueryInterface(IID_IHXCommonClassFactory, (void
>> **)&m_pCommonClassFactory); @@ -1182,9 +1184,8 @@
>> //
>> // get proxy info for HTTP protocol
>> //
>> -
>> - IHXBuffer* pBuffer = NULL;
>> UINT32 ulValue = 0;
>> + IHXBuffer* pBuffer = NULL;
>>
>> if (m_pPreferences)
>> {
>> @@ -1299,8 +1300,8 @@
>> }
>>
>> m_bInDestructor = TRUE;
>> -
>> Close();
>> + HX_RELEASE(m_pMutex);
>> }
>>
>>
>> /*************************************************************
>> ***********
>> @@ -1318,7 +1319,7 @@
>> IHXFileResponse* /*IN*/ pFileResponse
>> )
>> {
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>>
>> HXLOGL1(HXLOG_HTTP, "Init");
>>
>> @@ -1387,13 +1388,13 @@
>> _SetCurrentReadPos(0);
>> m_bServerPresumablyWorksWithByteRangeRequests = TRUE;
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->InitDone(HXR_OK);
>> return HXR_OK;
>> }
>> else
>> {
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->InitDone(HXR_FAILED);
>> return HXR_FAILED;
>> }
>> @@ -1420,7 +1421,7 @@
>> m_pFileResponse->InitDone(HXR_FAILED);
>> }
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> return theErr;
>> }
>>
>> @@ -1600,7 +1601,6 @@
>> m_bClosed = TRUE;
>>
>> HX_UNLOCK(m_pMutex);
>> - HX_RELEASE(m_pMutex);
>>
>> if (m_bInDestructor)
>> {
>> @@ -1687,11 +1687,11 @@
>> {
>> HXLOGL1(HXLOG_HTTP, "Read (%d) cancelled! Seek is
>> pending!", ulCount);
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>>
>> CallReadDone(HXR_SEEK_PENDING ,NULL);
>>
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>>
>> return HXR_UNEXPECTED;
>> }
>> @@ -1750,9 +1750,9 @@
>> }
>> }
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> lResult = ProcessPendingReads();
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>>
>> return lResult;
>> }
>> @@ -1813,9 +1813,9 @@
>> while (m_PendingReadList.GetCount())
>> {
>> m_PendingReadList.RemoveHead();
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->ReadDone(HXR_CANCELLED, NULL);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>>
>> if (bRelative)
>> @@ -1834,9 +1834,9 @@
>> m_bSeekPending?"Seek":"", m_bReadPending?"Read":"");
>>
>> m_bSeekPending = FALSE;
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->SeekDone(HXR_CANCELLED);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>>
>> if (_GetContiguousLength() > 0)
>> @@ -1856,18 +1856,18 @@
>> {
>> HXLOGL4(HXLOG_HTTP, "Seek: no reconnect
>> necessary, has data already");
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->SeekDone(HXR_OK);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> }
>> else
>> {
>> HXLOGL4(HXLOG_HTTP, "Seek: no byte range
>> support, will wait for data if necessary");
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->SeekDone(HXR_OK);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> }
>> else
>> @@ -1879,17 +1879,17 @@
>> {
>> HXLOGL2(HXLOG_HTTP, "Seek: at end of read content");
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->SeekDone(HXR_OK);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> else if (m_bKnowContentSize &&
>> m_ulCurrentReadPosition == m_nContentSize)
>> {
>> HXLOGL2(HXLOG_HTTP, "Seek: at end of content");
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->SeekDone(HXR_OK);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> else
>> {
>> @@ -1916,16 +1916,16 @@
>> // signal the caller about the end of content
>> if (m_ulCurrentReadPosition == m_nContentRead)
>> {
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->SeekDone(HXR_OK);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> else
>> {
>> HX_ASSERT(m_ulCurrentReadPosition >
>> m_nContentRead);
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->SeekDone(HXR_FAILED);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> }
>> else /* add it to the seek pending queue...*/
>> @@ -2683,9 +2683,9 @@
>> // This prompts client to write Post Data.
>> if (m_pFileResponse)
>> {
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> theErr = m_pFileResponse->WriteDone(HXR_OK);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> }
>> }
>> @@ -2709,27 +2709,27 @@
>> HXLOGL2(HXLOG_HTTP, "ProcessIdle notices SeekDone");
>>
>> m_bSeekPending = FALSE;
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->SeekDone(HXR_OK);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> else if (m_bReadContentsDone)
>> {
>> HXLOGL1(HXLOG_HTTP, "ProcessIdle notices
>> SeekDone will fail");
>>
>> m_bSeekPending = FALSE;
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->SeekDone(HXR_FAILED);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> }
>>
>>
>> _DoSomeReadingFromSocket(TRUE);
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> HX_RESULT ReadErr = ProcessPendingReads();
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>>
>> if(!theErr)
>> {
>> @@ -2829,27 +2829,27 @@
>> if (m_bInitResponsePending && m_pFileResponse)
>> {
>> m_bInitResponsePending = FALSE;
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileResponse->InitDone(m_bPartialData ?
>> HXR_RESOURCE_PARTIALCOPY : HXR_OK);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>>
>> if (m_bFileExistsResponsePending &&
>> m_pFileExistsResponse)
>> {
>> AddNoCacheHeader();
>> m_bFileExistsResponsePending = FALSE;
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> m_pFileExistsResponse->DoesExistDone(TRUE);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> HX_RELEASE(m_pFileExistsResponse);
>> }
>>
>> if (m_bMimeResponsePending && m_pMimeMapperResponse)
>> {
>> m_bMimeResponsePending = FALSE;
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>>
>> m_pMimeMapperResponse->MimeTypeFound(HXR_OK, pMimeType);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>>
>> // MimeTypeFound() may cause us to close if
>> the Response object
>> // decides it doesn't like our mimetype and
>> shuts us down.
>> @@ -2922,9 +2922,9 @@
>> // but we have pending reads. The user
>> called too many reads, or the connection
>> // has died before all data was sent.
>> HXLOGL1(HXLOG_HTTP, "ProcessPendingReads
>> Read() failure due to insufficient content");
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> CallReadDone(HXR_FAIL , NULL);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> continue; // CallReadDone(HXR_FAIL..) for
>> remaining reads in pending list
>> }
>> }
>> @@ -2966,9 +2966,9 @@
>> /* Remove from pending list */
>> m_PendingReadList.RemoveHead();
>>
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> CallReadDone(HXR_OK ,pBuffer);
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> else
>> {
>> @@ -3783,9 +3783,9 @@
>>
>> if (bHandleReadImmediately)
>> {
>> - m_pMutex->Unlock();
>> + HX_UNLOCK(m_pMutex);
>> ProcessPendingReads();
>> - m_pMutex->Lock();
>> + HX_LOCK(m_pMutex);
>> }
>> }
>> break;
>>
>>
>>
>> _______________________________________________
>> Filesystem-dev mailing list
>> Filesystem-dev@helixcommunity.org
>> http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev
>
From gwright at real.com Fri Mar 30 17:49:35 2007
From: gwright at real.com (Greg Wright)
Date: Fri Mar 30 18:20:36 2007
Subject: [Filesystem-dev] CR: Allow overrides of growth limits....
Message-ID: <460DB01F.7060409@real.com>
We need to be able to change the floor and ceiling values depending
on the build target:
#define CHUNK_RES_MEM_FLOOR 512000 //512 KB
#define CHUNK_RES_MEM_CEILING 1000000 // 1MB
This change just uses the defaults only if they are not defined
already. Then I just define them in the OLPC profile as needed.
After this change, HTTP streaming works on the XO (olpc) for SMIL,
RV, Ogg and other datatypes.
HEAD only.
--greg.
Index: httpfsys.h
===================================================================
RCS file: /cvsroot/filesystem/http/httpfsys.h,v
retrieving revision 1.38
diff -u -w -r1.38 httpfsys.h
--- httpfsys.h 8 Mar 2006 02:28:35 -0000 1.38
+++ httpfsys.h 31 Mar 2007 00:46:22 -0000
@@ -103,11 +103,16 @@
#define DEFAULT_CHUNK_SIZE 1024 //default size of chunk buffer
#ifdef HELIX_FEATURE_HTTPFSYS_MEM_GROWTH_LIMIT
+# if !defined(CHUNK_RES_MEM_FLOOR)
+# define CHUNK_RES_MEM_FLOOR 512000
+# endif
+# if !defined(CHUNK_RES_MEM_CEILING)
+# define CHUNK_RES_MEM_CEILING 1000000
+# endif
+#endif //HELIX_HTTPFSYS_MEM_GROWTH_LIMIT
+
-#define CHUNK_RES_MEM_FLOOR 512000 //512 KB
-#define CHUNK_RES_MEM_CEILING 1000000 // 1MB
-#endif //HELIX_HTTPFSYS_MEM_GROWTH_LIMIT
typedef enum
{
Index: helix-client-OLPC.pf
===================================================================
RCS file: /cvsroot/ribosome/build/umakepf/helix-client-OLPC.pf,v
retrieving revision 1.1
diff -u -w -r1.1 helix-client-OLPC.pf
--- helix-client-OLPC.pf 29 Mar 2007 20:58:17 -0000 1.1
+++ helix-client-OLPC.pf 31 Mar 2007 00:46:44 -0000
@@ -95,3 +95,6 @@
project.AddDefines('HELIX_FEATURE_HTTPFSYS_MEM_GROWTH_LIMIT')
project.AddDefines('HELIX_FEATURE_ALSA')
+
+project.AddDefines("CHUNK_RES_MEM_FLOOR=128000")
+project.AddDefines("CHUNK_RES_MEM_CEILING=256000")
Copyright © 1995-2007 RealNetworks, Inc. All rights reserved.
RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.