List Info

Thread: Getting Media Duration




Getting Media Duration
user name
2006-06-07 00:52:15
Milko,
 
Are you referring specifically to this state diagram?
https://helix-client.helixcommunity.org/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation_files/image003.gif

Yes.

 
In this diagram, it looks like the player will move from the READY to the PREFETCHED state after calling OpenURL()/OpenRequest(). Somewhere during this call, OnPosLength() should be called, however, I don't see this happening when testing. The first call I see to OnPosLength() is made after calling Begin(). Additionally, OnPresentationOpened() and OnBuffering() are called after Begin() as well.
 
This behavior doesn't seem to support the state diagram. Could you clarify this for me?

It does, you are just calling Begin() early (prior to player entering PREFETCHED state) which causes begin to be effectively queued and applied only when player reaches the PREFTECHED state.
That is a proper approach if you wish to minimize playback start-up time as calling Begin() early will simply cause player to automatically transition from PREFETCHED to PLAYING state.

All my comments below apply.

Milko

 
Thanks,
Angus

Date: Sat, 3 Jun 2006 16:32:53 -0700
To: ahuang13hotmail.com; Helix-client-devhelixcommunity.org; Player-devhelixcommunity.org
From: milkoreal.com
Subject: Re: [Helix-client-dev] Getting Media Duration


OnPosLength is called as soon as the duration is known.  This occurs when player enters connected state (equivalent of realized state in JSR135).

It is not possible to obtain duration of media before the initial OnPosLength() call.

Refer to Helix DNA Client state machine in section 2.5.1. of below document for more information:
https://helix-client.helixcommunity.org/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation.html

Milko

At 10:31 AM 6/2/2006, Angus Huang wrote:
Hi Helix experts,

Can somebody explain how to get the duration/length of the media (e.g. an MP3) from a player?

I noticed in the jsr135 project, the duration was determined by using IHXClientAdviseSink::OnPosLength(...), which receives the duration from the Helix engine. However, I would like to know the length of the MP3 immediately after the data is loaded on the player (i.e. pPlayer2->OpenRequest(m_pRequest)) without having to wait for OnPosLength(...) to be called. Is there any API available to do this?

Thanks,

- Angus




Express yourself instantly with MSN Messenger! MSN Messenger
_______________________________________________
Helix-client-dev mailing list
Helix-client-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev




Express yourself instantly with MSN Messenger! MSN Messenger
Getting Media Duration
user name
2006-06-08 00:21:20
I'm a bit lost regarding if this is for JSR135 or straight
Helix interface 
use but if you're calling Helix APIs cannot you use the
client registry to 
get the duration once "OnPresentationOpened" is
called?

JEff

At 05:52 PM 6/6/2006, Milko Boic wrote:
>At 05:40 PM 6/6/2006, Angus Huang wrote:
>>Milko,
>>
>>Are you referring specifically to this state
diagram?
>><https://helix-client.hel
ixcommunity.org/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation_
files/image003.gif>https://helix-client.helixcommunity.or
g/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation_files/image003
.gif 
>>
>
>Yes.
>
>>
>>In this diagram, it looks like the player will move
from the READY to the 
>>PREFETCHED state after calling
OpenURL()/OpenRequest(). Somewhere during 
>>this call, OnPosLength() should be called, however,
I don't see this 
>>happening when testing. The first call I see to
OnPosLength() is made 
>>after calling Begin(). Additionally,
OnPresentationOpened() and 
>>OnBuffering() are called after Begin() as well.
>>
>>This behavior doesn't seem to support the state
diagram. Could you 
>>clarify this for me?
>
>It does, you are just calling Begin() early (prior to
player entering 
>PREFETCHED state) which causes begin to be effectively
queued and applied 
>only when player reaches the PREFTECHED state.
>That is a proper approach if you wish to minimize
playback start-up time 
>as calling Begin() early will simply cause player to
automatically 
>transition from PREFETCHED to PLAYING state.
>
>All my comments below apply.
>
>Milko


_______________________________________________
Helix-client-dev mailing list
Helix-client-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinf
o/helix-client-dev
Getting Media Duration
user name
2006-06-08 01:51:48
Client registry contains ancillary information about media
not crucial for 
precise player control.  It is an optional component of the
engine.
Duration of the media is fundamentally needed for precise
player control 
and would be very inadvisable for an application to rely on
presence of 
registry to achieve it.  If that was indeed needed we would
need to take 
corrective action.

