之前做过类似的几个项目都是通过开启一个线程或者通过glib自带的定时器的机制不停的更新播放的进度以及播放的状态
最近发现在这一块的处理时候使用的底层播放器callback的方式
有关的操作代码如下:
#0 WebCore::HTMLMediaElement::updatePlayState (this=0xadd800) at ../../WebCore/html/HTMLMediaElement.cpp:1652
#1 0x00007ffff6593786 in WebCore::HTMLMediaElement::mediaPlayerTimeChanged (this=0xadd800) at ../../WebCore/html/HTMLMediaElement.cpp:1448
#2 0x00007ffff6599551 in WebCore::MediaPlayer::timeChanged (this=0xa50c10) at ../../WebCore/platform/graphics/MediaPlayer.cpp:582
#3 0x00007ffff674c4f8 in WebCore::MediaPlayerPrivate::timeChanged (this=0xa50c60) at ../../WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:892
#4 0x00007ffff674bd39 in WebCore::MediaPlayerPrivate::updateStates (this=0xa50c60) at ../../WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:766
#5 0x00007ffff674969b in WebCore::mediaPlayerPrivateMessageCallback (bus=0x6806e0, message=0xc51f20, data=0xa50c60)
at ../../WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:115
这个是具体的调用流程记录