-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[input] Re-factor remote control #13502
Conversation
5a9bbe0
to
194b73d
Compare
xbmc/input/InputManager.h
Outdated
* | ||
* \return true if remote control is enabled, false otherwise | ||
*/ | ||
bool IsRemoteControlExists(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/input/IRTranslator.h
Outdated
@@ -34,7 +34,7 @@ class CIRTranslator | |||
/*! | |||
* \brief Loads Lircmap.xml/IRSSmap.xml | |||
*/ | |||
void Load(); | |||
void Load(std::string irMapName); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/input/remote/IRemoteControl.h
Outdated
virtual void Disconnect() = 0; | ||
|
||
/*! | ||
* \brief Get the button readed from IR |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/input/remote/IRemoteControl.h
Outdated
* | ||
* \return A button code | ||
*/ | ||
virtual unsigned short GetButton() const = 0; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/input/remote/IRemoteControl.h
Outdated
/*! | ||
* \brief Get the time while a button was hold | ||
* | ||
* \return A hold time |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/input/remote/IRemoteControl.h
Outdated
/*! | ||
* \brief Set enabled status | ||
*/ | ||
virtual void SetEnabled(bool) { } |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/input/remote/IRemoteControl.h
Outdated
/*! | ||
* \brief Get the in-use status | ||
*/ | ||
virtual bool IsInUse() const { return false; } |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/platform/linux/input/LIRC.h
Outdated
bool IsInUse() const override { return m_used; } | ||
bool IsInitialized() const override { return m_bInitialized; } | ||
void AddSendCommand(const std::string& command) override; | ||
std::string GetMapFile() override { return "Lircmap.xml"; } |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/input/remote/IRemoteControl.h
Outdated
/*! | ||
* \brief Interface for remote control | ||
*/ | ||
class IRemoteControl |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Really great job! All my comments are 1-liners |
xbmc/input/remote/IRemoteControl.h
Outdated
/*! | ||
* \brief Get the button readed from IR | ||
* | ||
* \return A button code |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
A single request to make this refactoring even more stellar: Can you move XBIRRemote.h to your new remotes/ subdir? Maybe rename it to not include XB? thanks! |
194b73d
to
6d0cdbe
Compare
return LIRC_MAP_FILENAME; | ||
} | ||
|
||
void CRemoteControl::SetEnabled(bool bEnabled) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
virtual bool IsInUse() const = 0; | ||
}; | ||
} | ||
} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/input/remote/IRemoteControl.h
Outdated
/*! | ||
* \brief Add a command to send to a bus | ||
*/ | ||
virtual void AddSendCommand(const std::string&) = 0; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
6d0cdbe
to
57adb06
Compare
if there is no more objection this will go tonight |
go now |
This PR is causing a problem with remote input after resuming from suspend (on Linux, specifically LibreELEC). Starting with build #0210, when device (eg. x86_64 Revo 3700 with USB MCE IR) is resumed from suspend Kodi no longer receives any remote control inputs. I've built the latest master Kodi with and without this PR, and the version with this PR has the resume-from-suspend issue while the version without works perfectly after resuming. Log without PR: http://ix.io/Gjw (works perfectly after resume) What seems to be missing in the "bad" log is the restart of lirc - this is what happens in the "good" log after resuming:
|
the links are identical |
Sorry, fat fingers: Log without PR: http://ix.io/Gjw (works perfectly after resume) |
Should work now, see 5c9c318 |
Thanks, 5c9c318 fixes the issue. |
in order of preparation to an implementation of support remote control on xbox I've made refactoring current code.