added clear to the miracle command set and valerie api
[melted] / src / miracle / miracle_unit.h
1 /*
2 * dvunit.h -- DV Transmission Unit Header
3 * Copyright (C) 2002-2003 Ushodaya Enterprises Limited
4 * Author: Dan Dennedy <dan@dennedy.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21 #ifndef _DV_UNIT_H_
22 #define _DV_UNIT_H_
23
24 #include <pthread.h>
25
26 #include <framework/mlt_properties.h>
27 #include <valerie/valerie.h>
28
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33
34 typedef struct
35 {
36 mlt_properties properties;
37 mlt_properties producers;
38 mlt_properties old_producers;
39 }
40 miracle_unit_t, *miracle_unit;
41
42 extern miracle_unit miracle_unit_init( int index, char *arg );
43 extern void miracle_unit_report_list( miracle_unit unit, valerie_response response );
44 extern void miracle_unit_allow_stdin( miracle_unit unit, int flag );
45 extern valerie_error_code miracle_unit_load( miracle_unit unit, char *clip, int32_t in, int32_t out, int flush );
46 extern valerie_error_code miracle_unit_insert( miracle_unit unit, char *clip, int index, int32_t in, int32_t out );
47 extern valerie_error_code miracle_unit_append( miracle_unit unit, char *clip, int32_t in, int32_t out );
48 extern valerie_error_code miracle_unit_remove( miracle_unit unit, int index );
49 extern valerie_error_code miracle_unit_clean( miracle_unit unit );
50 extern valerie_error_code miracle_unit_clear( miracle_unit unit );
51 extern valerie_error_code miracle_unit_move( miracle_unit unit, int src, int dest );
52 extern int miracle_unit_transfer( miracle_unit dest_unit, miracle_unit src_unit );
53 extern void miracle_unit_play( miracle_unit_t *unit, int speed );
54 extern void miracle_unit_terminate( miracle_unit );
55 extern int miracle_unit_has_terminated( miracle_unit );
56 extern int miracle_unit_get_nodeid( miracle_unit unit );
57 extern int miracle_unit_get_channel( miracle_unit unit );
58 extern int miracle_unit_is_offline( miracle_unit unit );
59 extern void miracle_unit_set_notifier( miracle_unit, valerie_notifier, char * );
60 extern int miracle_unit_get_status( miracle_unit, valerie_status );
61 extern void miracle_unit_change_position( miracle_unit, int, int32_t position );
62 extern void miracle_unit_change_speed( miracle_unit unit, int speed );
63 extern int miracle_unit_set_clip_in( miracle_unit unit, int index, int32_t position );
64 extern int miracle_unit_set_clip_out( miracle_unit unit, int index, int32_t position );
65 //extern void miracle_unit_set_mode( miracle_unit unit, dv_player_clip_mode mode );
66 //extern dv_player_clip_mode miracle_unit_get_mode( miracle_unit unit );
67 //extern void miracle_unit_set_eof_action( miracle_unit unit, dv_player_eof_action mode );
68 //extern dv_player_eof_action miracle_unit_get_eof_action( miracle_unit unit );
69 extern void miracle_unit_step( miracle_unit unit, int32_t offset );
70 extern void miracle_unit_close( miracle_unit unit );
71 extern void miracle_unit_suspend( miracle_unit );
72 extern void miracle_unit_restore( miracle_unit );
73 extern int miracle_unit_set( miracle_unit, char *name_value );
74 extern char * miracle_unit_get( miracle_unit, char *name );
75 extern int miracle_unit_get_current_clip( miracle_unit );
76
77
78 #ifdef __cplusplus
79 }
80 #endif
81
82 #endif