| 1 | /* |
| 2 | * Copyright (c) 2015 Moritz Grimm <[email protected]> |
| 3 | * |
| 4 | * Permission to use, copy, modify, and distribute this software for any |
| 5 | * purpose with or without fee is hereby granted, provided that the above |
| 6 | * copyright notice and this permission notice appear in all copies. |
| 7 | * |
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 15 | */ |
| 16 | |
| 17 | #ifndef __CFG_ENCODER_H__ |
| 18 | #define __CFG_ENCODER_H__ |
| 19 | |
| 20 | #include "cfg_stream.h" |
| 21 | |
| 22 | typedef struct cfg_encoder * cfg_encoder_t; |
| 23 | typedef struct cfg_encoder_list * cfg_encoder_list_t; |
| 24 | |
| 25 | cfg_encoder_list_t |
| 26 | cfg_encoder_list_create(void); |
| 27 | void cfg_encoder_list_destroy(cfg_encoder_list_t *); |
| 28 | unsigned int |
| 29 | cfg_encoder_list_nentries(cfg_encoder_list_t); |
| 30 | |
| 31 | cfg_encoder_t |
| 32 | cfg_encoder_list_find(cfg_encoder_list_t, const char *); |
| 33 | cfg_encoder_t |
| 34 | cfg_encoder_list_get(cfg_encoder_list_t, const char *); |
| 35 | void cfg_encoder_list_remove(cfg_encoder_list_t, cfg_encoder_t *o); |
| 36 | void cfg_encoder_list_foreach(cfg_encoder_list_t, void (*)(cfg_encoder_t, |
| 37 | void *), void *); |
| 38 | |
| 39 | cfg_encoder_t |
| 40 | cfg_encoder_create(const char *); |
| 41 | void cfg_encoder_destroy(cfg_encoder_t *); |
| 42 | |
| 43 | int cfg_encoder_set_format(cfg_encoder_t, enum cfg_stream_format); |
| 44 | |
| 45 | int cfg_encoder_set_name(cfg_encoder_t, cfg_encoder_list_t, const char *, |
| 46 | const char **); |
| 47 | int cfg_encoder_set_format_str(cfg_encoder_t, cfg_encoder_list_t, |
| 48 | const char *, const char **); |
| 49 | int cfg_encoder_set_program(cfg_encoder_t, cfg_encoder_list_t, |
| 50 | const char *, const char **); |
| 51 | |
| 52 | int cfg_encoder_validate(cfg_encoder_t, const char **); |
| 53 | |
| 54 | const char * |
| 55 | cfg_encoder_get_name(cfg_encoder_t); |
| 56 | enum cfg_stream_format |
| 57 | cfg_encoder_get_format(cfg_encoder_t); |
| 58 | const char * |
| 59 | cfg_encoder_get_program(cfg_encoder_t); |
| 60 | |
| 61 | #endif /* __CFG_ENCODER_H__ */ |