Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Streaming Audio

16 posts in AEP Last posting was on 2009-07-01 01:46:49.0Z
Benedictum Posted on 2009-01-05 12:34:30.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
Subject: Streaming Audio
Date: Mon, 5 Jan 2009 06:34:30 -0600
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: 67.186.82.181
Message-ID: <4961fe47@solutions.advantagedatabase.com>
X-Trace: 5 Jan 2009 05:34:15 -0700, 67.186.82.181
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.82.181
Xref: solutions.advantagedatabase.com Advantage.AEP:662
Article PK: 1103941

I have an ADS database of a collection of mp3 songs. The song files are
located in the same server where the database is. In our private WAN members
I would like to be able to stream the audio without sending the hard file. I
plan to stream the audio using AEP with TBlogStream.LoadFromFile method and
serve it back to the requesting station.

In the client side would be an application making the request and playing
the streamed audio.

Has anyone developed this type application? Is this approach or loging
doable?

You comments please. Thanks/
B


Benedictum Posted on 2009-01-05 12:36:20.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Mon, 5 Jan 2009 06:36:20 -0600
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: 67.186.82.181
Message-ID: <4961feb5@solutions.advantagedatabase.com>
X-Trace: 5 Jan 2009 05:36:05 -0700, 67.186.82.181
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.82.181
Xref: solutions.advantagedatabase.com Advantage.AEP:664
Article PK: 1103942

The last question should read "Is this approach or logic doable?"

"Benedictum" <Benedictus@dominusvobis.com> wrote in message
news:4961fe47@solutions.advantagedatabase.com...
>I have an ADS database of a collection of mp3 songs. The song files are
>located in the same server where the database is. In our private WAN
>members I would like to be able to stream the audio without sending the
>hard file. I plan to stream the audio using AEP with
>TBlogStream.LoadFromFile method and serve it back to the requesting
>station.
>
> In the client side would be an application making the request and playing
> the streamed audio.
>
> Has anyone developed this type application? Is this approach or loging
> doable?
>
> You comments please. Thanks/
> B
>


Douglas Woodrow Posted on 2009-01-05 14:39:56.0Z
Message-ID: <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com>
Date: Mon, 5 Jan 2009 14:39:56 +0000
From: Douglas Woodrow <newsgroups@nospam.demon.co.uk>
Newsgroups: Advantage.AEP
Subject: Re: Streaming Audio
References: <4961fe47@solutions.advantagedatabase.com>
Lines: 39
Organization: Woodrow Horsfall Ltd
MIME-Version: 1.0
Content-Type: text/plain;charset=us-ascii;format=flowed
User-Agent: Turnpike/6.05-U (<7NuiuSizqsb2S8hkEJGWu9hKd5>)
NNTP-Posting-Host: 84.92.177.174
X-Trace: 5 Jan 2009 07:38:04 -0700, 84.92.177.174
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!nospam.demon.co.uk!newsgroups
Xref: solutions.advantagedatabase.com Advantage.AEP:665
Article PK: 1103945

On Mon, 5 Jan 2009 06:34:30, Benedictum <Benedictus@dominusvobis.com>

wrote
>I have an ADS database of a collection of mp3 songs. The song files are
>located in the same server where the database is. In our private WAN members
>I would like to be able to stream the audio without sending the hard file. I
>plan to stream the audio using AEP with TBlogStream.LoadFromFile method and
>serve it back to the requesting station.
>
>In the client side would be an application making the request and playing
>the streamed audio.
>
>Has anyone developed this type application? Is this approach or loging
>doable?

Hi,

This probably isn't the kind of reply you had in mind, but if all you
want is for users to be able to play mp3 files there is a simple
python-based MP3 server called Edna which may be suitable. It only
takes a few minutes to install and configure.

http://edna.sourceforge.net/

"edna allows you to access your MP3 collection from any networked
computer. This software streams your MP3s via HTTP to any MP3 player
that supports playing off a remote connection"

edna can automatically create play lists for individual directories of
songs, and all directories recursively. These lists can also be shuffled
(by edna, rather than your player).

Your MP3 player must be able to recognize .m3u files, and your browser
must know to pass .m3u files to your player."

