libmimic 1.0.4

mimic.h

00001 /* Copyright (C) 2005  Ole André Vadla Ravnås <oleavr@gmail.com>
00002  *
00003  * This library is free software; you can redistribute it and/or
00004  * modify it under the terms of the GNU Lesser General Public
00005  * License as published by the Free Software Foundation; either
00006  * version 2.1 of the License, or (at your option) any later version.
00007  *
00008  * This library is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  * Lesser General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU Lesser General Public
00014  * License along with this library; if not, write to the Free Software
00015  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00016  */
00017 
00018 #ifndef MIMIC_H
00019 #define MIMIC_H
00020 
00021 #include <glib.h>
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00041 typedef struct _MimCtx MimCtx;
00042 
00043 typedef enum {
00044     MIMIC_RES_LOW,      
00045     MIMIC_RES_HIGH      
00046 } MimicResEnum;
00047 
00048 MimCtx *mimic_open();
00049 void mimic_close(MimCtx *ctx);
00050 
00051 gboolean mimic_encoder_init(MimCtx *ctx, const MimicResEnum resolution);
00052 gboolean mimic_decoder_init(MimCtx *ctx, const guchar *frame_buffer);
00053 
00054 gboolean mimic_get_property(MimCtx *ctx, const gchar *name, gpointer data);
00055 gboolean mimic_set_property(MimCtx *ctx, const gchar *name, gpointer data);
00056 
00057 gboolean mimic_encode_frame(MimCtx *ctx,
00058                             const guchar *input_buffer,
00059                             guchar *output_buffer,
00060                             gint *output_length,
00061                             gboolean make_keyframe);
00062 gboolean mimic_decode_frame(MimCtx *ctx,
00063                             const guchar *input_buffer,
00064                             guchar *output_buffer);
00065 
00068 #ifdef __cplusplus
00069 }
00070 #endif
00071 
00072 #endif // MIMIC_H
00073