[libdc1394-devel] Migrate a camera handle across fork()
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Rudi L. <r.l...@x-...> - 2006-12-12 11:25:24
|
I2luY2x1ZGUgPHVuaXN0ZC5oPg0KDQojaW5jbHVkZSA8ZGMxMzk0L2NvbnRyb2wuaD4NCiNpbmNs dWRlIDxkYzEzOTQvcmVnaXN0ZXIuaD4NCg0KI2luY2x1ZGUgPHN0ZGludC5oPg0KI2luY2x1ZGUg PHN0cmluZz4NCiNpbmNsdWRlIDxpb3N0cmVhbT4NCg0KI2RlZmluZSBDTEVBTlVQX0NBTUVSQSgp IGRvIHsgZGMxMzk0X2NhcHR1cmVfc3RvcChtX2NhbWVyYSk7ICAgICAgICAgICAgICAgICAgICAg ICBcDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYzEzOTRfdmlkZW9fc2V0X3RyYW5z bWlzc2lvbihtX2NhbWVyYSwgREMxMzk0X09GRik7IFwNCiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGRjMTM5NF9mcmVlX2NhbWVyYShtX2NhbWVyYSk7ICAgICAgICAgICAgICAgICAgICAg ICAgXA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbV9jYW1lcmEgPSBOVUxMOyB9d2hp bGUoMCkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KI2RlZmluZSBDSEVDS19DQU1F UkEoKSBkbyB7IGlmIChtX2NhbWVyYSA9PSBOVUxMKSB7IHJldHVybiAtMTsgfSB9d2hpbGUoMCkN Cg0KI2RlZmluZSBjYW1Ob2RlIDANCg0KI2RlZmluZSBDSEVDSyhkYzEzOTRfY29tbWFuZCkgZG8g eyBpZihEQzEzOTRfU1VDQ0VTUyAhPSBkYzEzOTRfY29tbWFuZCkgeyBcDQogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgQ0xFQU5VUF9DQU1FUkEoKTsgcmV0dXJuIC0xOyB9IH0g d2hpbGUoMCkNCg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pzdHJpbmcgaW1nZGF0YTsNCg0KICAgICAgICBmb3IoaW50IGk9 MDsgaTwzOyBpKyspDQogICAgICAgIHsNCiAgICAgICAgICAgIGludCByZXQ9MDsNCiAgICAgICAg ICAgIGlmKChyZXQgPSBnZXRJbWFnZShpbWdkYXRhKSkhPTApDQogICAgICAgICAgICB7DQogICAg ICAgICAgICAgICAgc3RkOjpjZXJyIDw8ICJcdGNvdWxkbid0IGdyYWIgaW1hZ2U6IiA8PCByZXQg PDwgc3RkOjplbmRsOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSAgc3RkOjpjZXJy IDw8ICJcdGltYWdlIGdyYWJiZWQiIDw8IHN0ZDo6ZW5kbDsNCiAgICAgICAgfQ0KICAgICAgICBl eGl0KDApOw0KICAgIH0NCiAgICBlbHNlDQogICAgew0KICAgICBzdGQ6OmNlcnIgPDwgIk1haW4g UHJvY2VzcyBmYWxsaW5nIGFzbGVlcCBmb3IgYSBiaXQiIDw8IHN0ZDo6ZW5kbDsNCiAgICAgOjpz bGVlcCgyMCk7DQogICAgfQ0KICAgIGludCBwaWQyID0gMDsNCiAgICBwaWQyID0gZm9yaygpOw0K ICAgIGlmKHBpZDIgPT0gMCkNCiAgICB7DQogICAgICAgIHN0ZDo6Y2VyciA8PCAiXHRcdENoaWxk MjoiIDw8IHN0ZDo6ZW5kbDsNCiAgICAgICAgc3RkOjpzdHJpbmcgaW1nZGF0YTsNCg0KICAgICAg ICBmb3IoaW50IGk9MDsgaTwzOyBpKyspDQogICAgICAgIHsNCiAgICAgICAgICAgIGludCByZXQ9 MDsgDQogICAgICAgICAgICBpZigocmV0ID0gZ2V0SW1hZ2UoaW1nZGF0YSkpIT0wKQ0KICAgICAg ICAgICAgew0KICAgICAgICAgICAgICAgIHN0ZDo6Y2VyciA8PCAiXHRcdGNvdWxkbid0IGdyYWIg aW1hZ2U6ICI8PCByZXQgPDwgc3RkOjplbmRsOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAg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91bmQgPSBmYWxzZTsNCiAgICAgICAgZm9yIChpbnQgaT12 aWRlb19tb2Rlcy5udW0tMTtpPj0wO2ktLSkgDQogICAgICAgIHsNCiAgICAgICAgICAgIGNvbnN0 IGRjMTM5NHZpZGVvX21vZGVfdCBtb2RlID0gdmlkZW9fbW9kZXMubW9kZXNbaV07DQogICAgICAg ICAgICBzd2l0Y2ggKG1vZGUpIHsNCiAgICAgICAgICAgICAgICAgICBjYXNlIERDMTM5NF9WSURF T19NT0RFXzY0MHg0ODBfTU9OTzg6IHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvX21v ZGUgPSBtb2RlOw0KICAgICAgICAgICAgICAgICAgICAgICAgbV93aWR0aCA9IDY0MDsNCiAgICAg ICAgICAgICAgICAgICAgICAgIG1faGVpZ2h0ID0gNDgwOw0KICAgICAgICAgICAgICAgICAgICAg ICAgdmFsaWRfdmlkZW9tb2RlX2ZvdW5kID0gdHJ1ZTsNCiAgICAgICAgICAgICAgICAgICAgICAg IGJyZWFrOw0KICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICBjYXNlIERD MTM5NF9WSURFT19NT0RFXzgwMHg2MDBfTU9OTzg6IHsNCiAgICAgICAgICAgICAgICAgICAgICAg IHZpZGVvX21vZGUgPSBtb2RlOw0KICAgICAgICAgICAgICAgICAgICAgICAgbV93aWR0aCA9IDgw MDsNCiAgICAgICAgICAgICAgICAgICAgICAgIG1faGVpZ2h0ID0gNjAwOw0KICAgICAgICAgICAg ICAgICAgICAgICAgdmFsaWRfdmlkZW9tb2RlX2ZvdW5kID0gdHJ1ZTsNCiAgICAgICAgICAgICAg ICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAg ICBjYXNlIERDMTM5NF9WSURFT19NT0RFXzEwMjR4NzY4X01PTk84OiB7DQogICAgICAgICAgICAg ICAgICAgICAgICB2aWRlb19tb2RlID0gbW9kZTsNCiAgICAgICAgICAgICAgICAgICAgICAgIG1f d2lkdGggPSAxMDI0Ow0KICAgICAgICAgICAgICAgICAgICAgICAgbV9oZWlnaHQgPSA3Njg7DQog ICAgICAgICAgICAgICAgICAgICAgICB2YWxpZF92aWRlb21vZGVfZm91bmQgPSB0cnVlOw0KICAg ICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgfQ0KICAgICAg ICAgICAgICAgICAgIGNhc2UgREMxMzk0X1ZJREVPX01PREVfMTI4MHg5NjBfTU9OTzg6IHsNCiAg ICAgICAgICAgICAgICAgICAgICAgIHZpZGVvX21vZGUgPSBtb2RlOw0KICAgICAgICAgICAgICAg ICAgICAgICAgbV93aWR0aCA9IDEyODA7DQogICAgICAgICAgICAgICAgICAgICAgICBtX2hlaWdo dCA9IDk2MDsNCiAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkX3ZpZGVvbW9kZV9mb3VuZCA9 IHRydWU7DQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAg ICB9DQogICAgICAgICAgICAgICAgICAgY2FzZSBEQzEzOTRfVklERU9fTU9ERV8xNjAweDEyMDBf TU9OTzg6IHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvX21vZGUgPSBtb2RlOw0KICAg ICAgICAgICAgICAgICAgICAgICAgbV93aWR0aCA9IDE2MDA7DQogICAgICAgICAgICAgICAgICAg ICAgICBtX2hlaWdodCA9IDEyMDA7DQogICAgICAgICAgICAgICAgICAgICAgICB2YWxpZF92aWRl b21vZGVfZm91bmQgPSB0cnVlOw0KICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQogICAg ICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IGJyZWFrOw0KICAg ICAgICAgICAgfQ0KICAgICAgICAgICAgaWYgKHZhbGlkX3ZpZGVvbW9kZV9mb3VuZCA9PSB0cnVl KSB7DQogICAgICAgICAgICAgICBic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