packages: guvcview/guvcview.spec, guvcview/guvcview-ffmpeg.patch (NEW) - re...

arekm arekm at pld-linux.org
Tue Jul 26 13:46:54 CEST 2011


Author: arekm                        Date: Tue Jul 26 11:46:54 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2; fix build with ffmpeg 0.8

---- Files affected:
packages/guvcview:
   guvcview.spec (1.4 -> 1.5) , guvcview-ffmpeg.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/guvcview/guvcview.spec
diff -u packages/guvcview/guvcview.spec:1.4 packages/guvcview/guvcview.spec:1.5
--- packages/guvcview/guvcview.spec:1.4	Tue Jul 26 13:19:38 2011
+++ packages/guvcview/guvcview.spec	Tue Jul 26 13:46:49 2011
@@ -3,11 +3,12 @@
 #Summary(pl.UTF-8):	-
 Name:		guvcview
 Version:	1.4.5
-Release:	1
+Release:	2
 License:	GPL v3
 Group:		Applications/Multimedia
 Source0:	http://download.berlios.de/guvcview/%{name}-src-%{version}.tar.gz
 # Source0-md5:	33d50a974f3db34eb5241686c3f86b60
+Patch0:		%{name}-ffmpeg.patch
 URL:		http://guvcview.berlios.de/
 BuildRequires:	ffmpeg-devel
 BuildRequires:	glib2-devel >= 1:2.10.0
@@ -26,6 +27,7 @@
 
 %prep
 %setup -q -n %{name}-src-%{version}
+%patch0 -p0
 
 %build
 %configure
@@ -56,6 +58,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2011/07/26 11:46:49  arekm
+- rel 2; fix build with ffmpeg 0.8
+
 Revision 1.4  2011/07/26 11:19:38  arekm
 - up to 1.4.5
 

================================================================
Index: packages/guvcview/guvcview-ffmpeg.patch
diff -u /dev/null packages/guvcview/guvcview-ffmpeg.patch:1.1
--- /dev/null	Tue Jul 26 13:46:54 2011
+++ packages/guvcview/guvcview-ffmpeg.patch	Tue Jul 26 13:46:49 2011
@@ -0,0 +1,88 @@
+Index: src/create_video.c
+===================================================================
+--- src/create_video.c	(wersja 772)
++++ src/create_video.c	(wersja 774)
+@@ -995,14 +995,12 @@
+ 	
+ 	if(lavc_data != NULL)
+ 	{
+-		int nf = clean_lavc(&lavc_data);
+-		if(global->debug) g_printf(" total frames encoded: %d\n", nf);
++		clean_lavc(&lavc_data);
+ 		lavc_data = NULL;
+ 	}
+ 	if(lavc_audio_data != NULL)
+ 	{
+-		int nf = clean_lavc_audio(&lavc_audio_data);
+-		if(global->debug) g_printf(" total audio frames encoded: %d\n", nf);
++		clean_lavc_audio(&lavc_audio_data);
+ 		lavc_audio_data = NULL;
+ 	}
+ 	if(jpg_data != NULL) g_free(jpg_data);
+Index: src/lavc_common.c
+===================================================================
+--- src/lavc_common.c	(wersja 772)
++++ src/lavc_common.c	(wersja 774)
+@@ -138,10 +138,10 @@
+ int clean_lavc (void* arg)
+ {
+ 	struct lavcData** data= (struct lavcData**) arg;
+-	int enc_frames =0;
++	//int enc_frames =0;
+ 	if(*data)
+ 	{
+-		enc_frames = (*data)->codec_context->real_pict_num;
++		//enc_frames = (*data)->codec_context->real_pict_num;
+ 		avcodec_flush_buffers((*data)->codec_context);
+ 		//close codec 
+ 		avcodec_close((*data)->codec_context);
+@@ -154,16 +154,16 @@
+ 		g_free(*data);
+ 		*data = NULL;
+ 	}
+-	return (enc_frames);
++	return (0);
+ }
+ 
+ int clean_lavc_audio (void* arg)
+ {
+ 	struct lavcAData** data= (struct lavcAData**) arg;
+-	int enc_frames =0;
++	//int enc_frames =0;
+ 	if(*data)
+ 	{
+-		enc_frames = (*data)->codec_context->real_pict_num;
++		//enc_frames = (*data)->codec_context->real_pict_num;
+ 		avcodec_flush_buffers((*data)->codec_context);
+ 		//close codec 
+ 		avcodec_close((*data)->codec_context);
+@@ -174,7 +174,7 @@
+ 		g_free(*data);
+ 		*data = NULL;
+ 	}
+-	return (enc_frames);
++	return (0);
+ }
+ 
+ struct lavcData* init_lavc(int width, int height, int fps_num, int fps_den, int codec_ind)
+@@ -240,7 +240,9 @@
+ 	data->codec_context->qblur = defaults->qblur;
+ 	data->codec_context->strict_std_compliance = FF_COMPLIANCE_NORMAL;
+ 	data->codec_context->codec_id = defaults->codec_id;
++#ifdef 	CODEC_TYPE_VIDEO
+ 	data->codec_context->codec_type = CODEC_TYPE_VIDEO;
++#endif
+ 	data->codec_context->pix_fmt = PIX_FMT_YUV420P; //only yuv420p available for mpeg
+ 	if(defaults->fps)
+ 		data->codec_context->time_base = (AVRational){1,defaults->fps}; //use properties fps
+@@ -299,8 +301,9 @@
+ 	data->codec_context->cutoff = 0; /*automatic*/
+ 	//data->codec_context->sample_fmt = SAMPLE_FMT_FLT; /* floating point sample */
+ 	data->codec_context->codec_id = defaults->codec_id;
++#ifdef CODEC_TYPE_AUDIO
+ 	data->codec_context->codec_type = CODEC_TYPE_AUDIO;
+-	
++#endif	
+ 	// open codec
+ 	if (avcodec_open(data->codec_context, data->codec) < 0) 
+ 	{
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/guvcview/guvcview.spec?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list