Obviously nothing to do with Advantage, but you may at least get some
useful ideas!
--
Doug Woodrow


Benedictum Posted on 2009-01-05 21:27:58.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com>
Subject: Re: Streaming Audio
Date: Mon, 5 Jan 2009 15:27:58 -0600
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: 67.186.82.181
Message-ID: <49627b53@solutions.advantagedatabase.com>
X-Trace: 5 Jan 2009 14:27:47 -0700, 67.186.82.181
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.82.181
Xref: solutions.advantagedatabase.com Advantage.AEP:667
Article PK: 1103944

Edna is good program. I would consider it though a general purpose program.
The ADS help me organize the mp3 files into various catergories like tempo,
author, album, genre, etc. The ICD tag info embedded in the song file is
extracted and placed in fields which are used for indices. It is easier then
to do a search, e.g. "get me a song, tempo=tango, and artist=Julio Iglesias"
:) This is the main reason on why I opted for a ADS database system.

I will look at EDNA's source and maybe I can get the logic and modify it to
my liking.

"Douglas Woodrow" <newsgroups@nospam.demon.co.uk> wrote in message
news:AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com...
> On Mon, 5 Jan 2009 06:34:30, Benedictum <Benedictus@dominusvobis.com>
> wrote
>>I have an ADS database of a collection of mp3 songs. The song files are
>>located in the same server where the database is. In our private WAN
>>members
>>I would like to be able to stream the audio without sending the hard file.
>>I
>>plan to stream the audio using AEP with TBlogStream.LoadFromFile method
>>and
>>serve it back to the requesting station.
>>
>>In the client side would be an application making the request and playing
>>the streamed audio.
>>
>>Has anyone developed this type application? Is this approach or loging
>>doable?
>
> Hi,
>
> This probably isn't the kind of reply you had in mind, but if all you want
> is for users to be able to play mp3 files there is a simple python-based
> MP3 server called Edna which may be suitable. It only takes a few minutes
> to install and configure.
>
> http://edna.sourceforge.net/
>
> "edna allows you to access your MP3 collection from any networked
> computer. This software streams your MP3s via HTTP to any MP3 player that
> supports playing off a remote connection"
>
> edna can automatically create play lists for individual directories of
> songs, and all directories recursively. These lists can also be shuffled
> (by edna, rather than your player).
>
> Your MP3 player must be able to recognize .m3u files, and your browser
> must know to pass .m3u files to your player."
>
> Obviously nothing to do with Advantage, but you may at least get some
> useful ideas!
> --
> Doug Woodrow
>


Benedictum Posted on 2009-06-26 13:32:32.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Fri, 26 Jun 2009 08:32:32 -0500
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: 67.186.83.195
Message-ID: <4a44cdb6@solutions.advantagedatabase.com>
X-Trace: 26 Jun 2009 07:31:34 -0700, 67.186.83.195
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.83.195
Xref: solutions.advantagedatabase.com Advantage.AEP:724
Article PK: 1104002

After going away from this project, I wrote an AEP that accessed the
songfile as a MemoryStream. My question is how to return this stream. Is
there a way in AEP?

