JACK-AUDIO-CONNECTION-KIT
transport.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002 Paul Davis
3  Copyright (C) 2003 Jack O'Quin
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation; either version 2.1 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 */
20 
21 #ifndef __jack_transport_h__
22 #define __jack_transport_h__
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #include <jack/types.h>
29 #include <jack/weakmacros.h>
30 
34 typedef enum {
35 
36  /* the order matters for binary compatibility */
43 
44 typedef uint64_t jack_unique_t;
49 typedef enum {
50  JackPositionBBT = 0x10,
55  JackTickDouble = 0x200,
57 
59 #define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode|JackBBTFrameOffset|JackAudioVideoRatio|JackVideoFrameOffset)
60 #define EXTENDED_TIME_INFO
61 
63 #define JACK_TICK_DOUBLE
64 
68 typedef struct {
69 
73  jack_unique_t unique_1;
83  /*}@*/
84 
97  /*}@*/
98 
106  int32_t bar;
110  int32_t beat;
115  int32_t tick;
119  double bar_start_tick;
124  float beat_type;
125  double ticks_per_beat;
138  /*}@*/
139 
143  double frame_time;
144  double next_time;
146  /*}@*/
147 
149  /* JackBBTFrameOffset fields */
164  /*}@*/
165 
167  /* JACK video positional data
168  * EXPERIMENTAL: could change */
182  /*}@*/
183 
186  double tick_double;
191  /*}@*/
192 
195  /* For binary compatibility, new fields should be allocated from
196  * this padding area with new valid bits controlling access, so
197  * the existing structure size and offsets are preserved. */
198  int32_t padding[5];
199  /*}@*/
200 
201  /* When (unique_1 == unique_2) the contents are consistent. */
202  jack_unique_t unique_2;
205 
227 int jack_release_timebase (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
228 
251  jack_position_t *pos,
252  void *arg);
253 
275  JackSyncCallback sync_callback,
276  void *arg) JACK_OPTIONAL_WEAK_EXPORT;
277 
296  jack_time_t timeout) JACK_OPTIONAL_WEAK_EXPORT;
297 
328  jack_nframes_t nframes,
329  jack_position_t *pos,
330  int new_pos,
331  void *arg);
332 
361  int conditional,
362  JackTimebaseCallback timebase_callback,
363  void *arg) JACK_OPTIONAL_WEAK_EXPORT;
364 
382  jack_nframes_t frame) JACK_OPTIONAL_WEAK_EXPORT;
383 
400  jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT;
401 
409 jack_nframes_t jack_get_current_transport_frame (const jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
410 
430  const jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT;
431 
443 void jack_transport_start (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
444 
453 void jack_transport_stop (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
454 
457 /*********************************************************************
458  * The following interfaces are DEPRECATED. They are only provided
459  * for compatibility with the earlier JACK transport implementation.
460  *********************************************************************/
461 
467 typedef enum {
468 
476 
483 typedef struct {
484 
485  /* these two cannot be set from clients: the server sets them */
486 
495 
499  int bar;
500  int beat;
501  int tick;
502  double bar_start_tick;
503 
505  float beat_type;
508 
510 
524  jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
525 
534  jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
535 
536 #ifdef __cplusplus
537 }
538 #endif
539 
540 #endif /* __jack_transport_h__ */
struct _jack_client jack_client_t
Definition: types.h:90
float audio_frames_per_video_frame
Definition: transport.h:169
Definition: transport.h:473
int32_t beat
Definition: transport.h:110
Definition: transport.h:472
Definition: transport.h:55
jack_position_bits_t valid
Definition: transport.h:94
void jack_get_transport_info(jack_client_t *client, jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
Definition: transport.h:50
Definition: transport.h:483
jack_transport_state_t jack_transport_query(const jack_client_t *client, jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT
jack_nframes_t frame
Definition: transport.h:492
void jack_set_transport_info(jack_client_t *client, jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
double beats_per_minute
Definition: transport.h:507
double beats_per_minute
Definition: transport.h:130
double bar_start_tick
Definition: transport.h:502
jack_transport_state_t transport_state
Definition: transport.h:491
jack_transport_bits_t
Definition: transport.h:467
int jack_release_timebase(jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
int32_t tick
Definition: transport.h:115
Definition: transport.h:68
jack_nframes_t video_offset
Definition: transport.h:176
double tick_double
Definition: transport.h:186
float beats_per_bar
Definition: transport.h:504
int bar
Definition: transport.h:499
double frame_time
Definition: transport.h:143
jack_nframes_t frame
Definition: transport.h:88
void jack_transport_start(jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
double next_time
Definition: transport.h:144
double bar_start_tick
Definition: transport.h:119
float beat_type
Definition: transport.h:505
int jack_set_sync_timeout(jack_client_t *client, jack_time_t timeout) JACK_OPTIONAL_WEAK_EXPORT
jack_position_bits_t
Definition: transport.h:49
int jack_transport_locate(jack_client_t *client, jack_nframes_t frame) JACK_OPTIONAL_WEAK_EXPORT
jack_nframes_t bbt_offset
Definition: transport.h:150
void jack_transport_stop(jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
jack_unique_t unique_2
Definition: transport.h:202
jack_transport_bits_t valid
Definition: transport.h:490
int tick
Definition: transport.h:501
uint64_t jack_time_t
Definition: types.h:65
jack_transport_state_t
Definition: transport.h:34
float beat_type
Definition: transport.h:124
uint64_t jack_unique_t
Definition: transport.h:44
jack_nframes_t frame_rate
Definition: transport.h:487
jack_nframes_t loop_start
Definition: transport.h:493
int jack_transport_reposition(jack_client_t *client, const jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT
Definition: transport.h:53
uint32_t jack_nframes_t
Definition: types.h:53
int jack_set_timebase_callback(jack_client_t *client, int conditional, JackTimebaseCallback timebase_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT
jack_time_t usecs
Definition: transport.h:74
jack_nframes_t frame_rate
Definition: transport.h:82
int jack_set_sync_callback(jack_client_t *client, JackSyncCallback sync_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT
Definition: transport.h:52
Definition: transport.h:39
int beat
Definition: transport.h:500
Definition: transport.h:471
Definition: transport.h:54
int32_t bar
Definition: transport.h:106
long smpte_offset
Definition: transport.h:496
Definition: transport.h:470
double ticks_per_beat
Definition: transport.h:506
double ticks_per_beat
Definition: transport.h:125
jack_nframes_t loop_end
Definition: transport.h:494
float smpte_frame_rate
Definition: transport.h:497
Definition: transport.h:40
int(* JackSyncCallback)(jack_transport_state_t state, jack_position_t *pos, void *arg)
Definition: transport.h:250
Definition: transport.h:38
jack_nframes_t jack_get_current_transport_frame(const jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
jack_unique_t unique_1
Definition: transport.h:73
jack_time_t usecs
Definition: transport.h:488
Definition: transport.h:51
Definition: transport.h:469
void(* JackTimebaseCallback)(jack_transport_state_t state, jack_nframes_t nframes, jack_position_t *pos, int new_pos, void *arg)
Definition: transport.h:327
float beats_per_bar
Definition: transport.h:123
Definition: transport.h:37
jack_client_t * client
Definition: simple_client.c:17