- 论坛徽章:
- 0
|
我最近在做电视卡的驱动程序。现在想写一个简单的sample来检测Capture的正确性(调用XvPutVideo函数来把信号抓进来,然后显示在CRT显示器上)。
我初步的code,但根本抓不到信号,请教大侠有没有好的解决方法?谢谢
int DoVideo(GtkWidget *widget)
{
XvPortID port_index;
int vx, vy, dx, dy;
unsigned int vw, vh;
unsigned int dw, dh;
ScrnInfoPtr pScrn = NULL;
/* Allocate new ScrnInfoRec and claim the slot */
pScrn = xf86ConfigPciEntity(pScrn, 0,
usedChips[1], TviaPciChipsets, 0, 0, 0, 0, 0));
port_index = 0;
vx = vy = dx = dy = 0;
vw = vh = 300;
dw = gdk_screen_width();
dh = gdk_screen_height();
XvPutVideo(pScrn, port_index, widget->window,
widget->style->black_gc,
vx, vy, vw, vh, dx, dy, dw, dh);
} |
|