Re: Can't get kino or dvgrab to work
Stefan Richter <[email protected]> Tue, 20 Oct 2009 22:04:56 +0200 (CEST)
| Newsgroups | gmane.comp.video.kino.devel |
|---|---|
| Message-ID | <[email protected]> |
On 20 Oct, Dan Dennedy wrote: > On Tue, Oct 20, 2009 at 11:28 AM, Stefan Richter > <[email protected]> wrote: >> Uh, I left an important fact out of my "report": Lately I used this >> camcorder without a tape inserted, in webcam mode. (I never ever record >> anything, I got this camcorder for nothing else than driver testing.) > > Yes, that is important [...] > I believe I have a limitation in detecting the exact state. IOW, I > believe I may not be able to determine the difference between this and > the end-of-tape. I will have to review this use case to be sure. For > now, for this use case, -noavc is required. Makes sense, in retrospect. [...] >>> There is a big test in the middle of captureThreadRun() in dvgrab.cc >>> around a call to writeFrame(). It would be interesting test for >>> someone who is affected by this bug to comment the if lines and call >>> writeFrame unconditionally to see if it resolves. >> >> Hmm. I left the three blocks with "buffer underrun...", "damaged >> frame...", and "frame dropped..." intact because these messages were >> never printed, and changed the else block thus: > > correct, and you changed what I was hinting at, but this is not the > part of the code that is doing end-of-tape detection. Right. When I restore that code and instead mess with this: --- dvgrab-3.5.orig/dvgrab.cc +++ dvgrab-3.5/dvgrab.cc @@ -1272,15 +1272,6 @@ bool DVgrab::done() { if ( m_reader_active ) { - // Stop capture at end of tape - if ( !m_interactive && m_writer && m_writer->GetFileSize() > 0 && m_avc && !m_isRecordMode ) - { - m_transportStatus = m_avc->TransportStatus( m_node ); - if ( AVC1394_MASK_RESPONSE_OPERAND( m_transportStatus, 3 ) == AVC1394_VCR_OPERAND_WIND_STOP - && AVC1394_MASK_OPCODE( m_transportStatus ) == AVC1394_VCR_RESPONSE_TRANSPORT_STATE_WIND ) - return true; - } - timespec t = {0, 125000000L}; return ( nanosleep( &t, NULL ) == -1 ); } then dvgrab does not quit. (No tape, no -noavc.) Indeed, --- dvgrab-3.5.orig/dvgrab.cc +++ dvgrab-3.5/dvgrab.cc @@ -1292,6 +1292,10 @@ bool DVgrab::done() { if ( m_reader_active ) { + m_transportStatus = m_avc->TransportStatus( m_node ); + fprintf(stderr, "operand 0x%02x, opcode 0x%08x\n", + AVC1394_MASK_RESPONSE_OPERAND( m_transportStatus, 3 ), + AVC1394_MASK_OPCODE( m_transportStatus )); timespec t = {0, 125000000L}; return ( nanosleep( &t, NULL ) == -1 ); } logs "operand 0x60, opcode 0x0000c400", i.e. AVC1394_VCR_OPERAND_WIND_STOP and AVC1394_VCR_RESPONSE_TRANSPORT_STATE_WIND. The camcorder actually emits a quite mechanical noise in this state. There is a blinking tape icon on the LCD which, according to the manual, appropriately tells me that no tape is inserted. -- Stefan Richter -=====-==--= =-=- =-=-- http://arcgraph.de/sr/ ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference