AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
dpxfileio.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef AJA_DPXFILEIO_H
9 #define AJA_DPXFILEIO_H
10 
11 #include "ajabase/common/dpx_hdr.h"
12 #include "ajabase/common/types.h"
13 
18 class AJADPXFileIO : public DpxHdr
19 {
20  // Public Instance Methods
21  public:
27 
28  AJA_EXPORT virtual ~AJADPXFileIO ();
29 
33  AJA_EXPORT std::vector<std::string> & GetFileList ();
34 
38  AJA_EXPORT uint32_t GetFileCount () const;
39 
43  AJA_EXPORT uint32_t GetIndex () const;
44 
48  AJA_EXPORT bool GetLoopMode () const;
49 
53  AJA_EXPORT bool GetPauseMode () const;
54 
58  AJA_EXPORT std::string GetPath () const;
59 
65  AJA_EXPORT AJAStatus Read (const uint32_t inIndex);
66 
74  AJA_EXPORT AJAStatus Read (uint8_t & outBuffer,
75  const uint32_t inBufferSize,
76  uint32_t & outIndex);
77 
81  void SetFileList (std::vector<std::string> & list);
82 
86  AJA_EXPORT AJAStatus SetIndex (const uint32_t & index);
87 
93  AJA_EXPORT void SetLoopMode (bool mode);
94 
100  AJA_EXPORT void SetPauseMode (bool mode);
101 
108  AJA_EXPORT AJAStatus SetPath (const std::string & inPath);
109 
116  AJA_EXPORT AJAStatus Write (const uint8_t & inBuffer,
117  const uint32_t inBufferSize,
118  const uint32_t & inIndex) const;
119 
120 
121  // Protected Instance Methods
122  protected:
123 
124 
125  // Private Member Data
126  private:
127  bool mPathSet;
128  bool mLoopMode;
129  bool mPauseMode;
130  std::string mPath;
131  uint32_t mFileCount;
132  uint32_t mCurrentIndex;
133  std::vector<std::string> mFileList;
134 
135 }; // AJADPXFileIO
136 
137 #endif // AJA_DPXFILEIO_H
138 
AJADPXFileIO::GetPath
AJA_EXPORT std::string GetPath() const
Returns the current path to the DPX files to be read.
Definition: dpxfileio.cpp:63
types.h
Declares common types used in the ajabase library.
AJADPXFileIO::GetIndex
AJA_EXPORT uint32_t GetIndex() const
Returns the index in the file list of the next file to be read.
Definition: dpxfileio.cpp:45
AJA_EXPORT
#define AJA_EXPORT
Definition: export.h:34
AJADPXFileIO::SetIndex
AJA_EXPORT AJAStatus SetIndex(const uint32_t &index)
Specifies the index in the file list of the next file to be read.
Definition: dpxfileio.cpp:186
AJADPXFileIO::SetPauseMode
AJA_EXPORT void SetPauseMode(bool mode)
Specifies the setting of the pause control. If true, pause mode will take effect. If false,...
Definition: dpxfileio.cpp:203
AJADPXFileIO
Definition: dpxfileio.h:18
DpxHdr
Definition: dpx_hdr.h:249
AJADPXFileIO::SetLoopMode
AJA_EXPORT void SetLoopMode(bool mode)
Specifies the setting of the loop play control. If true, the last file of a sequence is followed by t...
Definition: dpxfileio.cpp:197
AJAStatus
AJAStatus
Definition: types.h:378
AJADPXFileIO::GetFileCount
AJA_EXPORT uint32_t GetFileCount() const
Returns the number of DPX files in the location specified by the path.
Definition: dpxfileio.cpp:33
AJADPXFileIO::Read
AJA_EXPORT AJAStatus Read(const uint32_t inIndex)
Read only the header from the specified file in the DPX sequence.
Definition: dpxfileio.cpp:69
AJADPXFileIO::SetFileList
void SetFileList(std::vector< std::string > &list)
Specifies an ordered list of DPX files to read.
Definition: dpxfileio.cpp:178
AJADPXFileIO::SetPath
AJA_EXPORT AJAStatus SetPath(const std::string &inPath)
Change the path to the DPX files to be read.
Definition: dpxfileio.cpp:209
AJADPXFileIO::GetLoopMode
AJA_EXPORT bool GetLoopMode() const
Returns the current setting of the loop play control.
Definition: dpxfileio.cpp:51
AJADPXFileIO::GetFileList
AJA_EXPORT std::vector< std::string > & GetFileList()
Returns the list of DPX files that were found at the destination.
Definition: dpxfileio.cpp:39
dpx_hdr.h
Declaration of DpxHdr class adapted from STwo's dpx file I/O.
AJADPXFileIO::GetPauseMode
AJA_EXPORT bool GetPauseMode() const
Returns the current setting of the pause control.
Definition: dpxfileio.cpp:57
AJADPXFileIO::Write
AJA_EXPORT AJAStatus Write(const uint8_t &inBuffer, const uint32_t inBufferSize, const uint32_t &inIndex) const
Write a DPX file.
Definition: dpxfileio.cpp:233
AJADPXFileIO::AJADPXFileIO
AJA_EXPORT AJADPXFileIO()
Constructs a DPX file IO object.
Definition: dpxfileio.cpp:17
AJADPXFileIO::~AJADPXFileIO
virtual AJA_EXPORT ~AJADPXFileIO()
Definition: dpxfileio.cpp:27