Hi,
These steps are correct! However, a good amount of the work will first be in libvlc. Exporting playlists requires some changes in both libvlc and libvlc-core. I don't know how familiar you are with the VLC codebase, but it could be a bit of a challenge (in a good way) and we can provide assistance.
I'll dump the first pass of research I did on libvlc here:
libvlc-core exposes an utility to export playlists. We want to plug it to libvlc a it supports several playlist export format.
VLC playlists represent the "playqueue" it's a complex bound to the player, and it does not make sense to expose the playlist exporter like that, it's too coupled to the internals of libvlc-core.
Instead, we should try to decouple the playlist_view from the actual playlist object from VLC. It seems that the only things needed for the playlist export modules is a list of input_item_t (equivalent of a media).
When we have this, it will be possible to plug playlist export to the media list as you intended initially.
TLDR; To be able to export media_lists, the first step is to change core internals to handle a simple input_item list instead of the complex and hard to expose playlist object.