lu-zero / bmdtools

Basic capture and play programs for Blackmagic Design Decklink
Boost Software License 1.0
198 stars 74 forks source link

Pause / Resume for Bmdplay #98

Open advera68 opened 6 years ago

advera68 commented 6 years ago

Dear Luca,

I have been using bmdplay / bmdcapture in Ubuntu environment with an excellent result so far. Thank you very much for these tools.

Recently I needed to Pause / Resume bmdplay. I tried to do it sending SIGSTOP (as pause) and SIGCONT (as resume) to bmdplay process but it didn't work very well. It seems to work if time elapsed between pause and resume is lees than bmdplay prebuffering (one or two seconds) but doesn't work for more time.

I also tried sending the same signals to "avconv" or "ffmpeg" which are the commands that pipe out to bmdplay but the result is much the same.

When SIGSTOP or SIGCONT is sent avconv or ffmpeg behave properly as can be observed looking their messages, meanwhile when bmdplay stops, the image frozes in SDI video monitor but when bmdplay resumes, video remains frozen and however audio returns to play correctly.

Could you tell me how to perform a Pause / Resume Bmdplay operation ?

Thanks.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/56981735-pause-resume-for-bmdplay?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).
advera68 commented 6 years ago

Hi Luca,

I have just noticed in Blackmagic_DeckLink_SDK_10.9.11/Linux/include/DeckLinkAPI*.h files exist sentences with "PauseStreams" words.

Do you think this may have something to do with Pause / Resume operation that I am looking for ?

lu-zero commented 6 years ago

Pause/Resume using signals is not currently supported and actually was never tested.

Probably would be possible to add a pause-on-signal feature to bmdplay, but it would require some additional thinking.

advera68 commented 6 years ago

OK, is there any way to pause / resume without using signals ?