Hi,
Can anyone explain how clockDivisor works in HDiSim
Frankly speaking I cannot catch the idea :)
Simple sample below is to display "OK" on the screen after 1s.
timeBase is 60fps, clockDivisor is 120. When "OK" should appear
After 1s, after 2s, after 5s... And why
Thanks in advance
<head>
<timing clock="page" clockDivisor="120">
<cue begin="1s" select="id('ok')" dur="5s">
<set style:visibility="visible"/>
</cue>
</timing>
<styling/>
</head>
<body style:font="file:///dvddisc/ADV_OBJ/font.ttf" >
<p id="ok" style:visibility="hidden"> OK </p>
</body>

How clockDivisor works?
hrubesh
Sorry; that was a temporary lapse in sanity on my part. You are correct that it re-draws every 120 frames (ie, 2 seconds) not every 120 seconds (doh!). I was so busy trying to explain clockDivisor that I didn't actually look at your example :-)
Anyway, the real problem is that your content is invalid; try this and it will work:
Do you have the schemas installed in Visual Studio (or the editor of your choice), and have you run the HD DVD Validator Both would tell you that you were missing the <par> and the <div>
Michael Grau
Dear Peter, you are right absolutely about <par>. Yes, it was my fault.
But anyway in my sample (with <par> :) I have “OK” appeared not after 2s but 5s…
Is it a bug in HDiSim or something else
Alan Stevens
Hello Peter,
Timeline is based on "page" so <timing> section should start after page is loaded.
You can easily count up time in seconds using simple sample below:
<timing clock="page">
<defs>
<set id="show" style:visibility="visible"/>
</defs>
<par begin="0s" dur="20s">
<cue select="id('t1')" begin="1s" dur="10s" use="show" />
<cue select="id('t2')" begin="2s" dur="10s" use="show" />
<cue select="id('t3')" begin="3s" dur="10s" use="show" />
<cue select="id('t4')" begin="4s" dur="10s" use="show" />
<cue select="id('t5')" begin="5s" dur="10s" use="show" />
<cue select="id('t6')" begin="6s" dur="10s" use="show" />
<cue select="id('t7')" begin="7s" dur="10s" use="show" />
</par>
</timing>
<styling>
<style select="//span" id="invis" style:visibility="hidden"/>
</styling>
...
<p>Time: 0
<span id="t1">1</span>
<span id="t2">2</span>
<span id="t3">3</span>
<span id="t4">4</span>
<span id="t5">5</span>
<span id="t6">6</span>
<span id="t7">7</span>
</p>
Alexey Raga
Tom De Cort
Yes, I understand that clockDivisor is used to lower the framerate.
But in my sample timeBase="60fps" and clockDivisor="120".
So framerate=60/120=0.5fps in other words redraw the screen every 2s not 120s.
Is it correct
So in my sample "OK" should appear after 2s, right
In your sample small yellow box should be redrawn every 1/60=16.7ms when clockDivisor="1",
and every 167ms for clockDivisor="10".
If we change clockDivisor to 60 we have to see 5 steps of animation, right
suds143
The problem appears to be that clockDivisor always assumes 24fps, even if you have a 60fps presentatinon. If you need to use clockDivisor, you can set the tickBase="24fps" in your playlist and then use 24-fps based clockDivisor (eg, 48 instead of 60).
Thanks for reporting this though; I will log it as a bug.
MMerchant
clockDivisor is used to lower the framerate. All your animations are timed the same way, but the page is only layed out every clockDivisor frames. So in your example, the text "OK" is visible from t=1s to t=6s, but you only redraw the screen every 120s (2 minutes), so you never see what happens.
Here's a quick example:
Run the following:
xml version="1.0" ><root xml:lang="en" xmlns="http://www.dvdforum.org/2005/ihd" xmlns:style="http://www.dvdforum.org/2005/ihd#style" xmlns:state="http://www.dvdforum.org/2005/ihd#state">
<head>
<timing clock="page" clockDivisor="1">
<par>
<cue select="id('test')" dur="5s">
<animate style:x="0px;1920px"/>
</cue>
</par>
</timing>
</head>
<body>
<div id="test" style:position="absolute" style:width="50px" style:height="50px" style:backgroundColor="yellow" />
</body>
</root>
Now change clockDivisor to 10 and watch it again.