Width and height are defined by the sources themselves. You use the get_width and get_height callbacks on the obs_source_info structure. I really should have just used one function, not sure what on earth I was thinking at the time when I made it two functions.