diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-02-05 13:39:10 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-02-05 13:39:10 +0000 |
| commit | 5cb09148a9d3456727459b7d41b8c36b0ca277b9 (patch) | |
| tree | f896e01194135fe6dd19d1bb04c786d5fc846623 /src | |
| parent | 5d2236bf466ea8592344791e926b075be339c3dc (diff) | |
Comment / tidy.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp.h | 5 | ||||
| -rw-r--r-- | src/mxf.cc | 2 | ||||
| -rw-r--r-- | src/mxf.h | 22 |
3 files changed, 15 insertions, 14 deletions
@@ -97,11 +97,6 @@ public: boost::shared_ptr<const Signer> signer = boost::shared_ptr<const Signer> () ); - /** Emitted with a parameter between 0 and 1 to indicate progress - * for long jobs. - */ - boost::signals2::signal<void (float)> Progress; - private: /** Write the PKL file. @@ -43,7 +43,6 @@ using namespace dcp; MXF::MXF (Fraction edit_rate) : Content (edit_rate) - , _progress (0) , _encryption_context (0) , _decryption_context (0) { @@ -52,7 +51,6 @@ MXF::MXF (Fraction edit_rate) MXF::MXF (boost::filesystem::path file) : Content (file) - , _progress (0) , _encryption_context (0) , _decryption_context (0) { @@ -45,6 +45,7 @@ public: MXF (boost::filesystem::path file); ~MXF (); + /** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */ virtual std::string key_type () const = 0; bool equals ( @@ -59,36 +60,43 @@ public: */ void fill_writer_info (ASDCP::WriterInfo* w, Standard standard); - void set_progress (boost::signals2::signal<void (float)>* progress) { - _progress = progress; - } - + /** @return true if the data is encrypted */ bool encrypted () const { return !_key_id.empty (); } + /** Set the ID of the key that is used for encryption/decryption. + * @param i key ID. + */ void set_key_id (std::string i) { _key_id = i; } + /** @return the ID of the key used for encryption/decryption, or an empty string */ std::string key_id () const { return _key_id; } - + void set_key (Key); + /** @return encryption/decryption key, if one has been set */ boost::optional<Key> key () const { return _key; } + /** @return encryption context, set up with any key that has been passed to set_key() */ ASDCP::AESEncContext* encryption_context () const { return _encryption_context; } + /** Set the metadata that is written to the MXF file. + * @param m Metadata. + */ void set_metadata (MXFMetadata m) { _metadata = m; } + /** @return metadata from the MXF file */ MXFMetadata metadata () const { return _metadata; } @@ -100,11 +108,11 @@ protected: void read_writer_info (ASDCP::WriterInfo const &); - /** Signal to emit to report progress, or 0 */ - boost::signals2::signal<void (float)>* _progress; ASDCP::AESEncContext* _encryption_context; ASDCP::AESDecContext* _decryption_context; + /** ID of the key used for encryption/decryption, or an empty string */ std::string _key_id; + /** Key used for encryption/decryption, if there is one */ boost::optional<Key> _key; MXFMetadata _metadata; }; |
