alepez / omxdirector

Nodejs module to control omxplayer
29 stars 68 forks source link

Start, stop and start will end the 2nd video before expected #7

Open totty90 opened 9 years ago

totty90 commented 9 years ago

Here is the exact steps to reproduce (doesn't happen 100% of the times):

I didn't stopped it because the output would be process exit { '0': null, '1': 'SIGTERM' }

Here is the log:

> omx.play(left)
spawn omx process with omxplayer left.mp4
true
> omx.stop();
action quit
true
> undefined
omxplayer still running. kill forced
process exit { '0': null, '1': 'SIGTERM' }
stopped {}
omx.play(init)
spawn omx process with omxplayer init.mp4
trueprocess exit { '0': 0, '1': null }
> 
stopped {}

I've added some logs into the key parts of your lib to get that output.

I've tried with the omxplayer from cli and works as expected.

alepez commented 9 years ago

I guess this is caused by a workaround. Sometimes (randomly) omxplayer does not exit completely, but hangs after video has stopped. We need to kill it if it does not exit when stopped. And this workaround seems to interfere with your case. If you want to investigate and correct this problem, i will be pleased to merge your pull request.

Il giorno Ven 6 Feb 2015 16:30 TT TY notifications@github.com ha scritto:

Here is the exact steps to reproduce (doesn't happen 100% of the times):

  • Start video A;
  • Get status: playing
  • Stop
  • Get status: stopped
  • Start video B
  • Get status the next 0.5 second: playing
  • Then player stops with process exit { '0': 0, '1': null }

I didn't stopped it because the output would be process exit { '0': null, '1': 'SIGTERM' }

Here is the log:

omx.play(left) spawn omx process with omxplayer left.mp4 true omx.stop(); action quit true undefined omxplayer still running. kill forced process exit { '0': null, '1': 'SIGTERM' } stopped {} omx.play(init) spawn omx process with omxplayer init.mp4 trueprocess exit { '0': 0, '1': null }

stopped {}

I've added some logs into the key parts of your lib to get that output.

— Reply to this email directly or view it on GitHub https://github.com/alessandro-pezzato/omxdirector/issues/7.

totty90 commented 9 years ago

Hy! Ok, I will try to make it work :-)

On Fri, Feb 6, 2015, 22:13 Alessandro Pezzato notifications@github.com wrote:

I guess this is caused by a workaround. Sometimes (randomly) omxplayer does not exit completely, but hangs after video has stopped. We need to kill it if it does not exit when stopped. And this workaround seems to interfere with your case. If you want to investigate and correct this problem, i will be pleased to merge your pull request.

Il giorno Ven 6 Feb 2015 16:30 TT TY notifications@github.com ha scritto:

Here is the exact steps to reproduce (doesn't happen 100% of the times):

  • Start video A;
  • Get status: playing
  • Stop
  • Get status: stopped
  • Start video B
  • Get status the next 0.5 second: playing
  • Then player stops with process exit { '0': 0, '1': null }

I didn't stopped it because the output would be process exit { '0': null, '1': 'SIGTERM' }

Here is the log:

omx.play(left) spawn omx process with omxplayer left.mp4 true omx.stop(); action quit true undefined omxplayer still running. kill forced process exit { '0': null, '1': 'SIGTERM' } stopped {} omx.play(init) spawn omx process with omxplayer init.mp4 trueprocess exit { '0': 0, '1': null }

stopped {}

I've added some logs into the key parts of your lib to get that output.

— Reply to this email directly or view it on GitHub https://github.com/alessandro-pezzato/omxdirector/issues/7.

— Reply to this email directly or view it on GitHub https://github.com/alessandro-pezzato/omxdirector/issues/7#issuecomment-73322604 .

danielmahon commented 8 years ago

Im having this issue now as well