weixin_39620653 2020-11-22 02:50
浏览 0

Refactor DirectMediaPlayer (and component) to a new CallbackVideoSurface

The DirectMediaPlayer, DirectMediaPlayerComponent and associated classes can be deleted.

The functionality can be very nicely re-implemented as a new VideoSurface, meaning that the existing EmbeddedMediaPlayer can be used for a direct rendering media player.

Relates #184.

该提问来源于开源项目:caprica/vlcj

  • 写回答

5条回答 默认 最新

  • weixin_39620653 2020-11-22 02:50
    关注

    The DirectMediaPlayer and associated DirectMediaPlayerComponent is now gone.

    The functionality previously implemented by DirectMediaPlayer is now re-implemented as a bespoke VideoSurface that can be used with the existing EmbeddedMediaPlayer.

    This was a very satisfying change.

    A new CallbackMediaPlayerComponent was added to replace the old direct component. Both this new component and EmbeddedMediaPlayerComponent share a common base class since the new callback component is essentially a specialisation of the embedded version. The callback component provides a reasonable default implementation for rendering video directly to a video surface (e.g. a buffered image in a JPanel). If a client application wants to provide their own RenderCallback, that all still works as expected.

    Tests were also updated and simplified thanks to the new implementation.

    So far committed at daa89dda93c598a73b8f2a459a671a625fa80a66.

    There remain pending changes to the component builders and the component spec builder classes.

    评论

报告相同问题?