On 05/04/16 22:19, Vittorio Giovara wrote: > --- > Note: I am not affiliated with the specification draft in any way. > https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md > > Also matroska could have the same metadata but the demuxer reads tags *after* > reading the header, and that makes adding stream side data from metadata > quite difficult (if not extremely ugly). > > Vittorio > > libavformat/isom.h | 3 +++ > libavformat/mov.c | 72 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 75 insertions(+) > > diff --git a/libavformat/isom.h b/libavformat/isom.h > index aec623b..78bfb87 100644 > --- a/libavformat/isom.h > +++ b/libavformat/isom.h > @@ -24,6 +24,8 @@ > #ifndef AVFORMAT_ISOM_H > #define AVFORMAT_ISOM_H > > +#include "libavutil/stereo3d.h" > + > #include "avio.h" > #include "internal.h" > #include "dv.h" > @@ -138,6 +140,7 @@ typedef struct MOVStreamContext { > MOVSbgp *rap_group; > > int32_t *display_matrix; > + AVStereo3D *stereo_mode; > } MOVStreamContext; > > typedef struct MOVContext { > diff --git a/libavformat/mov.c b/libavformat/mov.c > index 9d271f8..2045b98 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -36,6 +36,7 @@ > #include "libavutil/avstring.h" > #include "libavutil/dict.h" > #include "libavutil/opt.h" > +#include "libavutil/stereo3d.h" > #include "libavcodec/ac3tab.h" > #include "avformat.h" > #include "internal.h" > @@ -3082,6 +3083,58 @@ static int mov_read_elst(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > return 0; > } > > +static int mov_read_uuid(MOVContext *c, AVIOContext *pb, MOVAtom atom) > +{ > + AVStream *st; > + MOVStreamContext *sc; > + int ret, size = atom.size - 16; > + > + if (c->fc->nb_streams < 1) > + return 0; > + st = c->fc->streams[c->fc->nb_streams - 1]; > + sc = st->priv_data; > + > + if (avio_rb64(pb) == 0xffcc8263f8554a93 && avio_rb64(pb) == > 0x8814587a02521fdd) {
those magic numbers might enjoy being constants. The rest is not exactly wonderful but I assume nobody sane will add spaces just because he could. (and addressing those issues can be done on a later time) lu _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel