gst_plugins_good/gst/qtdemux/qtdemux_types.h
changeset 27 d43ce56a1534
parent 23 29ecd5cb86b3
child 31 aec498aab1d3
equal deleted inserted replaced
23:29ecd5cb86b3 27:d43ce56a1534
     1 /* GStreamer
       
     2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
       
     3  *
       
     4  * This library is free software; you can redistribute it and/or
       
     5  * modify it under the terms of the GNU Library General Public
       
     6  * License as published by the Free Software Foundation; either
       
     7  * version 2 of the License, or (at your option) any later version.
       
     8  *
       
     9  * This library is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    12  * Library General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU Library General Public
       
    15  * License along with this library; if not, write to the
       
    16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    17  * Boston, MA 02111-1307, USA.
       
    18  */
       
    19 
       
    20 #ifndef __GST_QTDEMUX_TYPES_H__
       
    21 #define __GST_QTDEMUX_TYPES_H__
       
    22 
       
    23 #include <gst/gst.h>
       
    24 
       
    25 #include "qtdemux.h"
       
    26 
       
    27 G_BEGIN_DECLS
       
    28 
       
    29 typedef void (*QtDumpFunc) (GstQTDemux * qtdemux, guint8 * buffer, int depth);
       
    30 
       
    31 typedef struct _QtNodeType QtNodeType;
       
    32 
       
    33 #define QT_UINT32(a)  (GST_READ_UINT32_BE(a))
       
    34 #define QT_UINT24(a)  (GST_READ_UINT32_BE(a) >> 8)
       
    35 #define QT_UINT16(a)  (GST_READ_UINT16_BE(a))
       
    36 #define QT_UINT8(a)   (GST_READ_UINT8(a))
       
    37 #define QT_FP32(a)    ((GST_READ_UINT32_BE(a))/65536.0)
       
    38 #define QT_FP16(a)    ((GST_READ_UINT16_BE(a))/256.0)
       
    39 #define QT_FOURCC(a)  (GST_READ_UINT32_LE(a))
       
    40 #define QT_UINT64(a)  ((((guint64)QT_UINT32(a))<<32)|QT_UINT32(((guint8 *)a)+4))
       
    41 
       
    42 typedef enum {
       
    43   QT_FLAG_NONE      = (0),
       
    44   QT_FLAG_CONTAINER = (1 << 0) 
       
    45 } QtFlags;
       
    46 
       
    47 struct _QtNodeType {
       
    48   guint32      fourcc;
       
    49   const gchar *name;
       
    50   QtFlags      flags;
       
    51   QtDumpFunc   dump;
       
    52 };
       
    53 
       
    54 const QtNodeType *qtdemux_type_get (guint32 fourcc);
       
    55 
       
    56 G_END_DECLS
       
    57 
       
    58 #endif /* __GST_QTDEMUX_TYPES_H__ */