RE: Support for other file formats

2000-06-12 Thread shren

On Mon, 12 Jun 2000, Ed Patriquin wrote:

> No.  I couldn't even find out if it was called Msft Multimedia Services or
> Msft Metadirectory Service.  It seems to be built into the Win NT media
> service components.  I couldn't find anything but a few mentions, no
> technical details whatsoever.  If you find anything, please share.

  It's Microsoft Multimedia Services, but I don't know more than that.

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-06-12 Thread Ed Patriquin

No.  I couldn't even find out if it was called Msft Multimedia Services or
Msft Metadirectory Service.  It seems to be built into the Win NT media
service components.  I couldn't find anything but a few mentions, no
technical details whatsoever.  If you find anything, please share.

Ed Patriquin

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of shren
> Sent: Thursday, June 08, 2000 7:16 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Support for other file formats
>
>
>
>   I know this is a conversation that we had a while back,
> but we were looking at streaming protocols and the term
> Microsoft Multimedia Server came up.  Do you know anything
> about the structure of this protocol or a location where
> I can learn more about it?
>
>   Thanks
>   Shren
>
> ___
> [EMAIL PROTECTED]
> http://www.freeamp.org/mailman/listinfo/freeamp-dev
>

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-06-08 Thread shren


On Mon, 29 May 2000, Ed Patriquin wrote:

> I have hacked in some loopback code.  When I use a
> "http://127.0.0.1:portno/file" format I get an INVALID_REQUEST error.  If I
> use "mms://" I get the packets, but can't find how to act like an MMS
> server.  If I use other prefixes, I get bad protocol errors.  What protocol
> did you use on your loopback connection?

  I know this is a conversation that we had a while back,
but we were looking at streaming protocols and the term
Microsoft Multimedia Server came up.  Do you know anything
about the structure of this protocol or a location where
I can learn more about it?

  Thanks
  Shren

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-31 Thread shren

On Wed, 31 May 2000, Ed Patriquin wrote:
> On a lark, I tried the same code on another system.  My development system
> is Windows 2000.  I tried it on a Windows 98 machine and VOILA, I get the
> request.  The Illegal Request error must be coming from within the bowels of
> Win2k.  There is probably some kind of permission issue with allowing me to
> open the connection.  Now I have to track that problem down.  I knew it was
> something simple.

  *laughs*

  I should have expected that.  No reason a modern operating system should
take 3+ minutes to boot.  We have a 2000 file server here and I personally
hate the frigging thing.  Microsoft should take a clue from most other
operating systems in the world and seperate the OS into discrete chunks.
There's the file system, and the windows system, and the kernel drivers,
and the device drivers, and in most sane operating systems these things
are discrete entities to some degree.  Not microsoft!  They make what
operating systems designers call a 'monolithic' kernel look like a creme
drop next to a giant wad of cotton candy.

> P.S. Shren, if your every in the Silicon Valley, let me know, I owe you a
> dinner.

  Eh.  I signed on to this group looking for some help with DirectSound,
and my problem was solved with advice from the group within 24 hours.
What goes around comes around.  But if I am ever out that way I'll let you
know in advance.

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-31 Thread Ed Patriquin

Mystery solved!!

It's not my code.It's Microsoft!!!

On a lark, I tried the same code on another system.  My development system
is Windows 2000.  I tried it on a Windows 98 machine and VOILA, I get the
request.  The Illegal Request error must be coming from within the bowels of
Win2k.  There is probably some kind of permission issue with allowing me to
open the connection.  Now I have to track that problem down.  I knew it was
something simple.

Thanks for your help.

Ed Patriquin

P.S. Shren, if your every in the Silicon Valley, let me know, I owe you a
dinner.



___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-30 Thread shren

On Tue, 30 May 2000, Ed Patriquin wrote:

> 
> Let's sync up.
> 
> Goal: Provide an arbitrary byte stream to the IWMReader object in the
> Windows Media Format SDK.
> 
> Here is the psuedocode for what I am trying to do:
> 
> I never get the chance to serve up any data to anyone as the Accept in the
> server thread never returns in this scenario.  Does this make things a
> little clearer.

  A little...
  I can't look at it in depth tonight, but here's a snippet of code from
