Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
media-access-facade.hpp
Go to the documentation of this file.
1/*
2 MEDIA-ACCESS-FACADE.hpp - functions for querying media file and channels.
3
4 Copyright (C)
5 2008, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
26#ifndef VAULT_INTERFACE_MEDIA_ACCESS_FACADE_H
27#define VAULT_INTERFACE_MEDIA_ACCESS_FACADE_H
28
29
30#include "lib/error.hpp"
31#include "lib/depend.hpp"
33
34#include <string>
35
36
37
38namespace vault {
39
41 using std::string;
42
43 struct MediaDesc;
44 struct ChanDesc;
45
46
47 /**************************************************************/
58 {
59 public:
60 typedef void* ChanHandle;
61
63
73 virtual MediaDesc& queryFile (string const& name) const;
74
81 virtual ChanDesc queryChannel (MediaDesc&, uint chanNo) const;
82
83 virtual ~MediaAccessFacade () {}
84 };
85
86
91 struct MediaDesc
92 {
99
101 };
102
103
104
105
110 struct ChanDesc
111 {
117
125
130
131 ChanDesc (CStr chanName =nullptr
132 ,CStr codec =nullptr
134 : chanID(chanName),
135 codecID(codec),
136 handle(h)
137 { }
138 };
139
140} // namespace vault
141
142
144
146 using vault::MediaDesc;
147 using vault::ChanDesc;
148
149} // namespace backend_interface
150#endif
Access point to singletons and other kinds of dependencies designated by type.
Definition depend.hpp:281
Duration is the internal Lumiera time metric.
Interface to the vault layer: provides functions for querying (opening) a media file,...
static lib::Depend< MediaAccessFacade > instance
storage for the SingletonFactory (actually a lumiera::test::MockInjector)
virtual ChanDesc queryChannel(MediaDesc &, uint chanNo) const
request for information about the n-th channel of the file referred by FileHandle.
virtual MediaDesc & queryFile(string const &name) const
request for testing the denoted files accessibility
Singleton services and Dependency Injection.
Lumiera error handling (C++ interface).
const char * CStr
Definition error.hpp:42
unsigned int uint
Definition integral.hpp:29
Vault-Layer implementation namespace root.
Description of one channel found in a media file; result of querying the channel.
CStr codecID
identifier characterising the access method (or codec) needed to get at the media data.
CStr chanID
identifier which can be used to create a name for the media asset corresponding to this channel.
ChanDesc(CStr chanName=nullptr, CStr codec=nullptr, MediaAccessFacade::ChanHandle h=nullptr)
MediaAccessFacade::ChanHandle handle
opaque handle, which will be used later to open this channel and retrieve some frames from it
Descriptor holding the global information record required for further handling this kind of media wit...
Duration length
effectively usable duration.
a family of time value like entities and their relationships.