/src/flvmeta.h

https://code.google.com/ · C Header · 100 lines · 55 code · 12 blank · 33 comment · 0 complexity · a2a8cbc162fe11841c7dc4f530ba46ac MD5 · raw file

  1. /*
  2. $Id: flvmeta.h 231 2011-06-27 13:46:19Z marc.noirot $
  3. FLV Metadata updater
  4. Copyright (C) 2007-2012 Marc Noirot <marc.noirot AT gmail.com>
  5. This file is part of FLVMeta.
  6. FLVMeta is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. FLVMeta is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with FLVMeta; if not, write to the Free Software
  16. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef __FLVMETA_H__
  19. #define __FLVMETA_H__
  20. /* Configuration of the sources */
  21. #ifdef HAVE_CONFIG_H
  22. # include <config.h>
  23. #endif
  24. #include "flv.h"
  25. /* copyright string */
  26. #define COPYRIGHT_STR "Copyright (C) 2007-2012 Marc Noirot <marc.noirot AT gmail.com>"
  27. /* error statuses */
  28. #define OK FLV_OK
  29. #define ERROR_OPEN_READ FLV_ERROR_OPEN_READ
  30. #define ERROR_NO_FLV FLV_ERROR_NO_FLV
  31. #define ERROR_EOF FLV_ERROR_EOF
  32. #define ERROR_MEMORY FLV_ERROR_MEMORY
  33. #define ERROR_EMPTY_TAG FLV_ERROR_EMPTY_TAG
  34. #define ERROR_OPEN_WRITE 6
  35. #define ERROR_INVALID_TAG 7
  36. #define ERROR_WRITE 8
  37. /* invalid flv file reported by the check command (one or more errors) */
  38. #define ERROR_INVALID_FLV_FILE 9
  39. /* stop file parsing without error */
  40. #define FLVMETA_DUMP_STOP_OK 10
  41. /* commands */
  42. #define FLVMETA_DEFAULT_COMMAND 0
  43. #define FLVMETA_DUMP_COMMAND 1
  44. #define FLVMETA_FULL_DUMP_COMMAND 2
  45. #define FLVMETA_CHECK_COMMAND 3
  46. #define FLVMETA_UPDATE_COMMAND 4
  47. #define FLVMETA_VERSION_COMMAND 5
  48. #define FLVMETA_HELP_COMMAND 6
  49. /* error handling */
  50. #define FLVMETA_EXIT_ON_ERROR 0
  51. #define FLVMETA_FIX_ERRORS 1
  52. #define FLVMETA_IGNORE_ERRORS 2
  53. /* check levels */
  54. #define FLVMETA_CHECK_LEVEL_INFO 0
  55. #define FLVMETA_CHECK_LEVEL_WARNING 1
  56. #define FLVMETA_CHECK_LEVEL_ERROR 2
  57. #define FLVMETA_CHECK_LEVEL_FATAL 3
  58. /* dump formats */
  59. #define FLVMETA_FORMAT_XML 0
  60. #define FLVMETA_FORMAT_RAW 1
  61. #define FLVMETA_FORMAT_JSON 2
  62. #define FLVMETA_FORMAT_YAML 3
  63. /* flvmeta options */
  64. typedef struct __flvmeta_opts {
  65. int command;
  66. char * input_file;
  67. char * output_file;
  68. amf_data * metadata;
  69. int dump_metadata;
  70. int check_level;
  71. int quiet;
  72. int check_xml_report;
  73. int insert_onlastsecond;
  74. int reset_timestamps;
  75. int all_keyframes;
  76. int preserve_metadata;
  77. int error_handling;
  78. int dump_format;
  79. int verbose;
  80. char * metadata_event;
  81. } flvmeta_opts;
  82. #endif /* __FLVMETA_H__ */