From owner-freebsd-firewire@FreeBSD.ORG Sat Jan 29 19:19:47 2005 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52ADC16A4CE for ; Sat, 29 Jan 2005 19:19:47 +0000 (GMT) Received: from ithil.ics.muni.cz (ithil.ics.muni.cz [147.251.4.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FC5843D1F for ; Sat, 29 Jan 2005 19:19:46 +0000 (GMT) (envelope-from hopet@ics.muni.cz) Received: from KLOBOUCEK (kloboucek.ics.muni.cz [147.251.3.38]) (user=hopet@META mech=LOGIN bits=0) by ithil.ics.muni.cz (8.12.1/8.12.1) with ESMTP id j0TJJgXQ008830 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 29 Jan 2005 20:19:43 +0100 From: "Petr Holub" To: Date: Sat, 29 Jan 2005 20:19:44 +0100 Message-ID: <003b01c50637$7d7ae0a0$2136fb93@KLOBOUCEK> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Muni-Spam-TestIP: 147.251.3.38 X-Muni-Virus-Test: Clean cc: Hidetoshi Shimokawa Subject: reading MPEG-2 from firewire X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jan 2005 19:19:47 -0000 Hi all, we have got our first HD camera which outputs HD MPEG-2 stream through it's firewire interface. I've tried to hack together simple fwcontrol based application to read the stream into a file. I started with what's available for DV in fwdv.c and modified the code according to what I was able to read from different IEC61883 descriptions (don't have access to real specs :( ). It seems to receive packets in correct MPEG-TS format but it seems that I receive just say one of 200 packets. Do I need to do the intialization in a different way than the following? (I've modified PSIZE to 596 which corresponds to maximum packet I've observed on the link when the camera is sending.) bufreq.rx.nchunk = NCHUNK; bufreq.rx.npacket = NPACKET_R; bufreq.rx.psize = PSIZE; bufreq.tx.nchunk = 0; bufreq.tx.npacket = 0; bufreq.tx.psize = 0; if (ioctl(d, FW_SSTBUF, &bufreq) < 0) { err(1, "ioctl"); } isoreq.ch = ich & 0x3f; isoreq.tag = (ich >> 6) & 3; if( ioctl(d, FW_SRSTREAM, &isoreq) < 0) err(1, "ioctl"); Thanks for any hint, Petr