|
@@ -1,18 +1,9 @@
|
|
|
#!/usr/bin/env python3
|
|
|
# encoding:utf-8
|
|
|
|
|
|
-import os
|
|
|
import mmh3
|
|
|
-import queue
|
|
|
import pjsua2 as pj
|
|
|
|
|
|
-player_script_dir = '/code/src/core/voip/scripts/'
|
|
|
-
|
|
|
-
|
|
|
-def murmur3_32(player_file):
|
|
|
- if isinstance(player_file, list):
|
|
|
- player_file = ','.join(player_file)
|
|
|
- return abs(mmh3.hash(player_file))
|
|
|
|
|
|
def build_ep_config():
|
|
|
ep_cfg = pj.EpConfig()
|
|
@@ -74,11 +65,7 @@ def build_audio_format():
|
|
|
# fmt.frameTimeUsec = 20000
|
|
|
return fmt
|
|
|
|
|
|
-
|
|
|
-def build_demo_script():
|
|
|
- res = queue.Queue(maxsize=10)
|
|
|
- for file in os.listdir(player_script_dir):
|
|
|
- file = os.path.join(player_script_dir, file)
|
|
|
- print('build_demo_script::', file)
|
|
|
- res.put(file)
|
|
|
- return res
|
|
|
+def murmur3_32(player_file):
|
|
|
+ if isinstance(player_file, list):
|
|
|
+ player_file = ','.join(player_file)
|
|
|
+ return abs(mmh3.hash(player_file))
|