rework kodi grabbing mode for all grabbers (#169)

* pull out setgrabbing mode from every grabber into parent class

* implement optional kodi check for v4l

* fix typo

* fix dispmanx build
This commit is contained in:
redPanther
2016-08-12 23:07:32 +02:00
committed by GitHub
parent 050ab11c8e
commit 7ee2e7cf8d
15 changed files with 99 additions and 168 deletions

View File

@@ -67,3 +67,41 @@ void GrabberWrapper::componentStateChanged(const hyperion::Components component,
Info(_log, "bb detector change state to %s", (_processor->blackBorderDetectorEnabled() ? "enabled" : "disabled") );
}
}
void GrabberWrapper::kodiPlay()
{
start();
}
void GrabberWrapper::kodiPause()
{
start();
}
void GrabberWrapper::kodiOff()
{
stop();
}
void GrabberWrapper::setGrabbingMode(const GrabbingMode mode)
{
switch (mode)
{
case GRABBINGMODE_VIDEO:
case GRABBINGMODE_PAUSE:
kodiPause();
break;
case GRABBINGMODE_AUDIO:
case GRABBINGMODE_PHOTO:
case GRABBINGMODE_MENU:
case GRABBINGMODE_SCREENSAVER:
case GRABBINGMODE_INVALID:
kodiPlay();
break;
case GRABBINGMODE_OFF:
kodiOff();
break;
}
}