connectors.h
/*****************************************************************
* gavl - a general purpose audio/video processing library
*
* Copyright (c) 2001 - 2024 Members of the Gmerlin project
* http://github.com/bplaum
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* *****************************************************************/
#ifndef GAVL_CONNECTORS_H_INCLUDED
#define GAVL_CONNECTORS_H_INCLUDED
#include <gavl/gavl.h>
#include <gavl/trackinfo.h>
#include <gavl/compression.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*gavl_connector_lock_func_t)(void * priv);
typedef void (*gavl_connector_free_func_t)(void * priv);
typedef enum
{
GAVL_SOURCE_EOF = 0,
GAVL_SOURCE_OK = 1,
GAVL_SOURCE_AGAIN = 2,
} gavl_source_status_t;
typedef gavl_source_status_t
(*gavl_audio_source_func_t)(void * priv, gavl_audio_frame_t ** frame);
typedef gavl_source_status_t
(*gavl_video_source_func_t)(void * priv, gavl_video_frame_t ** frame);
typedef gavl_source_status_t
(*gavl_packet_source_func_t)(void * priv, gavl_packet_t ** p);
#define GAVL_SOURCE_SRC_ALLOC (1<<0)
#define GAVL_SOURCE_SRC_FRAMESIZE_MAX (1<<2)
#define GAVL_SOURCE_SRC_DISCONTINUOUS (1<<3)
/* Called by the source */
GAVL_PUBLIC
gavl_video_source_t *
gavl_video_source_create(gavl_video_source_func_t func,
void * priv, int src_flags,
const gavl_video_format_t * src_format);
GAVL_PUBLIC
void gavl_video_source_set_pts_offset(gavl_video_source_t * src, int64_t offset);
GAVL_PUBLIC
void gavl_video_source_drain(gavl_video_source_t * s);
GAVL_PUBLIC
gavl_video_source_t *
gavl_video_source_create_source(gavl_video_source_func_t func,
void * priv, int src_flags,
gavl_video_source_t * src);
GAVL_PUBLIC void
gavl_video_source_set_lock_funcs(gavl_video_source_t * src,
gavl_connector_lock_func_t lock_func,
gavl_connector_lock_func_t unlock_func,
void * priv);
GAVL_PUBLIC void
gavl_video_source_set_free_func(gavl_video_source_t * src,
gavl_connector_free_func_t free_func);
GAVL_PUBLIC
gavl_video_options_t * gavl_video_source_get_options(gavl_video_source_t * s);
GAVL_PUBLIC
void gavl_video_source_reset(gavl_video_source_t * s);
GAVL_PUBLIC
void gavl_video_source_destroy(gavl_video_source_t * s);
/* Called by the destination */
GAVL_PUBLIC
void gavl_video_source_support_hw(gavl_video_source_t * s);
GAVL_PUBLIC
const gavl_video_format_t *
gavl_video_source_get_src_format(gavl_video_source_t * s);
GAVL_PUBLIC
int gavl_video_source_get_src_flags(gavl_video_source_t * s);
GAVL_PUBLIC
const gavl_video_format_t *
gavl_video_source_get_dst_format(gavl_video_source_t * s);
GAVL_PUBLIC
void
gavl_video_source_set_dst(gavl_video_source_t * s, int dst_flags,
const gavl_video_format_t * dst_format);
GAVL_PUBLIC
gavl_source_status_t
gavl_video_source_read_frame(void * s, gavl_video_frame_t ** frame);
/* Called by source */
GAVL_PUBLIC
gavl_audio_source_t *
gavl_audio_source_create(gavl_audio_source_func_t func,
void * priv, int src_flags,
const gavl_audio_format_t * src_format);
GAVL_PUBLIC
void gavl_audio_source_drain(gavl_audio_source_t * s);
GAVL_PUBLIC
void gavl_audio_source_set_pts_offset(gavl_audio_source_t * src, int64_t offset);
GAVL_PUBLIC
gavl_audio_source_t *
gavl_audio_source_create_source(gavl_audio_source_func_t func,
void * priv, int src_flags,
gavl_audio_source_t * src);
GAVL_PUBLIC void
gavl_audio_source_set_lock_funcs(gavl_audio_source_t * src,
gavl_connector_lock_func_t lock_func,
gavl_connector_lock_func_t unlock_func,
void * priv);
GAVL_PUBLIC void
gavl_audio_source_set_free_func(gavl_audio_source_t * src,
gavl_connector_free_func_t free_func);
GAVL_PUBLIC
const gavl_audio_format_t *
gavl_audio_source_get_src_format(gavl_audio_source_t * s);
GAVL_PUBLIC
const gavl_audio_format_t *
gavl_audio_source_get_dst_format(gavl_audio_source_t * s);
GAVL_PUBLIC int
gavl_audio_source_get_dst_flags(gavl_audio_source_t * s);
GAVL_PUBLIC
void
gavl_audio_source_set_dst(gavl_audio_source_t * s, int dst_flags,
const gavl_audio_format_t * dst_format);
GAVL_PUBLIC
gavl_source_status_t
gavl_audio_source_read_frame(void*s, gavl_audio_frame_t ** frame);
GAVL_PUBLIC
void
gavl_audio_source_skip(gavl_audio_source_t * s, int num_samples);
GAVL_PUBLIC
void
gavl_audio_source_skip_to(gavl_audio_source_t * s,
int64_t t, int scale);
GAVL_PUBLIC
int gavl_audio_source_read_samples(void*s, gavl_audio_frame_t * frame,
int num_samples);
GAVL_PUBLIC
gavl_audio_options_t * gavl_audio_source_get_options(gavl_audio_source_t * s);
GAVL_PUBLIC
void gavl_audio_source_reset(gavl_audio_source_t * s);
GAVL_PUBLIC
void gavl_audio_source_destroy(gavl_audio_source_t * s);
/* Packet source */
GAVL_PUBLIC
gavl_packet_source_t *
gavl_packet_source_create(gavl_packet_source_func_t func,
void * priv, int src_flags, const gavl_dictionary_t * s);
GAVL_PUBLIC
void gavl_packet_source_set_pts_offset(gavl_packet_source_t * src, int64_t offset);
GAVL_PUBLIC
void gavl_packet_source_drain(gavl_packet_source_t * src);
/* Call after seeking */
GAVL_PUBLIC
void gavl_packet_source_reset(gavl_packet_source_t * s);
GAVL_PUBLIC const gavl_dictionary_t *
gavl_packet_source_get_stream(gavl_packet_source_t * s);
GAVL_PUBLIC gavl_dictionary_t *
gavl_packet_source_get_stream_nc(gavl_packet_source_t * s);
GAVL_PUBLIC
gavl_packet_source_t *
gavl_packet_source_create_source(gavl_packet_source_func_t func,
void * priv, int src_flags,
gavl_packet_source_t * src);
GAVL_PUBLIC void
gavl_packet_source_set_lock_funcs(gavl_packet_source_t * src,
gavl_connector_lock_func_t lock_func,
gavl_connector_lock_func_t unlock_func,
void * priv);
GAVL_PUBLIC void
gavl_packet_source_set_free_func(gavl_packet_source_t * src,
gavl_connector_free_func_t free_func);
// GAVL_PUBLIC const gavl_compression_info_t *
// gavl_packet_source_get_ci(gavl_packet_source_t * s);
GAVL_PUBLIC const gavl_audio_format_t *
gavl_packet_source_get_audio_format(gavl_packet_source_t * s);
GAVL_PUBLIC const gavl_video_format_t *
gavl_packet_source_get_video_format(gavl_packet_source_t * s);
GAVL_PUBLIC int
gavl_packet_source_get_timescale(gavl_packet_source_t * s);
GAVL_PUBLIC gavl_source_status_t
gavl_packet_source_read_packet(void*s, gavl_packet_t ** p);
GAVL_PUBLIC gavl_source_status_t
gavl_packet_source_peek_packet(void*sp, gavl_packet_t ** p);
GAVL_PUBLIC void
gavl_packet_source_destroy(gavl_packet_source_t * s);
typedef enum
{
GAVL_SINK_ERROR,
GAVL_SINK_OK,
} gavl_sink_status_t;
typedef gavl_audio_frame_t *
(*gavl_audio_sink_get_func)(void * priv);
typedef gavl_sink_status_t
(*gavl_audio_sink_put_func)(void * priv, gavl_audio_frame_t * f);
GAVL_PUBLIC gavl_audio_sink_t *
gavl_audio_sink_create(gavl_audio_sink_get_func get_func,
gavl_audio_sink_put_func put_func,
void * priv,
const gavl_audio_format_t * format);
GAVL_PUBLIC void
gavl_audio_sink_set_lock_funcs(gavl_audio_sink_t * sink,
gavl_connector_lock_func_t lock_func,
gavl_connector_lock_func_t unlock_func,
void * priv);
GAVL_PUBLIC void
gavl_audio_sink_set_free_func(gavl_audio_sink_t * sink,
gavl_connector_free_func_t free_func);
GAVL_PUBLIC const gavl_audio_format_t *
gavl_audio_sink_get_format(gavl_audio_sink_t * s);
GAVL_PUBLIC gavl_audio_frame_t *
gavl_audio_sink_get_frame(gavl_audio_sink_t * s);
GAVL_PUBLIC gavl_sink_status_t
gavl_audio_sink_put_frame(gavl_audio_sink_t * s, gavl_audio_frame_t * f);
GAVL_PUBLIC void
gavl_audio_sink_destroy(gavl_audio_sink_t * s);
typedef gavl_video_frame_t *
(*gavl_video_sink_get_func)(void * priv);
typedef gavl_sink_status_t
(*gavl_video_sink_put_func)(void * priv, gavl_video_frame_t * f);
GAVL_PUBLIC gavl_video_sink_t *
gavl_video_sink_create(gavl_video_sink_get_func get_func,
gavl_video_sink_put_func put_func,
void * priv,
const gavl_video_format_t * format);
GAVL_PUBLIC void
gavl_video_sink_set_lock_funcs(gavl_video_sink_t * sink,
gavl_connector_lock_func_t lock_func,
gavl_connector_lock_func_t unlock_func,
void * priv);
GAVL_PUBLIC void
gavl_video_sink_set_free_func(gavl_video_sink_t * sink,
gavl_connector_free_func_t free_func);
GAVL_PUBLIC const gavl_video_format_t *
gavl_video_sink_get_format(gavl_video_sink_t * s);
GAVL_PUBLIC gavl_video_frame_t *
gavl_video_sink_get_frame(gavl_video_sink_t * s);
GAVL_PUBLIC gavl_sink_status_t
gavl_video_sink_put_frame(gavl_video_sink_t * s, gavl_video_frame_t * f);
GAVL_PUBLIC void
gavl_video_sink_destroy(gavl_video_sink_t * s);
typedef gavl_packet_t *
(*gavl_packet_sink_get_func)(void * priv);
typedef gavl_sink_status_t
(*gavl_packet_sink_put_func)(void * priv, gavl_packet_t * p);
GAVL_PUBLIC gavl_packet_sink_t *
gavl_packet_sink_create(gavl_packet_sink_get_func get_func,
gavl_packet_sink_put_func put_func,
void * priv);
GAVL_PUBLIC void
gavl_packet_sink_set_lock_funcs(gavl_packet_sink_t * sink,
gavl_connector_lock_func_t lock_func,
gavl_connector_lock_func_t unlock_func,
void * priv);
GAVL_PUBLIC void
gavl_packet_sink_set_free_func(gavl_packet_sink_t * sink,
gavl_connector_free_func_t free_func);
GAVL_PUBLIC gavl_packet_t *
gavl_packet_sink_get_packet(gavl_packet_sink_t * s);
GAVL_PUBLIC void
gavl_packet_sink_reset(gavl_packet_sink_t * s);
GAVL_PUBLIC gavl_sink_status_t
gavl_packet_sink_put_packet(gavl_packet_sink_t * s, gavl_packet_t * p);
GAVL_PUBLIC void
gavl_packet_sink_destroy(gavl_packet_sink_t * s);
/* Packet buffer */
typedef struct gavl_packet_buffer_s
gavl_packet_buffer_t;
GAVL_PUBLIC
gavl_packet_buffer_t * gavl_packet_buffer_create(const gavl_dictionary_t * stream_info);
GAVL_PUBLIC
void gavl_packet_buffer_destroy(gavl_packet_buffer_t *);
GAVL_PUBLIC
void gavl_packet_buffer_flush(gavl_packet_buffer_t *);
GAVL_PUBLIC
void gavl_packet_buffer_clear(gavl_packet_buffer_t *);
GAVL_PUBLIC
gavl_packet_sink_t * gavl_packet_buffer_get_sink(gavl_packet_buffer_t *);
GAVL_PUBLIC
gavl_packet_source_t * gavl_packet_buffer_get_source(gavl_packet_buffer_t *);
/* Set output PTS (called after seeking) */
GAVL_PUBLIC
void gavl_packet_buffer_set_out_pts(gavl_packet_buffer_t * buf, int64_t pts);
/*
* Mark the last packet with GAVL_PACKET_LAST.
* Introduces a delay of 1 for low-delay streams
*/
GAVL_PUBLIC
void gavl_packet_buffer_set_mark_last(gavl_packet_buffer_t * buf, int mark);
GAVL_PUBLIC
void gavl_packet_buffer_set_calc_frame_durations(gavl_packet_buffer_t * buf, int calc);
#ifdef __cplusplus
}
#endif
#endif // GAVL_CONNECTORS_H_INCLUDED
gavl.h
gavl_audio_options_t
struct gavl_audio_options_s gavl_audio_options_t
Opaque container for audio conversion options.
Definition gavl.h:1004
gavl_video_sink_t
struct gavl_video_sink_s gavl_video_sink_t
Video sink.
Definition gavl.h:83
gavl_video_sink_set_free_func
GAVL_PUBLIC void gavl_video_sink_set_free_func(gavl_video_sink_t *sink, gavl_connector_free_func_t free_func)
Set free function.
gavl_audio_sink_create
GAVL_PUBLIC gavl_audio_sink_t * gavl_audio_sink_create(gavl_audio_sink_get_func get_func, gavl_audio_sink_put_func put_func, void *priv, const gavl_audio_format_t *format)
Create an audio sink.
gavl_video_sink_set_lock_funcs
GAVL_PUBLIC void gavl_video_sink_set_lock_funcs(gavl_video_sink_t *sink, gavl_connector_lock_func_t lock_func, gavl_connector_lock_func_t unlock_func, void *priv)
Set lock functions.
gavl_packet_sink_put_func
gavl_sink_status_t(* gavl_packet_sink_put_func)(void *priv, gavl_packet_t *p)
Prototype for putting a frame.
Definition connectors.h:889
gavl_video_sink_destroy
GAVL_PUBLIC void gavl_video_sink_destroy(gavl_video_sink_t *s)
Destroy a video sink.
gavl_sink_status_t
gavl_sink_status_t
Return status of the sink functions.
Definition connectors.h:664
gavl_audio_sink_t
struct gavl_audio_sink_s gavl_audio_sink_t
Audio sink.
Definition gavl.h:74
gavl_packet_sink_t
struct gavl_packet_sink_s gavl_packet_sink_t
Packet sink.
Definition gavl.h:92
gavl_audio_sink_set_free_func
GAVL_PUBLIC void gavl_audio_sink_set_free_func(gavl_audio_sink_t *sink, gavl_connector_free_func_t free_func)
Set free function.
gavl_video_sink_create
GAVL_PUBLIC gavl_video_sink_t * gavl_video_sink_create(gavl_video_sink_get_func get_func, gavl_video_sink_put_func put_func, void *priv, const gavl_video_format_t *format)
Create a video sink.
gavl_audio_sink_put_func
gavl_sink_status_t(* gavl_audio_sink_put_func)(void *priv, gavl_audio_frame_t *f)
Prototype for putting a frame.
Definition connectors.h:688
gavl_audio_sink_get_func
gavl_audio_frame_t *(* gavl_audio_sink_get_func)(void *priv)
Prototype for getting a frame buffer.
Definition connectors.h:679
gavl_packet_sink_get_packet
GAVL_PUBLIC gavl_packet_t * gavl_packet_sink_get_packet(gavl_packet_sink_t *s)
Get a buffer for a packet.
gavl_packet_sink_set_free_func
GAVL_PUBLIC void gavl_packet_sink_set_free_func(gavl_packet_sink_t *sink, gavl_connector_free_func_t free_func)
Set free function.
gavl_audio_sink_destroy
GAVL_PUBLIC void gavl_audio_sink_destroy(gavl_audio_sink_t *s)
Destroy an audio sink.
gavl_video_sink_put_frame
GAVL_PUBLIC gavl_sink_status_t gavl_video_sink_put_frame(gavl_video_sink_t *s, gavl_video_frame_t *f)
Output a frame.
gavl_video_sink_get_func
gavl_video_frame_t *(* gavl_video_sink_get_func)(void *priv)
Prototype for getting a frame buffer.
Definition connectors.h:780
gavl_packet_sink_put_packet
GAVL_PUBLIC gavl_sink_status_t gavl_packet_sink_put_packet(gavl_packet_sink_t *s, gavl_packet_t *p)
Output a frame.
gavl_video_sink_get_frame
GAVL_PUBLIC gavl_video_frame_t * gavl_video_sink_get_frame(gavl_video_sink_t *s)
Get a buffer for a frame.
gavl_packet_sink_create
GAVL_PUBLIC gavl_packet_sink_t * gavl_packet_sink_create(gavl_packet_sink_get_func get_func, gavl_packet_sink_put_func put_func, void *priv)
Create a packet sink.
gavl_packet_sink_get_func
gavl_packet_t *(* gavl_packet_sink_get_func)(void *priv)
Prototype for getting a packet buffer.
Definition connectors.h:880
gavl_video_sink_put_func
gavl_sink_status_t(* gavl_video_sink_put_func)(void *priv, gavl_video_frame_t *f)
Prototype for putting a frame.
Definition connectors.h:789
gavl_audio_sink_set_lock_funcs
GAVL_PUBLIC void gavl_audio_sink_set_lock_funcs(gavl_audio_sink_t *sink, gavl_connector_lock_func_t lock_func, gavl_connector_lock_func_t unlock_func, void *priv)
Set lock functions.
gavl_packet_sink_set_lock_funcs
GAVL_PUBLIC void gavl_packet_sink_set_lock_funcs(gavl_packet_sink_t *sink, gavl_connector_lock_func_t lock_func, gavl_connector_lock_func_t unlock_func, void *priv)
Set lock functions.
gavl_audio_sink_put_frame
GAVL_PUBLIC gavl_sink_status_t gavl_audio_sink_put_frame(gavl_audio_sink_t *s, gavl_audio_frame_t *f)
Output a frame.
gavl_audio_sink_get_frame
GAVL_PUBLIC gavl_audio_frame_t * gavl_audio_sink_get_frame(gavl_audio_sink_t *s)
Get a buffer for a frame.
gavl_audio_sink_get_format
GAVL_PUBLIC const gavl_audio_format_t * gavl_audio_sink_get_format(gavl_audio_sink_t *s)
Get the format.
gavl_packet_sink_destroy
GAVL_PUBLIC void gavl_packet_sink_destroy(gavl_packet_sink_t *s)
Destroy a packet sink.
gavl_video_sink_get_format
GAVL_PUBLIC const gavl_video_format_t * gavl_video_sink_get_format(gavl_video_sink_t *s)
Get the format.
GAVL_SINK_OK
@ GAVL_SINK_OK
Frame was successfully processed.
Definition connectors.h:666
GAVL_SINK_ERROR
@ GAVL_SINK_ERROR
Something went wrong.
Definition connectors.h:665
gavl_packet_source_read_packet
GAVL_PUBLIC gavl_source_status_t gavl_packet_source_read_packet(void *s, gavl_packet_t **p)
Read one packet.
gavl_packet_source_func_t
gavl_source_status_t(* gavl_packet_source_func_t)(void *priv, gavl_packet_t **p)
Prototype for obtaining one packet.
Definition connectors.h:131
gavl_video_source_create_source
GAVL_PUBLIC gavl_video_source_t * gavl_video_source_create_source(gavl_video_source_func_t func, void *priv, int src_flags, gavl_video_source_t *src)
Create a video source from another source.
gavl_packet_source_create
GAVL_PUBLIC gavl_packet_source_t * gavl_packet_source_create(gavl_packet_source_func_t func, void *priv, int src_flags, const gavl_dictionary_t *s)
Create a packet source.
gavl_video_source_create
GAVL_PUBLIC gavl_video_source_t * gavl_video_source_create(gavl_video_source_func_t func, void *priv, int src_flags, const gavl_video_format_t *src_format)
Create a video source.
gavl_audio_source_read_frame
GAVL_PUBLIC gavl_source_status_t gavl_audio_source_read_frame(void *s, gavl_audio_frame_t **frame)
Read an audio frame.
gavl_audio_source_get_dst_format
GAVL_PUBLIC const gavl_audio_format_t * gavl_audio_source_get_dst_format(gavl_audio_source_t *s)
Get the output format.
gavl_audio_source_set_dst
GAVL_PUBLIC void gavl_audio_source_set_dst(gavl_audio_source_t *s, int dst_flags, const gavl_audio_format_t *dst_format)
Set the destination mode.
gavl_video_source_set_dst
GAVL_PUBLIC void gavl_video_source_set_dst(gavl_video_source_t *s, int dst_flags, const gavl_video_format_t *dst_format)
Set the destination mode.
gavl_audio_source_create
GAVL_PUBLIC gavl_audio_source_t * gavl_audio_source_create(gavl_audio_source_func_t func, void *priv, int src_flags, const gavl_audio_format_t *src_format)
Create an audio source.
gavl_video_source_t
struct gavl_video_source_s gavl_video_source_t
Forward declaration of the video source.
Definition gavl.h:50
gavl_audio_source_set_free_func
GAVL_PUBLIC void gavl_audio_source_set_free_func(gavl_audio_source_t *src, gavl_connector_free_func_t free_func)
Set free function.
gavl_audio_source_skip
GAVL_PUBLIC void gavl_audio_source_skip(gavl_audio_source_t *s, int num_samples)
Skip audio samples at the input.
gavl_audio_source_create_source
GAVL_PUBLIC gavl_audio_source_t * gavl_audio_source_create_source(gavl_audio_source_func_t func, void *priv, int src_flags, gavl_audio_source_t *src)
Create an audio source from another source.
gavl_source_status_t
gavl_source_status_t
Return value of the source function.
Definition connectors.h:94
gavl_video_source_get_src_format
GAVL_PUBLIC const gavl_video_format_t * gavl_video_source_get_src_format(gavl_video_source_t *s)
Get the native format.
gavl_audio_source_reset
GAVL_PUBLIC void gavl_audio_source_reset(gavl_audio_source_t *s)
Reset an audio source.
gavl_video_source_get_src_flags
GAVL_PUBLIC int gavl_video_source_get_src_flags(gavl_video_source_t *s)
Get the source flags.
gavl_video_source_read_frame
GAVL_PUBLIC gavl_source_status_t gavl_video_source_read_frame(void *s, gavl_video_frame_t **frame)
Read a video frame.
gavl_video_source_set_lock_funcs
GAVL_PUBLIC void gavl_video_source_set_lock_funcs(gavl_video_source_t *src, gavl_connector_lock_func_t lock_func, gavl_connector_lock_func_t unlock_func, void *priv)
Set lock functions.
gavl_video_source_set_free_func
GAVL_PUBLIC void gavl_video_source_set_free_func(gavl_video_source_t *src, gavl_connector_free_func_t free_func)
Set free function.
gavl_audio_source_read_samples
GAVL_PUBLIC int gavl_audio_source_read_samples(void *s, gavl_audio_frame_t *frame, int num_samples)
Read audio samples.
gavl_video_source_get_options
GAVL_PUBLIC gavl_video_options_t * gavl_video_source_get_options(gavl_video_source_t *s)
Get conversion options of a video source.
gavl_packet_source_create_source
GAVL_PUBLIC gavl_packet_source_t * gavl_packet_source_create_source(gavl_packet_source_func_t func, void *priv, int src_flags, gavl_packet_source_t *src)
Create a packet source from another packet source.
gavl_video_source_support_hw
GAVL_PUBLIC void gavl_video_source_support_hw(gavl_video_source_t *s)
Enable hardware surfaces.
gavl_audio_source_t
struct gavl_audio_source_s gavl_audio_source_t
Forward declaration of the audio source.
Definition gavl.h:58
gavl_packet_source_get_audio_format
GAVL_PUBLIC const gavl_audio_format_t * gavl_packet_source_get_audio_format(gavl_packet_source_t *s)
Get the compression info.
gavl_audio_source_get_options
GAVL_PUBLIC gavl_audio_options_t * gavl_audio_source_get_options(gavl_audio_source_t *s)
Get conversion options of an audio source.
gavl_video_source_func_t
gavl_source_status_t(* gavl_video_source_func_t)(void *priv, gavl_video_frame_t **frame)
Prototype for obtaining one video frame.
Definition connectors.h:120
gavl_audio_source_func_t
gavl_source_status_t(* gavl_audio_source_func_t)(void *priv, gavl_audio_frame_t **frame)
Prototype for obtaining one audio frame.
Definition connectors.h:109
gavl_packet_source_destroy
GAVL_PUBLIC void gavl_packet_source_destroy(gavl_packet_source_t *s)
Destroy a packet source.
gavl_packet_source_t
struct gavl_packet_source_s gavl_packet_source_t
Forward declaration of the packet source.
Definition gavl.h:66
gavl_video_source_get_dst_format
GAVL_PUBLIC const gavl_video_format_t * gavl_video_source_get_dst_format(gavl_video_source_t *s)
Get the output format.
gavl_packet_source_get_timescale
GAVL_PUBLIC int gavl_packet_source_get_timescale(gavl_packet_source_t *s)
Get the time scale.
gavl_packet_source_set_free_func
GAVL_PUBLIC void gavl_packet_source_set_free_func(gavl_packet_source_t *src, gavl_connector_free_func_t free_func)
Set free function.
gavl_audio_source_set_lock_funcs
GAVL_PUBLIC void gavl_audio_source_set_lock_funcs(gavl_audio_source_t *src, gavl_connector_lock_func_t lock_func, gavl_connector_lock_func_t unlock_func, void *priv)
Set lock functions.
gavl_packet_source_get_video_format
GAVL_PUBLIC const gavl_video_format_t * gavl_packet_source_get_video_format(gavl_packet_source_t *s)
Get the video format.
gavl_audio_source_destroy
GAVL_PUBLIC void gavl_audio_source_destroy(gavl_audio_source_t *s)
Destroy an audio source.
gavl_packet_source_set_lock_funcs
GAVL_PUBLIC void gavl_packet_source_set_lock_funcs(gavl_packet_source_t *src, gavl_connector_lock_func_t lock_func, gavl_connector_lock_func_t unlock_func, void *priv)
Set lock functions.
gavl_video_source_reset
GAVL_PUBLIC void gavl_video_source_reset(gavl_video_source_t *s)
Reset a video source.
gavl_video_source_destroy
GAVL_PUBLIC void gavl_video_source_destroy(gavl_video_source_t *s)
Destroy a video source.
gavl_audio_source_get_dst_flags
GAVL_PUBLIC int gavl_audio_source_get_dst_flags(gavl_audio_source_t *s)
Get the output flags.
gavl_audio_source_get_src_format
GAVL_PUBLIC const gavl_audio_format_t * gavl_audio_source_get_src_format(gavl_audio_source_t *s)
Get the native format.
GAVL_SOURCE_OK
@ GAVL_SOURCE_OK
Frame available.
Definition connectors.h:96
GAVL_SOURCE_EOF
@ GAVL_SOURCE_EOF
End of file, no more frames available.
Definition connectors.h:95
GAVL_SOURCE_AGAIN
@ GAVL_SOURCE_AGAIN
No frame available right now, might try later.
Definition connectors.h:97
gavl_video_format_t
struct gavl_video_format_s gavl_video_format_t
Video format.
Definition gavl.h:102
gavl_video_options_t
struct gavl_video_options_s gavl_video_options_t
Definition gavl.h:3230
gavl_audio_format_t
Audio Format.
Definition gavl.h:273
gavl_audio_frame_t
Generic container for audio samples.
Definition gavl.h:624