"Benedictum" <Benedictus@dominusvobis.com> wrote in message
news:49627b53@solutions.advantagedatabase.com...
> Edna is good program. I would consider it though a general purpose
> program. The ADS help me organize the mp3 files into various catergories
> like tempo, author, album, genre, etc. The ICD tag info embedded in the
> song file is extracted and placed in fields which are used for indices. It
> is easier then to do a search, e.g. "get me a song, tempo=tango, and
> artist=Julio Iglesias" :) This is the main reason on why I opted for a ADS
> database system.
>
> I will look at EDNA's source and maybe I can get the logic and modify it
> to my liking.
>
> "Douglas Woodrow" <newsgroups@nospam.demon.co.uk> wrote in message
> news:AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com...
>> On Mon, 5 Jan 2009 06:34:30, Benedictum <Benedictus@dominusvobis.com>
>> wrote
>>>I have an ADS database of a collection of mp3 songs. The song files are
>>>located in the same server where the database is. In our private WAN
>>>members
>>>I would like to be able to stream the audio without sending the hard
>>>file. I
>>>plan to stream the audio using AEP with TBlogStream.LoadFromFile method
>>>and
>>>serve it back to the requesting station.
>>>
>>>In the client side would be an application making the request and playing
>>>the streamed audio.
>>>
>>>Has anyone developed this type application? Is this approach or loging
>>>doable?
>>
>> Hi,
>>
>> This probably isn't the kind of reply you had in mind, but if all you
>> want is for users to be able to play mp3 files there is a simple
>> python-based MP3 server called Edna which may be suitable. It only takes
>> a few minutes to install and configure.
>>
>> http://edna.sourceforge.net/
>>
>> "edna allows you to access your MP3 collection from any networked
>> computer. This software streams your MP3s via HTTP to any MP3 player that
>> supports playing off a remote connection"
>>
>> edna can automatically create play lists for individual directories of
>> songs, and all directories recursively. These lists can also be shuffled
>> (by edna, rather than your player).
>>
>> Your MP3 player must be able to recognize .m3u files, and your browser
>> must know to pass .m3u files to your player."
>>
>> Obviously nothing to do with Advantage, but you may at least get some
>> useful ideas!
>> --
>> Doug Woodrow
>>
>
>


Joachim Duerr (ADS) Posted on 2009-06-26 21:53:17.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Streaming Audio
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com>
User-Agent: XanaNews/1.19.1.194
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 95.113.180.217
Message-ID: <4a45353d@solutions.advantagedatabase.com>
Date: 26 Jun 2009 14:53:17 -0700
X-Trace: 26 Jun 2009 14:53:17 -0700, 95.113.180.217
Lines: 13
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!95.113.180.217
Xref: solutions.advantagedatabase.com Advantage.AEP:725
Article PK: 1104003


Benedictum wrote:

>After going away from this project, I wrote an AEP that accessed the
>songfile as a MemoryStream. My question is how to return this stream.
>Is there a way in AEP?

AEPs work (temp) table based...you can't stream to the client, but you
can stream it into a blob field of the __output table.

--
Joachim Duerr
Advantage Presales
check out my new ADS book on http://www.jd-engineering.de/adsbuch


Benedictum Posted on 2009-06-27 21:45:42.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Sat, 27 Jun 2009 16:45:42 -0500
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: 67.186.83.195
Message-ID: <4a4692cb@solutions.advantagedatabase.com>
X-Trace: 27 Jun 2009 15:44:43 -0700, 67.186.83.195
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.83.195
Xref: solutions.advantagedatabase.com Advantage.AEP:726
Article PK: 1104004

Seems like I read your mind, Joachim. I had to create a blob field but I
needed to include DB in the uses clause for the TBlobfield to be available
then assign the MemoryStream to it. All I need now is to write the receiving
routine (client). Wish me luck for the second half of this project.

"Joachim Duerr (ADS)" <jojo.duerr@gmx.de> wrote in message
news:4a45353d@solutions.advantagedatabase.com...
> Benedictum wrote:
>
>>After going away from this project, I wrote an AEP that accessed the
>>songfile as a MemoryStream. My question is how to return this stream.
>>Is there a way in AEP?
>
> AEPs work (temp) table based...you can't stream to the client, but you
> can stream it into a blob field of the __output table.
>
> --
> Joachim Duerr
> Advantage Presales
> check out my new ADS book on http://www.jd-engineering.de/adsbuch


Benedictum Posted on 2009-06-28 04:06:21.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com> <4a4692cb@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Sat, 27 Jun 2009 23:06:21 -0500
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 67.186.83.195
Message-ID: <4a46ec02@solutions.advantagedatabase.com>
X-Trace: 27 Jun 2009 22:05:22 -0700, 67.186.83.195
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.83.195
Xref: solutions.advantagedatabase.com Advantage.AEP:727
Article PK: 1104011

Ok, I wrote the aep to fetch the blob stream (audio) file from a server
path. This is then loaded into a blob field for output. On the server side,
I could execute and the aep could find the files. When I execute on a client
machine I get the error (5154) which states that the function could not find
the file. The client program passes the server-path string into the aep. Is
there a way to correct this problem. First of all, why am I getting this
error?

