gstreamer_core/libs/gst/base/gsttypefindhelper.h
changeset 0 0e761a78d257
child 8 4a7fac7dd34a
child 29 567bb019e3e3
equal deleted inserted replaced
-1:000000000000 0:0e761a78d257
       
     1 /* GStreamer
       
     2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
       
     3  * Copyright (C) 2000,2005 Wim Taymans <wim@fluendo.com>
       
     4  * Copyright (C) 2006      Tim-Philipp Müller <tim centricular net>
       
     5  *
       
     6  * gsttypefindhelper.h:
       
     7  *
       
     8  * This library is free software; you can redistribute it and/or
       
     9  * modify it under the terms of the GNU Library General Public
       
    10  * License as published by the Free Software Foundation; either
       
    11  * version 2 of the License, or (at your option) any later version.
       
    12  *
       
    13  * This library is distributed in the hope that it will be useful,
       
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    16  * Library General Public License for more details.
       
    17  *
       
    18  * You should have received a copy of the GNU Library General Public
       
    19  * License along with this library; if not, write to the
       
    20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    21  * Boston, MA 02111-1307, USA.
       
    22  */
       
    23 
       
    24 #ifndef __GST_TYPEFINDHELPER_H__
       
    25 #define __GST_TYPEFINDHELPER_H__
       
    26 
       
    27 #include <gst/gst.h>
       
    28 
       
    29 G_BEGIN_DECLS
       
    30 
       
    31 GstCaps * gst_type_find_helper (GstPad *src, guint64 size);
       
    32 #ifdef __SYMBIAN32__
       
    33 IMPORT_C
       
    34 #endif
       
    35 
       
    36 
       
    37 GstCaps * gst_type_find_helper_for_buffer (GstObject              *obj,
       
    38                                            GstBuffer              *buf,
       
    39                                            GstTypeFindProbability *prob);
       
    40 
       
    41 /**
       
    42  * GstTypeFindHelperGetRangeFunction:
       
    43  * @obj: a #GstObject that will handle the getrange request
       
    44  * @offset: the offset of the range
       
    45  * @length: the length of the range
       
    46  * @buffer: a memory location to hold the result buffer
       
    47  *
       
    48  * This function will be called by gst_type_find_helper_get_range() when
       
    49  * typefinding functions request to peek at the data of a stream at certain
       
    50  * offsets. If this function returns GST_FLOW_OK, the result buffer will be
       
    51  * stored in @buffer. The  contents of @buffer is invalid for any other
       
    52  * return value.
       
    53  *
       
    54  * This function is supposed to behave exactly like a #GstPadGetRangeFunction.
       
    55  *
       
    56  * Returns: GST_FLOW_OK for success
       
    57  */
       
    58 typedef GstFlowReturn (*GstTypeFindHelperGetRangeFunction) (GstObject  *obj,
       
    59                                                             guint64     offset,
       
    60                                                             guint       length,
       
    61                                                             GstBuffer **buffer);
       
    62 #ifdef __SYMBIAN32__
       
    63 IMPORT_C
       
    64 #endif
       
    65 
       
    66 
       
    67 GstCaps * gst_type_find_helper_get_range (GstObject                        * obj,
       
    68                                           GstTypeFindHelperGetRangeFunction  func,
       
    69                                           guint64                            size,
       
    70                                           GstTypeFindProbability            *prob);
       
    71 
       
    72 G_END_DECLS
       
    73 
       
    74 #endif /* __GST_TYPEFINDHELPER_H__ */