/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#include "../../guicast/bcwindowbase.inc"
- if((frontend_fd = ::open(frontend_path, O_RDWR)) < 0)
+ if((frontend_fd = ::open(frontend_path, O_RDWR)) < 0)
{
- fprintf(stderr,
+ fprintf(stderr,
"DVBTune::open_tuner %s: %s\n",
frontend_path,
strerror(errno));
// Open transport stream for reading
if((dvr_fd = ::open(dvr_path, O_RDONLY)) < 0)
{
- fprintf(stderr,
+ fprintf(stderr,
"DVBTune::open_tuner %s: %s\n",
dvr_path,
strerror(errno));
if(ioctl(frontend_fd, FE_SET_FRONTEND, &frontend_param) < 0)
{
- fprintf(stderr,
+ fprintf(stderr,
"DVBTune::open_tuner FE_SET_FRONTEND frequency=%d: %s",
frontend_param.frequency,
strerror(errno));
pesfilter.flags = DMX_IMMEDIATE_START;
if(ioctl(video_fd, DMX_SET_PES_FILTER, &pesfilter) < 0)
{
- fprintf(stderr,
- "DVBTune::open_tuner DMX_SET_PES_FILTER for raw: %s\n",
+ fprintf(stderr,
+ "DVBTune::open_tuner DMX_SET_PES_FILTER for raw: %s\n",
strerror(errno));
return 1;
}
pesfilter.flags = DMX_IMMEDIATE_START;
if(ioctl(video_fd, DMX_SET_PES_FILTER, &pesfilter) < 0)
{
- fprintf(stderr,
- "DVBTune::open_tuner DMX_SET_PES_FILTER for video: %s\n",
+ fprintf(stderr,
+ "DVBTune::open_tuner DMX_SET_PES_FILTER for video: %s\n",
strerror(errno));
return 1;
}
pesfilter.flags = DMX_IMMEDIATE_START;
if(ioctl(audio_fd, DMX_SET_PES_FILTER, &pesfilter) < 0)
{
- fprintf(stderr,
- "DVBTune::open_tuner DMX_SET_PES_FILTER for audio: %s\n",
+ fprintf(stderr,
+ "DVBTune::open_tuner DMX_SET_PES_FILTER for audio: %s\n",
strerror(errno));
return 1;
}
if(video_fd >= 0) close(video_fd);
if(dvr_fd >= 0) close(dvr_fd);
reset();
-
+
return 0;
}
*current_power = 0;
*current_lock = 0;
}
-
+
return 0;
}
// Store in server buffer.
{
server->buffer_lock->lock("DVBTuneThread::run");
- if(!server->buffer ||
+ if(!server->buffer ||
server->buffer_allocated < server->buffer_size + result)
{
int new_allocation = server->buffer_size + result;