Georg Lippitsch | 30 Jun 2012 16:35
Picon
Picon

FireWire DV/HDV input device using libiec61883

Hi,

since it's quite a long time ago I posted my first version of the FireWire  
input patch, I start a new thread.
Here is a new version of the patch, which uses the new Linux kernel  
FireWire stack and libiec61883 instead of the old deprecated one.

I fixed most of the issues discussed in the former thread, and also  
rewrote the capture loop using threads. This allows stable operation, even  
if iec61883_read_packet() is not called frequently enough. If incoming  
frames are not processed fast enough, they can be buffered up to a  
specified limit.

Regards,

Georg
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel <at> ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Stefano Sabatini | 1 Jul 2012 01:24
Picon

Re: FireWire DV/HDV input device using libiec61883

On date Saturday 2012-06-30 16:35:25 +0200, Georg Lippitsch encoded:
> Hi,
> 
> since it's quite a long time ago I posted my first version of the
> FireWire input patch, I start a new thread.
> Here is a new version of the patch, which uses the new Linux kernel
> FireWire stack and libiec61883 instead of the old deprecated one.
> 
> I fixed most of the issues discussed in the former thread, and also
> rewrote the capture loop using threads. This allows stable
> operation, even if iec61883_read_packet() is not called frequently
> enough. If incoming frames are not processed fast enough, they can
> be buffered up to a specified limit.
> 
> 
> Regards,
> 
> Georg

> From 0551eba2b5164e9c277a07d0b9a11f8ee47b4c3d Mon Sep 17 00:00:00 2001
> From: Georg Lippitsch <georg.lippitsch <at> gmx.at>
> Date: Mon, 23 Apr 2012 16:01:17 +0200
> Subject: [PATCH] FireWire DV/HDV input device using libiec61883
> 
> ---
>  configure                |    3 +
>  doc/indevs.texi          |   49 +++++
>  libavdevice/Makefile     |    1 +
>  libavdevice/alldevices.c |    1 +
>  libavdevice/iec61883.c   |  461 ++++++++++++++++++++++++++++++++++++++++++++++
(Continue reading)

Georg Lippitsch | 1 Jul 2012 12:01
Picon
Picon

Re: FireWire DV/HDV input device using libiec61883

Am 01.07.2012, 01:24 Uhr, schrieb Stefano Sabatini <stefasab <at> gmail.com>:

>
> Again, add yourself to MAINTAINERS if you wish to maintain this
> device. Also feel free to ignore all the comments marked with "nit" if
> they make no sense to you.

Ok, I'll do.

>
> Apart from that, if there are no more comments from other developers
> and you say the patch is tested enough I suppose it is safe to commit
> it.

I just found out that it breaks compilation with --enable-shared.
Renaming all the ff_mpegts_parse_* functions into avpriv_mpegts_parse_*  
fixes this, but I don't really understand the mechanism behind it. Would  
renaming these functions be acceptable?

Thanks,

Georg
Stefano Sabatini | 1 Jul 2012 13:18
Picon

Re: FireWire DV/HDV input device using libiec61883

On date Sunday 2012-07-01 12:01:57 +0200, Georg Lippitsch encoded:
> Am 01.07.2012, 01:24 Uhr, schrieb Stefano Sabatini <stefasab <at> gmail.com>:
> 
> >
> >Again, add yourself to MAINTAINERS if you wish to maintain this
> >device. Also feel free to ignore all the comments marked with "nit" if
> >they make no sense to you.
> 
> Ok, I'll do.
> 
> >
> >Apart from that, if there are no more comments from other developers
> >and you say the patch is tested enough I suppose it is safe to commit
> >it.
> 

> I just found out that it breaks compilation with --enable-shared.
> Renaming all the ff_mpegts_parse_* functions into
> avpriv_mpegts_parse_* fixes this, but I don't really understand the
> mechanism behind it. Would renaming these functions be acceptable?

Try to add ff_mpegts_parse_* to libavformat/libavformat.v, that should
be enough.
--

-- 
FFmpeg = Fast and Fiendish Magical Power Ecumenical Gigant
Georg Lippitsch | 3 Jul 2012 23:59
Picon
Picon

Re: FireWire DV/HDV input device using libiec61883

Am 01.07.2012, 01:24 Uhr, schrieb Stefano Sabatini <stefasab <at> gmail.com>:

>> + <at> item dvbuffer
>> +Maxiumum size of buffer for incoming data, in frames. For DV, this
>
> Set maximum ...

Fixed

>> +    raw1394handle_t handle;             ///< handle for libraw1394
>
> nit: handle -> raw1394?

Fixed

>> +    pthread_t receive_thread;
>
> Nit++: receive_task_thread;

Fixed

