~ubuntu-branches/ubuntu/karmic/xmms2/karmic

« back to all changes in this revision

Viewing changes to src/plugins/ices/encode.h

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2008-05-29 10:14:25 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080529101425-ycw1nbd980uhvzfp
Tags: 0.4DrKosmos-4ubuntu1
* Merge from debian unstable (LP: #178477), remaining changes:
  - debian/control: Update Maintainer field
  - debian/control: add lpia to xmms2-plugin-alsa supported architectures
* This version reads AAC files (LP: #156359)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef __ENCODE_H
20
20
#define __ENCODE_H
21
21
 
 
22
#include <glib.h>
22
23
#include <ogg/ogg.h>
23
24
#include <vorbis/codec.h>
24
25
 
25
 
typedef struct {
26
 
    ogg_stream_state os;
27
 
    vorbis_block vb;
28
 
    vorbis_dsp_state vd;
29
 
    vorbis_info vi;
30
 
 
31
 
    int samples_in_current_page;
32
 
    int samplerate;
33
 
    ogg_int64_t prevgranulepos;
34
 
    int in_header;
35
 
} encoder_state;
36
 
 
37
 
encoder_state *encode_initialise(int channels, int rate, int managed,
38
 
    int min_br, int nom_br, int max_br, float quality,
39
 
    int serial, vorbis_comment *vc);
40
 
void encode_clear(encoder_state *s);
41
 
void encode_data_float(encoder_state *s, float **pcm, int samples);
42
 
void encode_data(encoder_state *s, signed char *buf, int bytes, int bigendian);
43
 
int encode_dataout(encoder_state *s, ogg_page *og);
44
 
void encode_finish(encoder_state *s);
45
 
int encode_flush(encoder_state *s, ogg_page *og);
 
26
#include "xmms/xmms_sample.h"
 
27
 
 
28
typedef struct encoder_state encoder_state;
 
29
 
 
30
encoder_state *xmms_ices_encoder_init(int min_br, int nom_br, int max_br);
 
31
void xmms_ices_encoder_fini(encoder_state *s);
 
32
gboolean xmms_ices_encoder_stream_change(encoder_state *s, int rate,
 
33
                                         int channels, vorbis_comment *vc);
 
34
void xmms_ices_encoder_input(encoder_state *s, xmms_samplefloat_t *buf, int n_samples);
 
35
void xmms_ices_encoder_finish(encoder_state *s);
 
36
gboolean xmms_ices_encoder_output(encoder_state *s, ogg_page *og);
46
37
 
47
38
#endif
48
39