Loading...
Searching...
No Matches
transport.h
Go to the documentation of this file.
/*
Copyright (C) 2002 Paul Davis
Copyright (C) 2003 Jack O'Quin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __jack_transport_h__
#define __jack_transport_h__
#ifdef __cplusplus
extern "C" {
#endif
#include <jack/types.h>
#include <jack/weakmacros.h>
typedef enum {
/* the order matters for binary compatibility */
JackTransportStopped = 0,
JackTransportRolling = 1,
JackTransportLooping = 2,
JackTransportStarting = 3
} jack_transport_state_t;
typedef uint64_t jack_unique_t;
typedef enum {
JackPositionBBT = 0x10,
JackPositionTimecode = 0x20,
JackBBTFrameOffset = 0x40,
JackAudioVideoRatio = 0x80,
JackVideoFrameOffset = 0x100,
JackTickDouble = 0x200,
} jack_position_bits_t;
#define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode|JackBBTFrameOffset|JackAudioVideoRatio|JackVideoFrameOffset)
#define EXTENDED_TIME_INFO
#define JACK_TICK_DOUBLE
typedef struct {
jack_unique_t unique_1;
jack_time_t usecs;
jack_nframes_t frame_rate;
/*}@*/
jack_nframes_t frame;
jack_position_bits_t valid;
/*}@*/
int32_t bar;
int32_t beat;
int32_t tick;
double bar_start_tick;
float beats_per_bar;
float beat_type;
double ticks_per_beat;
double beats_per_minute;
/*}@*/
double frame_time;
double next_time;
/*}@*/
/* JackBBTFrameOffset fields */
jack_nframes_t bbt_offset;
/*}@*/
/* JACK video positional data
* EXPERIMENTAL: could change */
float audio_frames_per_video_frame;
jack_nframes_t video_offset;
/*}@*/
double tick_double;
/*}@*/
/* For binary compatibility, new fields should be allocated from
* this padding area with new valid bits controlling access, so
* the existing structure size and offsets are preserved. */
int32_t padding[5];
/*}@*/
/* When (unique_1 == unique_2) the contents are consistent. */
jack_unique_t unique_2;
} jack_position_t;
int jack_release_timebase (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
typedef int (*JackSyncCallback)(jack_transport_state_t state,
jack_position_t *pos,
void *arg);
int jack_set_sync_callback (jack_client_t *client,
JackSyncCallback sync_callback,
void *arg) JACK_OPTIONAL_WEAK_EXPORT;
int jack_set_sync_timeout (jack_client_t *client,
jack_time_t timeout) JACK_OPTIONAL_WEAK_EXPORT;
typedef void (*JackTimebaseCallback)(jack_transport_state_t state,
jack_nframes_t nframes,
jack_position_t *pos,
int new_pos,
void *arg);
int jack_set_timebase_callback (jack_client_t *client,
int conditional,
JackTimebaseCallback timebase_callback,
void *arg) JACK_OPTIONAL_WEAK_EXPORT;
int jack_transport_locate (jack_client_t *client,
jack_nframes_t frame) JACK_OPTIONAL_WEAK_EXPORT;
jack_transport_state_t jack_transport_query (const jack_client_t *client,
jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT;
jack_nframes_t jack_get_current_transport_frame (const jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
int jack_transport_reposition (jack_client_t *client,
const jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT;
void jack_transport_start (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
void jack_transport_stop (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
/*********************************************************************
* The following interfaces are DEPRECATED. They are only provided
* for compatibility with the earlier JACK transport implementation.
*********************************************************************/
typedef enum {
JackTransportState = 0x1,
JackTransportPosition = 0x2,
JackTransportLoop = 0x4,
JackTransportSMPTE = 0x8,
JackTransportBBT = 0x10
} jack_transport_bits_t;
typedef struct {
/* these two cannot be set from clients: the server sets them */
jack_nframes_t frame_rate;
jack_time_t usecs;
jack_transport_bits_t valid;
jack_transport_state_t transport_state;
jack_nframes_t frame;
jack_nframes_t loop_start;
jack_nframes_t loop_end;
long smpte_offset;
float smpte_frame_rate;
int bar;
int beat;
int tick;
double bar_start_tick;
float beats_per_bar;
float beat_type;
double ticks_per_beat;
double beats_per_minute;
} jack_transport_info_t;
void jack_get_transport_info (jack_client_t *client,
jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
void jack_set_transport_info (jack_client_t *client,
jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
#ifdef __cplusplus
}
#endif
#endif /* __jack_transport_h__ */
jack_position_t::ticks_per_beat
double ticks_per_beat
Definition transport.h:125
jack_position_t::usecs
jack_time_t usecs
Definition transport.h:74
jack_set_timebase_callback
int jack_set_timebase_callback(jack_client_t *client, int conditional, JackTimebaseCallback timebase_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT
jack_position_t::beat_type
float beat_type
Definition transport.h:124
jack_transport_info_t::loop_start
jack_nframes_t loop_start
Definition transport.h:493
jack_transport_bits_t
jack_transport_bits_t
Definition transport.h:467
JackTimebaseCallback
void(* JackTimebaseCallback)(jack_transport_state_t state, jack_nframes_t nframes, jack_position_t *pos, int new_pos, void *arg)
Definition transport.h:327
jack_set_sync_timeout
int jack_set_sync_timeout(jack_client_t *client, jack_time_t timeout) JACK_OPTIONAL_WEAK_EXPORT
jack_transport_reposition
int jack_transport_reposition(jack_client_t *client, const jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT
jack_position_t::unique_1
jack_unique_t unique_1
Definition transport.h:73
jack_transport_info_t::beat_type
float beat_type
Definition transport.h:505
jack_transport_info_t::beat
int beat
Definition transport.h:500
jack_transport_info_t::beats_per_minute
double beats_per_minute
Definition transport.h:507
jack_transport_info_t::tick
int tick
Definition transport.h:501
jack_transport_info_t::ticks_per_beat
double ticks_per_beat
Definition transport.h:506
jack_position_t::bar
int32_t bar
Definition transport.h:106
JackSyncCallback
int(* JackSyncCallback)(jack_transport_state_t state, jack_position_t *pos, void *arg)
Definition transport.h:250
jack_transport_query
jack_transport_state_t jack_transport_query(const jack_client_t *client, jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT
jack_transport_info_t::smpte_frame_rate
float smpte_frame_rate
Definition transport.h:497
JackPositionTimecode
@ JackPositionTimecode
Definition transport.h:51
JackAudioVideoRatio
@ JackAudioVideoRatio
Definition transport.h:53
JackBBTFrameOffset
@ JackBBTFrameOffset
Definition transport.h:52
JackPositionBBT
@ JackPositionBBT
Definition transport.h:50
JackVideoFrameOffset
@ JackVideoFrameOffset
Definition transport.h:54
JackTickDouble
@ JackTickDouble
Definition transport.h:55
jack_position_t::beats_per_minute
double beats_per_minute
Definition transport.h:130
JackTransportLooping
@ JackTransportLooping
Definition transport.h:39
JackTransportStopped
@ JackTransportStopped
Definition transport.h:37
JackTransportRolling
@ JackTransportRolling
Definition transport.h:38
JackTransportStarting
@ JackTransportStarting
Definition transport.h:40
jack_position_t::bar_start_tick
double bar_start_tick
Definition transport.h:119
jack_transport_info_t::valid
jack_transport_bits_t valid
Definition transport.h:490
jack_transport_stop
void jack_transport_stop(jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
jack_transport_info_t::beats_per_bar
float beats_per_bar
Definition transport.h:504
jack_transport_info_t::transport_state
jack_transport_state_t transport_state
Definition transport.h:491
jack_transport_info_t::frame
jack_nframes_t frame
Definition transport.h:492
jack_position_t::valid
jack_position_bits_t valid
Definition transport.h:94
jack_position_t::next_time
double next_time
Definition transport.h:144
jack_transport_info_t::bar_start_tick
double bar_start_tick
Definition transport.h:502
jack_get_transport_info
void jack_get_transport_info(jack_client_t *client, jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
jack_position_t::tick
int32_t tick
Definition transport.h:115
jack_position_t::unique_2
jack_unique_t unique_2
Definition transport.h:202
jack_transport_info_t::loop_end
jack_nframes_t loop_end
Definition transport.h:494
jack_position_t::frame
jack_nframes_t frame
Definition transport.h:88
jack_transport_locate
int jack_transport_locate(jack_client_t *client, jack_nframes_t frame) JACK_OPTIONAL_WEAK_EXPORT
jack_transport_start
void jack_transport_start(jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
jack_transport_info_t::frame_rate
jack_nframes_t frame_rate
Definition transport.h:487
jack_position_t::frame_time
double frame_time
Definition transport.h:143
jack_position_t::tick_double
double tick_double
Definition transport.h:186
jack_position_t::video_offset
jack_nframes_t video_offset
Definition transport.h:176
jack_transport_info_t::smpte_offset
long smpte_offset
Definition transport.h:496
jack_set_transport_info
void jack_set_transport_info(jack_client_t *client, jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
jack_position_t::beats_per_bar
float beats_per_bar
Definition transport.h:123
jack_position_t::frame_rate
jack_nframes_t frame_rate
Definition transport.h:82
jack_position_t::bbt_offset
jack_nframes_t bbt_offset
Definition transport.h:150
jack_set_sync_callback
int jack_set_sync_callback(jack_client_t *client, JackSyncCallback sync_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT
jack_release_timebase
int jack_release_timebase(jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
jack_get_current_transport_frame
jack_nframes_t jack_get_current_transport_frame(const jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
jack_position_t::audio_frames_per_video_frame
float audio_frames_per_video_frame
Definition transport.h:169
jack_transport_info_t::bar
int bar
Definition transport.h:499
jack_transport_info_t::usecs
jack_time_t usecs
Definition transport.h:488
jack_position_t::beat
int32_t beat
Definition transport.h:110
JackTransportPosition
@ JackTransportPosition
Definition transport.h:470
JackTransportLoop
@ JackTransportLoop
Definition transport.h:471
JackTransportSMPTE
@ JackTransportSMPTE
Definition transport.h:472
JackTransportState
@ JackTransportState
Definition transport.h:469
JackTransportBBT
@ JackTransportBBT
Definition transport.h:473
jack_position_t
Definition transport.h:68
jack_transport_info_t
Definition transport.h:483
jack_position_bits_t
jack_position_bits_t
Definition transport.h:49
jack_transport_state_t
jack_transport_state_t
Definition transport.h:34
jack_unique_t
uint64_t jack_unique_t
Definition transport.h:44
types.h
jack_client_t
struct _jack_client jack_client_t
Definition types.h:89
jack_nframes_t
uint32_t jack_nframes_t
Definition types.h:53
jack_time_t
uint64_t jack_time_t
Definition types.h:64
weakmacros.h
JACK_OPTIONAL_WEAK_EXPORT
#define JACK_OPTIONAL_WEAK_EXPORT
Definition weakmacros.h:56