MultiMedia Interface (6.2.1) questions

bridged with qnx.rtos
Post Reply
Johan Björk

MultiMedia Interface (6.2.1) questions

Post by Johan Björk » Sun Jan 11, 2004 3:49 am

Hi everyone

I'm developing a filter for the MultiMedia interface (6.2.1) and I have
a few questions:

1) In AOStreamInspector 'RateStream', am I allowed to call 'Sniff' more
then once? I want to do this as a small hack to minimize my changes to
the mediaparsing library i'm using...

2) In AOExtInspector, what format does the extension come in?
(.myext or myext?)

Also,there seems to be a bug in the documentation,
AOAudioFormat_t->depth seems to be in BYTES, not BITS as the
documentation claim.

I also tried to write a small utility that printed out the resources of
every availible plugin, not sure if I did it the right way, attached my
program, any comments on that one would be great.
It results in FPE for several plugins when I call their GetResources()
function. And the window_writer.so crash my test utility unless I
PtInit()'ed.

Thanks in advance

/Johan Björk

Angelo Pennacchioli

Re: MultiMedia Interface (6.2.1) questions

Post by Angelo Pennacchioli » Thu Jan 15, 2004 5:57 pm

Hi, Johan


"Johan Björk" <phearbear@home.se> wrote in message
news:btqfp8$sbs$1@inn.qnx.com...
Hi everyone

I'm developing a filter for the MultiMedia interface (6.2.1) and I have
a few questions:

1) In AOStreamInspector 'RateStream', am I allowed to call 'Sniff' more
then once? I want to do this as a small hack to minimize my changes to
the mediaparsing library i'm using...
As long as you don't call streamer->read(),
you can call streamer->Sniff() as many times as you want.



2) In AOExtInspector, what format does the extension come in?
(.myext or myext?)
..myext
Also,there seems to be a bug in the documentation,
AOAudioFormat_t->depth seems to be in BYTES, not BITS as the
documentation claim.
You are right.
the docs will be corrected.
I also tried to write a small utility that printed out the resources of
every availible plugin, not sure if I did it the right way, attached my
program, any comments on that one would be great.
It results in FPE for several plugins when I call their GetResources()
function. And the window_writer.so crash my test utility unless I
PtInit()'ed.
the window_writer.so filter has a photon dependency and
needs the widget library initialized.

Your program is OK.
Your use of the api is correct.
I have to check why some of the filters are FPE ing.

Regards,
Angelo.

Thanks in advance

/Johan Björk
----------------------------------------------------------------------------
----

#include <stdio.h
#include <mmedia/mmedia.h


int main()
{
int32_t cookie=0;
AOResourceAccess *ras;
AOResource_t *res;
AODeConstructor *constructor;
AOICtrl_t *ctrl;
void *ctx;
int n=0;

PtInit(NULL);
MmInitialize(NULL);

while(ctrl = AoIterate(NULL,0,&cookie)) {
AoHold(ctrl);

constructor =
AoGetInterface(ctrl,"AODeConstructor",AODECONSTRUCTOR_VERSION,0);
if(constructor)
ctx = constructor->Create(NULL);
else
ctx=NULL;

if(ras =
AoGetInterface(ctrl,"AOResourceAccess",AORESOURCEACCESS_VERSION,0))
{
if(res=ras->GetResources(ctx))
{
for(;res->name;res++)
{
fprintf(stderr,"%s\n",res->name);
}
}
n++;
}
AoRelease(ctrl);
}


}

Johan Björk

Re: MultiMedia Interface (6.2.1) questions

Post by Johan Björk » Fri Jan 16, 2004 8:28 am

Hi

"Angelo Pennacchioli" <apennacchioli@qnx.com> skrev i meddelandet
news:bu6ivf$5a2$1@inn.qnx.com...
Hi, Johan


"Johan Björk" <phearbear@home.se> wrote in message
news:btqfp8$sbs$1@inn.qnx.com...
Hi everyone

I'm developing a filter for the MultiMedia interface (6.2.1) and I have
a few questions:

1) In AOStreamInspector 'RateStream', am I allowed to call 'Sniff' more
then once? I want to do this as a small hack to minimize my changes to
the mediaparsing library i'm using...

As long as you don't call streamer->read(),
you can call streamer->Sniff() as many times as you want.

Excellent!



2) In AOExtInspector, what format does the extension come in?
(.myext or myext?)
.myext
Oups, great to know that, It'd be neat if the docs would mention this!

Also,there seems to be a bug in the documentation,
AOAudioFormat_t->depth seems to be in BYTES, not BITS as the
documentation claim.

You are right.
the docs will be corrected.
Neato


I also tried to write a small utility that printed out the resources of
every availible plugin, not sure if I did it the right way, attached my
program, any comments on that one would be great.
It results in FPE for several plugins when I call their GetResources()
function. And the window_writer.so crash my test utility unless I
PtInit()'ed.

the window_writer.so filter has a photon dependency and
needs the widget library initialized.

Your program is OK.
Your use of the api is correct.
I have to check why some of the filters are FPE ing.

Great! Please keep me updated on this if possible.

Post Reply

Return to “qnx.rtos”