1
/*****************************************************************
2
* gmerlin-encoders - encoder plugins for gmerlin
4
* Copyright (c) 2001 - 2011 Members of the Gmerlin project
5
* gmerlin-general@lists.sourceforge.net
6
* http://gmerlin.sourceforge.net
8
* This program is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 2 of the License, or
11
* (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
* *****************************************************************/
22
/* Common defintions and routines for driving mp2enc */
26
int bitrate; /* -b (kbps) */
30
gavl_audio_format_t format;
31
bg_subprocess_t * mp2enc;
34
const gavl_compression_info_t * ci;
38
const bg_parameter_info_t * bg_mpa_get_parameters();
40
/* Must pass a bg_mpa_common_t for parameters */
41
void bg_mpa_set_parameter(void * data, const char * name,
42
const bg_parameter_value_t * val);
44
void bg_mpa_set_format(bg_mpa_common_t * com, const gavl_audio_format_t * format);
45
void bg_mpa_get_format(bg_mpa_common_t * com, gavl_audio_format_t * format);
47
int bg_mpa_start(bg_mpa_common_t * com, const char * filename);
49
int bg_mpa_write_audio_frame(bg_mpa_common_t * com, gavl_audio_frame_t * frame);
51
int bg_mpa_close(bg_mpa_common_t * com);
53
const char * bg_mpa_get_extension(bg_mpa_common_t * mpa);
55
void bg_mpa_set_ci(bg_mpa_common_t * com, const gavl_compression_info_t * ci);
57
int bg_mpa_write_audio_packet(bg_mpa_common_t * com,
58
gavl_packet_t * packet);