Commit baca970d authored by François Cartegnie's avatar François Cartegnie 🤞 Committed by Jean-Baptiste Kempf
Browse files

demux: hls: add support for Ogg streams

Ignore the worst standard for the worse
refs #25781
parent fb6354a1
......@@ -60,6 +60,8 @@ std::string StreamFormat::str() const
return "Packed AC-3";
case Type::WebM:
return "WebM";
case Type::Ogg:
return "Ogg";
case Type::Unsupported:
return "Unsupported";
default:
......@@ -123,6 +125,8 @@ StreamFormat::StreamFormat(const void *data_, size_t sz)
type = StreamFormat::Type::WebVTT;
else if(sz > 4 && !memcmp("\x1A\x45\xDF\xA3", data, 4))
type = StreamFormat::Type::WebM;
else if(sz > 4 && !memcmp("OggS", data, 4))
type = StreamFormat::Type::Ogg;
else /* Check Packet Audio formats */
{
/* It MUST have ID3 header, but HLS spec is an oxymoron */
......
......@@ -34,6 +34,7 @@ namespace adaptive
MPEG2TS,
MP4,
WebM,
Ogg,
WebVTT,
TTML,
PackedAAC,
......
......@@ -146,6 +146,10 @@ AbstractDemuxer *HLSStream::newDemux(vlc_object_t *p_obj, const StreamFormat &fo
ret = AbstractStream::newDemux(p_obj, format, out, source);
break;
case StreamFormat::Type::Ogg:
ret = new Demuxer(p_obj, "ogg", out, source);
break;
/* Disabled until we can handle empty segments/cue and absolute time
case StreamFormat::Type::WebVTT:
ret = new Demuxer(p_obj, "webvttstream", out, source);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment