Opened 5 years ago

Last modified 5 months ago

#15720 new bug

MediaPlayer is not working if started immidiately after restarting media_server

Reported by: X512 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Media Kit Version: R1/Development
Keywords: Cc: ttcoder
Blocked By: Blocking: #18086
Platform: All

Description

This is hrev53868.

Steps to reproduce:

  1. Quit MediaPlayer if opened.
  2. Restart media_server by using ProcessController -> Quit an application.
  3. Immidiately after step 2 open some video in MediaPlayer.
  4. MediaPlayer will not work properly, possible scenarios:

Black screen and no effect when attempt to start playing.

Sound playing, but black screen instead of video.

Sound and video are not playing and position slider advances with wrong speed.

MediaPlayer and other programs using Media Kit should wait until media_server become usable.

Change History (5)

comment:1 by ttcoder, 5 years ago

Cc: ttcoder added

(note to self: still seeing this after media_server startup at boot time, on b1/52295+132 x64 ; today sound came to life all of a sudden after an uptime of ca. 40 minutes and 15 seconds; it was garbled for 2 or 3 seconds, then worked correctly for the remainder of the time)

Last edited 5 years ago by ttcoder (previous) (diff)

comment:2 by waddlesplash, 5 months ago

Blocked By: 18086 added

comment:3 by waddlesplash, 5 months ago

Blocked By: 18086 removed
Blocking: 18086 added

comment:4 by waddlesplash, 5 months ago

So, this was probably at least partially fixed by mmlr's changes in hrev54479 back in 2020. But some problems still remain. After my fixes in hrev57918, I added some logs in MediaEventLooper to see how long it's waiting, and I got output like this at startup:

MediaEventLooper wait: 28662555
MediaEventLooper wait: 28611354
MediaEventLooper wait: 42237174
Last message repeated 2 times.
MediaEventLooper wait: 28662555
Last message repeated 84 times.
Last message repeated 38 times.
MediaEventLooper wait: 42519013
MediaEventLooper wait: 42386139
MediaEventLooper wait: 42519013
Last message repeated 70 times.
MediaEventLooper wait: 42787275
MediaEventLooper wait: 42768210

Then after audio started working, the messages disappeared (as I configured them not to print if waiting < 200ms.)

Restarting media services, they stopped working again and this time didn't seem to start working, and I got messages like this:

MediaEventLooper wait: -790166627
Last message repeated 93 times.
Last message repeated 100 times.
Last message repeated 100 times.
Last message repeated 100 times.
Last message repeated 76 times.
Last message repeated 100 times.

comment:5 by waddlesplash, 5 months ago

This should be fixed by hrev57919.

Note: See TracTickets for help on using tickets.