Hello!
I am using libcss to parse CSS from WebVTT subtitle file.
example :
WEBVTT
}
I am using libcss to parse CSS from WebVTT subtitle file.
example :
WEBVTT
STYLE
::cue {
color: red;
font-family: Arial, sans-serif;
font-size: 16px;
font-weight: bold;
text-indent: 20px;
background-color: rgba(0, 0, 0, 0.5);
text-shadow: 1px 1px 2px black;
}
::cue(#\3) {
color: blue;
background-color: rgba(0.5, 0, 0, 0);
font-size: 18px;
padding: 5px;
I treat cue as a pseudo element. And for some reason, I have to strip the double colon from the id in order for libcss to process it. Below is my code that integrates with libcss
https://gitlab.freedesktop.org/boxerab/gstreamer/-/blob/webvtt/subprojects/gst-plugins-base/gst/subparse/gstcssparse.c?ref_type=heads
Any advice would be greatly appreciated!
https://gitlab.freedesktop.org/boxerab/gstreamer/-/blob/webvtt/subprojects/gst-plugins-base/gst/subparse/gstcssparse.c?ref_type=heads
Any advice would be greatly appreciated!
Many Thanks,
Aaron Boxer