AJA NTV2 SDK  17.6.0.2675
NTV2 SDK 17.6.0.2675
AJADPXFileIO Class Reference

#include <dpxfileio.h>

Inheritance diagram for AJADPXFileIO:
[legend]
Collaboration diagram for AJADPXFileIO:
[legend]

Public Member Functions

AJA_EXPORT AJADPXFileIO ()
 Constructs a DPX file IO object. More...
 
virtual AJA_EXPORT ~AJADPXFileIO ()
 
AJA_EXPORT std::vector< std::string > & GetFileList ()
 Returns the list of DPX files that were found at the destination. More...
 
AJA_EXPORT uint32_t GetFileCount () const
 Returns the number of DPX files in the location specified by the path. More...
 
AJA_EXPORT uint32_t GetIndex () const
 Returns the index in the file list of the next file to be read. More...
 
AJA_EXPORT bool GetLoopMode () const
 Returns the current setting of the loop play control. More...
 
AJA_EXPORT bool GetPauseMode () const
 Returns the current setting of the pause control. More...
 
AJA_EXPORT std::string GetPath () const
 Returns the current path to the DPX files to be read. More...
 
AJA_EXPORT AJAStatus Read (const uint32_t inIndex)
 Read only the header from the specified file in the DPX sequence. More...
 
AJA_EXPORT AJAStatus Read (uint8_t &outBuffer, const uint32_t inBufferSize, uint32_t &outIndex)
 Read the next file in the DPX sequence. More...
 
void SetFileList (std::vector< std::string > &list)
 Specifies an ordered list of DPX files to read. More...
 
AJA_EXPORT AJAStatus SetIndex (const uint32_t &index)
 Specifies the index in the file list of the next file to be read. More...
 
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 the first file. If false, attempting to read beyond the end of a sequence is an error. More...
 
AJA_EXPORT void SetPauseMode (bool mode)
 Specifies the setting of the pause control. If true, pause mode will take effect. If false, pause mode is canceled. More...
 
AJA_EXPORT AJAStatus SetPath (const std::string &inPath)
 Change the path to the DPX files to be read. More...
 
AJA_EXPORT AJAStatus Write (const uint8_t &inBuffer, const uint32_t inBufferSize, const uint32_t &inIndex) const
 Write a DPX file. More...
 
- Public Member Functions inherited from DpxHdr
 DpxHdr (void)
 
 ~DpxHdr ()
 
DpxHdr & operator= (const DpxHdr &rhs)
 
void init (uint32_t endianness)
 
bool valid () const
 
bool IsBigEndian ()
 
std::string get_fi_time_stamp () const
 
void set_fi_time_stamp ()
 
void set_s2_tcframe (uint32_t frame)
 
size_t get_s2_tcframe () const
 
uint32_t get_s2_filenumber () const
 
void set_s2_filenumber (uint32_t fr)
 
void set_s2_ids (uint8_t rid, uint8_t sid, uint8_t tid)
 
void get_s2_ids (uint8_t *rid, uint8_t *sid, uint8_t *tid) const
 
size_t get_file_size ()
 
size_t get_generic_hdr_size ()
 
size_t get_industry_hdr_size ()
 
size_t get_user_hdr_size ()
 
size_t get_fi_image_offset () const
 
void set_fi_image_offset (size_t offs)
 
size_t get_fi_file_size () const
 
void set_fi_file_size (size_t offs)
 
std::string get_fi_version () const
 
void set_fi_version (const std::string &str)
 
std::string get_fi_file_name () const
 
void set_fi_file_name (const std::string &str)
 
std::string get_fi_creator () const
 
void set_fi_creator (const std::string &str)
 
std::string get_fi_create_time () const
 
void set_fi_create_time (const std::string &str)
 
std::string get_fi_project () const
 
void set_fi_project (const std::string &str)
 
std::string get_fi_copyright () const
 
void set_fi_copyright (const std::string &str)
 
void set_ii_orientation (uint16_t orientation)
 
uint16_t get_ii_orientation () const
 
void set_ii_element_number (uint16_t element_number)
 
uint16_t get_ii_element_number () const
 
void set_ii_pixels (uint32_t pixels)
 
