diff options
author | reed <reed> | 2006-05-17 01:53:17 +0000 |
---|---|---|
committer | reed <reed> | 2006-05-17 01:53:17 +0000 |
commit | cf6962c01a9880e3c5a6e644f328351c53274b15 (patch) | |
tree | 0f4e81d65bba8304fa87f94647bc4a9c9c349b02 | |
parent | 3b0d549bb0b0c7a422e453ad6e8100dd88d3f547 (diff) | |
download | pkgsrc-cf6962c01a9880e3c5a6e644f328351c53274b15.tar.gz |
Add patch for ffmpeg update. And update patch for png update.
Thank you Joerg!
Bump PKREVISION for these.
Also use --without-forced-embedded-ffmpeg
(even though it is the default when the ffmpeg is detected).
TODO: just use a common patches directory for these two packages.
-rw-r--r-- | x11/xvidcap-gtk2/Makefile | 4 | ||||
-rw-r--r-- | x11/xvidcap-gtk2/distinfo | 5 | ||||
-rw-r--r-- | x11/xvidcap-gtk2/patches/patch-af | 30 | ||||
-rw-r--r-- | x11/xvidcap-gtk2/patches/patch-ag | 37 | ||||
-rw-r--r-- | x11/xvidcap/Makefile | 4 | ||||
-rw-r--r-- | x11/xvidcap/Makefile.common | 3 | ||||
-rw-r--r-- | x11/xvidcap/distinfo | 5 | ||||
-rw-r--r-- | x11/xvidcap/patches/patch-af | 30 | ||||
-rw-r--r-- | x11/xvidcap/patches/patch-ag | 37 |
9 files changed, 124 insertions, 31 deletions
diff --git a/x11/xvidcap-gtk2/Makefile b/x11/xvidcap-gtk2/Makefile index df01bdf1725..2b314545fce 100644 --- a/x11/xvidcap-gtk2/Makefile +++ b/x11/xvidcap-gtk2/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.5 2006/04/17 13:47:02 wiz Exp $ +# $NetBSD: Makefile,v 1.6 2006/05/17 01:53:18 reed Exp $ # .include "../../x11/xvidcap/Makefile.common" PKGNAME= ${DISTNAME:S/-/-gtk2-/} -PKGREVISION= 3 +PKGREVISION= 4 COMMENT= Capture X display to individual frames or MPEG video (GTK2 version) CONFLICTS+= xvidcap<1.1.3nb3 diff --git a/x11/xvidcap-gtk2/distinfo b/x11/xvidcap-gtk2/distinfo index 78d7a12b096..94c49154bcc 100644 --- a/x11/xvidcap-gtk2/distinfo +++ b/x11/xvidcap-gtk2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.4 2006/04/20 22:56:02 wiz Exp $ +$NetBSD: distinfo,v 1.5 2006/05/17 01:53:18 reed Exp $ SHA1 (xvidcap-1.1.3.tar.gz) = e6d86a4184c8cc3e74738fb6e20d49c0d1640025 RMD160 (xvidcap-1.1.3.tar.gz) = cc7be360153f192b502ffedc6548cce163a9154c @@ -7,4 +7,5 @@ SHA1 (patch-ab) = cea05b76ffb2919e1fd4dcb5f489f641ca8e36bd SHA1 (patch-ac) = 0de9d748e3808a210ec68d140eb1dfd5e18d9e4f SHA1 (patch-ad) = ac40095849f721cfd8aa1e0143dff3ac9b705be7 SHA1 (patch-ae) = d2b5bf7f73a9e0c3e322911ba2296bbe47e2728f -SHA1 (patch-af) = 0e5d5bc1064e67b5adc5958ea613d77114017c17 +SHA1 (patch-af) = 7e5533775b68a2c2ade195660b859530e6422da4 +SHA1 (patch-ag) = 44cb7ad63e477f21b013a43d06ce81fddb235ef7 diff --git a/x11/xvidcap-gtk2/patches/patch-af b/x11/xvidcap-gtk2/patches/patch-af index 8ad755b4547..dc808e0b19d 100644 --- a/x11/xvidcap-gtk2/patches/patch-af +++ b/x11/xvidcap-gtk2/patches/patch-af @@ -1,19 +1,27 @@ -$NetBSD: patch-af,v 1.1 2006/04/20 22:56:02 wiz Exp $ +$NetBSD: patch-af,v 1.2 2006/05/17 01:53:17 reed Exp $ --- src/mngutil.c.orig 2004-02-14 11:55:36.000000000 +0100 +++ src/mngutil.c -@@ -30,12 +30,14 @@ +@@ -30,13 +30,6 @@ #include <png.h> #include "mngutil.h" -+#if 0 - extern void png_write_data (png_structp png_ptr, - png_bytep data,png_size_t length); - extern void png_save_uint_32 (png_bytep buf, png_uint_32 i); - extern void png_save_uint_16 (png_bytep buf, png_uint_16 i); - extern void png_write_chunk (png_structp png_ptr, - png_bytep chunk_name, png_bytep data, png_size_t length); -+#endif - +-extern void png_write_data (png_structp png_ptr, +- png_bytep data,png_size_t length); +-extern void png_save_uint_32 (png_bytep buf, png_uint_32 i); +-extern void png_save_uint_16 (png_bytep buf, png_uint_16 i); +-extern void png_write_chunk (png_structp png_ptr, +- png_bytep chunk_name, png_bytep data, png_size_t length); +- png_byte mng_sig[8] = {138, 77, 78, 71, 13, 10, 26, 10}; + /* +@@ -46,7 +39,7 @@ void + mng_write_sig (png_structp png_ptr) + { + /* write the rest of the 8 byte signature */ +- png_write_data (png_ptr, &mng_sig[png_ptr->sig_bytes], ++ png_write_chunk_data (png_ptr, &mng_sig[png_ptr->sig_bytes], + (png_size_t)8 - png_ptr->sig_bytes); + } + diff --git a/x11/xvidcap-gtk2/patches/patch-ag b/x11/xvidcap-gtk2/patches/patch-ag new file mode 100644 index 00000000000..3f27eafb5f9 --- /dev/null +++ b/x11/xvidcap-gtk2/patches/patch-ag @@ -0,0 +1,37 @@ +$NetBSD: patch-ag,v 1.1 2006/05/17 01:53:17 reed Exp $ + +--- src/xtoffmpeg.c.orig 2006-04-21 07:54:06.000000000 +0000 ++++ src/xtoffmpeg.c +@@ -582,6 +582,7 @@ XImageToFFMPEG (FILE *fp, XImage *image, + AVFormatParameters fParams, *p_fParams = &fParams; // video stream params + AVFormatParameters params, *ap = ¶ms; // audio stream params + AVImageFormat *image_format; ++ AVPacket pkt; + int ret, err, i; + + #ifdef DEBUG +@@ -1103,7 +1104,8 @@ XImageToFFMPEG (FILE *fp, XImage *image, + #endif /* DEBUG */ + + /* encode the image */ +- out_size = avcodec_encode_video (c, outbuf, image_size, frame); ++ av_init_packet(&pkt); ++ pkt.size = avcodec_encode_video (c, outbuf, image_size, frame); + + #ifdef HAVE_FFMPEG_AUDIO + if (job->flags & FLG_AUDIO_WANTED) { +@@ -1117,7 +1119,13 @@ XImageToFFMPEG (FILE *fp, XImage *image, + } + #endif // HAVE_FFMPEG_AUDIO + /* write frame to file */ +- av_write_frame (output_file, out_st->index, outbuf, out_size); ++ ++ pkt.pts= c->coded_frame->pts; ++ pkt.flags |= PKT_FLAG_KEY; ++ pkt.stream_index= out_st->index; ++ pkt.data= outbuf; ++ ++ av_write_frame (output_file, &pkt); + #ifdef HAVE_FFMPEG_AUDIO + /* release the mutex */ + if (job->flags & FLG_AUDIO_WANTED) { diff --git a/x11/xvidcap/Makefile b/x11/xvidcap/Makefile index 07bcefda2dc..976fdfc7318 100644 --- a/x11/xvidcap/Makefile +++ b/x11/xvidcap/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.9 2006/04/17 14:52:12 wiz Exp $ +# $NetBSD: Makefile,v 1.10 2006/05/17 01:53:18 reed Exp $ # .include "Makefile.common" -PKGREVISION= 5 +PKGREVISION= 6 COMMENT= Capture X display to individual frames or MPEG video CONFIGURE_ARGS+= --without-gtk2 diff --git a/x11/xvidcap/Makefile.common b/x11/xvidcap/Makefile.common index bd89b0f0add..223fd6840e1 100644 --- a/x11/xvidcap/Makefile.common +++ b/x11/xvidcap/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.3 2005/06/01 18:03:33 jlam Exp $ +# $NetBSD: Makefile.common,v 1.4 2006/05/17 01:53:18 reed Exp $ # # Note: when upgrading version, be sure to update distinfo in xvidcap-gtk2 also @@ -10,6 +10,7 @@ MAINTAINER= reed@reedmedia.net HOMEPAGE= http://xvidcap.sourceforge.net/ GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --without-forced-embedded-ffmpeg .include "../../devel/zlib/buildlink3.mk" .include "../../graphics/jpeg/buildlink3.mk" diff --git a/x11/xvidcap/distinfo b/x11/xvidcap/distinfo index d5cc3fdec9b..a026e48947b 100644 --- a/x11/xvidcap/distinfo +++ b/x11/xvidcap/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2006/04/20 22:56:01 wiz Exp $ +$NetBSD: distinfo,v 1.6 2006/05/17 01:53:18 reed Exp $ SHA1 (xvidcap-1.1.3.tar.gz) = e6d86a4184c8cc3e74738fb6e20d49c0d1640025 RMD160 (xvidcap-1.1.3.tar.gz) = cc7be360153f192b502ffedc6548cce163a9154c @@ -8,4 +8,5 @@ SHA1 (patch-ab) = cea05b76ffb2919e1fd4dcb5f489f641ca8e36bd SHA1 (patch-ac) = 0de9d748e3808a210ec68d140eb1dfd5e18d9e4f SHA1 (patch-ad) = ac40095849f721cfd8aa1e0143dff3ac9b705be7 SHA1 (patch-ae) = 73358643d97b9b8771f7a26189a386c32007ec70 -SHA1 (patch-af) = 0e5d5bc1064e67b5adc5958ea613d77114017c17 +SHA1 (patch-af) = 7e5533775b68a2c2ade195660b859530e6422da4 +SHA1 (patch-ag) = 44cb7ad63e477f21b013a43d06ce81fddb235ef7 diff --git a/x11/xvidcap/patches/patch-af b/x11/xvidcap/patches/patch-af index 8ad755b4547..dc808e0b19d 100644 --- a/x11/xvidcap/patches/patch-af +++ b/x11/xvidcap/patches/patch-af @@ -1,19 +1,27 @@ -$NetBSD: patch-af,v 1.1 2006/04/20 22:56:02 wiz Exp $ +$NetBSD: patch-af,v 1.2 2006/05/17 01:53:17 reed Exp $ --- src/mngutil.c.orig 2004-02-14 11:55:36.000000000 +0100 +++ src/mngutil.c -@@ -30,12 +30,14 @@ +@@ -30,13 +30,6 @@ #include <png.h> #include "mngutil.h" -+#if 0 - extern void png_write_data (png_structp png_ptr, - png_bytep data,png_size_t length); - extern void png_save_uint_32 (png_bytep buf, png_uint_32 i); - extern void png_save_uint_16 (png_bytep buf, png_uint_16 i); - extern void png_write_chunk (png_structp png_ptr, - png_bytep chunk_name, png_bytep data, png_size_t length); -+#endif - +-extern void png_write_data (png_structp png_ptr, +- png_bytep data,png_size_t length); +-extern void png_save_uint_32 (png_bytep buf, png_uint_32 i); +-extern void png_save_uint_16 (png_bytep buf, png_uint_16 i); +-extern void png_write_chunk (png_structp png_ptr, +- png_bytep chunk_name, png_bytep data, png_size_t length); +- png_byte mng_sig[8] = {138, 77, 78, 71, 13, 10, 26, 10}; + /* +@@ -46,7 +39,7 @@ void + mng_write_sig (png_structp png_ptr) + { + /* write the rest of the 8 byte signature */ +- png_write_data (png_ptr, &mng_sig[png_ptr->sig_bytes], ++ png_write_chunk_data (png_ptr, &mng_sig[png_ptr->sig_bytes], + (png_size_t)8 - png_ptr->sig_bytes); + } + diff --git a/x11/xvidcap/patches/patch-ag b/x11/xvidcap/patches/patch-ag new file mode 100644 index 00000000000..3f27eafb5f9 --- /dev/null +++ b/x11/xvidcap/patches/patch-ag @@ -0,0 +1,37 @@ +$NetBSD: patch-ag,v 1.1 2006/05/17 01:53:17 reed Exp $ + +--- src/xtoffmpeg.c.orig 2006-04-21 07:54:06.000000000 +0000 ++++ src/xtoffmpeg.c +@@ -582,6 +582,7 @@ XImageToFFMPEG (FILE *fp, XImage *image, + AVFormatParameters fParams, *p_fParams = &fParams; // video stream params + AVFormatParameters params, *ap = ¶ms; // audio stream params + AVImageFormat *image_format; ++ AVPacket pkt; + int ret, err, i; + + #ifdef DEBUG +@@ -1103,7 +1104,8 @@ XImageToFFMPEG (FILE *fp, XImage *image, + #endif /* DEBUG */ + + /* encode the image */ +- out_size = avcodec_encode_video (c, outbuf, image_size, frame); ++ av_init_packet(&pkt); ++ pkt.size = avcodec_encode_video (c, outbuf, image_size, frame); + + #ifdef HAVE_FFMPEG_AUDIO + if (job->flags & FLG_AUDIO_WANTED) { +@@ -1117,7 +1119,13 @@ XImageToFFMPEG (FILE *fp, XImage *image, + } + #endif // HAVE_FFMPEG_AUDIO + /* write frame to file */ +- av_write_frame (output_file, out_st->index, outbuf, out_size); ++ ++ pkt.pts= c->coded_frame->pts; ++ pkt.flags |= PKT_FLAG_KEY; ++ pkt.stream_index= out_st->index; ++ pkt.data= outbuf; ++ ++ av_write_frame (output_file, &pkt); + #ifdef HAVE_FFMPEG_AUDIO + /* release the mutex */ + if (job->flags & FLG_AUDIO_WANTED) { |