[Pkg-kde-extras] Bug#556830: patch

Ilya Barygin barygin at gmail.com
Sun Jan 24 17:24:09 UTC 2010


tags 556830 patch
thanks

Some names are part of avm namespace and must be referred as such. The
following patch was applied in Ubuntu for dvr version 3.2-9.1ubuntu1.

diff -u dvr-3.2/dvr-qtgui/QCodecConfigImpl.h dvr-3.2/dvr-qtgui/QCodecConfigImpl.h
--- dvr-3.2/dvr-qtgui/QCodecConfigImpl.h
+++ dvr-3.2/dvr-qtgui/QCodecConfigImpl.h
@@ -45,7 +45,7 @@
 protected:
 	string	video_codec_name;
 	int compressor;
-	AttributeInfo::Kind current_attribute_kind;
+	avm::AttributeInfo::Kind current_attribute_kind;
 };
 
 #endif // QCODECCONFIGIMPL_H
diff -u dvr-3.2/dvr-qtgui/QCodecConfigImpl.cpp dvr-3.2/dvr-qtgui/QCodecConfigImpl.cpp
--- dvr-3.2/dvr-qtgui/QCodecConfigImpl.cpp
+++ dvr-3.2/dvr-qtgui/QCodecConfigImpl.cpp
@@ -39,12 +39,12 @@
 QCodecConfigImpl::QCodecConfigImpl(int fourcc, QWidget* parent,  const char* name )
     : QCodecConfig( parent, name ), compressor(fourcc)
 {
-//	const CodecInfo* ci=0;
+//	const avm::CodecInfo* ci=0;
 	
-	avm::vector<CodecInfo>::iterator it_ci;
+	avm::vector<avm::CodecInfo>::iterator it_ci;
 
 	for(it_ci=video_codecs.begin(); it_ci!=video_codecs.end(); it_ci++) {
-		if(!it_ci->direction & CodecInfo::Encode) continue;
+		if(!it_ci->direction & avm::CodecInfo::Encode) continue;
 		qlb_codec_list->insertItem(QString(it_ci->GetName()), 0);
 		if(it_ci->fourcc==compressor) {
 			qlb_codec_list->setSelected(0, true);
@@ -66,11 +66,11 @@
 
 void QCodecConfigImpl::setVideoCodecName(const string &vcn) {
 	video_codec_name=vcn;
-	avm::vector<CodecInfo>::iterator it_ci;
-	CodecInfo::match(0xffffffff, CodecInfo::Video, NULL);
+	avm::vector<avm::CodecInfo>::iterator it_ci;
+	avm::CodecInfo::match(0xffffffff, avm::CodecInfo::Video, NULL);
 	
 	for(it_ci=video_codecs.begin(); it_ci!=video_codecs.end(); it_ci++) {
-		if(!(it_ci->direction & CodecInfo::Encode)) continue;
+		if(!(it_ci->direction & avm::CodecInfo::Encode)) continue;
 		qlb_codec_list->insertItem(it_ci->GetName(), 0);
 		if(it_ci->GetName()==video_codec_name) {
 			compressor=it_ci->fourcc;
@@ -83,7 +83,7 @@
 
 void QCodecConfigImpl::changeCodec() {
 	// search fot the fourcc of the selected codec
-	avm::vector<CodecInfo>::iterator it_ci;
+	avm::vector<avm::CodecInfo>::iterator it_ci;
 
 	video_codec_name=(const char*)qlb_codec_list->currentText();
 	
@@ -99,7 +99,7 @@
 	// attributs list update
 	qlv_attribute_list->clear();
 	QListViewItem *a;
-	avm::vector<AttributeInfo>::iterator it_a;
+	avm::vector<avm::AttributeInfo>::iterator it_a;
 	for(it_a=it_ci->encoder_info.begin(); it_a!=it_ci->encoder_info.end(); it_a++) {
 		QString string_value;
 		int tmp_int;
@@ -107,28 +107,28 @@
     float tmp_float;
 
 		switch(it_a->kind) {
-    case AttributeInfo::Float:
+    case avm::AttributeInfo::Float:
 			if(CodecGetAttr(*it_ci, it_a->GetName(), &tmp_float)) {
 				string_value=null_value;
 			} else {
 				string_value=QString::number(double(tmp_float));
 			}
 			break;
-		case AttributeInfo::Integer :	
+		case avm::AttributeInfo::Integer :	
 			if(CodecGetAttr(*it_ci, it_a->GetName(), &tmp_int)) {
 				string_value=null_value;
 			} else {
 				string_value=QString::number(tmp_int);
 			}
 			break;
-		case AttributeInfo::String:		
+		case avm::AttributeInfo::String:		
 			if(CodecGetAttr(*it_ci, it_a->GetName(), &tmp_char)) {
 				string_value=null_value;
 			} else {
 				string_value=tmp_char;
 			}
 			break;
-		case AttributeInfo::Select:	
+		case avm::AttributeInfo::Select:	
 			string_value=null_value;
 			break;
 		}
@@ -147,12 +147,12 @@
 void QCodecConfigImpl::changeAttribute(QListViewItem *i) {
 	qle_attribute_value->setText(i->text(1));
 
-	avm::vector<CodecInfo>::iterator it_ci;
+	avm::vector<avm::CodecInfo>::iterator it_ci;
 	for(it_ci=video_codecs.begin(); it_ci!=video_codecs.end(); it_ci++) {
 		if(QString::compare(it_ci->GetName(),video_codec_name.c_str())==0) break;
 	}
 
-	avm::vector<AttributeInfo>::iterator it_a;
+	avm::vector<avm::AttributeInfo>::iterator it_a;
 	for(it_a=it_ci->encoder_info.begin(); it_a!=it_ci->encoder_info.end(); it_a++) {
 		if(QString::compare(it_a->GetName(), i->text(0))==0) {
 			current_attribute_kind=it_a->kind;
@@ -165,22 +165,22 @@
 void QCodecConfigImpl::setAttribute() {
 	if(QString::compare(qle_attribute_value->text(), null_value) && QString::compare(qle_attribute_value->text(), "")) {
 		
-		avm::vector<CodecInfo>::iterator it_ci;
+		avm::vector<avm::CodecInfo>::iterator it_ci;
 		for(it_ci=video_codecs.begin(); it_ci!=video_codecs.end(); it_ci++) {
 			if(QString::compare(it_ci->GetName(),video_codec_name.c_str())==0) break;
 		}
 
 		switch(current_attribute_kind) {
-		case AttributeInfo::Float :	
+		case avm::AttributeInfo::Float :	
 			CodecSetAttr(*it_ci, qlv_attribute_list->currentItem()->text(0), qle_attribute_value->text().toFloat());
 			break;
-    case AttributeInfo::Integer:
+    case avm::AttributeInfo::Integer:
 			CodecSetAttr(*it_ci, qlv_attribute_list->currentItem()->text(0), qle_attribute_value->text().toInt());
 			break;
-		case AttributeInfo::String:		
+		case avm::AttributeInfo::String:		
 			CodecSetAttr(*it_ci, qlv_attribute_list->currentItem()->text(0), qle_attribute_value->text());
 			break;
-		case AttributeInfo::Select:	
+		case avm::AttributeInfo::Select:	
 			//don't now what to do
 			break;
 		}
diff -u dvr-3.2/lib/dvr.cpp dvr-3.2/lib/dvr.cpp
--- dvr-3.2/lib/dvr.cpp
+++ dvr-3.2/lib/dvr.cpp
@@ -576,12 +576,12 @@
 
 	// looking for the fourcc of the codec
 	video_codec=0;
-	CodecInfo::match(0xffffffff, CodecInfo::Video, NULL);
+	avm::CodecInfo::match(0xffffffff, avm::CodecInfo::Video, NULL);
 	
 	try {
-	avm::vector<CodecInfo>::iterator it_ci;
+	avm::vector<avm::CodecInfo>::iterator it_ci;
   	for(it_ci=video_codecs.begin(); it_ci!=video_codecs.end(); it_ci++) {
-  		if(!(it_ci->direction & CodecInfo::Encode)) continue;
+  		if(!(it_ci->direction & avm::CodecInfo::Encode)) continue;
   		if(it_ci->GetName()==me->video_codec_name) {
   			video_codec=it_ci->fourcc;
   			break;
@@ -592,7 +592,7 @@
 		cerr<<"available video codecs are : "<<endl;
 		string s;
 		for(it_ci=video_codecs.begin(); it_ci!=video_codecs.end(); it_ci++) {
-      			if(!(it_ci->direction & CodecInfo::Encode)) continue;
+      			if(!(it_ci->direction & avm::CodecInfo::Encode)) continue;
         		if(s=="") s=string("'")+it_ci->GetName()+string("'");
           		else s+=string(", '")+it_ci->GetName()+string("'");
 		}





More information about the pkg-kde-extras mailing list