ca461c47da
- Rename AuracastQosHigh/Mid/Low to AuracastQosDefault/Fast for clarity - Add Public Broadcast Profile (PBP) service data to advertising with dynamic feature calculation based on encryption and sample rate - Add PBP/PBS/STR test cases (BV-01-C through BV-06-C) for standard and high quality streaming with various configurations - Update all existing test cases and main scripts to use new QoS profile names
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
"""
|
|
Make sure to set TXPX_BST_CODEC_CONFIG to 16_2_1
|
|
restart the stream when asked to terminate.
|
|
"""
|
|
|
|
import logging
|
|
import os
|
|
|
|
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
|
from auracast.multicast import broadcast, run_async
|
|
|
|
|
|
if __name__ == "__main__":
|
|
logging.basicConfig(
|
|
level=os.environ.get("LOG_LEVEL", logging.INFO),
|
|
format="%(module)s.py:%(lineno)d %(levelname)s: %(message)s",
|
|
)
|
|
|
|
# Start from default global config
|
|
config = AuracastGlobalConfig()
|
|
|
|
# Use same QoS profile as multicast main
|
|
config.qos_config = AuracastQosDefault()
|
|
|
|
# Transport similar to multicast main; adjust if needed for your setup
|
|
# config.transport = "auto" # let multicast auto-detect
|
|
config.transport = "serial:/dev/ttyAMA3,1000000,rtscts" # Raspberry Pi default
|
|
|
|
# Default BIG, only modify the random address as requested
|
|
big = AuracastBigConfig()
|
|
big.random_address = "F1:F1:F2:F3:F4:F5"
|
|
big.audio_source = "file:./src/auracast/testdata/announcement_en.wav"
|
|
big.id = 12
|
|
|
|
run_async(
|
|
broadcast(
|
|
config,
|
|
[big],
|
|
)
|
|
)
|