FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
jack.c File Reference
#include "config.h"
#include <semaphore.h>
#include <jack/jack.h>
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/fifo.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavformat/internal.h"
#include "timefilter.h"
#include "avdevice.h"

Go to the source code of this file.

Data Structures

struct  JackData
 

Macros

#define FIFO_PACKETS_NUM   16
 Size of the internal FIFO buffers as a number of audio packets. More...
 
#define OFFSET(x)   offsetof(JackData, x)
 

Functions

static int process_callback (jack_nframes_t nframes, void *arg)
 
static void shutdown_callback (void *arg)
 
static int xrun_callback (void *arg)
 
static int supply_new_packets (JackData *self, AVFormatContext *context)
 
static int start_jack (AVFormatContext *context)
 
static void free_pkt_fifo (AVFifoBuffer **fifo)
 
static void stop_jack (JackData *self)
 
static int audio_read_header (AVFormatContext *context)
 
static int audio_read_packet (AVFormatContext *context, AVPacket *pkt)
 
static int audio_read_close (AVFormatContext *context)
 

Variables

static const AVOption options []
 
static const AVClass jack_indev_class
 
AVInputFormat ff_jack_demuxer
 

Macro Definition Documentation

#define FIFO_PACKETS_NUM   16

Size of the internal FIFO buffers as a number of audio packets.

Definition at line 51 of file jack.c.

Referenced by start_jack().

#define OFFSET (   x)    offsetof(JackData, x)

Definition at line 345 of file jack.c.

Function Documentation

static int process_callback ( jack_nframes_t  nframes,
void arg 
)
static

Definition at line 69 of file jack.c.

Referenced by start_jack().

static void shutdown_callback ( void arg)
static

Definition at line 129 of file jack.c.

Referenced by start_jack().

static int xrun_callback ( void arg)
static

Definition at line 135 of file jack.c.

Referenced by start_jack().

static int supply_new_packets ( JackData self,
AVFormatContext context 
)
static

Definition at line 143 of file jack.c.

Referenced by audio_read_packet(), and start_jack().

static int start_jack ( AVFormatContext context)
static

Definition at line 161 of file jack.c.

Referenced by audio_read_header().

static void free_pkt_fifo ( AVFifoBuffer **  fifo)
static

Definition at line 226 of file jack.c.

Referenced by stop_jack().

static void stop_jack ( JackData self)
static

Definition at line 236 of file jack.c.

Referenced by audio_read_close(), and audio_read_header().

static int audio_read_header ( AVFormatContext context)
static

Definition at line 250 of file jack.c.

static int audio_read_packet ( AVFormatContext context,
AVPacket pkt 
)
static

Definition at line 278 of file jack.c.

static int audio_read_close ( AVFormatContext context)
static

Definition at line 338 of file jack.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "channels", "Number of audio channels.", OFFSET(nports), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:276
#define OFFSET(x)
Definition: jack.c:345

Definition at line 346 of file jack.c.

const AVClass jack_indev_class
static
Initial value:
= {
.class_name = "JACK indev",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:70
av_default_item_name
static const AVOption options[]
Definition: jack.c:346

Definition at line 351 of file jack.c.

AVInputFormat ff_jack_demuxer
Initial value:
= {
.name = "jack",
.long_name = NULL_IF_CONFIG_SMALL("JACK Audio Connection Kit"),
.priv_data_size = sizeof(JackData),
.priv_class = &jack_indev_class,
}
Definition: jack.c:53
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:638
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
static int audio_read_packet(AVFormatContext *context, AVPacket *pkt)
Definition: jack.c:278
static int audio_read_close(AVFormatContext *context)
Definition: jack.c:338
static int flags
Definition: cpu.c:47
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:476
static int audio_read_header(AVFormatContext *context)
Definition: jack.c:250
static const AVClass jack_indev_class
Definition: jack.c:351

Definition at line 359 of file jack.c.