예제 #1
0
XILWindowAssistor::~XILWindowAssistor()
{
	//fprintf(stderr,"XILWindowAssistor::~XILWindowAssistor\n");
	if (cis_) {
		xil_cis_sync(cis_);
		xil_cis_destroy(cis_);
		cis_ = 0;
	}
	/*
	 * Clear out the image so that the Video class does
	 * not try to use it before another window gets attached
	 * and replaces the image.
	 */ 
	if (window_) {
		window_->setimage(0);
	// Tk_FreeGC(Tk_Display(window_->tkwin()), gc_);
		XFreeGC(Tk_Display(window_->tkwin()), gc_);
	}
	if (ximage_) xil_destroy(ximage_);
	if (displayimage_) {
		xil_set_attribute(displayimage_,"HW_DECOMPRESS_CIS",NULL);
		xil_destroy(displayimage_);
	}
	if (imageYCC)
		xil_destroy(imageYCC);
	/*
	if (xil_) {
		xil_close(xil_);xil_=0;
	}
	*/
}
예제 #2
0
XILOutputAssistor::~XILOutputAssistor() {
	xil_set_attribute(o1kimage,"HW_DECOMPRESS_CIS",NULL);
	if (o1kimage) xil_destroy(o1kimage);
	if (cis_) xil_cis_destroy(cis_);
	/*
	if (xil_) {xil_close(xil_);xil_=0;}
	*/
}
예제 #3
0
파일: XILCapture.c 프로젝트: TheCrazyT/jmf
static void
freeXilCis(InstanceState *inst)
{

    /*    Debug Message */
    PRINT("In freeXilCis\n");
    
    if (inst) {
	if (inst->xil_cis) {
	    xil_cis_flush(inst->xil_cis);
	    xil_cis_destroy(inst->xil_cis);
	    inst->xil_cis = NULL;
	}
    }
}
예제 #4
0
파일: XILCapture.c 프로젝트: TheCrazyT/jmf
static void
updateXilCis(InstanceState *inst)
{

    /*    Debug Message */
    PRINT("In updateXilCis\n");
    
    if (inst) {
	xil_cis_destroy(inst->xil_cis);
	inst->xil_cis = NULL;
	inst->xil_cis = xil_cis_create(inst->xil_state, inst->cis_type);
	if (inst->do_cis == MPEG) {
	    XilMpeg1Pattern mpattern;
	    char *pattern = "IIII";
	    mpattern.pattern = pattern;
	    mpattern.repeat_count = 0;
	    xil_cis_set_keep_frames(inst->xil_cis, 6);
	    xil_cis_set_max_frames(inst->xil_cis, 6);
	    xil_cis_set_attribute(inst->xil_cis,
				"COMPRESSOR_PATTERN", (void *)&mpattern);
	    xil_cis_set_attribute(inst->xil_cis,
				"COMPRESSOR_INSERT_VIDEO_SEQUENCE_END",
				(void *)TRUE);

	} else {
	    xil_cis_set_keep_frames(inst->xil_cis, 1);
	    xil_cis_set_max_frames(inst->xil_cis, 1);
	}
	if (inst->do_cis == JPEG) {
	    xil_cis_set_attribute(inst->xil_cis, "ENCODE_411_INTERLEAVED",
							(void *) TRUE);
	    xil_cis_set_attribute(inst->xil_cis, "IGNORE_HISTORY",
							(void *) TRUE);
	    xil_cis_set_attribute(inst->xil_cis, "COMPRESSED_DATA_FORMAT",
							(void *) INTERCHANGE);
	    if (inst->quality != 0) {
		xil_cis_set_attribute(inst->xil_cis,
				"COMPRESSION_QUALITY", (void *)inst->quality);
	    }
	}
    }
}