/*
-Copyright (c) 2005-2021, John Hurst
+Copyright (c) 2005-2022, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
return RESULT_OK;
}
+//
+ASDCP::Result_t
+ASDCP::MXF::Partition::PacketList::DeleteMDObjectByID(const UUID& ObjectID)
+{
+ std::map<UUID, InterchangeObject*>::iterator mi = m_Map.find(ObjectID);
+
+ if ( mi == m_Map.end() )
+ {
+ return RESULT_FAIL;
+ }
+
+ delete (*mi).second;
+ m_Map.erase(mi);
+ return RESULT_OK;
+}
+
//
ASDCP::Result_t
ASDCP::MXF::Partition::PacketList::GetMDObjectByType(const byte_t* ObjectID, InterchangeObject** Object)
return result;
}
+//
ASDCP::Result_t
ASDCP::MXF::OP1aHeader::GetMDObjectByID(const UUID& ObjectID, InterchangeObject** Object)
{
return m_PacketList->GetMDObjectByID(ObjectID, Object);
}
+//
+ASDCP::Result_t
+ASDCP::MXF::OP1aHeader::DeleteMDObjectByID(const UUID& ObjectID)
+{
+ return m_PacketList->DeleteMDObjectByID(ObjectID);
+}
+
//
ASDCP::Result_t
ASDCP::MXF::OP1aHeader::GetMDObjectByType(const byte_t* ObjectID, InterchangeObject** Object)
(*i)->Dump(stream);
}
+//
ASDCP::Result_t
ASDCP::MXF::OPAtomIndexFooter::GetMDObjectByID(const UUID& ObjectID, InterchangeObject** Object)
{
return m_PacketList->GetMDObjectByID(ObjectID, Object);
}
+//
+ASDCP::Result_t
+ASDCP::MXF::OPAtomIndexFooter::DeleteMDObjectByID(const UUID& ObjectID)
+{
+ return m_PacketList->DeleteMDObjectByID(ObjectID);
+}
+
//
ASDCP::Result_t
ASDCP::MXF::OPAtomIndexFooter::GetMDObjectByType(const byte_t* ObjectID, InterchangeObject** Object)
/*
-Copyright (c) 2005-2021, John Hurst
+Copyright (c) 2005-2022, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
~PacketList();
void AddPacket(InterchangeObject* ThePacket); // takes ownership
Result_t GetMDObjectByID(const UUID& ObjectID, InterchangeObject** Object);
+ Result_t DeleteMDObjectByID(const UUID& ObjectID);
Result_t GetMDObjectByType(const byte_t* ObjectID, InterchangeObject** Object);
Result_t GetMDObjectsByType(const byte_t* ObjectID, std::list<InterchangeObject*>& ObjectList);
};
virtual Result_t WriteToFile(Kumu::FileWriter& Writer, ui32_t HeaderLength = 16384);
virtual void Dump(FILE* = 0);
virtual Result_t GetMDObjectByID(const UUID&, InterchangeObject** = 0);
+ virtual Result_t DeleteMDObjectByID(const UUID& ObjectID);
virtual Result_t GetMDObjectByType(const byte_t*, InterchangeObject** = 0);
virtual Result_t GetMDObjectsByType(const byte_t* ObjectID, std::list<InterchangeObject*>& ObjectList);
Identification* GetIdentification();
virtual void Dump(FILE* = 0);
virtual Result_t GetMDObjectByID(const UUID&, InterchangeObject** = 0);
+ virtual Result_t DeleteMDObjectByID(const UUID& ObjectID);
virtual Result_t GetMDObjectByType(const byte_t*, InterchangeObject** = 0);
virtual Result_t GetMDObjectsByType(const byte_t* ObjectID, std::list<InterchangeObject*>& ObjectList);