notsecure / uTox

Lightweight Tox client
utox.org
GNU General Public License v3.0
597 stars 149 forks source link

do not block video device when video is not used #1101

Closed cebe closed 8 years ago

cebe commented 9 years ago

initially open a device when it is selected but close it afterwards to allow other programs to used it. A device is now only opened if it is actually needed, meaning either a preview window is opened or a call is started.

fixes #628

this is my first contribution here so please tell me if there is anything to adjust. I'm also not that familiar with C. Any suggestions welcome.

GrayHatter commented 8 years ago

@cebe I've more or less finished porting utox over to the new toxav that's in the works... do you want to submit a new pull request from that branch? Or I can just copy over the code by hand... If you want the credit, you'll have to open a new PR.

https://github.com/grayhatter/utox/tree/new_av_api

cebe commented 8 years ago

feel free to copy the code, I wont have time for it the next weeks.

cebe commented 8 years ago

@GrayHatter do you need help with this or have you already fixed it in your branch?

GrayHatter commented 8 years ago

I haven't touched this from the time that we talked. So I definitely could use the help!

I've push a new branch to grayhatter/utox the branch name that you want to use now is new_av_api. The functions have moved around, so without looking I believe that the new location is video.c the thread should be mostly the same, so copy paste should work, but git won't be able to do it for you.

In order to compile or test that branch, you'll need to be able to compile the new_api branch from @mannol here -> https://github.com/mannol/toxcore/tree/new_api

If you need any help I'm always in #tox-dev on freenode.

GrayHatter commented 8 years ago

@cebe new ToxAV was merged, so if you could reopen this at https://github.com/GrayHatter/uTox, I'll merge in right in.

cebe commented 8 years ago

-> https://github.com/GrayHatter/uTox/pull/52