Lumiera  0.pre.03
»edit your freedom«
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"
32 #include "lib/time/timevalue.hpp"
33 
34 #include <string>
35 
36 
37 
38 namespace vault {
39 
40  using lib::time::Duration;
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 
100  MediaDesc() : length(Duration::NIL) { }
101  };
102 
103 
104 
105 
110  struct ChanDesc
111  {
116  const char* chanID;
117 
124  const char* codecID;
125 
129  MediaAccessFacade::ChanHandle handle;
130 
131  ChanDesc (const char* chanName=0, const char* codec=0,
132  MediaAccessFacade::ChanHandle h=0)
133  : chanID(chanName),
134  codecID(codec),
135  handle(h)
136  { }
137  };
138 
139 } // namespace vault
140 
141 
142 namespace backend_interface {
143 
145  using vault::MediaDesc;
146  using vault::ChanDesc;
147 
148 } // namespace backend_interface
149 #endif
virtual MediaDesc & queryFile(string const &name) const
request for testing the denoted files accessibility
MediaAccessFacade::ChanHandle handle
opaque handle, which will be used later to open this channel and retrieve some frames from it ...
virtual ChanDesc queryChannel(MediaDesc &, uint chanNo) const
request for information about the n-th channel of the file referred by FileHandle.
Descriptor holding the global information record required for further handling this kind of media wit...
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:280
Duration length
effectively usable duration.
Interface to the vault layer: provides functions for querying (opening) a media file, detecting the channels or streams found within this file etc.
const char * codecID
identifier characterising the access method (or codec) needed to get at the media data...
Singleton services and Dependency Injection.
Lumiera error handling (C++ interface).
static lib::Depend< MediaAccessFacade > instance
storage for the SingletonFactory (actually a lumiera::test::MockInjector)
Duration is the internal Lumiera time metric.
Definition: timevalue.hpp:468
abstract entry, not yet allocated
a family of time value like entities and their relationships.
Vault-Layer implementation namespace root.
Description of one channel found in a media file; result of querying the channel. ...
ElementBoxWidget::Config::Qualifier name(string id)
define the name-ID displayed in the caption
const char * chanID
identifier which can be used to create a name for the media asset corresponding to this channel...