~ubuntu-branches/ubuntu/gutsy/amsn/gutsy

« back to all changes in this revision

Viewing changes to utils/webcamsn/src/mimic.h

  • Committer: Bazaar Package Importer
  • Author(s): Theodore Karkoulis
  • Date: 2006-01-04 15:26:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060104152602-ipe1yg00rl3nlklv
Tags: 0.95-1
New Upstream Release (closes: #345052, #278575).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2005  Ole André Vadla Ravnås <oleavr@gmail.com>
 
2
 *
 
3
 * This library is free software; you can redistribute it and/or
 
4
 * modify it under the terms of the GNU Lesser General Public
 
5
 * License as published by the Free Software Foundation; either
 
6
 * version 2.1 of the License, or (at your option) any later version.
 
7
 *
 
8
 * This library is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
 * Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public
 
14
 * License along with this library; if not, write to the Free Software
 
15
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
16
 */
 
17
 
 
18
#ifndef MIMIC_H
 
19
#define MIMIC_H
 
20
 
 
21
//#include <glib.h>
 
22
#include "glib_replacement.h"
 
23
 
 
24
 
 
25
/**
 
26
 * @defgroup libmimic libmimic public API
 
27
 * @brief The public API of the libmimic library
 
28
 *
 
29
 * libmimic provides the API required for encoding and decoding
 
30
 * MIMIC v2.x-encoded content.
 
31
 *
 
32
 * @{
 
33
 */
 
34
 
 
35
#ifdef __cplusplus
 
36
#define EXTERN extern "C"
 
37
#else
 
38
#define EXTERN
 
39
#endif
 
40
 
 
41
/**
 
42
 * The mimic encoding/decoding context returned by #mimic_open
 
43
 * and used for all further API calls until #mimic_close.
 
44
 */
 
45
typedef struct _MimCtx MimCtx;
 
46
 
 
47
typedef enum {
 
48
    MIMIC_RES_LOW,      /**< 160x120 resolution */
 
49
    MIMIC_RES_HIGH      /**< 320x240 resolution */
 
50
} MimicResEnum;
 
51
 
 
52
EXTERN MimCtx *mimic_open();
 
53
EXTERN void mimic_close(MimCtx *ctx);
 
54
 
 
55
EXTERN gboolean mimic_encoder_init(MimCtx *ctx, const MimicResEnum resolution);
 
56
EXTERN gboolean mimic_decoder_init(MimCtx *ctx, const guchar *frame_buffer);
 
57
 
 
58
EXTERN gboolean mimic_get_property(MimCtx *ctx, const gchar *name, gpointer data);
 
59
EXTERN gboolean mimic_set_property(MimCtx *ctx, const gchar *name, gpointer data);
 
60
 
 
61
EXTERN gboolean mimic_encode_frame(MimCtx *ctx,
 
62
                            const guchar *input_buffer,
 
63
                            guchar *output_buffer,
 
64
                            gint *output_length,
 
65
                            gboolean make_keyframe);
 
66
EXTERN gboolean mimic_decode_frame(MimCtx *ctx,
 
67
                            const guchar *input_buffer,
 
68
                            guchar *output_buffer);
 
69
 
 
70
/** @} */
 
71
 
 
72
#endif // MIMIC_H
 
73