nabend,
ich bekomme es ums verrecken nicht hin eine datei lesend bzw schreiben zu öffnen.. file wird im konstruktor geöffnet:
Code
cFileRingBuffer::cFileRingBuffer(int Size, int BlockSize, int Margin, char *location)
{
frd_pos = 0;
fwrt_pos = 0;
fwrt_pos_org = 0;
blocksize = BlockSize;
max_buffersize = Size;
blockWritten = 0;
fwrt = fopen(location, "wb");
frd = fopen(location, "rb");
if(fwrt == NULL)
dsyslog("could not open file %s for writing\n", location);
if(frd == NULL)
dsyslog("could not open file %s for reading\n", location);
//set to unbuffered file i/o
setlinebuf(frd);
setlinebuf(fwrt);
//still, the 2bytes are buffered...
//frd->_bufsiz = 0;
//fwrt->_bufsiz = 0;
}
Alles anzeigen
den rufe ich an zbsp mit
vdr wird unter user vdr gestartet, schreibrechte in video.00 sind natürlich vorhanden..
dennoch steigt er aus :
ZitatJan 9 21:27:06 ubuntu-vm vdr: [19324] could not open file /var/lib/vdr/video.00/file.ts for writing
Jan 9 21:27:06 ubuntu-vm vdr: [19324] could not open file /var/lib/vdr/video.00/file.ts for reading
hat da jemand ne idee?
infinite