Using VS2003, VB.NET,
BACKGROUND
I have a window forms based application that will be distributed and
executed directly from CD media. The app contains a TreeView control and a
WebBroswer (AxSHDocVw.AxWebBrowse) control. The TreeView is populated with
nodes that when clicked play an audio clip that is stored on the CD and
navigate the browser control to a specified web URL (also stored on the CD).
All the web URLs are html documents that were converted from individual PPT
slides (with animations turned on). Several (17) of the slides (and
subsequent html pages) have an embedded video object (wmv). The video is
played when the video object is clicked 1x. Because the video was originally
embedded in PPT and subsequently converted to html, the click event that
fires the playback of the video is handled entirely through java script that
is created by the PPT to html conversion. Thus, my app knows nothing about
the events in the web pages being loaded (i.e. my does not interrogate the
MSHTML document object during page navigation/load). The audio clip playback
starts after the html page load is complete (DocumentComplete event handler)
- handled directly by my app.
The app is relatively small (~300 kb) but the CD slide content (html, audio
and video clips) is very large (500 Mb).
PROBLEM - jerky audio playback on several html pages that have embedded
video objects..
For several of the pages (sequentially, the last 12 slides with video that
are accessed), the audio clip that starts playing after a node is clicked
does not play smoothly. For these slides, it sounds like the CD read head is
moving back and forth on the CD, thrashing around trying to buffer the html's
associated video into memory. My guess is that the CPU is getting tied up
looking for and buffering info from the CD and thus can't stream the audio
clip continuously. For the other slides with video that don't have the audio
problem (sequentially, the 1st 5 slides with video that are accessed), there
is no CD "thrashing" happening - I only hear smooth spinning from the CD (no
stopping and starting, or jerky read head movement).
Multiple CDs of the app and content have been burned from on several
different machines with similar results - jerky audio on these 12 slides.
There seems to be no correlation between the size of the video and/or audio
playback with the jerky playback - the largest audio and video clips
combinations on the CD playback without any jerky behavior.
CAUSE - buffering? CD writer fragmenting video files?
When the CD initially spins up, it spins for quite a while - could it be
that enough info is buffered to playback the 1st 5 videos without having the
read more from the CD?
When the problem occurs I can hear the CD drive stopping and starting and
hear the read/write hear thrashing around - could it be the as the CD is
burned some of the video files are being fragmented over the CD?
Does anyone have any ideas as the to source of the problem, and thusly how
to attack it?
I'm pretty well stumped on this problem - so any feedback would be greatly
appreciated!
Thanks for your attention
-celoftis