size_t get_ii_pixels () const
 
void set_ii_lines (uint32_t lines)
 
size_t get_ii_lines (void) const
 
size_t get_ii_image_size ()
 
void set_ie_data_sign (uint32_t sign, int i=0)
 
size_t get_ie_data_sign (int i=0)
 
void set_ie_ref_low_data (uint32_t data, int i=0)
 
size_t get_ie_ref_low_data (int i=0) const
 
void set_ie_ref_high_data (uint32_t data, int i=0)
 
size_t get_ie_ref_high_data (int i=0) const
 
void set_ie_ref_low_quantity (float data, int i=0)
 
float get_ie_ref_low_quantity (int i=0) const
 
void set_ie_ref_high_quantity (float data, int i=0)
 
float get_ie_ref_high_quantity (int i=0) const
 
void set_ie_descriptor (uint8_t desc, int i=0)
 
uint8_t get_ie_descriptor (int i=0) const
 
void set_ie_transfer (uint8_t trans, int i=0)
 
uint8_t get_ie_transfer (int i=0) const
 
void set_ie_colorimetric (uint8_t c, int i=0)
 
uint8_t get_ie_colorimetric (int i=0) const
 
void set_ie_bit_size (uint8_t bits, int i=0)
 
uint8_t get_ie_bit_size (int i=0) const
 
void set_ie_packing (uint16_t pack, int i=0)
 
uint16_t get_ie_packing (int i=0) const
 
void set_ie_encoding (uint16_t enc, int i=0)
 
uint16_t get_ie_encoding (int i=0) const
 
void set_ie_data_offset (uint32_t offs, int i=0)
 
uint32_t get_ie_data_offset (int i=0) const
 
void set_ie_eol_padding (uint32_t padding, int i=0)
 
uint32_t get_ie_eol_padding (int i=0) const
 
void set_ie_eo_image_padding (uint32_t padding, int i=0)
 
uint32_t get_ie_eo_image_padding (int i=0) const
 
std::string get_ie_description (int i=0) const
 
void set_ie_description (const std::string &str, int i=0)
 
std::string get_is_filename () const
 
void set_is_filename (const std::string &str)
 
std::string get_is_creation_time () const
 
void set_is_creation_time (const std::string &str)
 
std::string get_is_input_device () const
 
void set_is_input_device (const std::string &str)
 
std::string get_is_input_serial () const
 
void set_is_input_serial (const std::string &str)
 
std::string get_film_mfg_id () const
 
void set_film_mfg_id (const std::string &str)
 
std::string get_film_type () const
 
void set_film_type (const std::string &str)
 
std::string get_film_offset () const
 
void set_film_offset (const std::string &str)
 
std::string get_film_prefix () const
 
void set_film_prefix (const std::string &str)
 
std::string get_film_count () const
 
void set_film_count (const std::string &str)
 
std::string get_film_format () const
 
void set_film_format (const std::string &str)
 
size_t get_film_frame_position () const
 
void set_film_frame_position (size_t pos)
 
size_t get_film_sequence_len () const
 
void set_film_sequence_len (size_t len)
 
size_t get_film_held_count () const
 
void set_film_held_count (size_t count)
 
float get_film_frame_rate () const
 
void set_film_frame_rate (float len)
 
float get_film_shutter_angle () const
 
void set_film_shutter_angle (float)
 
std::string get_film_frame_id () const
 
void set_film_frame_id (const std::string &str)
 
std::string get_film_slate_info () const
 
void set_film_slate_info (const std::string &str)
 
size_t get_tv_timecode () const
 
void set_tv_timecode (size_t tc)
 
size_t get_tv_userbits () const
 
void set_tv_userbits (size_t tc)
 
float get_tv_frame_rate () const
 
void set_tv_frame_rate (float fr)
 
uint8_t get_tv_interlace () const
 
void set_tv_interlace (uint8_t interlace)
 
const DPX_header_t & GetHdr (void) const
 
DPX_header_t & GetHdr (void)
 
size_t GetHdrSize (void) const
 

Detailed Description

Class to support low level I/O for DPX files.

Definition at line 18 of file dpxfileio.h.

Constructor & Destructor Documentation

