[vlc-devel] [RFC 0/2] Player info to replace module tree
Romain Vimont
rom1v at videolabs.io
Wed Jun 26 11:15:52 CEST 2019
The purpose is to build and maintain a structure representing the modules used
for the current playback, to replace the module tree which has been removed
(trac #21997).
It will contain info about:
- input sources
- stream/demux/access
- decoder
- aout
- vout
- ...
To show how it could work, I implemented a player info for input sources and
their stream/demux/access (patch 1).
When a change occurs, a specific input event (with type INPUT_EVENT_INFO) is
sent. The player receives this event and (delegates to vlc_player_info which)
updates the info structure, and notify listeners.
To show how it is used, I implemented a listener from the Qt module (patch 2).
For now, it just print logs.
For example, I have to files:
- big_buck_bunny.mp4
- big_buck_bunny.srt (a fake subtitle track)
When I open big_buck_bunny.mp4, it prints:
[PI] --> on_source_added
[PI INPUT]
[PI SOURCE 0]
[PI STREAM 0]: MP4 stream demuxer (MP4): file:///home/rom/Vid%C3%A9os/big_buck_bunny.mp4
[PI STREAM 1]: Internal stream record (record): file:///home/rom/Vid%C3%A9os/big_buck_bunny.mp4
[PI STREAM 2]: Byte stream cache (cache_read): file:///home/rom/Vid%C3%A9os/big_buck_bunny.mp4
[PI STREAM 3]: (null) ((null)): file:///home/rom/Vid%C3%A9os/big_buck_bunny.mp4
[PI] --> on_source_added
[PI INPUT]
[PI SOURCE 0]
[PI STREAM 0]: MP4 stream demuxer (MP4): file:///home/rom/Vid%C3%A9os/big_buck_bunny.mp4
[PI STREAM 1]: Internal stream record (record): file:///home/rom/Vid%C3%A9os/big_buck_bunny.mp4
[PI STREAM 2]: Byte stream cache (cache_read): file:///home/rom/Vid%C3%A9os/big_buck_bunny.mp4
[PI STREAM 3]: (null) ((null)): file:///home/rom/Vid%C3%A9os/big_buck_bunny.mp4
[PI SOURCE 1]
[PI STREAM 0]: Text subtitle parser (Subtitles): file:///home/rom/Vid%C3%A9os/big_buck_bunny.srt
[PI STREAM 1]: Internal stream record (record): file:///home/rom/Vid%C3%A9os/big_buck_bunny.srt
[PI STREAM 2]: Byte stream cache (cache_read): file:///home/rom/Vid%C3%A9os/big_buck_bunny.srt
[PI STREAM 3]: (null) ((null)): file:///home/rom/Vid%C3%A9os/big_buck_bunny.srt
(The goal is to update the UI instead of printing logs.)
What do you think?
Thank you for your feedbacks.
Romain Vimont (2):
player info
listen player info from Qt module
include/vlc_player.h | 3 +
include/vlc_player_info.h | 78 +++++++++
modules/gui/qt/qt.cpp | 67 ++++++++
modules/gui/qt/qt.hpp | 1 +
src/Makefile.am | 3 +
src/input/demux.c | 6 +
src/input/demux.h | 2 +
src/input/event.h | 12 +-
src/input/input.c | 17 ++
src/input/input_internal.h | 9 +-
src/input/player.c | 20 +++
src/input/player_info.c | 337 +++++++++++++++++++++++++++++++++++++
src/input/player_info.h | 77 +++++++++
src/libvlccore.sym | 11 ++
14 files changed, 641 insertions(+), 2 deletions(-)
create mode 100644 include/vlc_player_info.h
create mode 100644 src/input/player_info.c
create mode 100644 src/input/player_info.h
--
2.20.1
More information about the vlc-devel
mailing list