diff options
author | Edward Hervey <edward@centricular.com> | 2018-01-31 19:11:16 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2018-01-31 19:12:48 +0100 |
commit | 0c56a80333c6698dfe6f79c987a22b5919a42131 (patch) | |
tree | a6fbffefe154240257d441922424036606d7fdc1 | |
parent | ba86a1d99cabf331be5f1460289b013c5bea5aa8 (diff) |
isomp4: Add gmhd/gmin debugging
* gmhd is a container, mark it as such so we can see/dump
what is contained within
* Add dumping for the Base Media Information atom (gmin)
-rw-r--r-- | gst/isomp4/qtdemux_dump.c | 25 | ||||
-rw-r--r-- | gst/isomp4/qtdemux_dump.h | 2 | ||||
-rw-r--r-- | gst/isomp4/qtdemux_types.c | 4 |
3 files changed, 29 insertions, 2 deletions
diff --git a/gst/isomp4/qtdemux_dump.c b/gst/isomp4/qtdemux_dump.c index 0d7bba12c..2eb96cde6 100644 --- a/gst/isomp4/qtdemux_dump.c +++ b/gst/isomp4/qtdemux_dump.c @@ -959,6 +959,31 @@ qtdemux_dump_fLaC (GstQTDemux * qtdemux, GstByteReader * data, int depth) } gboolean +qtdemux_dump_gmin (GstQTDemux * qtdemux, GstByteReader * data, int depth) +{ + guint32 ver_flags; + guint16 graphics_mode, opc_r, opc_g, opc_b, balance; + + if (!gst_byte_reader_get_uint32_be (data, &ver_flags)) + return FALSE; + + GST_LOG ("%*s version/flags : %08x", depth, "", ver_flags); + if (!gst_byte_reader_get_uint16_be (data, &graphics_mode) || + !gst_byte_reader_get_uint16_be (data, &opc_r) || + !gst_byte_reader_get_uint16_be (data, &opc_g) || + !gst_byte_reader_get_uint16_be (data, &opc_b) || + !gst_byte_reader_get_uint16_be (data, &balance)) + return FALSE; + + GST_LOG ("%*s graphics mode : 0x%x", depth, "", graphics_mode); + GST_LOG ("%*s opcolor : r:0x%x g:0x%x b:0x%x", depth, "", opc_r, opc_g, + opc_b); + GST_LOG ("%*s balance : %d", depth, "", balance); + + return TRUE; +} + +gboolean qtdemux_dump_unknown (GstQTDemux * qtdemux, GstByteReader * data, int depth) { int len; diff --git a/gst/isomp4/qtdemux_dump.h b/gst/isomp4/qtdemux_dump.h index 8b240de06..45dcd3f08 100644 --- a/gst/isomp4/qtdemux_dump.h +++ b/gst/isomp4/qtdemux_dump.h @@ -89,6 +89,8 @@ gboolean qtdemux_dump_dfLa (GstQTDemux * qtdemux, GstByteReader * data, int depth); gboolean qtdemux_dump_fLaC (GstQTDemux * qtdemux, GstByteReader * data, int depth); +gboolean qtdemux_dump_gmin (GstQTDemux * qtdemux, GstByteReader * data, + int depth); gboolean qtdemux_node_dump (GstQTDemux * qtdemux, GNode * node); diff --git a/gst/isomp4/qtdemux_types.c b/gst/isomp4/qtdemux_types.c index e4fa3b48c..88db8c2ce 100644 --- a/gst/isomp4/qtdemux_types.c +++ b/gst/isomp4/qtdemux_types.c @@ -54,8 +54,8 @@ static const QtNodeType qt_node_types[] = { {FOURCC_vmhd, "video media information", 0, qtdemux_dump_vmhd}, {FOURCC_smhd, "sound media information", 0}, - {FOURCC_gmhd, "base media information header", 0}, - {FOURCC_gmin, "base media info", 0}, + {FOURCC_gmhd, "base media information header", QT_FLAG_CONTAINER}, + {FOURCC_gmin, "base media info", 0, qtdemux_dump_gmin}, {FOURCC_dinf, "data information", QT_FLAG_CONTAINER}, {FOURCC_dref, "data reference", 0, qtdemux_dump_dref}, |