Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 357b000

Browse files
authored
Fix streaming-in internal spreading (#1082)
Fix streaming-in internal spreading
1 parent 1721cfc commit 357b000

16 files changed

+65
-9
lines changed

source/agent/analytics/log4cxx.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ log4j.appender.A1.layout.ConversionPattern=%d - %p: %c - %m%n
1111

1212
# The raw UDP and TCP transports which are used for the connection between the Gateway and AVS.
1313
log4j.logger.owt.RawTransport=INFO
14+
log4j.logger.owt.TransportSession=INFO
15+
log4j.logger.owt.TransportServer=INFO
16+
log4j.logger.owt.TransportClient=INFO
1417
# If the SctpTransport log is set to debug, heavy IO would affact the connections
1518
log4j.logger.owt.SctpTransport=INFO
19+
log4j.logger.owt.InternalClient=INFO
20+
log4j.logger.owt.InternalServer=INFO
1621

1722
log4j.logger.mcu.media.VideoMixer=INFO
1823
log4j.logger.mcu.media.VideoTranscoder=INFO

source/agent/analytics/log4js_configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
"AnalyticsNode": "INFO",
1919
"AnalyticsAgent": "WARN",
2020
"Connections": "INFO",
21-
"InternalConnectionFactory": "INFO"
21+
"InternalConnectionRouter": "INFO"
2222
}
2323
}

source/agent/audio/log4cxx.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ log4j.logger.owt.TransportServer=INFO
1616
log4j.logger.owt.TransportClient=INFO
1717
# If the SctpTransport log is set to debug, heavy IO would affact the connections
1818
log4j.logger.owt.SctpTransport=INFO
19+
log4j.logger.owt.InternalClient=INFO
20+
log4j.logger.owt.InternalServer=INFO
21+
1922
log4j.logger.owt.AudioRanker=INFO
2023

2124
log4j.logger.mcu.media.AudioMixer=INFO

source/agent/audio/log4js_configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"SelectiveMixer": "INFO",
2020
"WorkingAgent": "INFO",
2121
"Connections": "INFO",
22-
"InternalConnectionFactory": "INFO"
22+
"InternalConnectionRouter": "INFO"
2323
}
2424
}

source/agent/quic/log4js_configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"Connection": "WARN",
2020
"WorkingAgent": "WARN",
2121
"Connections": "WARN",
22-
"InternalConnectionFactory": "WARN",
22+
"InternalConnectionRouter": "WARN",
2323
"QuicConnection": "WARN",
2424
"QuicTransportServer": "WARN",
2525
"QuicTransportStreamPipeline": "WARN"

source/agent/recording/dist.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
"folder": "../addons/logger",
4848
"name": "logger"
4949
},
50+
{
51+
"folder": "../addons/mediaFrameMulticaster",
52+
"name": "mediaFrameMulticaster"
53+
},
5054
{
5155
"folder": "../addons/quicIO",
5256
"name": "quicIO"

source/agent/recording/index.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var InternalOut = internalIO.Out;
1111
var avstream = require('../avstreamLib/build/Release/avstream');
1212
var AVStreamIn = avstream.AVStreamIn;
1313
var AVStreamOut = avstream.AVStreamOut;
14+
15+
const MediaFrameMulticaster = require(
16+
'../mediaFrameMulticaster/build/Release/mediaFrameMulticaster');
17+
1418
var logger = require('../logger').logger;
1519
var path = require('path');
1620
var Connections = require('./connections');
@@ -42,6 +46,19 @@ module.exports = function (rpcClient, selfRpcId, parentRpcId, clusterWorkerIP) {
4246
setTimeout(function () {connection.startPlay();}, 6000);
4347
callback('onStatus', {type: 'ready'});
4448

49+
var dispatcher = new MediaFrameMulticaster();
50+
connection.addDestination('audio', dispatcher);
51+
connection.addDestination('video', dispatcher);
52+
connection.selfClose = connection.close;
53+
connection.close = function () {
54+
connection.removeDestination('audio', dispatcher);
55+
connection.removeDestination('video', dispatcher);
56+
connection.selfClose();
57+
};
58+
connection.source = function () {
59+
return dispatcher.source();
60+
};
61+
4562
return connection;
4663
};
4764

@@ -116,7 +133,7 @@ module.exports = function (rpcClient, selfRpcId, parentRpcId, clusterWorkerIP) {
116133
return callback('callback', {type: 'failed', reason: 'Create Connection failed'});
117134
}
118135

119-
router.addLocalSource(connectionId, connectionType, conn)
136+
router.addLocalSource(connectionId, connectionType, conn.source())
120137
.then(onSuccess(callback), onError(callback));
121138
};
122139

source/agent/recording/log4cxx.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ log4j.logger.owt.TransportServer=INFO
1616
log4j.logger.owt.TransportClient=INFO
1717
# If the SctpTransport log is set to debug, heavy IO would affact the connections
1818
log4j.logger.owt.SctpTransport=INFO
19+
log4j.logger.owt.InternalClient=INFO
20+
log4j.logger.owt.InternalServer=INFO
1921

2022
log4j.logger.owt.LiveStreamIn=INFO
2123
log4j.logger.owt.LiveStreamIn.JitterBuffer=INFO

source/agent/recording/log4js_configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
"RecordingNode": "INFO",
1919
"WorkingAgent": "INFO",
2020
"Connections": "INFO",
21-
"InternalConnectionFactory": "INFO"
21+
"InternalConnectionRouter": "INFO"
2222
}
2323
}

source/agent/streaming/dist.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
"folder": "../addons/logger",
4848
"name": "logger"
4949
},
50+
{
51+
"folder": "../addons/mediaFrameMulticaster",
52+
"name": "mediaFrameMulticaster"
53+
},
5054
{
5155
"folder": "../addons/quicIO",
5256
"name": "quicIO"

0 commit comments

Comments
 (0)