"Benedictum" <Benedictus@dominusvobis.com> wrote in message
news:4a4692cb@solutions.advantagedatabase.com...
> Seems like I read your mind, Joachim. I had to create a blob field but I
> needed to include DB in the uses clause for the TBlobfield to be available
> then assign the MemoryStream to it. All I need now is to write the
> receiving routine (client). Wish me luck for the second half of this
> project.
>
> "Joachim Duerr (ADS)" <jojo.duerr@gmx.de> wrote in message
> news:4a45353d@solutions.advantagedatabase.com...
>> Benedictum wrote:
>>
>>>After going away from this project, I wrote an AEP that accessed the
>>>songfile as a MemoryStream. My question is how to return this stream.
>>>Is there a way in AEP?
>>
>> AEPs work (temp) table based...you can't stream to the client, but you
>> can stream it into a blob field of the __output table.
>>
>> --
>> Joachim Duerr
>> Advantage Presales
>> check out my new ADS book on http://www.jd-engineering.de/adsbuch
>
>


Joachim Duerr (ADS) Posted on 2009-06-28 22:53:37.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Streaming Audio
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com> <4a4692cb@solutions.advantagedatabase.com> <4a46ec02@solutions.advantagedatabase.com>
User-Agent: XanaNews/1.19.1.194
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 80.120.42.6
Message-ID: <4a47e661@solutions.advantagedatabase.com>
Date: 28 Jun 2009 15:53:37 -0700
X-Trace: 28 Jun 2009 15:53:37 -0700, 80.120.42.6
Lines: 16
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!80.120.42.6
Xref: solutions.advantagedatabase.com Advantage.AEP:728
Article PK: 1104010


Benedictum wrote:

>Ok, I wrote the aep to fetch the blob stream (audio) file from a
>server path. This is then loaded into a blob field for output. On the
>server side, I could execute and the aep could find the files. When I
>execute on a client machine I get the error (5154) which states that
>the function could not find the file. The client program passes the
>server-path string into the aep. Is there a way to correct this
>problem. First of all, why am I getting this error?

could you please post the complete error message you get?

--
Joachim Duerr
Advantage Presales
check out my new ADS book on http://www.jd-engineering.de/adsbuch


Benedictum Posted on 2009-06-29 01:02:46.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com> <4a4692cb@solutions.advantagedatabase.com> <4a46ec02@solutions.advantagedatabase.com> <4a47e661@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Sun, 28 Jun 2009 20:02:46 -0500
Lines: 90
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 67.186.83.195
Message-ID: <4a48127d@solutions.advantagedatabase.com>
X-Trace: 28 Jun 2009 19:01:49 -0700, 67.186.83.195
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.83.195
Xref: solutions.advantagedatabase.com Advantage.AEP:729
Article PK: 1104005

Here it is:
***********************
AdsQuery1:Error 7200: AQE Error: State=HY000; NativeError 5154; [Extended
Systems][Advantage SQL][ASA] Error 5154; Execution of the stored procedure
failed, ProcError1: Cannot open file "n:\music\ballroom\allstarsballroom\nel
blu di pinto di blu.mp3".The system cannot find the path specified.
************************


here is the AEP function:
************************
function GetStream( ulConnectionID: UNSIGNED32;
hConnection: ADSHANDLE;
pulNumRowsAffected: PUNSIGNED32 ): UNSIGNED32;
{$IFDEF WIN32}stdcall;{$ENDIF}{$IFDEF
LINUX}cdecl;{$ENDIF} // Do not change prototype
var
DM1 : TDM1;
SongStream:TMemoryStream;
bStream:TStream;
bField:TBlobField;
SongIndex,SongPath:String;
FoundSong:Boolean;
SongTable:TadsTable;
begin

Result := AE_SUCCESS;

