File: reencode.h

package info (click to toggle)
ices2 2.0.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,064 kB
  • ctags: 782
  • sloc: sh: 8,350; ansic: 6,448; xml: 121; makefile: 94
file content (62 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* reencode.h
 * - reencoding functions
 *
 * $Id: reencode.h,v 1.7 2004/01/13 16:35:27 karl Exp $
 *
 * Copyright (c) 2001 Michael Smith <msmith@labyrinth.net.au>
 *
 * This program is distributed under the terms of the GNU General
 * Public License, version 2. You may use, modify, and redistribute
 * it under the terms of this license. A copy should be included
 * with this source.
 */

#ifndef __REENCODE_H
#define __REENCODE_H

#include <ogg/ogg.h>
#include <vorbis/codec.h>

#include "cfgparse.h"
#include "stream.h"
#include "encode.h"
#include "audio.h"

typedef struct {
    int out_min_br;
    int out_nom_br;
    int out_max_br;
    float quality;
    int managed;

    int out_samplerate;
    int out_channels;

    int in_samplerate;
    int in_channels;

    int current_serial;
    int need_headers;

    ogg_stream_state os;
    vorbis_info vi;
    vorbis_comment vc;
    vorbis_dsp_state vd;
    vorbis_block vb;
    int max_samples_ppage;

    encoder_state *encoder;
    downmix_state *downmix;
    resample_state *resamp;

} reencode_state;

reencode_state *reencode_init(instance_t *stream);
int reencode_page(reencode_state *s, ref_buffer *buf,
        unsigned char **outbuf, int *outlen);
void reencode_clear(reencode_state *s);



#endif /* __REENCODE_H */