[vlc-devel] Developed a playback control mechanism which can be used as parental control feature or ...

Jahan Zinedine jzinedine at gmail.com
Tue Feb 25 23:34:44 CET 2020


Hello everyone!

I developed a scheduled playback control feature inspired by this ticket:
https://trac.videolan.org/vlc/ticket/23005

Almost all the source is in playlist/playback_rules.h
<https://code.videolan.org/jahan/vlc/blob/master/src/playlist/playback_rules.h>
plus couple of other minor changes all contained in this commit
<https://code.videolan.org/jahan/vlc/-/commit/b555087a51c893f9ea2469b3bdeb61fe1bb68d5f>,
notably changes in control.c
<https://code.videolan.org/jahan/vlc/-/commit/b555087a51c893f9ea2469b3bdeb61fe1bb68d5f#4bd5a5ee908d31bafdfc3dd3de731cf2a4cf526b>
vlc_playlist_SetCurrentMedia
function.

I've tested it on Debian dev machine built based on docker scripts
<https://code.videolan.org/videolan/docker-images/-/blob/master/vlc-debian-stable/Dockerfile>
on videolan gitlab and it's base image. Please check out a demo run on
Youtube <https://youtu.be/ieVAiJCESHY>.
The way it works is to lookup the current media folder and it's parent
folders to find the file named rule.mrl which has a quite simple syntax:

00:00-23:59 mtwTFSS              //defines timeslot and weekdays to apply
the rule below which can be repeated for different timeslots
includes:
**/**
excludes:
**/*Sina%20Sarlak*

There is a function called CheckPlayRules which returns a boolean to escape
the current media and go to next one in playlist when returns false and
play when returned true.

Highly appreciate any feedback and wondering if we can have it merge in VLC
trunk to be part of next release.

Cheers,
Jahan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200225/da9f0fc9/attachment.html>


More information about the vlc-devel mailing list