gst_plugins_good/gst/qtdemux/qtdemux.h
changeset 26 69c7080681bf
parent 24 bc39b352897e
child 28 4ed5253bb6ba
equal deleted inserted replaced
24:bc39b352897e 26:69c7080681bf
     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 
       
    21 #ifndef __GST_QTDEMUX_H__
       
    22 #define __GST_QTDEMUX_H__
       
    23 
       
    24 #include <gst/gst.h>
       
    25 #include <gst/base/gstadapter.h>
       
    26 
       
    27 G_BEGIN_DECLS
       
    28 
       
    29 GST_DEBUG_CATEGORY_EXTERN (qtdemux_debug);
       
    30 #define GST_CAT_DEFAULT qtdemux_debug
       
    31 
       
    32 #define GST_TYPE_QTDEMUX \
       
    33   (gst_qtdemux_get_type())
       
    34 #define GST_QTDEMUX(obj) \
       
    35   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QTDEMUX,GstQTDemux))
       
    36 #define GST_QTDEMUX_CLASS(klass) \
       
    37   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QTDEMUX,GstQTDemuxClass))
       
    38 #define GST_IS_QTDEMUX(obj) \
       
    39   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QTDEMUX))
       
    40 #define GST_IS_QTDEMUX_CLASS(klass) \
       
    41   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QTDEMUX))
       
    42 
       
    43 #define GST_QTDEMUX_CAST(obj) ((GstQTDemux *)(obj))
       
    44 
       
    45 /* qtdemux produces these for atoms it cannot parse */
       
    46 #define GST_QT_DEMUX_PRIVATE_TAG "private-qt-tag"
       
    47 #define GST_QT_DEMUX_CLASSIFICATION_TAG "classification"
       
    48 
       
    49 #define GST_QTDEMUX_MAX_STREAMS         8
       
    50 
       
    51 typedef struct _GstQTDemux GstQTDemux;
       
    52 typedef struct _GstQTDemuxClass GstQTDemuxClass;
       
    53 typedef struct _QtDemuxStream QtDemuxStream;
       
    54 
       
    55 struct _GstQTDemux {
       
    56   GstElement element;
       
    57 
       
    58   /* pads */
       
    59   GstPad *sinkpad;
       
    60 
       
    61   QtDemuxStream *streams[GST_QTDEMUX_MAX_STREAMS];
       
    62   gint     n_streams;
       
    63   gint     n_video_streams;
       
    64   gint     n_audio_streams;
       
    65   gint     n_subp_streams;
       
    66 
       
    67   guint  major_brand;
       
    68   GNode *moov_node;
       
    69   GNode *moov_node_compressed;
       
    70 
       
    71   guint32 timescale;
       
    72   guint32 duration;
       
    73 
       
    74   gint state;
       
    75 
       
    76   gboolean pullbased;
       
    77 
       
    78   /* push based variables */
       
    79   guint neededbytes;
       
    80   guint todrop;
       
    81   GstAdapter *adapter;
       
    82   GstBuffer *mdatbuffer;
       
    83 
       
    84   /* offset of the media data (i.e.: Size of header) */
       
    85   guint64 offset;
       
    86   /* offset of the mdat atom */
       
    87   guint64 mdatoffset;
       
    88 
       
    89   GstTagList *tag_list;
       
    90 
       
    91   /* track stuff */
       
    92   guint64 last_ts;
       
    93 
       
    94   /* configured playback region */
       
    95   GstSegment segment;
       
    96   gboolean segment_running;
       
    97   GstEvent *pending_newsegment;
       
    98 };
       
    99 
       
   100 struct _GstQTDemuxClass {
       
   101   GstElementClass parent_class;
       
   102 };
       
   103 
       
   104 #ifdef __SYMBIAN32__
       
   105 IMPORT_C
       
   106 #endif
       
   107 GType gst_qtdemux_get_type (void);
       
   108 
       
   109 G_END_DECLS
       
   110 
       
   111 #endif /* __GST_QTDEMUX_H__ */