[vlc-commits] mux: mp4: add support for vc-1/dvc1

Francois Cartegnie git at videolan.org
Tue Oct 27 19:13:53 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 22 23:31:38 2015 +0200| [4838b54a1d2a1b316556d64fd2940e51d6e42d0a] | committer: Francois Cartegnie

mux: mp4: add support for vc-1/dvc1

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4838b54a1d2a1b316556d64fd2940e51d6e42d0a
---

 modules/mux/mp4/libmp4mux.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index c1f9f62..cf7a04f 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -724,6 +724,15 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
     return hvcC;
 }
 
+static bo_t *GetxxxxTag(es_format_t *p_fmt, const char *tag)
+{
+    bo_t *box = box_new(tag);
+    if(!box)
+        return NULL;
+    bo_add_mem(box, p_fmt->i_extra, p_fmt->p_extra);
+    return box;
+}
+
 static bo_t *GetAvcCTag(es_format_t *p_fmt)
 {
     bo_t    *avcC = box_new("avcC");/* FIXME use better value */
@@ -986,6 +995,7 @@ static bo_t *GetVideBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
     case VLC_CODEC_SVQ3: memcpy(fcc, "SVQ3", 4); break;
     case VLC_CODEC_H263: memcpy(fcc, "s263", 4); break;
     case VLC_CODEC_H264: memcpy(fcc, "avc1", 4); break;
+    case VLC_CODEC_VC1 : memcpy(fcc, "vc-1", 4); break;
     case VLC_CODEC_HEVC: memcpy(fcc, "hvc1", 4); break;
     case VLC_CODEC_YV12: memcpy(fcc, "yv12", 4); break;
     case VLC_CODEC_YUYV: memcpy(fcc, "yuy2", 4); break;
@@ -1042,6 +1052,10 @@ static bo_t *GetVideBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
         box_gather(vide, GetAvcCTag(&p_track->fmt));
         break;
 
+    case VLC_CODEC_VC1:
+        box_gather(vide, GetxxxxTag(&p_track->fmt, "dvc1"));
+            break;
+
     case VLC_CODEC_HEVC:
         box_gather(vide, GetHvcCTag(&p_track->fmt));
         break;



More information about the vlc-commits mailing list