libopenraw  0.3.7
isomediacontainer.hpp
1 /* -*- tab-width:4; c-basic-offset:4; indent-tabs-mode:nil; -*- */
2 /*
3  * libopenraw - isomediacontainer.hpp
4  *
5  * Copyright (C) 2018-2020 Hubert Figuiere
6  *
7  * This library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation, either version 3 of
10  * the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library. If not, see
19  * <http://www.gnu.org/licenses/>.
20  */
21 
22 #pragma once
23 
24 #include "io/stream.hpp"
25 #include "rawcontainer.hpp"
26 #include "rawfile_private.hpp"
27 #include "option.hpp"
28 #include "ifdfilecontainer.hpp"
29 #include "mp4/mp4parse.h"
30 
31 namespace OpenRaw {
32 namespace Internals {
33 
35 public:
37  virtual ~IsoMediaContainer();
38 
40  uint32_t count_tracks();
42  Option<Mp4parseTrackInfo> get_track(uint32_t index);
43  Option<Mp4parseTrackRawInfo> get_raw_track(uint32_t index);
44  Option<Mp4parseCrawHeader> get_craw_header();
45  Option<std::pair<uint64_t, uint64_t>> get_offsets_at(uint32_t index);
46 
47  Option<ThumbDesc> get_preview_desc();
48  std::shared_ptr<IfdFileContainer> get_metadata_block(uint32_t idx);
49 
50 private:
52  static intptr_t read_callback(uint8_t*, uintptr_t, void*);
53 
54  Mp4parseIo m_mp4io;
55  Mp4parseParser *m_parser;
56  std::vector<std::shared_ptr<IfdFileContainer>> m_meta_ifd;
57 };
58 }
59 }
std::shared_ptr< Stream > Ptr
Definition: stream.hpp:47
uint32_t count_tracks()
Count tracks in the iso container.
Option< Mp4parseTrackInfo > get_track(uint32_t index)
Get track info.
Generic interface for the RAW file container.
An option type inspired by Rust.
Definition: option.hpp:47
Global namespace for libopenraw.
Definition: arwfile.cpp:29