phplay plugin programming problem

Hi
I’m trying to make a XMP plugin for Phplay but unfortunatly the docs doesn’t explain what i should do with the CMD_PLUGIN_CLOSE call, i understand that it’s called before a file that use the same plugin is opened. The phabplugin1 example segfault if trying to open another file that use that plugin so it won’t help me.
Anyone could explain what I need to do when i get that signal?

Thanks

/Johan

In my plugins, I normally check for state playing or paused and call
the stop routine. The state should be set to MV_STOPPED at
the end. When phplay sees the stop it should send an OPENURL command.
Remember that stopping should close out all playing threads and
leave you with just the basic player state. I will look at this again
at work and give you more info tomorrow.
Good Luck
Jim
“phearbear” <phearbear@qnxstart.com> wrote in message
news:Voyager.010129181539.1581090A@buffelboff…

Hi
I’m trying to make a XMP plugin for Phplay but unfortunatly the docs
doesn’t explain what i should do with the CMD_PLUGIN_CLOSE call, i

understand that it’s called before a file that use the same plugin is
opened. The phabplugin1 example segfault if trying to open another file that
use that plugin so it won’t help me.

Anyone could explain what I need to do when i get that signal?

Thanks

/Johan

Correction, after calling your stop routine (which should set the state
to MV_STOPPED), set the state to MV_CLOSED. Then the player
will send OpenUrl.
I see that the state transition diagram in the docs is not
clear on this point. Thanks for the tip.
Jim


“James Boucher” <jaboucher@home.com> wrote in message
news:Bznd6.15413$KP3.4938667@news3.rdc1.on.home.com

In my plugins, I normally check for state playing or paused and call
the stop routine. The state should be set to MV_STOPPED at
the end. When phplay sees the stop it should send an OPENURL command.
Remember that stopping should close out all playing threads and
leave you with just the basic player state. I will look at this again
at work and give you more info tomorrow.
Good Luck
Jim
“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010129181539.1581090A@buffelboff…
Hi
I’m trying to make a XMP plugin for Phplay but unfortunatly the docs
doesn’t explain what i should do with the CMD_PLUGIN_CLOSE call, i
understand that it’s called before a file that use the same plugin is
opened. The phabplugin1 example segfault if trying to open another file
that
use that plugin so it won’t help me.
Anyone could explain what I need to do when i get that signal?

Thanks

/Johan

“James Boucher” <jaboucher@home.com> wrote in message
news:zBud6.18387$KP3.5807229@news3.rdc1.on.home.com

“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010129181539.1581090A@buffelboff…
Hi
I’m trying to make a XMP plugin for Phplay

If you are creating an XMPS plugin to play RIFF/AVI files (ie.
ProjectMayo)

I have been looking a that. The divx library was just a recompile, no
problem what so ever. I’m looking into this in my free time.
At the moment I’m learn about the plug-in stuff and i’m still
a bit confuse :wink:

you should call the plugin avi.so to ensure compatibility with
libmedia in the next patch.

As well, any Quicktime plugins should
be called qt.so. We added some filtering out of these
two unsupported data
types as people keep posting RIFF/AVI and .mov files with .mpg
file extensions. If you name them as I suggest, you will be able
to bypass this filtering.

What data types were you planning on assigning to this plugin?
Perhaps I should alter this modification as it may restrict
things needlessly. What do you think?

Jim


but unfortunatly the docs doesn’t explain what i should do with the
CMD_PLUGIN_CLOSE >call, i understand that it’s called before a file that
use
the same plugin is opened. The >phabplugin1 example segfault if trying to
open another file that use that plugin so it won’t help >me.
Anyone could explain what I need to do when i get that signal?

Thanks

/Johan

Hi
thanks to your reply but I’m still a littile confused…
Am i supposed to close the pane/gui? (how?)
is openurl suppose to check if the pane is working and if not create it again?
changing the status so it is MV_CLOSED when i only have closed down my player threads it calls openurls and opens the new file, but my pane is gone and soon after (when clicking something or waiting for a while) it segfault…

Thanks again
/Johan


Previously, James Boucher wrote in comp.os.qnx:

Correction, after calling your stop routine (which should set the state
to MV_STOPPED), set the state to MV_CLOSED. Then the player
will send OpenUrl.
I see that the state transition diagram in the docs is not
clear on this point. Thanks for the tip.
Jim


“James Boucher” <> jaboucher@home.com> > wrote in message
news:Bznd6.15413$> KP3.4938667@news3.rdc1.on.home.com> …
In my plugins, I normally check for state playing or paused and call
the stop routine. The state should be set to MV_STOPPED at
the end. When phplay sees the stop it should send an OPENURL command.
Remember that stopping should close out all playing threads and
leave you with just the basic player state. I will look at this again
at work and give you more info tomorrow.
Good Luck
Jim
“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010129181539.1581090A@buffelboff…
Hi
I’m trying to make a XMP plugin for Phplay but unfortunatly the docs
doesn’t explain what i should do with the CMD_PLUGIN_CLOSE call, i
understand that it’s called before a file that use the same plugin is
opened. The phabplugin1 example segfault if trying to open another file
that
use that plugin so it won’t help me.
Anyone could explain what I need to do when i get that signal?

Thanks

/Johan


\

Do you still crash if you do not set the SPANE flag in MvInit?
“James Boucher” <jaboucher@home.com> wrote in message
news:UQHd6.22720$KP3.6653157@news3.rdc1.on.home.com

Angelo says: (see below)
He will look for a bug on thursday when he gets back from vacation.
Jim

“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010130153937.5451816A@buffelboff…
Hi
thanks to your reply but I’m still a littile confused…
Am i supposed to close the pane/gui? (how?)

phplay creates a PtPane widget and hands it over to
the plugin. You have to close the widgets that
you create inside it, but phplay will handle the PtPane
container.

is openurl suppose to check if the pane is working and if not create it
again?

No, don’t create it (PtPane). If it is not there and you have not closed
it
mistakenly,
then there is a bug in phplay probably.

changing the status so it is MV_CLOSED when i only have closed down my
player threads it calls openurls and opens the new file, but my pane is
gone
and soon after (when clicking something or waiting for a while) it
segfault…

Please confirm you have not closed the pane.


Thanks again
/Johan


Previously, James Boucher wrote in comp.os.qnx:
Correction, after calling your stop routine (which should set the
state
to MV_STOPPED), set the state to MV_CLOSED. Then the player
will send OpenUrl.
I see that the state transition diagram in the docs is not
clear on this point. Thanks for the tip.
Jim


“James Boucher” <> jaboucher@home.com> > wrote in message
news:Bznd6.15413$> KP3.4938667@news3.rdc1.on.home.com> …
In my plugins, I normally check for state playing or paused and call
the stop routine. The state should be set to MV_STOPPED at
the end. When phplay sees the stop it should send an OPENURL
command.
Remember that stopping should close out all playing threads and
leave you with just the basic player state. I will look at this
again
at work and give you more info tomorrow.
Good Luck
Jim
“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010129181539.1581090A@buffelboff…
Hi
I’m trying to make a XMP plugin for Phplay but unfortunatly the
docs
doesn’t explain what i should do with the CMD_PLUGIN_CLOSE call, i
understand that it’s called before a file that use the same plugin
is
opened. The phabplugin1 example segfault if trying to open another
file
that
use that plugin so it won’t help me.
Anyone could explain what I need to do when i get that signal?

Thanks

/Johan





\

Hi , i did some quick test to try it without the spane flag (had to comment out louds of my code) and it seemed to work ok
well, might be that I don’t close down my own widgets, going to try that now.
And yes i’m very certain that i don’t close the spane widget.
Will report back if it helps

/Johan

Previously, James Boucher wrote in comp.os.qnx:

Do you still crash if you do not set the SPANE flag in MvInit?
“James Boucher” <> jaboucher@home.com> > wrote in message
news:UQHd6.22720$> KP3.6653157@news3.rdc1.on.home.com> …
Angelo says: (see below)
He will look for a bug on thursday when he gets back from vacation.
Jim

“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010130153937.5451816A@buffelboff…
Hi
thanks to your reply but I’m still a littile confused…
Am i supposed to close the pane/gui? (how?)

phplay creates a PtPane widget and hands it over to
the plugin. You have to close the widgets that
you create inside it, but phplay will handle the PtPane
container.

is openurl suppose to check if the pane is working and if not create it
again?

No, don’t create it (PtPane). If it is not there and you have not closed
it
mistakenly,
then there is a bug in phplay probably.

changing the status so it is MV_CLOSED when i only have closed down my
player threads it calls openurls and opens the new file, but my pane is
gone
and soon after (when clicking something or waiting for a while) it
segfault…

Please confirm you have not closed the pane.


Thanks again
/Johan


Previously, James Boucher wrote in comp.os.qnx:
Correction, after calling your stop routine (which should set the
state
to MV_STOPPED), set the state to MV_CLOSED. Then the player
will send OpenUrl.
I see that the state transition diagram in the docs is not
clear on this point. Thanks for the tip.
Jim


“James Boucher” <> jaboucher@home.com> > wrote in message
news:Bznd6.15413$> KP3.4938667@news3.rdc1.on.home.com> …
In my plugins, I normally check for state playing or paused and call
the stop routine. The state should be set to MV_STOPPED at
the end. When phplay sees the stop it should send an OPENURL
command.
Remember that stopping should close out all playing threads and
leave you with just the basic player state. I will look at this
again
at work and give you more info tomorrow.
Good Luck
Jim
“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010129181539.1581090A@buffelboff…
Hi
I’m trying to make a XMP plugin for Phplay but unfortunatly the
docs
doesn’t explain what i should do with the CMD_PLUGIN_CLOSE call, i
understand that it’s called before a file that use the same plugin
is
opened. The phabplugin1 example segfault if trying to open another
file
that
use that plugin so it won’t help me.
Anyone could explain what I need to do when i get that signal?

Thanks

/Johan








\

Previously, phearbear wrote in comp.os.qnx:

Hi , i did some quick test to try it without the spane flag (had to comment out louds of my code) and it seemed to work ok
well, might be that I don’t close down my own widgets, going to try that now.
And yes i’m very certain that i don’t close the spane widget.
Will report back if it helps

/Johan

Previously, James Boucher wrote in comp.os.qnx:
Do you still crash if you do not set the SPANE flag in MvInit?
“James Boucher” <> jaboucher@home.com> > wrote in message
news:UQHd6.22720$> KP3.6653157@news3.rdc1.on.home.com> …
Angelo says: (see below)
He will look for a bug on thursday when he gets back from vacation.
Jim

“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010130153937.5451816A@buffelboff…
Hi
thanks to your reply but I’m still a littile confused…
Am i supposed to close the pane/gui? (how?)

phplay creates a PtPane widget and hands it over to
the plugin. You have to close the widgets that
you create inside it, but phplay will handle the PtPane
container.

is openurl suppose to check if the pane is working and if not create it
again?

No, don’t create it (PtPane). If it is not there and you have not closed
it
mistakenly,
then there is a bug in phplay probably.

changing the status so it is MV_CLOSED when i only have closed down my
player threads it calls openurls and opens the new file, but my pane is
gone
and soon after (when clicking something or waiting for a while) it
segfault…

Please confirm you have not closed the pane.


Thanks again
/Johan


Previously, James Boucher wrote in comp.os.qnx:
Correction, after calling your stop routine (which should set the
state
to MV_STOPPED), set the state to MV_CLOSED. Then the player
will send OpenUrl.
I see that the state transition diagram in the docs is not
clear on this point. Thanks for the tip.
Jim


“James Boucher” <> jaboucher@home.com> > wrote in message
news:Bznd6.15413$> KP3.4938667@news3.rdc1.on.home.com> …
In my plugins, I normally check for state playing or paused and call
the stop routine. The state should be set to MV_STOPPED at
the end. When phplay sees the stop it should send an OPENURL
command.
Remember that stopping should close out all playing threads and
leave you with just the basic player state. I will look at this
again
at work and give you more info tomorrow.
Good Luck
Jim
“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010129181539.1581090A@buffelboff…
Hi
I’m trying to make a XMP plugin for Phplay but unfortunatly the
docs
doesn’t explain what i should do with the CMD_PLUGIN_CLOSE call, i
understand that it’s called before a file that use the same plugin
is
opened. The phabplugin1 example segfault if trying to open another
file
that
use that plugin so it won’t help me.
Anyone could explain what I need to do when i get that signal?

Thanks

/Johan











\

Hi again

been playing around now
not sure what you mean with “Close the widgets” but i assume i only need to unrealize them and I unrealize a group with all the spane’s widgets. (from what i understand that should unrealize all of them)
uncommenting all my code that updates the gui and it works great except for that there are no spane :frowning:

with CMD_PLUGIN_CLOSE i do
:
//shutting down all my audio parts…
PtUnrealizeWidget(ABW_widget_group);
pluginStatus.state=MV_CLOSED;
pctrl->cb(pctrl,MVS_PLUGIN_STATE,&pluginStatus);


