about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/kino
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/video/kino
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/video/kino')
-rw-r--r--nixpkgs/pkgs/applications/video/kino/default.nix93
-rw-r--r--nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.7.patch60
-rw-r--r--nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.8.patch57
-rw-r--r--nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libavcodec-pkg-config.patch11
-rw-r--r--nixpkgs/pkgs/applications/video/kino/kino-1.3.4-v4l1.patch21
5 files changed, 242 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/video/kino/default.nix b/nixpkgs/pkgs/applications/video/kino/default.nix
new file mode 100644
index 000000000000..d6404a82bc34
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/kino/default.nix
@@ -0,0 +1,93 @@
+# is this configure option of interest?
+#--enable-udev-rules-dir=PATH
+#                        Where to install udev rules (/etc/udev/rules.d)
+
+#TODO shared version?
+
+
+# This is my config output.. Much TODO ?
+#source path               /tmp/nix-31998-1/kino-1.2.0/ffmpeg
+#C compiler                gcc
+#make                      make
+#.align is power-of-two    no
+#ARCH                      x86_64 (generic)
+#build suffix              -kino
+#big-endian                no
+#MMX enabled               yes
+#CMOV enabled              no
+#CMOV is fast              no
+#gprof enabled             no
+#debug symbols             yes
+#strip symbols             yes
+#optimize                  yes
+#static                    yes
+#shared                    no
+#postprocessing support    no
+#software scaler enabled   yes
+#video hooking             no
+#network support           no
+#threading support         no
+#SDL support               no
+#Sun medialib support      no
+#AVISynth enabled          no
+#liba52 support            no
+#liba52 dlopened           no
+#libdts support            no
+#libfaac enabled           no
+#libfaad enabled           no
+#faadbin enabled           no
+#libgsm enabled            no
+#libmp3lame enabled        no
+#libnut enabled            no
+#libogg enabled            no
+#libtheora enabled         no
+#libvorbis enabled         no
+#x264 enabled              no
+#XviD enabled              no
+#zlib enabled              no
+#AMR-NB float support      no
+#AMR-NB fixed support      no
+#AMR-WB float support      no
+#AMR-WB IF2 support        no
+
+{ stdenv, fetchurl, gtk2, libglade, libxml2, libraw1394, libsamplerate, libdv
+, pkgconfig, perlPackages, libavc1394, libiec61883, libXv, gettext
+, libX11, glib, cairo, intltool, ffmpeg, libv4l
+}:
+
+stdenv.mkDerivation {
+  name = "kino-1.3.4";
+
+  src = fetchurl {
+    url = mirror://sourceforge/kino/kino-1.3.4.tar.gz;
+    sha256 = "020s05k0ma83rq2kfs8x474pqicaqp9spar81qc816ddfrnh8k8i";
+  };
+
+  buildInputs = [ gtk2 libglade libxml2 libraw1394 libsamplerate libdv
+      pkgconfig libavc1394 libiec61883 intltool libXv gettext libX11 glib cairo ffmpeg libv4l ] # TODOoptional packages
+    ++ (with perlPackages; [ perl XMLParser ]);
+
+  configureFlags = [ "--enable-local-ffmpeg=no" ];
+
+  hardeningDisable = [ "format" ];
+
+  patches = [ ./kino-1.3.4-v4l1.patch ./kino-1.3.4-libav-0.7.patch ./kino-1.3.4-libav-0.8.patch ]; #./kino-1.3.4-libavcodec-pkg-config.patch ];
+
+  postInstall = "
+    rpath=`patchelf --print-rpath \$out/bin/kino`;
+    for i in $\buildInputs; do
+      echo adding \$i/lib
+      rpath=\$rpath\${rpath:+:}\$i/lib
+    done
+    for i in \$out/bin/*; do
+      patchelf --set-rpath \"\$rpath\" \"\$i\"
+    done
+  ";
+
+  meta = {
+      description = "Non-linear DV editor for GNU/Linux";
+      homepage = http://www.kinodv.org/;
+      license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.7.patch b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.7.patch
new file mode 100644
index 000000000000..65c5bc38276d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.7.patch
@@ -0,0 +1,60 @@
+--- kino-1.3.4.orig/src/frame.cc	2011-07-17 14:54:59.089481638 +0200
++++ kino-1.3.4/src/frame.cc	2011-07-17 15:09:23.199481714 +0200
+@@ -1063,7 +1063,12 @@
+ 	AVPicture dest;
+ 	int got_picture;
+ 
+-	avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
++	AVPacket pkt;
++	av_init_packet(&pkt);
++	pkt.data = data;
++	pkt.size = GetFrameSize();
++
++	avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+ 	if ( got_picture )
+ 	{
+ 		avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), PIX_FMT_RGB24, GetWidth(), GetHeight() );
+@@ -1123,7 +1128,12 @@
+ 	AVPicture output;
+ 	int got_picture;
+ 
+-	avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
++	AVPacket pkt;
++	av_init_packet(&pkt);
++	pkt.data = data;
++	pkt.size = GetFrameSize();
++
++	avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+ 	if ( got_picture )
+ 	{
+ 		avpicture_fill( &output, static_cast<uint8_t*>( yuv ), PIX_FMT_YUV422, GetWidth(), GetHeight() );
+@@ -1156,7 +1166,12 @@
+ 	AVFrame *frame = avcodec_alloc_frame();
+ 	int got_picture;
+ 
+-	avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
++        AVPacket pkt;
++        av_init_packet(&pkt);
++        pkt.data = data;
++        pkt.size = GetFrameSize();
++
++        avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+ 
+ 	int width = GetWidth(), height = GetHeight();
+ 
+@@ -1319,12 +1334,12 @@
+ #if defined(HAVE_LIBAVCODEC)
+ 	if ( avformatEncoder == NULL )
+ 	{
+-		avformatEncoder = av_alloc_format_context();
++		avformatEncoder = avformat_alloc_context();
+ 		if ( avformatEncoder )
+ 		{
+-			avformatEncoder->oformat = guess_format( "dv", NULL, NULL );
++			avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
+ 			AVStream* vst = av_new_stream( avformatEncoder, 0 );
+-			vst->codec->codec_type = CODEC_TYPE_VIDEO;
++			vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+ 			vst->codec->codec_id = CODEC_ID_DVVIDEO;
+ 			vst->codec->bit_rate = 25000000;
+			vst->start_time = 0;
diff --git a/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.8.patch b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.8.patch
new file mode 100644
index 000000000000..f98cbda0bc49
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.8.patch
@@ -0,0 +1,57 @@
+--- kino-1.3.4.orig/src/frame.cc	2012-05-14 19:55:42.153772418 -0700
++++ kino-1.3.4/src/frame.cc	2012-05-14 20:28:34.448838653 -0700
+@@ -101,8 +101,9 @@
+ #if defined(HAVE_LIBAVCODEC)
+ 	pthread_mutex_lock( &avcodec_mutex );
+ 	av_register_all();
+-	libavcodec = avcodec_alloc_context();
+-	avcodec_open( libavcodec, avcodec_find_decoder( CODEC_ID_DVVIDEO ) );
++	libavcodec = avcodec_alloc_context3(NULL);
++	avcodec_open2( libavcodec,
++                       avcodec_find_decoder( CODEC_ID_DVVIDEO ), NULL );
+ 	pthread_mutex_unlock( &avcodec_mutex );
+ 	data = ( unsigned char* ) av_mallocz( 144000 );
+ #if defined(HAVE_SWSCALE)
+@@ -1338,7 +1339,7 @@
+ 		if ( avformatEncoder )
+ 		{
+ 			avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
+-			AVStream* vst = av_new_stream( avformatEncoder, 0 );
++			AVStream* vst = avformat_new_stream( avformatEncoder, NULL );
+ 			vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+ 			vst->codec->codec_id = CODEC_ID_DVVIDEO;
+ 			vst->codec->bit_rate = 25000000;
+@@ -1364,12 +1365,10 @@
+ 			vst->sample_aspect_ratio = avcodecEncoder->sample_aspect_ratio;
+ #endif
+ 			avcodecEncoder->thread_count = 2;
+-			avcodec_thread_init( avcodecEncoder, avcodecEncoder->thread_count );
+ 			avcodecEncoder->time_base= isPAL ? ( AVRational ){ 1, 25 } : ( AVRational ){ 1001, 30000 };
+ 			avcodecEncoder->pix_fmt = isPAL ? PIX_FMT_YUV420P : PIX_FMT_YUV411P;
+ 			avcodecEncoder->flags |= CODEC_FLAG_INTERLACED_DCT;
+-			av_set_parameters( avformatEncoder, NULL );
+-			avcodec_open( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ) );
++			avcodec_open2( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ), NULL );
+ 			av_new_packet( &avpacketEncoder, 144000 );
+ 			tempImage = ( uint8_t* ) av_malloc(
+ 				avpicture_get_size( avcodecEncoder->pix_fmt, avcodecEncoder->width, avcodecEncoder->height ) );
+@@ -1475,16 +1474,16 @@
+ 
+ 			// Encode
+ 			bytesInFrame = avcodec_encode_video( avcodecEncoder, avpacketEncoder.data, size, output );
+-			url_open_buf( &avformatEncoder->pb, data, bytesInFrame, URL_WRONLY );
++                        avformatEncoder->pb = avio_alloc_context(data, bytesInFrame, 0, NULL, NULL, NULL, NULL);
+ 			avpacketEncoder.size = bytesInFrame;
+ 			if ( !isEncoderHeaderWritten )
+ 			{
+-				av_write_header( avformatEncoder );
++				avformat_write_header( avformatEncoder, NULL );
+ 				isEncoderHeaderWritten = true;
+ 			}
+ 			av_write_frame( avformatEncoder, &avpacketEncoder );
+ #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
+-			url_close_buf( avformatEncoder->pb );
++			avio_close( avformatEncoder->pb );
+ #else
+ 			url_close_buf( &avformatEncoder->pb );
+ #endif
diff --git a/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libavcodec-pkg-config.patch b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libavcodec-pkg-config.patch
new file mode 100644
index 000000000000..d6a8953cf00a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libavcodec-pkg-config.patch
@@ -0,0 +1,11 @@
+--- a/kino-1.3.4/configure.in	2009-09-08 02:35:23.000000000 -0400
++++ b/kino-1.3.4/configure.in	2014-01-27 14:53:01.366063037 -0500
+@@ -221,7 +221,7 @@
+ 		if (test "x$avcodec_include" != x) || (test "x$avcodec_lib" != x) ; then
+ 			local_legacy_ffmpeg_test
+ 		else
+-			PKG_CHECK_MODULES(AVCODEC, libavformat,
++			PKG_CHECK_MODULES(AVCODEC, [libavcodec libavformat libavutil],
+ 			[
+ 				AC_DEFINE(HAVE_LIBAVCODEC, 1, [Enable FFMPEG libavcodec])
+ 				AC_SUBST(AVCODEC_LIBS)
diff --git a/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-v4l1.patch b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-v4l1.patch
new file mode 100644
index 000000000000..05ec7386709e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-v4l1.patch
@@ -0,0 +1,21 @@
+no-1.3.3.orig/ffmpeg/libavdevice/v4l.c	2011-05-17 02:20:37.161004916 +0400
++++ kino-1.3.3.orig/ffmpeg/libavdevice/v4l.c	2011-05-17 02:21:57.302377529 +0400
+@@ -26,7 +26,7 @@ 
+ #include <sys/mman.h>
+ #include <sys/time.h>
+ #define _LINUX_TIME_H 1
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+ #include <time.h>
+ 
+ typedef struct {
+--- kino-1.3.3.orig/src/v4l.h	2011-05-17 02:20:38.896969666 +0400
++++ kino-1.3.3.orig/src/v4l.h	2011-05-17 02:21:39.922730395 +0400
+@@ -40,7 +40,7 @@ 
+ 
+ #define _DEVICE_H_
+ #define _LINUX_TIME_H
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+ 
+ #include "displayer.h"