Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: occasionally empty movie files from Sequence Grabber



This may be a bug in the video digitizer component that you are using or the Sequence Grabber.

An invalid duration is one that is negative (I don't know if 0 is an invalid duration). The component's CompressDone routine could be returning a time value that is less then the time value returned by a previous call to the CompressDone routine.

The Sequence Grabber or the component (I'm not sure which is responsible) can still get frames after the time base rate is set to zero after an SGStop. Maybe the component is not handling this condition correctly when calculating time values when a frame is received. I've had to make special case code for this in my own digitizer. Getting time values for frames was much easier before Mac OS X when you could call GetTimeBaseTime at primary interrupt time.

Maybe try an SGPause before SGStop? I don't know if that will work. The only other idea I have is to somehow make the video digitizer component's CompressDone routine return valid time values by making another component that calls the video digitizer component.


> ----------
> From: 	quicktime-api-bounces+jvantunen=email@hidden on behalf of Mark Sanvitale
> Sent: 	Thursday, September 21, 2006 11:54 AM
> To: 	email@hidden
> Subject: 	occasionally empty movie files from Sequence Grabber
> 
> Our application uses the Sequence Grabber to record a single video  
> channel and a single audio channel to a single movie file.  Every so  
> often (under the control of a separate part of the application), I  
> stop the SG, reconfigure the channel outputs to record to a different  
> movie file, and then start recording to this new file.  This is  
> intended to be able to go on for a long time (e.g. multiple days).   
> In summary, there is an overall, long-term recording which is  
> composed of numerous, simple SG recording sessions.
> 
> Testing is revealing a frustratingly occasional and (at the  
> application level) inexplicable bug where the SG created movie file  
> is empty (technically, the file is not size zero, rather, around  
> 100KB but there is no movie resource, it cannot be opened).  Within  
> the application, the only time the SG returns an error during this  
> problematic portion of the overall recording is at the end when  
> SGStop returns -2014 (invalidDuration), which makes some sense as the  
> duration seems to be zero.  Thus, the preexisting sequence grabber  
> and channels are used to create and apply a new output, start  
> recording, and, finally, the required repeated calls to SGIdle -- all  
> with no hint of an error, yet, we are left with an, essentially,  
> empty movie file.
> 
> So, after running our application you are sometimes left with an  
> overall recording which contains gaps in video content (i.e. empty  
> movie files).  At the application level, we have no idea what is  
> going on and how to attempt to reduce/remove these gaps.  The only  
> clue we have is that the frequency of empty movie files increases  
> when our application runs on a laptop vs. a desktop machine (perhaps  
> because of firewire bus performance??).  Note:  it is the case that,  
> besides the video camera, our application uses another device  
> connected via firewire whose data is written to a file in parallel to  
> the A/V data.
> 
> Up here at the top of the pile, I am left to guess what might be  
> going wrong.  The Sequence Grabber abstracts all of the details away  
> which is a blessing and, for debugging, a curse.  I ask You, the all- 
> knowing collective of QT people:
> 
> 	(1) Any debugging hints/tools I could use to gather more data about  
> this problem?
> 	(2) What might be the cause of the problem?  (solution?)
> 
> 
> Mark Sanvitale
> Electrical Geodesics, Inc.
> email@hidden
> 
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.> 
> QuickTime-API mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/quicktime-api/email@hidden
> 
> This email sent to email@hidden
> 
> 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.