my stuff.  It's unlikely that this will solve your problem, but it's all I
have time to do *right now*.  I'll try to dive in later.  This is all from
the windows media side of things, not the socket side of things.

ECS(data->port_cs);
sprintf(szUrl,"http://127.0.0.1:%i/%i",*data->port,key);
LCS(data->port_cs);

MultiByteToWideChar(CP_ACP,0,szUrl,-1,wsUrl,256);

//  create the WMA reader
hr = WMCreateReader(NULL, 0, &comReader);
if (hr!=S_OK) {ODS("Could not get a reader\n");}

//  open the reader, with cNoise->OnSample as the callback
ResetEvent(data->hWait);

hr = data->noise->QueryInterface(IID_IWMReaderCallback, (void **)
&comCallback);
if (hr!=S_OK) {ODS("cNoise couldn't be a callback\n");}

if (hr == E_NOINTERFACE) 
  {ODS("No Interface?  (hmmm)\n");}
if (hr == REGDB_E_CLASSNOTREG)  
  {ODS("Class not registered.  (oh fuck)\n");}
if (hr == CLASS_E_NOAGGREGATION) 
  {ODS("Class can not be aggregated.  (huh?)\n");}

hr = comReader->Open(wsUrl, comCallback, 0);
if (hr!=S_OK) {ODS("Could not open the reader\n");}

WaitForSingleObject(data->hWait, INFINITE);

  data->hWait gets set by the object data->noise, which implements the
callback, which is called by the system during opening:

STDMETHODIMP CSound::OnStatus( 
/* [in] */ WMT_STATUS Status,
/* [in] */ HRESULT hr,
/* [in] */ WMT_ATTR_DATATYPE dwType,
/* [in] */ BYTE __RPC_FAR *pValue,
/* [in] */ void __RPC_FAR *pvContext)
{
//  ODS("OnStatus\n");
switch (Status)  {
case WMT_OPENED:  ODS("OnStatus(WMT_OPENED)\n");
HANDLE hWait;
hWait =
OpenEvent(EVENT_MODIFY_STATE,FALSE,"windowsmedia_open");
  SetEvent(hWait);
  break;

  there are a bunch of other cases that you should consider processing,
and a similar function:

STDMETHODIMP CSound::OnSample( 
/* [in] */ DWORD dwOutputNum,
/* [in] */ QWORD cnsSampleTime,
/* [in] */ QWORD cnsSampleDuration,
/* [in] */ DWORD dwFlags,
/* [in] */ INSSBuffer __RPC_FAR *pSample,
/* [in] */ void __RPC_FAR *pvContext)
{
//  ODS("OnSample\n");
//  ODS("on sample\n");
struct sound *s;
s = (struct sound *)CoTaskMemAlloc(sizeof(struct sound));
unsigned char *in;

pSample->GetBufferAndLength(&in,&(s->size));

  which is called for each sample.

  If this helps at all, tell me.  If it doesn't help at all, tell me that
too.  Oh, ODS is a macro for outputdebugstring, and ECS/LCS are enter
critical section and leave critical section.  Neither have any real effect
on the code, at least not the part you're trying to understand.

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-30 Thread Ed Patriquin


Let's sync up.

Goal: Provide an arbitrary byte stream to the IWMReader object in the
Windows Media Format SDK.

Here is the psuedocode for what I am trying to do:


Main processServer Thread  
 RdrCallBack
Setup my input stream.
Start server thread
Create Socket (CSocket.Create())
Get port number I will listen on 
(m_portno)
Listen on Socket (CSocket.Listen ())
Accept Connections (CSocket.Accept 
(&Socket))
Cons up a URL i.e. http://127.0.0.1:m_portno/file.wma
Change into a Wide-Char string (wstr)
Open Reader (WMCreateReader(&RdrObj))
Try to open File (RdrObj.Open(wstr, &callback))
   
 OnStatus (WMT_LOCATING)
   
 OnStatus (WMT_CONNECTING)
   
 OnStatus (WMT_OPEN) err = 0xc00d002b

I never get the chance to serve up any data to anyone as the Accept in the
server thread never returns in this scenario.  Does this make things a
little clearer.

Ed Patriquin

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-30 Thread shren

On Tue, 30 May 2000, Ed Patriquin wrote:

> OK, I'm confused now.

  I'm getting there.

> If I try to use the MMS protocol as in "mms://localhost:portno/file.wma", I
> receive a packet but do not know how to decode it and respond.

  MMS == ???;  I've never heard of it, not being a native windows coder
untill about 3 months ago.

> If I use HTTP, as you suggested, as in "http://localhost:portno/file.wma", I
> DO NOT receive a packet but get error 0xC00D002B or NS_E_INVALID_REQUEST.

  Let's talk about what you mean by use HTTP.  When I say, HTTP, I'm
getting a socket from the os, throwing together a header, sending the
header, then sending the binary data.  I'm essentially assemblng a web
page and sending it out.  Is this what you mean by HTTP?  Or is there some
API you are using that I don't know about?  Here's my header, BTW, I
recall I had some trouble making WMA happy:

"
HTTP/1.1 200 OK\r\n
Server: Stupid-Loopback-0.2\r\n
Content-Type: audio\r\n
\r\n
"

  All newlines are for readiblity only.

> If I use an external host, to monitor packet transmission, as in
> "http://192.168.1.250:portno/file.wma" I don't see any packets, but I
> eventually time out with the NS_E_INVALID_REQUEST error.

  Uh, hmm.  There's a good code sample in an SDK somewhere, one much of my
code is based on.  It's C:\WMSDK\WMFSDK\samples on my system, you're
looking for windows media format SDK - probably from microsoft.  There's
also a DLL that you have to link to in that heirarchy as I recall.

> I am sure that I am missing something fundamental and simple.  Any guidance?

  Let's try to get on the same level here.  The samples above are good and
have source code.  I don't remember having any of the errors you are
describing.

  I wish I could send you my code but I wrote it for a company and it
can't go out - but if you're writing for FreeAmp then I could look at
yours.

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-30 Thread Ed Patriquin


OK, I'm confused now.

If I try to use the MMS protocol as in "mms://localhost:portno/file.wma", I
receive a packet but do not know how to decode it and respond.

If I use HTTP, as you suggested, as in "http://localhost:portno/file.wma", I
DO NOT receive a packet but get error 0xC00D002B or NS_E_INVALID_REQUEST.

If I use an external host, to monitor packet transmission, as in
"http://192.168.1.250:portno/file.wma" I don't see any packets, but I
eventually time out with the NS_E_INVALID_REQUEST error.

I tried the same things with the Microsoft sample apps and the results were
consistent.

I do get a packet when I use the address in my browser.

I am sure that I am missing something fundamental and simple.  Any guidance?

Ed Patriquin

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-30 Thread shren

On Mon, 29 May 2000, Ed Patriquin wrote:

> I have hacked in some loopback code.  When I use a
> "http://127.0.0.1:portno/file" format I get an INVALID_REQUEST error.  If I
> use "mms://" I get the packets, but can't find how to act like an MMS
> server.  If I use other prefixes, I get bad protocol errors.  What protocol
> did you use on your loopback connection?

  HTTP.  The big thing that got me, and might be getting you, is that the
WMA code gets the file twice.  It connects to the socket the first time,
reads about 20 to 40 k bytes, drops the connection, and starts over,
reading the whole file from the beginning the second time.

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-29 Thread Ed Patriquin

I have hacked in some loopback code.  When I use a
"http://127.0.0.1:portno/file" format I get an INVALID_REQUEST error.  If I
use "mms://" I get the packets, but can't find how to act like an MMS
server.  If I use other prefixes, I get bad protocol errors.  What protocol
did you use on your loopback connection?

Ed Patriquin

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of shren
> Sent: Friday, May 26, 2000 12:00 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Support for other file formats
>
>
> On Fri, 26 May 2000, Ed Patriquin wrote:
>
> > I did an experimental version based on 2.06.  The problem I ran
> into was the
> > need for a temporary file.  I couldn't find a way to hook up
> the WMA classes
> > to the streaming input.  The WMA classes seem to be designed to
> only work
> > with files.  I didn't make it more widely available because
> this limitation
> > made it inconsistent with FreeAmp's architecture.
>
>   I hacked around this problem by supplying the WMA data on a loopback
> socket, then giving WMA a URL to the loopback interface.  It's a hack, but
> I had to solve the problem somehow for work.
>
> ___
> [EMAIL PROTECTED]
> http://www.freeamp.org/mailman/listinfo/freeamp-dev
>

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



Re: Support for other file formats

2000-05-26 Thread Mayhem & Chaos Coordinator

We've recently added support for Vorbis (http://www.xiph.org) and I will
also write a plugin that will do WAV files. However, that's the extend of it
right now


--ruaok   Hindsight is always 50/50.

Robert Kaye -- [EMAIL PROTECTED]  http://www.emusic.com
- Original Message -
From: Karl Ove Hufthammer <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 26, 2000 6:57 AM
Subject: Support for other file formats


> Are there any plans for supporting other music file formats (.mid, .xm,
> .mod)?
>
> --
> Karl Ove Hufthammer
>
>
> ___
> [EMAIL PROTECTED]
> http://www.freeamp.org/mailman/listinfo/freeamp-dev
>

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



Re: Support for other file formats

2000-05-26 Thread Mark Elrod

We are not gonna add WMA ourselves but if you write a plugin we could help
guide you.

elrod

shren wrote:

> On Fri, 26 May 2000, Karl Ove Hufthammer wrote:
>
> > Are there any plans for supporting other music file formats (.mid, .xm,
> > .mod)?
>
>   .wma, perhaps?  I mention that one only because I know most of what's
> needed to code it (at least for Win32).
>
> ___
> [EMAIL PROTECTED]
> http://www.freeamp.org/mailman/listinfo/freeamp-dev

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-26 Thread shren

On Fri, 26 May 2000, Ed Patriquin wrote:

> I did an experimental version based on 2.06.  The problem I ran into was the
> need for a temporary file.  I couldn't find a way to hook up the WMA classes
> to the streaming input.  The WMA classes seem to be designed to only work
> with files.  I didn't make it more widely available because this limitation
> made it inconsistent with FreeAmp's architecture.

  I hacked around this problem by supplying the WMA data on a loopback
socket, then giving WMA a URL to the loopback interface.  It's a hack, but
I had to solve the problem somehow for work.

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-26 Thread Ed Patriquin

I did an experimental version based on 2.06.  The problem I ran into was the
need for a temporary file.  I couldn't find a way to hook up the WMA classes
to the streaming input.  The WMA classes seem to be designed to only work
with files.  I didn't make it more widely available because this limitation
made it inconsistent with FreeAmp's architecture.

Ed Patriquin
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of shren
> Sent: Friday, May 26, 2000 11:18 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Support for other file formats
>
>
> On Fri, 26 May 2000, Karl Ove Hufthammer wrote:
>
> > Are there any plans for supporting other music file formats (.mid, .xm,
> > .mod)?
>
>   .wma, perhaps?  I mention that one only because I know most of what's
> needed to code it (at least for Win32).
>
> ___
> [EMAIL PROTECTED]
> http://www.freeamp.org/mailman/listinfo/freeamp-dev
>

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



RE: Support for other file formats

2000-05-26 Thread Antonio Banderas

Now I work over voice in realtime over IP... but for future I'll try to
create and player ...

---
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com


___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



Re: Support for other file formats

2000-05-26 Thread shren

On Fri, 26 May 2000, Karl Ove Hufthammer wrote:

> Are there any plans for supporting other music file formats (.mid, .xm,
> .mod)?

  .wma, perhaps?  I mention that one only because I know most of what's
needed to code it (at least for Win32).

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev