Opened 17 years ago

Closed 17 years ago

#2708 closed patch (fixed)

patch: Allow remote FE/BE to prefer to use the myth protocol

Reported by: gdragon at jetcom dt org Owned by: cpinkham
Priority: minor Milestone: unknown
Component: mythtv Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: no

Description

On slave FE's it is generally recommended by various posts in the mailing lists that the myth protocol is better suited to handle playback of streams rather than use a NFS mounted directory. This is especially true when playing back HD streams. The recommendation here is to not have the recording directory mounted and it will use the protocol.

On a setup with a slave FE & BE that writes to the master common recording storage, this is not feasible as we need write access to the recording directory. In this case we need to write to the nfs mount, but prefer the mythprotocol when playingback. This is especially true in a diskless backend, where there is no local disk.

This patch modifies GetPlaybackURL to return a myth:// url rather than a local file handle.

  • It defaults to a local file if the recording was done on the host.
  • A hidden database configuration item is added called "PreferMythProtocol?". This item is applicable to each slave FE that would require this functionality. I wouldn't expect that you'd want to set this on the master server. I did not make this configurable on the GUI, as I'm not sure where it'd go(I can add this if desired).
  • There is an added argument to the function to indicate that the caller request read/write access to the file. In this case the file handle is used if available. This parameter defaults to off, aka read-only.
  • I also removed one argument to the function. It was an unused defaulted parameter, that didn't seem to have any value. It would have meant 2 defaulted parameters if left in. If deemed important, I'll revise the patch to add it back.

I've tested this on my setup, one master, and 2 slave machines. Both slaves are diskless, one has a tuner, and records SD from a cable box. The patch was developed & tested on the fixes branch, but applies cleanly (with minor offset) to svn head.

This patch makes a big difference on my setup, I can now watch HD streams cleanly on slave boxes, while backend is recording 2 hd streams and remote slave is recording.

Attachments (1)

preferMythProto.patch (6.4 KB) - added by anonymous 17 years ago.
Slight update to fix doxygen

Download all attachments as: .zip

Change History (5)

Changed 17 years ago by anonymous

Attachment: preferMythProto.patch added

Slight update to fix doxygen

comment:1 Changed 17 years ago by cpinkham

Owner: changed from Isaac Richards to cpinkham

Moving this ticket to my Queue since ProgramInfo::GetPlaybackURL() is under heavy changes due to the Storage Groups mods I'm working on.

comment:2 Changed 17 years ago by danielk

Chris, if you apply this please don't make it default to being enabled.

Streaming is much slower for most people and we'll get more 'channel changing is too slow' complaints, and 'browsing the recorded list is too slow' complaints, if myth streaming is the default.

comment:3 in reply to:  2 Changed 17 years ago by gdragon

Replying to danielk:

Chris, if you apply this please don't make it default to being enabled.

Streaming is much slower for most people and we'll get more 'channel changing is too slow' complaints, and 'browsing the recorded list is too slow' complaints, if myth streaming is the default.


I would agree that it should not be the default.

FWIW: My in experience streaming works far better. It used to be slower (prior to 0.19), but it seems to be better since then. There are also several posts in the dev & users lists that suggest to use streaming rather than nfs mounts.

comment:4 Changed 17 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [12197]) Add a new setting under Setup -> TV SEttings -> Playback to allow the user to force Myth to prefer to stream files from a remote backend. This preference is ignored by the preview generator when looking for a local file, by mythtranscode since it needs direct access to the file in order to create a transcoded copy, and by the JobQueue? when it calls mythtranscode.

The "Hardware Decoder Settings" page has been renamed to "Decoder Settings" and this new setting has been added to the page. The "Preferred MPEG2 Decoder" setting has also been moved to this settings page.

This is a totally different patch, but it was based on the patch by gdragon at jetcom dt org in #2708.

Closes #2708.

Note: See TracTickets for help on using tickets.