Scanner C++ API
video_index_entry.h
1 /* Copyright 2016 Carnegie Mellon University
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #pragma once
17 
18 #include "scanner/engine/metadata.h"
19 #include "scanner/engine/runtime.h"
20 #include "scanner/util/common.h"
21 
22 #include "storehouse/storage_backend.h"
23 
24 namespace scanner {
25 namespace internal {
26 
28  std::unique_ptr<storehouse::RandomReadFile> open_file() const;
29 
30  storehouse::StorageBackend* storage;
31  std::string path;
32  bool inplace;
33  i32 table_id;
34  i32 column_id;
35  i32 item_id;
36  i32 width;
37  i32 height;
38  i32 channels;
39  FrameType frame_type;
40  proto::VideoDescriptor::VideoCodecType codec_type;
41  u64 file_size;
42  i32 num_encoded_videos;
43  std::vector<i64> frames_per_video;
44  std::vector<i64> keyframes_per_video;
45  std::vector<i64> size_per_video;
46 
47  std::vector<u64> keyframe_indices;
48  std::vector<u64> sample_offsets;
49  std::vector<u64> sample_sizes;
50  std::vector<u8> metadata;
51 };
52 
53 VideoIndexEntry read_video_index(storehouse::StorageBackend *storage,
54  i32 table_id, i32 column_id, i32 item_id);
55 
56 VideoIndexEntry read_video_index(storehouse::StorageBackend *storage,
57  const VideoMetadata& video_meta);
58 }
59 }
Definition: video_index_entry.h:27
Definition: metadata.h:148
Definition: database.cpp:36