This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum class Kind : unsigned int; | |
struct Base { | |
const Kind kind; | |
explicit Base(Kind kind) : kind(kind) {} | |
template <class T> bool is() const { return kind == T::kind; } | |
template <class T> const T* cast() const { return is<T>()? static_cast<const T*>(this) : nullptr; } | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
search="$@" | |
vlc_options=":sout=#transcode{vcodec=none,scodec=none}:http{mux=ogg,dst=:8080/} :no-sout-all :sout-keep" | |
youtube-dl "ytsearch1:$search" -r 200k -f 'bestaudio[ext=m4a]' -o - | cvlc - ${vlc_options} |
OlderNewer