Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2497 closed patch (invalid)

Wrong recording file extension can get used on analog/digital cards

Reported by: anonymous Owned by: danielk
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

I have pchdtv5500 (digital/analog card) and I noticed a problem where the wrong recording file extension could be used. So, you might see .nuv files for digital channels and .mpeg for analog.

I traced the problem to tv_rec.cpp. The problem is that a recording is queued (StartedRecording?) using the rbFileExt rather than what the current channel's file extension should be. This is an issue for digital/analog cards because the actual tuning that sets the correct rbFileExt (CreateChannel?) is not done until after the recording is queued. It seems like this is too late to change the extension from what I can see.

I fixed the problem by retrieving a channel's file extension prior to queueing a recording. By default, the file extension is be mpg. Only if a V4l card (using a query that searches for standalone analog or child analog cards) is the file extension changed to nuv. I also removed the class rbFileExt and any usage since we will looking up the extension prior to queuing a recording.

Any comments?

Attachments (1)

get_correct_file_extension.patch (3.3 KB) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by anonymous

comment:1 Changed 13 years ago by danielk

Owner: changed from Isaac Richards to danielk

comment:2 Changed 13 years ago by danielk

Milestone: unknown0.21
Resolution: invalid
Status: newclosed

The patch doesn't apply to SVN head.

Otherwise the idea of getting the file extension just before queueing up the recording is a good one. Using a SQL query doesn't seem like the best way to do this though. Couldn't you just check if we are using the NuppelVideoRecorder?, and then using the "nuv" extension, otherwise using "mpg"? Or better yet, adding a virtual "GetFileExtension?" method to the recorders, so the recorder can tell you what extension to use. The one in RecorderBase? could return "mpg" while the NuppelVideoRecorder? one would override this by returning "nuv", then this would be extensible in the future to recorders which use other container formats.

comment:3 Changed 13 years ago by jedynamic@…

Sorry about it not applying to SVN head. I thought I got it right, but I guess not.

Yes, the sql query isn't the best approach. How could I check if I am using the NuppelVideoRecorder? or just an mpeg decoder prior to queuing the recording? I thought the recorder would only change after the tuning request was processed in HandleTuning?. So, if the channel switched from analog to digital then the recorder would go from a NuppelVideoRecorder? to a DVBRecorder.

Note: See TracTickets for help on using tickets.