DVD audio/subtitle track selection is broken

Bug #1514545 reported by Azaziah
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenLP
Fix Committed
Medium
Mike

Bug Description

Selecting of audio track and subtitle tracks is broken.
They don't change even thought they are changed from the
disc playback options.

Windows 8.1 / OpenLP 2.2.1 / VLC 2.2.1

Related branches

Revision history for this message
Mike (mikey74) wrote :

I downloaded the latest build: 2726 to see if I could troubleshoot why DVD playback isn't working. The issues affected the MediaClipSelectorForm, the Preview and Live Controllers. I am glad to say that I was able to get everything working. I am not familiar with using bazaar, but I'd like to post my results so someone can implement them. The changes necessary affect 4 or 5 py files.

Revision history for this message
Tim Bentley (trb143) wrote :

Attach the files here and we can have a look and apply for you.

Thanks for have a look at this.

These changes will go into 2.6 as 2.2 is now closed and the recommendation is to update to 2.4.5

Revision history for this message
Mike (mikey74) wrote :

Well here are my notes from debugging. Sorry if they are not very clear, but I wanted you to see exactly what I did to fix the problems.

plugins.media.forms.mediaclipselectorform.py

 line 131 win_id = (see if we can get the hwnd of the displaye here)

 **do search for QTime()
 line 112 time = QtCore.QTime() should be (0,0,0)
 line 298 time = QtCore.QTime() should be (0,0,0)
 line 314 time = QtCore.QTime() should be (0,0,0)
 line 452 time = QtCore.QTime() should be (0,0,0)
 line 510 time = QtCore.QTime() should be (0,0,0)
 **This fixes the time displays in the Media Clip Selector form

core.plugins.media.lib.mediaitem.py

 line 269 service_item.set_media_length((end - start) / 1000) remove / 1000
 line 270 service_item.start_time = start / 1000 remove / 1000
        line 271 service_item.end_time = end / 1000 remove / 1000
 **This fixes the Live controller showing the correct time, pause button and stop button

core.ui.media.mediacontroller.py
 line 501 controller = self.display_cntrollers[DisplayControllerType.Plugin] should be .Preview (setting to .Live gave an error)
 **This fixes the crash when selecting the DVD items

 line 511 remove //1000
 line 512 remove //1000
 line 513 remove //1000
 **this fixes the time display on preview controller

 **while debugging I turned off the audio track to a DVD and when i tried to play the media item it failed with an error. Tracked it down that the MediaType was set to audio CD. Media controller set the media type here:
 line 536 if audio_track == -1 and subtitle_track == -1:
 line 507
 **this makes a bad assumption that its a CD and not a DVD if you turn off the audio track and subtitle track , it wont play
 **this only affects if you turn off the audio track on a DVD
 **turns out if you change both to DVD, the video and audio plays, at least the error goes away

core.ui.media.vlcplayer.py
 **On the Live controller if you hit pause and the play to resume, it starts the media over again, this problem does not occur for video files. So if we add another check to the IF statement, it bypasses the reinit of the DVD track and resumes properly.
 line 282 add "and self.get_live_state() != MediaState.Paused
 **This will skip the reloading of the DVD on resume from Pause

 line 388 remove /1000
 line 352 seek_value += int(display.controller.media_info.start_time / 1000) remove \1000
 line 396 remove / 1000
 **This fixes the slider seek on live controller

This was done with PyCharm Community 2016(i think 3.2) on Windows 10 x64. Tested on another Windows 10 x64 laptop as well. If you have questions, please let me know.

Phill (phill-ridout)
Changed in openlp:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mike (mikey74)
Tim Bentley (trb143)
Changed in openlp:
milestone: none → 2.9.1
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.