[asterisk-scf-commits] asterisk-scf/integration/mediaformatgeneric.git branch "resampling" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue Aug 23 18:42:35 CDT 2011
branch "resampling" has been updated
via 116fbb5d78fbe5435ee72291eee16eb6bc62a9a4 (commit)
from 3865e464a88d7aa5d23465000568af11b2c182be (commit)
Summary of changes:
src/MediaFormatGeneric.cpp | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 116fbb5d78fbe5435ee72291eee16eb6bc62a9a4
Author: Mark Michelson <mmichelson at digium.com>
Date: Tue Aug 23 17:28:42 2011 -0500
Add the signed linear formats
diff --git a/src/MediaFormatGeneric.cpp b/src/MediaFormatGeneric.cpp
index 9bffa97..68b00f9 100644
--- a/src/MediaFormatGeneric.cpp
+++ b/src/MediaFormatGeneric.cpp
@@ -312,6 +312,33 @@ void MediaFormatGenericApp::start(const std::string&, const Ice::CommunicatorPtr
descriptorService->addFormat(alaw->name, alaw, alawSDP);
comparatorService->addFormat(alaw->name);
+ // Add the various flavors of signed linear audio
+ SignedLinearPtr slin8 = new SignedLinear();
+ slin8->name = SignedLinear8Name;
+ slin8->sampleSize = 16;
+ slin8->operations = m16BitFormatOperationsProxy;
+ SDPDescriptorPtr slin8SDP = new SDPDescriptor();
+ slin8SDP->payload = 11;
+ slin8SDP->type = "audio";
+ slin8SDP->subtype = "L16";
+ slin8SDP->samplerate = slin8->sampleRate = 8000;
+ descriptorService->addFormat(slin8->name, slin8, slin8SDP);
+ comparatorService->addFormat(slin8->name);
+
+ SignedLinearPtr slin16 = new SignedLinear();
+ slin16->name = SignedLinear16Name;
+ slin16->sampleSize = 16;
+ slin16->operations = m16BitFormatOperationsProxy;
+ SDPDescriptorPtr slin16SDP = new SDPDescriptor();
+ //XXX Need to come up with a good way of managing our dynamic
+ //payloads other than hard-coding them like this.
+ slin16SDP->payload = 102;
+ slin16SDP->type = "audio";
+ slin16SDP->subtype = "L16";
+ slin16SDP->samplerate = slin16->sampleRate = 16000;
+ descriptorService->addFormat(slin16->name, slin16, slin16SDP);
+ comparatorService->addFormat(slin16->name);
+
// Register our custom comparator with the service locator
ServiceLocatorParamsComparePrx comparatorServicePrx = ServiceLocatorParamsComparePrx::uncheckedCast(
mAdapter->addWithUUID(comparatorService));
-----------------------------------------------------------------------
--
asterisk-scf/integration/mediaformatgeneric.git
More information about the asterisk-scf-commits
mailing list