8 #ifndef GROOVE_ENCODER_H
9 #define GROOVE_ENCODER_H
94 const char *key,
const struct GrooveTag *prev,
int flags);
98 const char *value,
int flags);
int groove_encoder_metadata_set(struct GrooveEncoder *encoder, const char *key, const char *value, int flags)
see docs for groove_file_metadata_set
int groove_encoder_buffer_get(struct GrooveEncoder *encoder, struct GrooveBuffer **buffer, int block)
returns < 0 on error, GROOVE_BUFFER_NO on aborted (block=1) or no buffer ready (block=0), GROOVE_BUFFER_YES on buffer returned, and GROOVE_BUFFER_END on end of playlist.
const char * mime_type
optional - provide a mime type string to help libgroove guess which format/codec to use ...
Definition: encoder.h:43
void groove_encoder_position(struct GrooveEncoder *encoder, struct GroovePlaylistItem **item, double *seconds)
get the position of the encode head both the current playlist item and the position in seconds in the...
struct GrooveTag * groove_encoder_metadata_get(struct GrooveEncoder *encoder, const char *key, const struct GrooveTag *prev, int flags)
see docs for groove_file_metadata_get
attach a GrooveEncoder to a playlist to keep a buffer of encoded audio full.
Definition: encoder.h:15
struct GrooveAudioFormat actual_audio_format
read-only.
Definition: encoder.h:67
int bit_rate
Select encoding quality by choosing a target bit rate in bits per second.
Definition: encoder.h:28
int encoded_buffer_size
how big the encoded audio buffer should be, in bytes groove_encoder_create defaults this to 16384 ...
Definition: encoder.h:51
double gain
This volume adjustment to make to this player.
Definition: encoder.h:59
struct GrooveEncoder * groove_encoder_create(void)
int groove_encoder_detach(struct GrooveEncoder *encoder)
struct GroovePlaylist * playlist
read-only. set when attached and cleared when detached
Definition: encoder.h:62
const char * filename
optional - provide an example filename to help libgroove guess which format/codec to use ...
Definition: encoder.h:40
const char * format_short_name
optional - choose a short name for the format to help libgroove guess which format to use use avconv ...
Definition: encoder.h:33
struct GrooveAudioFormat target_audio_format
The desired audio format to encode.
Definition: encoder.h:21
const char * codec_short_name
optional - choose a short name for the codec to help libgroove guess which codec to use use avconv -c...
Definition: encoder.h:37
void groove_encoder_destroy(struct GrooveEncoder *encoder)
detach before destroying
int groove_encoder_buffer_peek(struct GrooveEncoder *encoder, int block)
returns < 0 on error, 0 on no buffer ready, 1 on buffer ready if block is 1, block until buffer is re...
int groove_encoder_set_gain(struct GrooveEncoder *encoder, double gain)
See the gain property of GrooveSink.
int groove_encoder_attach(struct GrooveEncoder *encoder, struct GroovePlaylist *playlist)
once you attach, you must detach before destroying the playlist at playlist begin, format headers are generated.
int sink_buffer_size
how big the sink buffer should be, in sample frames.
Definition: encoder.h:47