From c8a8baa243132a938fe4bbfc06a7afe980aa07e6 Mon Sep 17 00:00:00 2001 From: jhurst Date: Wed, 13 Jun 2007 22:15:44 +0000 Subject: oops --- AS_DCP_TimedText.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'AS_DCP_TimedText.h') diff --git a/AS_DCP_TimedText.h b/AS_DCP_TimedText.h index b175683..9c0262c 100644 --- a/AS_DCP_TimedText.h +++ b/AS_DCP_TimedText.h @@ -61,7 +61,7 @@ namespace ASDCP { Rational EditRate; // ui32_t ContainerDuration; byte_t AssetID[UUIDlen]; - std::string NamespaceName; // NULL-terminated string + std::string NamespaceName; std::string EncodingName; ResourceList_t ResourceList; @@ -94,6 +94,14 @@ namespace ASDCP { void Dump(FILE* = 0, ui32_t dump_bytes = 0) const; }; + // + class IResourceResolver + { + public: + virtual ~IResourceResolver() {} + virtual Result_t ResolveRID(const byte_t* uuid, FrameBuffer&) const = 0; // return data for RID + }; + // class DCSubtitleParser { @@ -117,8 +125,14 @@ namespace ASDCP { Result_t ReadTimedTextResource(std::string&) const; // Reads the Ancillary Resource having the given ID. Fails if the buffer - // is too small or the resource does not exist. - Result_t ReadAncillaryResource(const byte_t* uuid, FrameBuffer&) const; + // is too small or the resource does not exist. The optional Resolver + // argument can be provided which will be used to retrieve the resource + // having a particulat UUID. If a Resolver is not supplied, the default + // internal resolver will return the contents of the file having the UUID + // (with optional extension) as the filename. The filename must exist in + // the same directory as the XML file opened with OpenRead(). + Result_t ReadAncillaryResource(const byte_t* uuid, FrameBuffer&, + const IResourceResolver* Resolver = 0) const; }; // -- cgit v1.2.3