mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 938809 - Support calling seeking/tuning functions off main thread in HAL, r=dhylands
This commit is contained in:
parent
4c0ec65557
commit
68f5b67b31
@ -526,6 +526,8 @@ void DisableFMRadio();
|
||||
/**
|
||||
* Seek to an available FM radio station.
|
||||
*
|
||||
* This can be called off main thread, but all calls must be completed
|
||||
* before calling DisableFMRadio.
|
||||
*/
|
||||
void FMRadioSeek(const hal::FMRadioSeekDirection& aDirection);
|
||||
|
||||
@ -536,6 +538,9 @@ void GetFMRadioSettings(hal::FMRadioSettings* aInfo);
|
||||
|
||||
/**
|
||||
* Set the FM radio's frequency.
|
||||
*
|
||||
* This can be called off main thread, but all calls must be completed
|
||||
* before calling DisableFMRadio.
|
||||
*/
|
||||
void SetFMRadioFrequency(const uint32_t frequency);
|
||||
|
||||
|
@ -402,20 +402,18 @@ FMRadioSeek(const hal::FMRadioSeekDirection& aDirection)
|
||||
if (sMsmFMMode && rc >= 0)
|
||||
return;
|
||||
|
||||
hal::FMRadioOperationInformation info;
|
||||
info.operation() = hal::FM_RADIO_OPERATION_SEEK;
|
||||
info.status() = rc < 0 ? hal::FM_RADIO_OPERATION_STATUS_FAIL :
|
||||
hal::FM_RADIO_OPERATION_STATUS_SUCCESS;
|
||||
hal::NotifyFMRadioStatus(info);
|
||||
NS_DispatchToMainThread(new RadioUpdate(hal::FM_RADIO_OPERATION_SEEK,
|
||||
rc < 0 ?
|
||||
hal::FM_RADIO_OPERATION_STATUS_FAIL :
|
||||
hal::FM_RADIO_OPERATION_STATUS_SUCCESS));
|
||||
|
||||
if (rc < 0) {
|
||||
HAL_LOG(("Could not initiate hardware seek"));
|
||||
return;
|
||||
}
|
||||
|
||||
info.operation() = hal::FM_RADIO_OPERATION_TUNE;
|
||||
info.status() = hal::FM_RADIO_OPERATION_STATUS_SUCCESS;
|
||||
hal::NotifyFMRadioStatus(info);
|
||||
NS_DispatchToMainThread(new RadioUpdate(hal::FM_RADIO_OPERATION_TUNE,
|
||||
hal::FM_RADIO_OPERATION_STATUS_SUCCESS));
|
||||
}
|
||||
|
||||
void
|
||||
@ -450,11 +448,10 @@ SetFMRadioFrequency(const uint32_t frequency)
|
||||
if (sMsmFMMode && rc >= 0)
|
||||
return;
|
||||
|
||||
hal::FMRadioOperationInformation info;
|
||||
info.operation() = hal::FM_RADIO_OPERATION_TUNE;
|
||||
info.status() = rc < 0 ? hal::FM_RADIO_OPERATION_STATUS_FAIL :
|
||||
hal::FM_RADIO_OPERATION_STATUS_SUCCESS;
|
||||
hal::NotifyFMRadioStatus(info);
|
||||
NS_DispatchToMainThread(new RadioUpdate(hal::FM_RADIO_OPERATION_TUNE,
|
||||
rc < 0 ?
|
||||
hal::FM_RADIO_OPERATION_STATUS_FAIL :
|
||||
hal::FM_RADIO_OPERATION_STATUS_SUCCESS));
|
||||
}
|
||||
|
||||
uint32_t
|
||||
|
Loading…
Reference in New Issue
Block a user