From 7a447b4372adff1755d320f7ea27ef1a29e07952 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 2 Sep 2010 13:58:05 +0200 Subject: [PATCH] qtmux: add ismlmux, for fragmented isml major brand --- gst/quicktime/atoms.h | 3 ++- gst/quicktime/ftypcc.h | 2 ++ gst/quicktime/gstqtmuxmap.c | 19 +++++++++++++++++++ gst/quicktime/gstqtmuxmap.h | 3 ++- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/gst/quicktime/atoms.h b/gst/quicktime/atoms.h index 8f48303..a3ec67a 100644 --- a/gst/quicktime/atoms.h +++ b/gst/quicktime/atoms.h @@ -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 diff --git a/gst/quicktime/ftypcc.h b/gst/quicktime/ftypcc.h index 66642b7..3d31b6d 100644 --- a/gst/quicktime/ftypcc.h +++ b/gst/quicktime/ftypcc.h @@ -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 diff --git a/gst/quicktime/gstqtmuxmap.c b/gst/quicktime/gstqtmuxmap.c index 4d238eb..b8859b4 100644 --- a/gst/quicktime/gstqtmuxmap.c +++ b/gst/quicktime/gstqtmuxmap.c @@ -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; diff --git a/gst/quicktime/gstqtmuxmap.h b/gst/quicktime/gstqtmuxmap.h index 8e89351..767d62a 100644 --- a/gst/quicktime/gstqtmuxmap.h +++ b/gst/quicktime/gstqtmuxmap.h @@ -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 -- 2.7.4