mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1075727 - Return success/failure in hal::EnableRDS, r=dhylands
This commit is contained in:
parent
ca3efe3c25
commit
2543c4e388
@ -1112,10 +1112,10 @@ CancelFMRadioSeek() {
|
||||
PROXY_IF_SANDBOXED(CancelFMRadioSeek());
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
EnableRDS(uint32_t aMask) {
|
||||
AssertMainThread();
|
||||
PROXY_IF_SANDBOXED(EnableRDS(aMask));
|
||||
RETURN_PROXY_IF_SANDBOXED(EnableRDS(aMask), false);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -584,7 +584,7 @@ hal::FMRadioSettings GetFMBandSettings(hal::FMRadioCountry aCountry);
|
||||
/**
|
||||
* Enable RDS data reception
|
||||
*/
|
||||
void EnableRDS(uint32_t aMask);
|
||||
bool EnableRDS(uint32_t aMask);
|
||||
|
||||
/**
|
||||
* Disable RDS data reception
|
||||
|
@ -57,9 +57,11 @@ void
|
||||
CancelFMRadioSeek()
|
||||
{}
|
||||
|
||||
void
|
||||
bool
|
||||
EnableRDS(uint32_t aMask)
|
||||
{}
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
DisableRDS()
|
||||
|
@ -636,23 +636,23 @@ readRDSDataThread(void* data)
|
||||
|
||||
static int sRDSPipeFD;
|
||||
|
||||
void
|
||||
bool
|
||||
EnableRDS(uint32_t aMask)
|
||||
{
|
||||
if (!sRadioEnabled || !sRDSSupported)
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (sMsmFMMode)
|
||||
setControl(V4L2_CID_PRIVATE_TAVARUA_RDSGROUP_MASK, aMask);
|
||||
|
||||
if (sRDSEnabled)
|
||||
return;
|
||||
return true;
|
||||
|
||||
int pipefd[2];
|
||||
int rc = pipe2(pipefd, O_NONBLOCK);
|
||||
if (rc < 0) {
|
||||
HAL_LOG("Could not create RDS thread signaling pipes (%d)", rc);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
ScopedClose writefd(pipefd[1]);
|
||||
@ -661,7 +661,7 @@ EnableRDS(uint32_t aMask)
|
||||
rc = setControl(V4L2_CID_RDS_RECEPTION, true);
|
||||
if (rc < 0) {
|
||||
HAL_LOG("Could not enable RDS reception (%d)", rc);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
sRDSPipeFD = writefd;
|
||||
@ -674,11 +674,12 @@ EnableRDS(uint32_t aMask)
|
||||
HAL_LOG("Could not start RDS reception thread (%d)", rc);
|
||||
setControl(V4L2_CID_RDS_RECEPTION, false);
|
||||
sRDSEnabled = false;
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
readfd.forget();
|
||||
writefd.forget();
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -426,10 +426,11 @@ CancelFMRadioSeek()
|
||||
NS_RUNTIMEABORT("FM radio cannot be called from sandboxed contexts.");
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
EnableRDS(uint32_t aMask)
|
||||
{
|
||||
NS_RUNTIMEABORT("FM radio cannot be called from sandboxed contexts.");
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user