qtmux: add ismlmux, for fragmented isml major brand
authorMarc-André Lureau <mlureau@flumotion.com>
Thu, 2 Sep 2010 11:58:05 +0000 (13:58 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 19 Nov 2010 18:21:37 +0000 (19:21 +0100)
gst/qtmux/atoms.h
gst/qtmux/ftypcc.h
gst/qtmux/gstqtmuxmap.c
gst/qtmux/gstqtmuxmap.h

index 8f48303..a3ec67a 100644 (file)
@@ -96,7 +96,8 @@ typedef enum _AtomsTreeFlavor
 {
   ATOMS_TREE_FLAVOR_MOV,
   ATOMS_TREE_FLAVOR_ISOM,
-  ATOMS_TREE_FLAVOR_3GP
+  ATOMS_TREE_FLAVOR_3GP,
+  ATOMS_TREE_FLAVOR_ISML
 } AtomsTreeFlavor;
 
 typedef struct _AtomsContext
index 66642b7..3d31b6d 100644 (file)
@@ -60,6 +60,8 @@ G_BEGIN_DECLS
 #define FOURCC_3gg7     GST_MAKE_FOURCC('3','g','g','7')
 #define FOURCC_avc1     GST_MAKE_FOURCC('a','v','c','1')
 #define FOURCC_qt__     GST_MAKE_FOURCC('q','t',' ',' ')
+#define FOURCC_isml     GST_MAKE_FOURCC('i','s','m','l')
+#define FOURCC_piff     GST_MAKE_FOURCC('p','i','f','f')
 
 G_END_DECLS
 
index 4d238eb..b8859b4 100644 (file)
@@ -187,6 +187,18 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = {
         GST_STATIC_CAPS (MP3_CAPS "; " AAC_CAPS " ; " ALAC_CAPS)
       }
   ,
+  /* Microsoft Smooth Streaming fmp4/isml */
+  /* TODO add WMV/WMA support */
+  {
+        GST_QT_MUX_FORMAT_ISML,
+        "ismlmux",
+        "ISML",
+        "GstISMLMux",
+        GST_STATIC_CAPS ("video/quicktime, variant = (string) iso"),
+        GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS),
+        GST_STATIC_CAPS (MP3_CAPS "; " AAC_CAPS)
+      }
+  ,
   /* 3GPP Technical Specification 26.244 V7.3.0
    * (extended in 3GPP2 File Formats for Multimedia Services) */
   {
@@ -225,6 +237,8 @@ gst_qt_mux_map_format_to_flavor (GstQTMuxFormat format)
     return ATOMS_TREE_FLAVOR_MOV;
   else if (format == GST_QT_MUX_FORMAT_3GP)
     return ATOMS_TREE_FLAVOR_3GP;
+  else if (format == GST_QT_MUX_FORMAT_ISML)
+    return ATOMS_TREE_FLAVOR_ISML;
   else
     return ATOMS_TREE_FLAVOR_ISOM;
 }
@@ -270,6 +284,7 @@ gst_qt_mux_map_format_to_header (GstQTMuxFormat format, GstBuffer ** _prefix,
 {
   static guint32 qt_brands[] = { 0 };
   static guint32 mp4_brands[] = { FOURCC_mp41, FOURCC_isom, FOURCC_iso2, 0 };
+  static guint32 isml_brands[] = { FOURCC_iso2, 0 };
   static guint32 gpp_brands[] = { FOURCC_isom, FOURCC_iso2, 0 };
   static guint32 mjp2_brands[] = { FOURCC_isom, FOURCC_iso2, 0 };
   static guint8 mjp2_prefix[] =
@@ -294,6 +309,10 @@ gst_qt_mux_map_format_to_header (GstQTMuxFormat format, GstBuffer ** _prefix,
       major = FOURCC_mp42;
       comp = mp4_brands;
       break;
+    case GST_QT_MUX_FORMAT_ISML:
+      major = FOURCC_isml;
+      comp = isml_brands;
+      break;
     case GST_QT_MUX_FORMAT_3GP:
     {
       gint video, audio;
index 8e89351..767d62a 100644 (file)
@@ -55,7 +55,8 @@ typedef enum _GstQTMuxFormat
   GST_QT_MUX_FORMAT_QT,
   GST_QT_MUX_FORMAT_MP4,
   GST_QT_MUX_FORMAT_3GP,
-  GST_QT_MUX_FORMAT_MJ2
+  GST_QT_MUX_FORMAT_MJ2,
+  GST_QT_MUX_FORMAT_ISML
 } GstQTMuxFormat;
 
 typedef struct _GstQTMuxFormatProp