I note that phplay call CMD_PLUGIN_SET_GUI_STATUS before it close… and that one i only use to check if the repeat button is clicked or not?( in the docs it say “Tell the plugin how the media player expects to be told of GUI changes(the value of MvRepeatType_t repeatType).” Am i using this one for the wrong thing or is this some weird bug in the docs? ) doing something wrong herE?
it also call MVP_DELTA and i do nothing here… what should i do here?
probably doing some silly misstake… thanks for trying to help =))

/Johan

Angelo checked out the SPANE on close issue and found /fixed
a bug in phplay. I have be authorized to send you a binary
for phplay so you can continue work. Can you take a large
attachment to phearbear@qnxstart.com?

Jim

“phearbear” <phearbear@qnxstart.com> wrote in message
news:Voyager.010131213353.466984C@buffelboff…

Previously, phearbear wrote in comp.os.qnx:
Hi , i did some quick test to try it without the spane flag (had to
comment out louds of my code) and it seemed to work ok
well, might be that I don’t close down my own widgets, going to try that
now.
And yes i’m very certain that i don’t close the spane widget.
Will report back if it helps

/Johan

Previously, James Boucher wrote in comp.os.qnx:
Do you still crash if you do not set the SPANE flag in MvInit?
“James Boucher” <> jaboucher@home.com> > wrote in message
news:UQHd6.22720$> KP3.6653157@news3.rdc1.on.home.com> …
Angelo says: (see below)
He will look for a bug on thursday when he gets back from
vacation.
Jim

“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010130153937.5451816A@buffelboff…
Hi
thanks to your reply but I’m still a littile confused…
Am i supposed to close the pane/gui? (how?)

phplay creates a PtPane widget and hands it over to
the plugin. You have to close the widgets that
you create inside it, but phplay will handle the PtPane
container.

is openurl suppose to check if the pane is working and if not
create it
again?

No, don’t create it (PtPane). If it is not there and you have not
closed
it
mistakenly,
then there is a bug in phplay probably.

changing the status so it is MV_CLOSED when i only have closed
down my
player threads it calls openurls and opens the new file, but my pane
is
gone
and soon after (when clicking something or waiting for a while) it
segfault…

Please confirm you have not closed the pane.


Thanks again
/Johan


Previously, James Boucher wrote in comp.os.qnx:
Correction, after calling your stop routine (which should set
the
state
to MV_STOPPED), set the state to MV_CLOSED. Then the player
will send OpenUrl.
I see that the state transition diagram in the docs is not
clear on this point. Thanks for the tip.
Jim


“James Boucher” <> jaboucher@home.com> > wrote in message
news:Bznd6.15413$> KP3.4938667@news3.rdc1.on.home.com> …
In my plugins, I normally check for state playing or paused
and call
the stop routine. The state should be set to MV_STOPPED at
the end. When phplay sees the stop it should send an
OPENURL
command.
Remember that stopping should close out all playing threads
and
leave you with just the basic player state. I will look at
this
again
at work and give you more info tomorrow.
Good Luck
Jim
“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010129181539.1581090A@buffelboff…
Hi
I’m trying to make a XMP plugin for Phplay but unfortunatly
the
docs
doesn’t explain what i should do with the CMD_PLUGIN_CLOSE
call, i
understand that it’s called before a file that use the same
plugin
is
opened. The phabplugin1 example segfault if trying to open
another
file
that
use that plugin so it won’t help me.
Anyone could explain what I need to do when i get that
signal?

Thanks

/Johan















Hi again

been playing around now
not sure what you mean with “Close the widgets” but i assume i only need
to unrealize them and I unrealize a group with all the spane’s widgets.

(from what i understand that should unrealize all of them)

uncommenting all my code that updates the gui and it works great except
for that there are no spane > :frowning:

with CMD_PLUGIN_CLOSE i do
:
//shutting down all my audio parts…
PtUnrealizeWidget(ABW_widget_group);
pluginStatus.state=MV_CLOSED;
pctrl->cb(pctrl,MVS_PLUGIN_STATE,&pluginStatus);


I note that phplay call CMD_PLUGIN_SET_GUI_STATUS before it close… and
that one i only use to check if the repeat button is clicked or not?( in the

docs it say “Tell the plugin how the media player expects to be told of GUI
changes(the value of MvRepeatType_t repeatType).” Am i using this one for
the wrong thing or is this some weird bug in the docs? ) doing something
wrong herE?

it also call MVP_DELTA and i do nothing here… what should i do here?
probably doing some silly misstake… thanks for trying to help =))

/Johan



\

yes that should work ok.
thanks alot! both you and Angelo



Previously, James Boucher wrote in comp.os.qnx:

Angelo checked out the SPANE on close issue and found /fixed
a bug in phplay. I have be authorized to send you a binary
for phplay so you can continue work. Can you take a large
attachment to > phearbear@qnxstart.com> ?

Jim

“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010131213353.466984C@buffelboff…
Previously, phearbear wrote in comp.os.qnx:
Hi , i did some quick test to try it without the spane flag (had to
comment out louds of my code) and it seemed to work ok
well, might be that I don’t close down my own widgets, going to try that
now.
And yes i’m very certain that i don’t close the spane widget.
Will report back if it helps

/Johan

Previously, James Boucher wrote in comp.os.qnx:
Do you still crash if you do not set the SPANE flag in MvInit?
“James Boucher” <> jaboucher@home.com> > wrote in message
news:UQHd6.22720$> KP3.6653157@news3.rdc1.on.home.com> …
Angelo says: (see below)
He will look for a bug on thursday when he gets back from
vacation.
Jim

“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010130153937.5451816A@buffelboff…
Hi
thanks to your reply but I’m still a littile confused…
Am i supposed to close the pane/gui? (how?)

phplay creates a PtPane widget and hands it over to
the plugin. You have to close the widgets that
you create inside it, but phplay will handle the PtPane
container.

is openurl suppose to check if the pane is working and if not
create it
again?

No, don’t create it (PtPane). If it is not there and you have not
closed
it
mistakenly,
then there is a bug in phplay probably.

changing the status so it is MV_CLOSED when i only have closed
down my
player threads it calls openurls and opens the new file, but my pane
is
gone
and soon after (when clicking something or waiting for a while) it
segfault…

Please confirm you have not closed the pane.


Thanks again
/Johan


Previously, James Boucher wrote in comp.os.qnx:
Correction, after calling your stop routine (which should set
the
state
to MV_STOPPED), set the state to MV_CLOSED. Then the player
will send OpenUrl.
I see that the state transition diagram in the docs is not
clear on this point. Thanks for the tip.
Jim


“James Boucher” <> jaboucher@home.com> > wrote in message
news:Bznd6.15413$> KP3.4938667@news3.rdc1.on.home.com> …
In my plugins, I normally check for state playing or paused
and call
the stop routine. The state should be set to MV_STOPPED at
the end. When phplay sees the stop it should send an
OPENURL
command.
Remember that stopping should close out all playing threads
and
leave you with just the basic player state. I will look at
this
again
at work and give you more info tomorrow.
Good Luck
Jim
“phearbear” <> phearbear@qnxstart.com> > wrote in message
news:Voyager.010129181539.1581090A@buffelboff…
Hi
I’m trying to make a XMP plugin for Phplay but unfortunatly
the
docs
doesn’t explain what i should do with the CMD_PLUGIN_CLOSE
call, i
understand that it’s called before a file that use the same
plugin
is
opened. The phabplugin1 example segfault if trying to open
another
file
that
use that plugin so it won’t help me.
Anyone could explain what I need to do when i get that
signal?

Thanks

/Johan















Hi again

been playing around now
not sure what you mean with “Close the widgets” but i assume i only need
to unrealize them and I unrealize a group with all the spane’s widgets.
(from what i understand that should unrealize all of them)
uncommenting all my code that updates the gui and it works great except
for that there are no spane > :frowning:

with CMD_PLUGIN_CLOSE i do
:
//shutting down all my audio parts…
PtUnrealizeWidget(ABW_widget_group);
pluginStatus.state=MV_CLOSED;
pctrl->cb(pctrl,MVS_PLUGIN_STATE,&pluginStatus);


I note that phplay call CMD_PLUGIN_SET_GUI_STATUS before it close… and
that one i only use to check if the repeat button is clicked or not?( in the
docs it say “Tell the plugin how the media player expects to be told of GUI
changes(the value of MvRepeatType_t repeatType).” Am i using this one for
the wrong thing or is this some weird bug in the docs? ) doing something
wrong herE?
it also call MVP_DELTA and i do nothing here… what should i do here?
probably doing some silly misstake… thanks for trying to help =))

/Johan






\