~ubuntu-branches/debian/experimental/gpac/experimental

« back to all changes in this revision

Viewing changes to src/terminal/input_sensor.h

  • Committer: Package Import Robot
  • Author(s): Andres Mejia
  • Date: 2012-02-04 00:12:54 UTC
  • Revision ID: package-import@ubuntu.com-20120204001254-l7v7u4kc4m7cxcqn
Tags: upstream-0.4.5+svn3450~dfsg3
ImportĀ upstreamĀ versionĀ 0.4.5+svn3450~dfsg3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *                      GPAC - Multimedia Framework C SDK
 
3
 *
 
4
 *                      Copyright (c) Jean Le Feuvre 2000-2005
 
5
 *                                      All rights reserved
 
6
 *
 
7
 *  This file is part of GPAC / Media terminal sub-project
 
8
 *
 
9
 *  GPAC is free software; you can redistribute it and/or modify
 
10
 *  it under the terms of the GNU Lesser General Public License as published by
 
11
 *  the Free Software Foundation; either version 2, or (at your option)
 
12
 *  any later version.
 
13
 *   
 
14
 *  GPAC is distributed in the hope that it will be useful,
 
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 *  GNU Lesser General Public License for more details.
 
18
 *   
 
19
 *  You should have received a copy of the GNU Lesser General Public
 
20
 *  License along with this library; see the file COPYING.  If not, write to
 
21
 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
 
22
 *
 
23
 */
 
24
 
 
25
#ifndef _INPUT_SENSOR_H_
 
26
#define _INPUT_SENSOR_H_
 
27
 
 
28
#include <gpac/internal/terminal_dev.h>
 
29
/*input sensor defs*/
 
30
#include <gpac/nodes_mpeg4.h>
 
31
 
 
32
#ifndef GPAC_DISABLE_VRML
 
33
 
 
34
enum
 
35
{
 
36
        IS_KeySensor = 1,
 
37
        IS_StringSensor,
 
38
        IS_Mouse,
 
39
        IS_HTKSensor,
 
40
};
 
41
 
 
42
#define GPAC_HTK_DEMO  0
 
43
 
 
44
 
 
45
typedef struct
 
46
{
 
47
        /*parent scene*/
 
48
        GF_Scene *scene;
 
49
        /*list of attached nodes*/
 
50
        GF_List *is_nodes;
 
51
        /*stream ID*/
 
52
        u16 ES_ID;
 
53
        /*uncompressed data frame*/
 
54
        GF_List *ddf;
 
55
 
 
56
        GF_InputSensorDevice *io_dev;
 
57
 
 
58
        u32 type;
 
59
 
 
60
        /*string sensor sep char */
 
61
        s16 termChar, delChar;
 
62
        /*current typed text in UTF-8*/
 
63
        unsigned short enteredText[5000];
 
64
        u32 text_len;
 
65
        Bool is_local;
 
66
 
 
67
#if GPAC_HTK_DEMO
 
68
        GF_Thread *th;
 
69
        Bool htk_running;
 
70
        char szHTKPath[GF_MAX_PATH];
 
71
#endif
 
72
 
 
73
} ISPriv;
 
74
 
 
75
 
 
76
GF_BaseDecoder *gf_isdec_new(GF_ESD *esd, u32 PL);
 
77
void gf_isdec_del(GF_BaseDecoder *plug);
 
78
GF_Err gf_isdec_configure(GF_BaseDecoder *plug, GF_Scene *scene, Bool is_remote);
 
79
 
 
80
 
 
81
typedef struct
 
82
{
 
83
        /*stream context*/
 
84
        u16 ES_ID;
 
85
        Bool registered;
 
86
        GF_MediaObject *mo;
 
87
        M_InputSensor *is;
 
88
} ISStack;
 
89
 
 
90
 
 
91
void InitInputSensor(GF_Scene *scene, GF_Node *node);
 
92
void InputSensorModified(GF_Node *n);
 
93
 
 
94
void InitKeySensor(GF_Scene *scene, GF_Node *node);
 
95
 
 
96
 
 
97
typedef struct
 
98
{
 
99
        u16 enteredText[5000];
 
100
        u32 text_len;
 
101
        GF_Terminal *term;
 
102
} StringSensorStack;
 
103
 
 
104
void InitStringSensor(GF_Scene *scene, GF_Node *node);
 
105
 
 
106
#endif /*GPAC_DISABLE_VRML*/
 
107
 
 
108
 
 
109
#endif  /*_INPUT_SENSOR_H_*/
 
110