Opened 11 years ago

Closed 10 years ago

#9287 closed Developer Task (Fixed)

DVD/BD RingBuffer refactor

Reported by: danielk Owned by: danielk
Priority: minor Milestone: 0.25
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


This makes the DVD and BD RingBuffer? implementations inherit from RingBuffer?.

This has not been tested, it compiles, that's about it.

What this patch does not do is:

  • Audit locking for DVD and BD access.
  • replace safe_read() with something more interruptible and responsive
  • Create a common interface for DVD and BD access (DiscRingBuffer?)

Those are all laudable goals, but I just wanted to keep this simple so we could get rid of the unsafe and depreciated code in RingBuffer?.{h,cpp} ASAP.

Attachments (3)

9287-v1.patch (165.7 KB) - added by danielk 11 years ago.
initial patch
9287-v2.patch (166.9 KB) - added by danielk 11 years ago.
9287-v3.patch (144.9 KB) - added by markk 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by danielk

Attachment: 9287-v1.patch added

initial patch

comment:1 Changed 11 years ago by Kenni Lund [kenni a kelu dot dk]

Status: newassigned

Changed 11 years ago by danielk

Attachment: 9287-v2.patch added


Changed 11 years ago by markk

Attachment: 9287-v3.patch added

comment:2 Changed 11 years ago by markk

I've added another version with a couple of fixes:-

  • properly initialise filename in FileRingBuffer::FileRingBuffer? for all use cases.
  • use the correct filename value in DVDRingBuffer::DVDRingBuffer
  • fix lockups in BDRingBuffer when using the LOC definitions in debug output (GetFilename? locks up)

With these fixes everything appears to be functioning without issue.

I would like to fix a pet hate of mine as well - does anyone object to removing the capitalisation from the ringbuffer class filenames? They persistently throw me (and QtCreator?) when looking for files!

comment:3 Changed 11 years ago by markk

(In [27413]) Refactor the RingBuffer? classes.

-- make distclean STRONGLY recommended --

This creates a proper class hierarchy for the RingBuffer? classes, adds a new FileRingBuffer? class and removes the capitalisation from the file names.

As noted in #9287, this a straight refactor with no attempt made to optimise the interface or minimise code duplication.

Tested on 3 different boxes here with no apparent regressions.

Refs #9287

comment:4 Changed 10 years ago by danielk

Resolution: Fixed
Status: assignedclosed

The patch was committed in [27413]..

Note: See TracTickets for help on using tickets.