PageRenderTime 24ms CodeModel.GetById 15ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/src/info.h

https://code.google.com/
C++ Header | 87 lines | 55 code | 9 blank | 23 comment | 0 complexity | 90d26d93d57cb8799532c2e35e569563 MD5 | raw file
 1/*
 2    $Id: info.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 __INFO_H__
25#define __INFO_H__
26
27#include "flvmeta.h"
28
29typedef struct __flv_info {
30    flv_header header;
31    uint8 have_video;
32    uint8 have_audio;
33    uint32 video_width;
34    uint32 video_height;
35    uint8 video_codec;
36    uint32 video_frames_number;
37    uint8 audio_codec;
38    uint8 audio_size;
39    uint8 audio_rate;
40    uint8 audio_stereo;
41    file_offset_t video_data_size;
42    file_offset_t audio_data_size;
43    file_offset_t meta_data_size;
44    file_offset_t real_video_data_size;
45    file_offset_t real_audio_data_size;
46    uint32 video_first_timestamp;
47    uint32 audio_first_timestamp;
48    uint32 first_timestamp;
49    uint8 can_seek_to_end;
50    uint8 have_keyframes;
51    uint32 last_keyframe_timestamp;
52    uint32 on_metadata_size;
53    file_offset_t on_metadata_offset;
54    uint32 biggest_tag_body_size;
55    uint32 last_timestamp;
56    uint32 video_frame_duration;
57    uint32 audio_frame_duration;
58    file_offset_t total_prev_tags_size;
59    uint8 have_on_last_second;
60    amf_data * original_on_metadata;
61    amf_data * keyframes;
62    amf_data * times;
63    amf_data * filepositions;
64} flv_info;
65
66typedef struct __flv_metadata {
67    amf_data * on_last_second_name;
68    amf_data * on_last_second;
69    amf_data * on_metadata_name;
70    amf_data * on_metadata;
71} flv_metadata;
72
73#ifdef __cplusplus
74extern "C" {
75#endif /* __cplusplus */
76
77int get_flv_info(flv_stream * flv_in, flv_info * info, const flvmeta_opts * opts);
78
79void compute_metadata(flv_info * info, flv_metadata * meta, const flvmeta_opts * opts);
80
81void compute_current_metadata(flv_info * info, flv_metadata * meta);
82
83#ifdef __cplusplus
84}
85#endif /* __cplusplus */
86
87#endif /* __INFO_H__ */