-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f94a9b
commit 6ce6f7b
Showing
83 changed files
with
4,000 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.. reference_sadm_elements: | ||
SADM Elements | ||
############# | ||
|
||
Frame Header | ||
------------ | ||
|
||
.. doxygenclass:: adm::FrameHeader | ||
.. doxygenclass:: adm::ProfileList | ||
.. doxygentypedef:: adm::TransportTrackFormats | ||
|
||
FrameFormat | ||
----------- | ||
|
||
.. doxygenclass:: adm::FrameFormat | ||
.. doxygenclass:: adm::FrameFormatId | ||
.. doxygenenum:: adm::FrameType | ||
.. doxygenenum:: adm::TimeReference | ||
.. doxygentypedef:: adm::FlowId | ||
.. doxygentypedef:: adm::CountToFull | ||
.. doxygentypedef:: adm::NumMetadataChunks | ||
.. doxygentypedef:: adm::CountToSameChunk | ||
.. doxygentypedef:: adm::FrameIndex | ||
.. doxygentypedef:: adm::ChunkIndex | ||
|
||
ChangedIds | ||
---------- | ||
|
||
.. doxygenclass:: adm::ChangedIds | ||
.. doxygenclass:: adm::ChangedId | ||
.. doxygenenum:: adm::ChangedIdStatus | ||
.. doxygentypedef:: adm::ChangedAudioChannelFormatIds | ||
.. doxygentypedef:: adm::ChangedAudioPackFormatIds | ||
.. doxygentypedef:: adm::ChangedAudioTrackUidIds | ||
.. doxygentypedef:: adm::ChangedAudioStreamFormatIds | ||
.. doxygentypedef:: adm::ChangedAudioObjectIds | ||
.. doxygentypedef:: adm::ChangedAudioContentIds | ||
.. doxygentypedef:: adm::ChangedAudioProgrammeIds | ||
|
||
TransportTrackFormat | ||
-------------------- | ||
|
||
.. doxygenclass:: adm::TransportTrackFormat | ||
.. doxygenclass:: adm::TransportId | ||
.. doxygentypedef:: adm::TransportName | ||
.. doxygentypedef:: adm::NumTracks | ||
.. doxygentypedef:: adm::NumIds | ||
.. doxygentypedef:: adm::AudioTracks | ||
|
||
AudioTrack | ||
---------- | ||
.. doxygenclass:: adm::AudioTrack | ||
.. doxygentypedef:: adm::TrackId | ||
.. doxygentypedef:: adm::AudioTrackUidRefs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#include <iostream> | ||
#include <sstream> | ||
#include "adm/elements.hpp" | ||
#include "adm/serial.hpp" | ||
#include "adm/utilities/id_assignment.hpp" | ||
#include "adm/utilities/object_creation.hpp" | ||
#include "adm/write.hpp" | ||
|
||
int main() { | ||
using namespace adm; | ||
auto uuid = "1f399874-dfa9-4a9b-82cd-fedc483d1223"; | ||
auto frameFormatId = parseFrameFormatId("FF_00000001"); | ||
auto frameHeader = FrameHeader{FrameFormat{ | ||
frameFormatId, Start(std::chrono::milliseconds(0)), | ||
Duration(std::chrono::milliseconds(40)), FrameType::FULL, FlowId{uuid}}}; | ||
auto document = Document::create(); | ||
|
||
// create ADM elements | ||
auto admProgramme = AudioProgramme::create( | ||
AudioProgrammeName("Alice and Bob talking in the forrest")); | ||
auto speechContent = AudioContent::create(AudioContentName("Speech")); | ||
auto atmoContent = AudioContent::create(AudioContentName("Atmo")); | ||
|
||
admProgramme->addReference(speechContent); | ||
admProgramme->addReference(atmoContent); | ||
auto holder1 = createSimpleObject("Alice"); | ||
speechContent->addReference(holder1.audioObject); | ||
|
||
auto holder2 = createSimpleObject("Bob"); | ||
speechContent->addReference(holder2.audioObject); | ||
|
||
document->add(admProgramme); | ||
|
||
reassignIds(document); | ||
|
||
auto trackFormat = TransportTrackFormat(TransportId(TransportIdValue(1))); | ||
|
||
AudioTrack audioTrack1(TrackId(1)); | ||
audioTrack1.add(holder1.audioTrackUid->get<AudioTrackUidId>()); | ||
trackFormat.add(audioTrack1); | ||
|
||
AudioTrack audioTrack2(TrackId(2)); | ||
audioTrack2.add(holder2.audioTrackUid->get<AudioTrackUidId>()); | ||
trackFormat.add(audioTrack2); | ||
|
||
frameHeader.add(trackFormat); | ||
|
||
// write XML data to stdout | ||
std::stringstream xmlStream; | ||
writeXml(xmlStream, document, frameHeader); | ||
std::cout << xmlStream.str(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <iostream> | ||
#include <sstream> | ||
#include <adm/serial.hpp> | ||
#include "adm/parse.hpp" | ||
#include "adm/write.hpp" | ||
|
||
int main(int argc, char const *argv[]) { | ||
if (argc != 2) { | ||
std::cout << "usage: " << argv[0] << " [SADM_XML_FILE]" << std::endl; | ||
exit(1); | ||
} | ||
|
||
std::string fileName = argv[1]; | ||
auto header = adm::parseFrameHeader(fileName); | ||
auto document = adm::parseXml(fileName, header, | ||
adm::xml::ParserOptions::recursive_node_search); | ||
|
||
// write XML data to stdout | ||
std::stringstream xmlStream; | ||
writeXml(xmlStream, document, header); | ||
std::cout << xmlStream.str(); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#pragma once | ||
#include "adm/document.hpp" | ||
#include <memory> | ||
|
||
|
Oops, something went wrong.