◆ AJADPXFileIO()

AJADPXFileIO::AJADPXFileIO ( )

Constructs a DPX file IO object.

Note
Do not call this method without first calling the SetPath method.

Definition at line 17 of file dpxfileio.cpp.

◆ ~AJADPXFileIO()

AJADPXFileIO::~AJADPXFileIO ( )
virtual

Definition at line 27 of file dpxfileio.cpp.

Member Function Documentation

◆ GetFileCount()

uint32_t AJADPXFileIO::GetFileCount ( ) const

Returns the number of DPX files in the location specified by the path.

Definition at line 33 of file dpxfileio.cpp.

◆ GetFileList()

vector< string > & AJADPXFileIO::GetFileList ( )

Returns the list of DPX files that were found at the destination.

Definition at line 39 of file dpxfileio.cpp.

◆ GetIndex()

uint32_t AJADPXFileIO::GetIndex ( ) const

Returns the index in the file list of the next file to be read.

Definition at line 45 of file dpxfileio.cpp.

◆ GetLoopMode()

bool AJADPXFileIO::GetLoopMode ( ) const

Returns the current setting of the loop play control.

Definition at line 51 of file dpxfileio.cpp.

◆ GetPath()

string AJADPXFileIO::GetPath ( ) const

Returns the current path to the DPX files to be read.

Definition at line 63 of file dpxfileio.cpp.

◆ GetPauseMode()

bool AJADPXFileIO::GetPauseMode ( ) const

Returns the current setting of the pause control.

Definition at line 57 of file dpxfileio.cpp.

◆ Read() [1/2]

AJAStatus AJADPXFileIO::Read ( const uint32_t  inIndex)

Read only the header from the specified file in the DPX sequence.

Parameters
[in]inIndexSpecifies the index number of the file to read. 0 <= outIndex <= FileCount

Definition at line 69 of file dpxfileio.cpp.

◆ Read() [2/2]

AJAStatus AJADPXFileIO::Read ( uint8_t &  outBuffer,
const uint32_t  inBufferSize,
uint32_t &  outIndex 
)

Read the next file in the DPX sequence.

Parameters
[out]outBufferReceives the DPX file image payload.
[in]inBufferSizeSpecifies the maximum number of bytes to store in outBuffer.
[out]outIndexReceives the index number of the file read. 0 <= outIndex <= FileCount

Definition at line 103 of file dpxfileio.cpp.

◆ SetFileList()

void AJADPXFileIO::SetFileList ( std::vector< std::string > &  list)

Specifies an ordered list of DPX files to read.

Definition at line 178 of file dpxfileio.cpp.

◆ SetIndex()

AJAStatus AJADPXFileIO::SetIndex ( const uint32_t &  index)

Specifies the index in the file list of the next file to be read.

Definition at line 186 of file dpxfileio.cpp.

◆ SetLoopMode()

void AJADPXFileIO::SetLoopMode ( bool  mode)

Specifies the setting of the loop play control. If true, the last file of a sequence is followed by the first file. If false, attempting to read beyond the end of a sequence is an error.

Definition at line 197 of file dpxfileio.cpp.

◆ SetPath()

AJAStatus AJADPXFileIO::SetPath ( const std::string &  inPath)

Change the path to the DPX files to be read.

Parameters
[in]inPathSpecifies the path to where the DPX files are located. The file count will change to reflect the number of files present in the new location.

Definition at line 209 of file dpxfileio.cpp.

◆ SetPauseMode()

void AJADPXFileIO::SetPauseMode ( bool  mode)

Specifies the setting of the pause control. If true, pause mode will take effect. If false, pause mode is canceled.

Definition at line 203 of file dpxfileio.cpp.

◆ Write()

AJAStatus AJADPXFileIO::Write ( const uint8_t &  inBuffer,
const uint32_t  inBufferSize,
const uint32_t &  inIndex 
) const

Write a DPX file.

Parameters
[in]inBufferSpecifies the DPX file image payload.
[in]inBufferSizeSpecifies the number of payload bytes in inBuffer.
[in]inIndexSpecifies the index number to be appended to the file name.

Definition at line 233 of file dpxfileio.cpp.


The documentation for this class was generated from the following files: