[mythtv] ringbuffer.cpp

Jean-Yves Avenard jyavenard at gmail.com
Mon Mar 3 05:22:33 UTC 2014

On 3 March 2014 15:26, Bill Meek <keemllib at gmail.com> wrote:
> Is this message supposed to be loglevel debug?
> 2014-03-02 22:08:02.032226 I [4857/4891] MythSocketThread(-1)
> mythcorecontext.cpp:1151 (readyRead) - MythCoreContext: Received remote
> 'FILE_WRITTEN /srv/mythtv-0/recordings/2615_20140303040000.mpg' request
> 2014-03-02 22:08:02.239430 I [4857/4891] MythSocketThread(-1)
> mythcorecontext.cpp:1151 (readyRead) - MythCoreContext: Received remote
> 'FILE_WRITTEN /srv/mythtv-1/recordings/1021_20140303030000.mpg' request
> I've had over 5300 (with various channels) in the last 10 hours. None
> were from LiveTV, they were scheduled recordings.
> They were all on a FE which is running: v0.28-pre-931-g2c71895.
> The message appears in: commit fafc658.

Yes, those messages appear with loglevel=debug like all messages sent
by the backend.
FILE_WRITTEN is sent by the backend whenever a new file is created in
write mode, and following that, no more than every 10s whenever a file
is being written to.

Those messages are needed in order to resolve one particular problem:
when watching an in-progress recording, if you were to fast forward
very close to the end, playback would exit.

The reason was that the frontend had no way to differentiate during
playback between reading a completed recording and reading an
in-progress recording. So if it ever encountered an EOF (End Of File),
it would simply exit, regardless of the backend still writing to the
file or not.

With those messages, every frontends can keep a record of while file
are currently being written to and those that aren't.

If during playback it encounters and EOF, if the file is still being
written to by the backend (e.g. an in-progress recording) then it
won't exit when encountering EOF, instead it will retry.

More information about the mythtv-dev mailing list