mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
spark: implement cRecord::GetStatus()
This commit is contained in:
@@ -51,6 +51,7 @@ public:
|
|||||||
file_fd = -1;
|
file_fd = -1;
|
||||||
exit_flag = RECORD_STOPPED;
|
exit_flag = RECORD_STOPPED;
|
||||||
dmx_num = num;
|
dmx_num = num;
|
||||||
|
state = REC_STATUS_OK;
|
||||||
}
|
}
|
||||||
int file_fd;
|
int file_fd;
|
||||||
int dmx_num;
|
int dmx_num;
|
||||||
@@ -270,6 +271,7 @@ void RecData::RecordThread()
|
|||||||
{
|
{
|
||||||
lt_info("%s: read failed: %m\n", __func__);
|
lt_info("%s: read failed: %m\n", __func__);
|
||||||
exit_flag = RECORD_FAILED_READ;
|
exit_flag = RECORD_FAILED_READ;
|
||||||
|
state = REC_STATUS_OVERFLOW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -286,6 +288,7 @@ void RecData::RecordThread()
|
|||||||
overflow = true;
|
overflow = true;
|
||||||
if (!(overflow_count % 10))
|
if (!(overflow_count % 10))
|
||||||
lt_info("%s: buffer full! Overflow? (%d)\n", __func__, ++overflow_count);
|
lt_info("%s: buffer full! Overflow? (%d)\n", __func__, ++overflow_count);
|
||||||
|
state = REC_STATUS_SLOW;
|
||||||
}
|
}
|
||||||
r = aio_error(&a);
|
r = aio_error(&a);
|
||||||
if (r == EINPROGRESS)
|
if (r == EINPROGRESS)
|
||||||
@@ -369,8 +372,9 @@ void RecData::RecordThread()
|
|||||||
|
|
||||||
int cRecord::GetStatus()
|
int cRecord::GetStatus()
|
||||||
{
|
{
|
||||||
/* dummy for now */
|
if (pd)
|
||||||
return REC_STATUS_OK;
|
return pd->state;
|
||||||
|
return REC_STATUS_OK; /* should not happen */
|
||||||
}
|
}
|
||||||
|
|
||||||
void cRecord::ResetStatus()
|
void cRecord::ResetStatus()
|
||||||
|
Reference in New Issue
Block a user