Documentation ¶
Overview ¶
Package folderscan handles the folder scanning and encoding methods
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EncodeCmd = &cobra.Command{ Use: "encode", Short: "Encode an organised folder of metadata into an mrx file", Long: `The encode flag brings together an organised file system of metadata into an mrx file. detailing the labels of its contents and the overall file structure The folders represent partitions within the mrx file and are to be numerically ordered, with their numbers. e.g. 1 is represented as 0001 Each partition folder, then contains up to 9999 essence files. The essence names are as follows: - TC - Clocked text data - BE - Embedded timing binary data - BC - Clocked binary data - TE - Embedded timing text data The complete folder names would then look like 0000StreamTC or 0000StreamBC etc. The metadata stored within the folders is then named {number}d, e.g. 25d, 132341d or 01d would all be valid. The numerical order the data is found in the folders is the order it is saved in the file. Any manifest files that are found can be added onto the "previous" field for a new manifest that is generated. The manifest, carries all the metadata in the mrx file, allowing for optional data from privates sources. These manifest files are stored as config.json in the parent folder. Flat formats are also used where the metadata is not split up into folders, and instead the data stream is part of the name. e.g. 0000StreamTC01d `, RunE: Encode, }
Functions ¶
Types ¶
type FolderScanner ¶
type FolderScanner struct { ParentFolder string FolLayout *fullFolderMRX }
FolderScanner checks the folder for an MRX layout. It enables the encode.Writer interface to save the folder contents as an MRX.
func (*FolderScanner) EssenceChannels ¶
func (f *FolderScanner) EssenceChannels(essChan chan *encode.ChannelPackets) error
EssenceChannels extracts the essence from the files, it then sends one data stream (in numerical order) to the writer channel.
func (*FolderScanner) GetRoundTrip ¶
func (f *FolderScanner) GetRoundTrip() (*manifest.RoundTrip, error)
GetRoundTrip gets the configuration and a manifest. It searches the parent folder for a config.json file, if the file is not found then it is not used. The config.json must be of type encode.Roundtrip
func (*FolderScanner) GetStreamInformation ¶
func (f *FolderScanner) GetStreamInformation() (encode.StreamInformation, error)
GetStreamInformation finds the number of channels and their MRX keys to be saved
Click to show internal directories.
Click to hide internal directories.