mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
@@ -14,6 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
@@ -286,8 +287,7 @@ void cRecord::RecordThread()
|
|||||||
if (toread > readsize)
|
if (toread > readsize)
|
||||||
toread = readsize;
|
toread = readsize;
|
||||||
ssize_t s = dmx->Read(buf + buf_pos, toread, 50);
|
ssize_t s = dmx->Read(buf + buf_pos, toread, 50);
|
||||||
hal_debug("%s: buf_pos %6d s %6d / %6d\n",
|
hal_debug("%s: buf_pos %6d s %6d / %6d\n", __func__, buf_pos, (int)s, bufsize - buf_pos);
|
||||||
__func__, buf_pos, (int)s, bufsize - buf_pos);
|
|
||||||
if (s < 0)
|
if (s < 0)
|
||||||
{
|
{
|
||||||
if (errno != EAGAIN && (errno != EOVERFLOW || !overflow))
|
if (errno != EAGAIN && (errno != EOVERFLOW || !overflow))
|
||||||
|
@@ -13,10 +13,10 @@ typedef enum
|
|||||||
{
|
{
|
||||||
RECORD_RUNNING,
|
RECORD_RUNNING,
|
||||||
RECORD_STOPPED,
|
RECORD_STOPPED,
|
||||||
RECORD_FAILED_READ, /* failed to read from DMX */
|
RECORD_FAILED_READ, /* failed to read from DMX */
|
||||||
RECORD_FAILED_OVERFLOW, /* cannot write fast enough */
|
RECORD_FAILED_OVERFLOW, /* cannot write fast enough */
|
||||||
RECORD_FAILED_FILE, /* cannot write to file */
|
RECORD_FAILED_FILE, /* cannot write to file */
|
||||||
RECORD_FAILED_MEMORY /* out of memory */
|
RECORD_FAILED_MEMORY /* out of memory */
|
||||||
} record_state_t;
|
} record_state_t;
|
||||||
|
|
||||||
class cRecord
|
class cRecord
|
||||||
|
@@ -17,18 +17,18 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include <config.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include "dmx_hal.h"
|
#include "dmx_hal.h"
|
||||||
#include "hal_debug.h"
|
#include "hal_debug.h"
|
||||||
@@ -147,6 +147,7 @@ void cDemux::Close(void)
|
|||||||
hal_info("%s #%d: not open!\n", __FUNCTION__, num);
|
hal_info("%s #%d: not open!\n", __FUNCTION__, num);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pesfds.clear();
|
pesfds.clear();
|
||||||
ioctl(fd, DMX_STOP);
|
ioctl(fd, DMX_STOP);
|
||||||
close(fd);
|
close(fd);
|
||||||
@@ -264,9 +265,9 @@ bool cDemux::sectionFilter(unsigned short _pid, const unsigned char *const filte
|
|||||||
hal_info("%s #%d: len too long: %d, DMX_FILTER_SIZE %d\n", __func__, num, len, DMX_FILTER_SIZE);
|
hal_info("%s #%d: len too long: %d, DMX_FILTER_SIZE %d\n", __func__, num, len, DMX_FILTER_SIZE);
|
||||||
len = DMX_FILTER_SIZE;
|
len = DMX_FILTER_SIZE;
|
||||||
}
|
}
|
||||||
|
flt = filter[0];
|
||||||
s_flt.pid = pid;
|
s_flt.pid = pid;
|
||||||
s_flt.timeout = timeout;
|
s_flt.timeout = timeout;
|
||||||
flt = filter[0];
|
|
||||||
memcpy(s_flt.filter.filter, filter, len);
|
memcpy(s_flt.filter.filter, filter, len);
|
||||||
memcpy(s_flt.filter.mask, mask, len);
|
memcpy(s_flt.filter.mask, mask, len);
|
||||||
if (negmask != NULL)
|
if (negmask != NULL)
|
||||||
|
@@ -184,8 +184,8 @@ class cVideo : public OpenThreads::Thread
|
|||||||
|
|
||||||
/* aspect ratio */
|
/* aspect ratio */
|
||||||
int getAspectRatio(void);
|
int getAspectRatio(void);
|
||||||
int setAspectRatio(int aspect, int mode);
|
|
||||||
void getPictureInfo(int &width, int &height, int &rate);
|
void getPictureInfo(int &width, int &height, int &rate);
|
||||||
|
int setAspectRatio(int aspect, int mode);
|
||||||
|
|
||||||
/* cropping mode */
|
/* cropping mode */
|
||||||
int setCroppingMode(int x = 0 /*vidDispMode_t x = VID_DISPMODE_NORM*/);
|
int setCroppingMode(int x = 0 /*vidDispMode_t x = VID_DISPMODE_NORM*/);
|
||||||
|
Reference in New Issue
Block a user