Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 3 years ago

Closed 3 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

Description

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 3 years ago.
initial patch
9287-v2.patch (166.9 KB) - added by danielk 3 years ago.
Updated
9287-v3.patch (144.9 KB) - added by markk 3 years ago.

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by danielk

initial patch

comment:1 Changed 3 years ago by kenni

  • Status changed from new to assigned

Changed 3 years ago by danielk

Updated

Changed 3 years ago by markk

comment:2 Changed 3 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 3 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 3 years ago by danielk

  • Resolution set to Fixed
  • Status changed from assigned to closed

The patch was committed in [27413]..

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.