{* Get this connection's data module from the session manager. *}
DM1 := TDM1( AEPSessionMgr.GetDM( ulConnectionID ) );
try
with DM1 do
begin
SongStream:=TMemoryStream.Create;
// get the song location
tblInput.Open;
SongPath:=tblInput.FieldByName('SongPath').AsString;
tblInput.Close;
// fetch the song
SongStream.LoadFromFile(SongPath);
{* Finally return any output parameters. *}
bField:=tblOutPut.FieldByName('RetStream') As TBlobField;
// create a link to the tblOutput field
bStream := tblOutput.CreateBlobStream(bField, bmWrite) ;
// send to client
tblOutput.open;
tblOutput.append;
bStream.Write(SongStream,sizeof(SongStream));
tblOutput.FieldByName('FoundIt').AsBoolean:=FoundSong;
tblOutput.Post;
tblOutput.Close;
bStream.Free;
SongStream.Free;
end; {* with DM1 *}

except
on E : EADSDatabaseError do
{* ADS-specific error, use ACE error code *}
DM1.DataConn.Execute( 'INSERT INTO __error VALUES ( ' + IntToStr(
E.ACEErrorCode ) + ', ' + QuotedStr( E.Message ) + ' )' );
on E : Exception do
{* other error *}
DM1.DataConn.Execute( 'INSERT INTO __error VALUES ( 1, ' +
QuotedStr( E.Message ) + ' )' );
end;

end;

"Joachim Duerr (ADS)" <jojo.duerr@gmx.de> wrote in message
news:4a47e661@solutions.advantagedatabase.com...
> Benedictum wrote:
>
>>Ok, I wrote the aep to fetch the blob stream (audio) file from a
>>server path. This is then loaded into a blob field for output. On the
>>server side, I could execute and the aep could find the files. When I
>>execute on a client machine I get the error (5154) which states that
>>the function could not find the file. The client program passes the
>>server-path string into the aep. Is there a way to correct this
>>problem. First of all, why am I getting this error?
>
> could you please post the complete error message you get?
>
> --
> Joachim Duerr
> Advantage Presales
> check out my new ADS book on http://www.jd-engineering.de/adsbuch


Mark Wilkins Posted on 2009-06-29 17:07:20.0Z
From: "Mark Wilkins" <mark@no.email>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com> <4a4692cb@solutions.advantagedatabase.com> <4a46ec02@solutions.advantagedatabase.com> <4a47e661@solutions.advantagedatabase.com> <4a48127d@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Mon, 29 Jun 2009 11:07:20 -0600
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 10.24.38.228
Message-ID: <4a48f48d@solutions.advantagedatabase.com>
X-Trace: 29 Jun 2009 11:06:21 -0700, 10.24.38.228
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.38.228
Xref: solutions.advantagedatabase.com Advantage.AEP:730
Article PK: 1104006


"Benedictum" <Benedictus@dominusvobis.com> wrote in message
news:4a48127d@solutions.advantagedatabase.com...
> Here it is:
> ***********************
> AdsQuery1:Error 7200: AQE Error: State=HY000; NativeError 5154; [Extended
> Systems][Advantage SQL][ASA] Error 5154; Execution of the stored procedure
> failed, ProcError1: Cannot open file
> "n:\music\ballroom\allstarsballroom\nel blu di pinto di blu.mp3".The
> system cannot find the path specified.
> ************************
>

If you are running this on Advantage Database Server (remote server as
opposed to local server), then the drive letter "n:" is probably not found.
The AEP would be running in Advantage's process space (as a service). A
service typically has no knowledge of mapped drive letters (and I'm guessing
that n: is a network mapped drive). If this is the case, you should
probably use UNC paths.

Mark Wilkins
Advantage R&D


Benedictum Posted on 2009-06-30 04:24:14.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com> <4a4692cb@solutions.advantagedatabase.com> <4a46ec02@solutions.advantagedatabase.com> <4a47e661@solutions.advantagedatabase.com> <4a48127d@solutions.advantagedatabase.com> <4a48f48d@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Mon, 29 Jun 2009 23:24:14 -0500
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 67.186.83.195
Message-ID: <4a499331@solutions.advantagedatabase.com>
X-Trace: 29 Jun 2009 22:23:13 -0700, 67.186.83.195
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.83.195
Xref: solutions.advantagedatabase.com Advantage.AEP:731
Article PK: 1104007

Glad to add that to my knowledge base. How then should I address the files
in UNC? Should I used the server's network local IP. The files are located
in a network file server (NAS).

"Mark Wilkins" <mark@no.email> wrote in message
news:4a48f48d@solutions.advantagedatabase.com...
>
> "Benedictum" <Benedictus@dominusvobis.com> wrote in message
> news:4a48127d@solutions.advantagedatabase.com...
>> Here it is:
>> ***********************
>> AdsQuery1:Error 7200: AQE Error: State=HY000; NativeError 5154; [Extended
>> Systems][Advantage SQL][ASA] Error 5154; Execution of the stored
>> procedure failed, ProcError1: Cannot open file
>> "n:\music\ballroom\allstarsballroom\nel blu di pinto di blu.mp3".The
>> system cannot find the path specified.
>> ************************
>>
>
> If you are running this on Advantage Database Server (remote server as
> opposed to local server), then the drive letter "n:" is probably not
> found. The AEP would be running in Advantage's process space (as a
> service). A service typically has no knowledge of mapped drive letters
> (and I'm guessing that n: is a network mapped drive). If this is the
> case, you should probably use UNC paths.
>
> Mark Wilkins
> Advantage R&D
>


Joachim Duerr (ADS) Posted on 2009-06-30 09:53:24.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Streaming Audio
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com> <4a4692cb@solutions.advantagedatabase.com> <4a46ec02@solutions.advantagedatabase.com> <4a47e661@solutions.advantagedatabase.com> <4a48127d@solutions.advantagedatabase.com> <4a48f48d@solutions.advantagedatabase.com> <4a499331@solutions.advantagedatabase.com>
User-Agent: XanaNews/1.19.1.194
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 80.120.42.6
Message-ID: <4a49d284@solutions.advantagedatabase.com>
Date: 30 Jun 2009 02:53:24 -0700
X-Trace: 30 Jun 2009 02:53:24 -0700, 80.120.42.6
Lines: 13
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!80.120.42.6
Xref: solutions.advantagedatabase.com Advantage.AEP:732
Article PK: 1104009


Benedictum wrote:

>Glad to add that to my knowledge base. How then should I address the
>files in UNC? Should I used the server's network local IP. The files
>are located in a network file server (NAS).

IIRC the path/filename comes from the client, send into the AEP? If so,
just call ExpandUNCFilePath (Delphi?).

--
Joachim Duerr
Advantage Presales
check out my new ADS book on http://www.jd-engineering.de/adsbuch


Benedictum Posted on 2009-06-30 12:49:47.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com> <4a4692cb@solutions.advantagedatabase.com> <4a46ec02@solutions.advantagedatabase.com> <4a47e661@solutions.advantagedatabase.com> <4a48127d@solutions.advantagedatabase.com> <4a48f48d@solutions.advantagedatabase.com> <4a499331@solutions.advantagedatabase.com> <4a49d284@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Tue, 30 Jun 2009 07:49:47 -0500
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: 67.186.83.195
Message-ID: <4a4a09ae@solutions.advantagedatabase.com>
X-Trace: 30 Jun 2009 06:48:46 -0700, 67.186.83.195
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.83.195
Xref: solutions.advantagedatabase.com Advantage.AEP:733
Article PK: 1104008

Thanks to Mark and Joachim. Here is what I did: I wrote a mini routine that
translates the DOS path into UNC convention. That eliminated the "file not
found" error. I have other issues to tackle, it has something to do with the
AEP function not found. First thing first. I will have to rewrite the aep
for now.

Though this is a fun project, delving into this is a learning process that
has serious business implication, e.g. serving PDF, graphics or any other
files that the client can request from a library list (datatable).

Thanks again. I will report any issues I encounter.

"Joachim Duerr (ADS)" <jojo.duerr@gmx.de> wrote in message
news:4a49d284@solutions.advantagedatabase.com...
> Benedictum wrote:
>
>>Glad to add that to my knowledge base. How then should I address the
>>files in UNC? Should I used the server's network local IP. The files
>>are located in a network file server (NAS).
>
> IIRC the path/filename comes from the client, send into the AEP? If so,
> just call ExpandUNCFilePath (Delphi?).
>
> --
> Joachim Duerr
> Advantage Presales
> check out my new ADS book on http://www.jd-engineering.de/adsbuch


Benedictum Posted on 2009-07-01 00:44:24.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com> <4a4692cb@solutions.advantagedatabase.com> <4a46ec02@solutions.advantagedatabase.com> <4a47e661@solutions.advantagedatabase.com> <4a48127d@solutions.advantagedatabase.com> <4a48f48d@solutions.advantagedatabase.com> <4a499331@solutions.advantagedatabase.com> <4a49d284@solutions.advantagedatabase.com> <4a4a09ae@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Tue, 30 Jun 2009 19:44:24 -0500
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: 67.186.83.195
Message-ID: <4a4ab12a@solutions.advantagedatabase.com>
X-Trace: 30 Jun 2009 18:43:22 -0700, 67.186.83.195
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.83.195
Xref: solutions.advantagedatabase.com Advantage.AEP:734
Article PK: 1104012

Alright, or not quite alright. I have encountered an AV and possibly has a
lot to do with type casting a blob into a stream. Is there another way?

here is my short code:

NetPath:='\\Nas-25-f2-82\media';
PathLen:=length(TheSong);
NetPath:=NetPath+copy(TheSong,3,PathLen-2); // convert into UNC
adsQuery1.SQL.text := 'Execute Procedure objSongProc(' +
QuotedStr(NetPath) + ')';
adsQuery1.Open;
SongBlob:=(adsQuery1.Fields[0] As TBlobField);
adsQuery1.Close;
// type cast the blob into stream
SongStream.LoadFromStream(TStream(SongBlob));

"Benedictum" <Benedictus@dominusvobis.com> wrote in message
news:4a4a09ae@solutions.advantagedatabase.com...
> Thanks to Mark and Joachim. Here is what I did: I wrote a mini routine
> that translates the DOS path into UNC convention. That eliminated the
> "file not found" error. I have other issues to tackle, it has something to
> do with the AEP function not found. First thing first. I will have to
> rewrite the aep for now.
>
> Though this is a fun project, delving into this is a learning process that
> has serious business implication, e.g. serving PDF, graphics or any other
> files that the client can request from a library list (datatable).
>
> Thanks again. I will report any issues I encounter.
>
> "Joachim Duerr (ADS)" <jojo.duerr@gmx.de> wrote in message
> news:4a49d284@solutions.advantagedatabase.com...
>> Benedictum wrote:
>>
>>>Glad to add that to my knowledge base. How then should I address the
>>>files in UNC? Should I used the server's network local IP. The files
>>>are located in a network file server (NAS).
>>
>> IIRC the path/filename comes from the client, send into the AEP? If so,
>> just call ExpandUNCFilePath (Delphi?).
>>
>> --
>> Joachim Duerr
>> Advantage Presales
>> check out my new ADS book on http://www.jd-engineering.de/adsbuch
>
>


Benedictum Posted on 2009-07-01 01:46:49.0Z
From: "Benedictum" <Benedictus@dominusvobis.com>
Newsgroups: Advantage.AEP
References: <4961fe47@solutions.advantagedatabase.com> <AqcgN9B8uhYJFwM+@woodrowhorsfall.plus.com> <49627b53@solutions.advantagedatabase.com> <4a44cdb6@solutions.advantagedatabase.com> <4a45353d@solutions.advantagedatabase.com> <4a4692cb@solutions.advantagedatabase.com> <4a46ec02@solutions.advantagedatabase.com> <4a47e661@solutions.advantagedatabase.com> <4a48127d@solutions.advantagedatabase.com> <4a48f48d@solutions.advantagedatabase.com> <4a499331@solutions.advantagedatabase.com> <4a49d284@solutions.advantagedatabase.com> <4a4a09ae@solutions.advantagedatabase.com> <4a4ab12a@solutions.advantagedatabase.com>
Subject: Re: Streaming Audio
Date: Tue, 30 Jun 2009 20:46:49 -0500
Lines: 103
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: 67.186.83.195
Message-ID: <4a4abfd0@solutions.advantagedatabase.com>
X-Trace: 30 Jun 2009 19:45:52 -0700, 67.186.83.195
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!67.186.83.195
Xref: solutions.advantagedatabase.com Advantage.AEP:735
Article PK: 1104013

Ok guys, I finally got the audio file streamed into the client - as an aid
to those using ADS to stream a blob file from a server here are the codes:
(I still have other issues playing it thru an audio engine but that's beyond
the scope of this forum. Thanks again guys.)

********************* Client side:
var
sStream: TStream;
iSyncProc: SYNCPROC;
NetPath, NewPath: string;
PathLen: integer;

begin
SongStream := TMemoryStream.Create;
NetPath := '\\Nas-25-f2-82\media';
PathLen := length(TheSong);
NetPath := NetPath + copy(TheSong, 3, PathLen - 2);
adsQuery1.SQL.text := 'Execute Procedure objSongProc(' +
QuotedStr(NetPath) + ')';
adsQuery1.Open;
TblobField(adsQuery1.FieldByName('RetStream')).SaveToStream(SongStream);
adsQuery1.Close;
//************* to check if indeed I got the audio file - I got a
file the works!
SongStream.SaveToFile('c:\myteststream.mp3');
// **** from here send it to a player.

//**************** here is the AEP
with DM1 do
begin
SongStream:=TMemoryStream.Create;
// get the song location
tblInput.Open;
// the client sent the UNC path
SongPath:=tblInput.FieldByName('SongPath').AsString;
tblInput.Close;
// fetch the song
SongStream.LoadFromFile(SongPath);
tblOutput.open;
tblOutput.append;
SongStream.position := 0;
TBlobField(tblOutput.FieldByName('RetStream')).LoadFromStream(SongStream);
tblOutput.Post;
tblOutput.Close;
SongStream.Free;
end; {* with DM1 *}

*******************

"Benedictum" <Benedictus@dominusvobis.com> wrote in message
news:4a4ab12a@solutions.advantagedatabase.com...
> Alright, or not quite alright. I have encountered an AV and possibly has a
> lot to do with type casting a blob into a stream. Is there another way?
>
> here is my short code:
>
> NetPath:='\\Nas-25-f2-82\media';
> PathLen:=length(TheSong);
> NetPath:=NetPath+copy(TheSong,3,PathLen-2); // convert into UNC
> adsQuery1.SQL.text := 'Execute Procedure objSongProc(' +
> QuotedStr(NetPath) + ')';
> adsQuery1.Open;
> SongBlob:=(adsQuery1.Fields[0] As TBlobField);
> adsQuery1.Close;
> // type cast the blob into stream
> SongStream.LoadFromStream(TStream(SongBlob));
>
> "Benedictum" <Benedictus@dominusvobis.com> wrote in message
> news:4a4a09ae@solutions.advantagedatabase.com...
>> Thanks to Mark and Joachim. Here is what I did: I wrote a mini routine
>> that translates the DOS path into UNC convention. That eliminated the
>> "file not found" error. I have other issues to tackle, it has something
>> to do with the AEP function not found. First thing first. I will have to
>> rewrite the aep for now.
>>
>> Though this is a fun project, delving into this is a learning process
>> that has serious business implication, e.g. serving PDF, graphics or any
>> other files that the client can request from a library list (datatable).
>>
>> Thanks again. I will report any issues I encounter.
>>
>> "Joachim Duerr (ADS)" <jojo.duerr@gmx.de> wrote in message
>> news:4a49d284@solutions.advantagedatabase.com...
>>> Benedictum wrote:
>>>
>>>>Glad to add that to my knowledge base. How then should I address the
>>>>files in UNC? Should I used the server's network local IP. The files
>>>>are located in a network file server (NAS).
>>>
>>> IIRC the path/filename comes from the client, send into the AEP? If so,
>>> just call ExpandUNCFilePath (Delphi?).
>>>
>>> --
>>> Joachim Duerr
>>> Advantage Presales
>>> check out my new ADS book on http://www.jd-engineering.de/adsbuch
>>
>>
>
>