PageRenderTime 39ms CodeModel.GetById 35ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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