Commit 4d14bae2 authored by Francois Cartegnie's avatar Francois Cartegnie

mux: ogg: add skeleton metadata (fix #1412)

This patch adds Skeleton V4.0 metadata for multiplexed ogg streams.

Note this does not adds skeleton indexes to streams, as we need to
have a way to get sout position to reseek and rewrite that header from
keyframes.
parent 46c5bf59
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
#include <assert.h> #include <assert.h>
#define XIPH_MAX_HEADER_COUNT (256) #define XIPH_MAX_HEADER_COUNT (256)
static inline unsigned int xiph_CountHeaders( const void *extra )
{
return *( (const uint8_t*) extra ) + 1;
}
static inline int xiph_SplitHeaders(unsigned packet_size[], void *packet[], unsigned *packet_count, static inline int xiph_SplitHeaders(unsigned packet_size[], void *packet[], unsigned *packet_count,
unsigned extra_size, void *extra) unsigned extra_size, void *extra)
{ {
...@@ -33,7 +38,7 @@ static inline int xiph_SplitHeaders(unsigned packet_size[], void *packet[], unsi ...@@ -33,7 +38,7 @@ static inline int xiph_SplitHeaders(unsigned packet_size[], void *packet[], unsi
return VLC_EGENERIC; return VLC_EGENERIC;
/* Parse the packet count and their sizes */ /* Parse the packet count and their sizes */
const unsigned count = 1 + *current++; const unsigned count = xiph_CountHeaders( current++ );
if (packet_count) if (packet_count)
*packet_count = count; *packet_count = count;
unsigned size = 0; unsigned size = 0;
......
This diff is collapsed.
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