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)
This commit is contained in:
Edward Hervey 2018-01-31 19:11:16 +01:00 committed by Edward Hervey
parent ba86a1d99c
commit 0c56a80333
3 changed files with 29 additions and 2 deletions

View file

@ -958,6 +958,31 @@ qtdemux_dump_fLaC (GstQTDemux * qtdemux, GstByteReader * data, int depth)
return TRUE;
}
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)
{

View file

@ -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);

View file

@ -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},