OnPosLength is reported prior to OnPresentationOpened().

Milko


At 05:21 PM 6/7/2006, Jeff Ayars wrote:
>I'm a bit lost regarding if this is for JSR135 or
straight Helix interface 
>use but if you're calling Helix APIs cannot you use the
client registry to 
>get the duration once "OnPresentationOpened"
is called?
>
>JEff
>
>At 05:52 PM 6/6/2006, Milko Boic wrote:
>>At 05:40 PM 6/6/2006, Angus Huang wrote:
>>>Milko,
>>>
>>>Are you referring specifically to this state
diagram?
>>><https://helix-client.hel
ixcommunity.org/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation_
files/image003.gif>https://helix-client.helixcommunity.or
g/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation_files/image003
.gif 
>>>
>>
>>Yes.
>>
>>>
>>>In this diagram, it looks like the player will
move from the READY to 
>>>the PREFETCHED state after calling
OpenURL()/OpenRequest(). Somewhere 
>>>during this call, OnPosLength() should be
called, however, I don't see 
>>>this happening when testing. The first call I
see to OnPosLength() is 
>>>made after calling Begin(). Additionally,
OnPresentationOpened() and 
>>>OnBuffering() are called after Begin() as well.
>>>
>>>This behavior doesn't seem to support the state
diagram. Could you 
>>>clarify this for me?
>>
>>It does, you are just calling Begin() early (prior
to player entering 
>>PREFETCHED state) which causes begin to be
effectively queued and applied 
>>only when player reaches the PREFTECHED state.
>>That is a proper approach if you wish to minimize
playback start-up time 
>>as calling Begin() early will simply cause player to
automatically 
>>transition from PREFETCHED to PLAYING state.
>>
>>All my comments below apply.
>>
>>Milko
>



_______________________________________________
Helix-client-dev mailing list
Helix-client-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinf
o/helix-client-dev
Getting Media Duration
user name
2006-06-08 04:12:13
At 06:51 PM 6/7/2006, Milko Boic wrote:

>Client registry contains ancillary information about
media not crucial for 
>precise player control.  It is an optional component of
the engine.
>Duration of the media is fundamentally needed for
precise player control 
>and would be very inadvisable for an application to rely
on presence of 
>registry to achieve it.  If that was indeed needed we
would need to take 
>corrective action.

Interesting position.  Given the lack of standardization and
planning 
regarding what is in the registry, I probably agree.

>OnPosLength is reported prior to OnPresentationOpened().

I didn't realize that.  It's a good thing as it solves
this problem, but I 
would not have expected it to be called until after Begin
was called based 
on the name of the method and it's implied semantics.

JEff

>Milko
>
>
>At 05:21 PM 6/7/2006, Jeff Ayars wrote:
>>I'm a bit lost regarding if this is for JSR135 or
straight Helix 
>>interface use but if you're calling Helix APIs
cannot you use the client 
>>registry to get the duration once
"OnPresentationOpened" is called?
>>
>>JEff
>>
>>At 05:52 PM 6/6/2006, Milko Boic wrote:
>>>At 05:40 PM 6/6/2006, Angus Huang wrote:
>>>>Milko,
>>>>
>>>>Are you referring specifically to this state
diagram?
>>>><https://helix-client.hel
ixcommunity.org/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation_
files/image003.gif>https://helix-client.helixcommunity.or
g/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation_files/image003
.gif 
>>>>
>>>
>>>Yes.
>>>
>>>>
>>>>In this diagram, it looks like the player
will move from the READY to 
>>>>the PREFETCHED state after calling
OpenURL()/OpenRequest(). Somewhere 
>>>>during this call, OnPosLength() should be
called, however, I don't see 
>>>>this happening when testing. The first call
I see to OnPosLength() is 
>>>>made after calling Begin(). Additionally,
OnPresentationOpened() and 
>>>>OnBuffering() are called after Begin() as
well.
>>>>
>>>>This behavior doesn't seem to support the
state diagram. Could you 
>>>>clarify this for me?
>>>
>>>It does, you are just calling Begin() early
(prior to player entering 
>>>PREFETCHED state) which causes begin to be
effectively queued and 
>>>applied only when player reaches the PREFTECHED
state.
>>>That is a proper approach if you wish to
minimize playback start-up time 
>>>as calling Begin() early will simply cause
player to automatically 
>>>transition from PREFETCHED to PLAYING state.
>>>
>>>All my comments below apply.
>>>
>>>Milko
>
>


_______________________________________________
Helix-client-dev mailing list
Helix-client-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinf
o/helix-client-dev
Getting Media Duration
user name
2006-06-08 16:19:17
At 09:12 PM 6/7/2006, Jeff Ayars wrote:
>At 06:51 PM 6/7/2006, Milko Boic wrote:
>
>>Client registry contains ancillary information about
media not crucial 
>>for precise player control.  It is an optional
component of the engine.
>>Duration of the media is fundamentally needed for
precise player control 
>>and would be very inadvisable for an application to
rely on presence of 
>>registry to achieve it.  If that was indeed needed
we would need to take 
>>corrective action.
>
>Interesting position.  Given the lack of standardization
and planning 
>regarding what is in the registry, I probably agree.

We invest in our standardization and planning where it
matters most given 
high ratio of work to capacity.  We have a consistent
message about what 
the registry is for and what type information it contains. 
I would not 
call that lack of planning and standardization.


>>OnPosLength is reported prior to
OnPresentationOpened().
>
>I didn't realize that.  It's a good thing as it solves
this problem, but I 
>would not have expected it to be called until after
Begin was called based 
>on the name of the method and it's implied semantics.

OnPosLength() reports position and length of the content. 
The name does 
not imply when this information is provided. This is
document in Helix DNA 
Client State machine. OnPosLength is initially reported when
client lands 
into connected state.  In connected state the properties of
the content 
have been acquired (possibly from the server) and client is
capable of 
providing information about the content.  In opened state 
(OnPresentationOpened()), the scarce system resource are
allocated such as 
audio device and client is in full readiness for playback in
terms of 
allocated resources.  Next phase is prefetch...

Milko


>JEff
>
>>Milko
>>
>>
>>At 05:21 PM 6/7/2006, Jeff Ayars wrote:
>>>I'm a bit lost regarding if this is for JSR135
or straight Helix 
>>>interface use but if you're calling Helix APIs
cannot you use the client 
>>>registry to get the duration once
"OnPresentationOpened" is called?
>>>
>>>JEff
>>>
>>>At 05:52 PM 6/6/2006, Milko Boic wrote:
>>>>At 05:40 PM 6/6/2006, Angus Huang wrote:
>>>>>Milko,
>>>>>
>>>>>Are you referring specifically to this
state diagram?
>>>>><https://helix-client.hel
ixcommunity.org/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation_
files/image003.gif>https://helix-client.helixcommunity.or
g/nonav/2005/devdocs/JSR-SOD-JSR135Adaptation_files/image003
.gif 
>>>>>
>>>>
>>>>Yes.
>>>>
>>>>>
>>>>>In this diagram, it looks like the
player will move from the READY to 
>>>>>the PREFETCHED state after calling
OpenURL()/OpenRequest(). Somewhere 
>>>>>during this call, OnPosLength() should
be called, however, I don't see 
>>>>>this happening when testing. The first
call I see to OnPosLength() is 
>>>>>made after calling Begin().
Additionally, OnPresentationOpened() and 
>>>>>OnBuffering() are called after Begin()
as well.
>>>>>
>>>>>This behavior doesn't seem to support
the state diagram. Could you 
>>>>>clarify this for me?
>>>>
>>>>It does, you are just calling Begin() early
(prior to player entering 
>>>>PREFETCHED state) which causes begin to be
effectively queued and 
>>>>applied only when player reaches the
PREFTECHED state.
>>>>That is a proper approach if you wish to
minimize playback start-up 
>>>>time as calling Begin() early will simply
cause player to automatically 
>>>>transition from PREFETCHED to PLAYING state.
>>>>
>>>>All my comments below apply.
>>>>
>>>>Milko
>>
>



_______________________________________________
Helix-client-dev mailing list
Helix-client-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinf
o/helix-client-dev
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )