| 1 | /* |
| 2 | * enc_output |
| 3 | * |
| 4 | * Copyright (C) Peter Schlaile - Feb 2001 |
| 5 | * |
| 6 | * This file is part of libdv, a free DV (IEC 61834/SMPTE 314M) |
| 7 | * codec. |
| 8 | * |
| 9 | * libdv is free software; you can redistribute it and/or modify it |
| 10 | * under the terms of the GNU Lesser Public License as published by |
| 11 | * the Free Software Foundation; either version 2.1, or (at your |
| 12 | * option) any later version. |
| 13 | * |
| 14 | * libdv is distributed in the hope that it will be useful, but |
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 | * Lesser Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU Lesser Public License |
| 20 | * along with libdv; see the file COPYING. If not, write to |
| 21 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 22 | * |
| 23 | * The libdv homepage is http://libdv.sourceforge.net/. |
| 24 | */ |
| 25 | |
| 26 | #ifndef DV_ENC_OUTPUT_H |
| 27 | #define DV_ENC_OUTPUT_H |
| 28 | |
| 29 | #include <time.h> |
| 30 | #include <stdio.h> |
| 31 | #include <stdlib.h> |
| 32 | |
| 33 | #include "enc_audio_input.h" |
| 34 | |
| 35 | #ifdef __cplusplus |
| 36 | extern "C" { |
| 37 | #endif |
| 38 | #define DV_ENC_MAX_OUTPUT_FILTERS 32 |
| 39 | |
| 40 | typedef struct dv_enc_output_filter_s { |
| 41 | int (*init)(FILE* fp); |
| 42 | void (*finish)(); |
| 43 | int (*store)(unsigned char* encoded_data, |
| 44 | dv_enc_audio_info_t* audio_data,/* may be null */ |
| 45 | int keep_meta_headers, |
| 46 | int isPAL, int is16x9, time_t now); |
| 47 | |
| 48 | const char* filter_name; |
| 49 | } dv_enc_output_filter_t; |
| 50 | |
| 51 | extern int _dv_raw_insert_audio(unsigned char * frame_buf, |
| 52 | dv_enc_audio_info_t * audio, int isPAL); |
| 53 | |
| 54 | extern void dv_enc_register_output_filter(dv_enc_output_filter_t |
| 55 | filter); |
| 56 | extern int dv_enc_get_output_filters(dv_enc_output_filter_t ** filters, |
| 57 | int * count); |
| 58 | |
| 59 | #ifdef __cplusplus |
| 60 | } |
| 61 | #endif |
| 62 | |
| 63 | #endif // DV_ENC_OUTPUT_H |