{"action":"created","issue":{"url":"https://api.github.com/repos/ufo-kit/libuca/issues/67","labels_url":"https://api.github.com/repos/ufo-kit/libuca/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/ufo-kit/libuca/issues/67/comments","events_url":"https://api.github.com/repos/ufo-kit/libuca/issues/67/events","html_url":"https://github.com/ufo-kit/libuca/pull/67","id":77605841,"number":67,"title":"Mock dynamic size","user":{"login":"TimoDritschler","id":6672463,"avatar_url":"https://avatars.githubusercontent.com/u/6672463?v=3","gravatar_id":"","url":"https://api.github.com/users/TimoDritschler","html_url":"https://github.com/TimoDritschler","followers_url":"https://api.github.com/users/TimoDritschler/followers","following_url":"https://api.github.com/users/TimoDritschler/following{/other_user}","gists_url":"https://api.github.com/users/TimoDritschler/gists{/gist_id}","starred_url":"https://api.github.com/users/TimoDritschler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimoDritschler/subscriptions","organizations_url":"https://api.github.com/users/TimoDritschler/orgs","repos_url":"https://api.github.com/users/TimoDritschler/repos","events_url":"https://api.github.com/users/TimoDritschler/events{/privacy}","received_events_url":"https://api.github.com/users/TimoDritschler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-18T10:47:31Z","updated_at":"2015-05-18T15:59:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ufo-kit/libuca/pulls/67","html_url":"https://github.com/ufo-kit/libuca/pull/67","diff_url":"https://github.com/ufo-kit/libuca/pull/67.diff","patch_url":"https://github.com/ufo-kit/libuca/pull/67.patch"},"body":"I have changed mock camera so that it is possible to set ```sensor-width```, ```sensor-height``` and ```sensor-bitdepth``` at construction time. This can be useful to create more meaningful test-cases for our frameworks. In order to prevent headaches with warnings and units and such, the properties have been made ```G_PARAM_CONSTRUCT_ONLY``` in the UcaCamera base class.\r\nAlso, I removed the ```__create_random__``` define from mock and made it a gobject property instead. It can be set during acquisition.\r\nFurther, the ```uca-camera-control``` GUI was only checking for the ```G_PARAM_WRITABLE``` bit in the properties, but not for ```G_PARAM_CONSTRUC_ONLY``` bit, which invalidates the writable bit. The GUI was changed accordingly.\r\nLastly, ```test-mock``` was adapted to the new mock behavior.\r\n\r\nThere is now only one pitfall, though. Since sensor-width and sensor-height are now construction time parameters, the ROI settings need to be set dynamically as well during construction. I just set them to the same values as sensor-width and sensor-height in the initable_init part of mock, which overrides any ROI sized passed in by the user at construction. Do you have any good idea how to handle this properly?"},"comment":{"url":"https://api.github.com/repos/ufo-kit/libuca/issues/comments/103113320","html_url":"https://github.com/ufo-kit/libuca/pull/67#issuecomment-103113320","issue_url":"https://api.github.com/repos/ufo-kit/libuca/issues/67","id":103113320,"user":{"login":"TimoDritschler","id":6672463,"avatar_url":"https://avatars.githubusercontent.com/u/6672463?v=3","gravatar_id":"","url":"https://api.github.com/users/TimoDritschler","html_url":"https://github.com/TimoDritschler","followers_url":"https://api.github.com/users/TimoDritschler/followers","following_url":"https://api.github.com/users/TimoDritschler/following{/other_user}","gists_url":"https://api.github.com/users/TimoDritschler/gists{/gist_id}","starred_url":"https://api.github.com/users/TimoDritschler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimoDritschler/subscriptions","organizations_url":"https://api.github.com/users/TimoDritschler/orgs","repos_url":"https://api.github.com/users/TimoDritschler/repos","events_url":"https://api.github.com/users/TimoDritschler/events{/privacy}","received_events_url":"https://api.github.com/users/TimoDritschler/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T15:59:19Z","updated_at":"2015-05-18T15:59:19Z","body":"I have changed the things you mentioned in your comments.\r\nAdditionally, I have missed one more small optimization in mock (moved the ```default_line``` buffer to priv data and create it only once, during init, so I don't need to recalc it over and over again, each frame)\r\nFurther, I am using the newly created ```uca_camera_pspec_set_writable``` in mock, which means it has a dependency on whatever interface version of libuca this is going to be (I guessed version 2.1 for now. (See [here](https://github.com/ufo-kit/libuca/pull/67/files#diff-cee3f81a9fb5fab2caf91681d68394f2R7) and [here](https://github.com/ufo-kit/libuca/pull/67/files#diff-75f1650d7ede5ccabb91fb3593224e7aR1169)) Is that okay?"}}