>> +            if (!(errno == EAGAIN || errno == EINTR)) {
>
> nit+: the De-Morgan equivalent (errno != EAGAIN && errno != EINTR)
> looks more readable to me, but that's just a personal opinion

Ignored, since I've copied this from the dvgrab utility, and actually  
didn't see a reason to change.

> Nit: maybe
(Continue reading)

Stefano Sabatini | 4 Jul 2012 01:49
Picon

Re: FireWire DV/HDV input device using libiec61883

On date Tuesday 2012-07-03 23:59:56 +0200, Georg Lippitsch encoded:
> Am 01.07.2012, 01:24 Uhr, schrieb Stefano Sabatini <stefasab <at> gmail.com>:
> 
> >>+ <at> item dvbuffer
> >>+Maxiumum size of buffer for incoming data, in frames. For DV, this
> >
> >Set maximum ...
> 
> Fixed
> 
> >>+    raw1394handle_t handle;             ///< handle for libraw1394
> >
> >nit: handle -> raw1394?
> 
> Fixed
> 
> >>+    pthread_t receive_thread;
> >
> >Nit++: receive_task_thread;
> 
> Fixed
> 
> 
> >>+            if (!(errno == EAGAIN || errno == EINTR)) {
> >
> >nit+: the De-Morgan equivalent (errno != EAGAIN && errno != EINTR)
> >looks more readable to me, but that's just a personal opinion
> 
> Ignored, since I've copied this from the dvgrab utility, and
> actually didn't see a reason to change.
(Continue reading)

Stefano Sabatini | 5 Jul 2012 13:08
Picon

Re: FireWire DV/HDV input device using libiec61883

On date Wednesday 2012-07-04 01:49:20 +0200, Stefano Sabatini encoded:
> On date Tuesday 2012-07-03 23:59:56 +0200, Georg Lippitsch encoded:
[...] 
> Assuming there are no other significant changes to the code it should
> be fine for me, I'll apply in a few days if I see no more comments
> from other devs, thanks so far for your work.

Applied, with a few very minor cosmetics (file doxy and non uppercased
option help messages), thanks.
--

-- 
FFmpeg = Frenzy & Fancy Mind-dumbing Pitiless Exuberant Goblin
Michael Niedermayer | 5 Jul 2012 13:50
Picon
Picon

Re: FireWire DV/HDV input device using libiec61883

On Tue, Jul 03, 2012 at 11:59:56PM +0200, Georg Lippitsch wrote:
[...]
> diff --git a/configure b/configure
> index b3719f8..1723197 100755
> --- a/configure
> +++ b/configure
>  <at>  <at>  -1627,6 +1627,7  <at>  <at>  dshow_indev_deps="IBaseFilter"
>  dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid"
>  dv1394_indev_deps="dv1394 dv_demuxer"
>  fbdev_indev_deps="linux_fb_h"
> +iec61883_indev_deps="iec61883"
>  jack_indev_deps="jack_jack_h sem_timedwait"
>  lavfi_indev_deps="avfilter"
>  libcdio_indev_deps="libcdio"
>  <at>  <at>  -2764,6 +2765,7  <at>  <at>  case $target_os in
>      linux)
>          add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
>          enable dv1394
> +        enable iec61883
>          ;;
>      irix*)
>          target_os=irix
>  <at>  <at>  -3194,6 +3196,7  <at>  <at>  enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
>  enabled fontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
>  enabled frei0r     && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
>  enabled gnutls     && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
> +enabled iec61883   && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394
-lavc1394 -lrom1394 -liec61883
>  enabled libaacplus && require  "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
>  enabled libass     && require_pkg_config libass ass/ass.h ass_library_init
(Continue reading)

Michael Niedermayer | 5 Jul 2012 14:06
Picon
Picon

Re: FireWire DV/HDV input device using libiec61883

On Thu, Jul 05, 2012 at 01:50:44PM +0200, Michael Niedermayer wrote:
> On Tue, Jul 03, 2012 at 11:59:56PM +0200, Georg Lippitsch wrote:
> [...]
> > diff --git a/configure b/configure
> > index b3719f8..1723197 100755
> > --- a/configure
> > +++ b/configure
> >  <at>  <at>  -1627,6 +1627,7  <at>  <at>  dshow_indev_deps="IBaseFilter"
> >  dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid"
> >  dv1394_indev_deps="dv1394 dv_demuxer"
> >  fbdev_indev_deps="linux_fb_h"
> > +iec61883_indev_deps="iec61883"
> >  jack_indev_deps="jack_jack_h sem_timedwait"
> >  lavfi_indev_deps="avfilter"
> >  libcdio_indev_deps="libcdio"
> >  <at>  <at>  -2764,6 +2765,7  <at>  <at>  case $target_os in
> >      linux)
> >          add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
> >          enable dv1394
> > +        enable iec61883
> >          ;;
> >      irix*)
> >          target_os=irix
> >  <at>  <at>  -3194,6 +3196,7  <at>  <at>  enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
> >  enabled fontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
> >  enabled frei0r     && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
> >  enabled gnutls     && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
> > +enabled iec61883   && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394
-lavc1394 -lrom1394 -liec61883
> >  enabled libaacplus && require  "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
(Continue reading)

Michael Niedermayer | 4 Jul 2012 02:02
Picon
Picon

Re: FireWire DV/HDV input device using libiec61883

On Sun, Jul 01, 2012 at 01:24:05AM +0200, Stefano Sabatini wrote:
> On date Saturday 2012-06-30 16:35:25 +0200, Georg Lippitsch encoded:
[...]> 
> [...]
> 
> Again, add yourself to MAINTAINERS if you wish to maintain this

Also to maintain the code, i would recommand that you get a public
git clone of ffmpeg (on github or elsewhere) where you can maintain
the code, merge any patches others submit, and that i can merge into
main ffmpeg when you are happy with the state of your branch and
want me to merge it.

[...]
--

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel <at> ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Georg Lippitsch | 4 Jul 2012 11:58
Picon
Picon

Re: FireWire DV/HDV input device using libiec61883

Am 04.07.2012, 02:02 Uhr, schrieb Michael Niedermayer <michaelni <at> gmx.at>:

>> Again, add yourself to MAINTAINERS if you wish to maintain this
>
> Also to maintain the code, i would recommand that you get a public
> git clone of ffmpeg (on github or elsewhere) where you can maintain
> the code, merge any patches others submit, and that i can merge into
> main ffmpeg when you are happy with the state of your branch and
> want me to merge it.

Ok, I'll create a clone on github as soon as there are new changes to the  
patch.

Regards,

Georg

Gmane