Skip to content

Commit

Permalink
automatic commit at releng box
Browse files Browse the repository at this point in the history
  • Loading branch information
mc36 committed Feb 1, 2025
1 parent 9c8278c commit e93e498
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 4 deletions.
62 changes: 62 additions & 0 deletions misc/player/sender.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

import java.io.InputStream;
import java.net.InetAddress;
import java.nio.ByteBuffer;
import java.nio.channels.DatagramChannel;

public class sender {

public static void main(String[] args) throws Exception {
InetAddress group = InetAddress.getByName(args[2]);
int port = Integer.parseInt(args[3]);
DatagramChannel channel = DatagramChannel.open();
channel.socket().connect(group, port);
ByteBuffer buffer = ByteBuffer.allocate(4096);

String[] cmd = {
"ffmpeg",
"-ss", args[1],
"-re",
"-i", args[0],
"-vn", "-sn",
"-ar", "44100",
"-ac", "2",
"-c:a", "pcm_s16be",
"-f", "s16be",
"-"};
Process process = Runtime.getRuntime().exec(cmd);
InputStream stream = process.getInputStream();

int seq = 0;
int clk = 0;
for (;;) {
byte[] buf = new byte[1024];
int i = stream.read(buf, 0, buf.length);
if (i < 0) {
break;
}
if (i < 1) {
if (!process.isAlive()) {
break;
}
continue;
}
buffer.clear();
buffer.put(0, (byte) 0x80);
buffer.put(1, (byte) 0xa);
buffer.put(2, (byte) (seq >>> 8));
buffer.put(3, (byte) seq);
buffer.put(4, (byte) (clk >>> 24));
buffer.put(5, (byte) (clk >>> 16));
buffer.put(6, (byte) (clk >>> 8));
buffer.put(7, (byte) clk);
buffer.put(12, buf, 0, i);
buffer.position(0);
buffer.limit(i + 12);
channel.write(buffer);
seq++;
clk += i / 4;
}
}

}
2 changes: 1 addition & 1 deletion src/rtr.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v25.2.1-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-02-01 20:51:59, took 00:15:02, with 50 workers, on 3634 cases, 0 failed, 0 traces, 4 retries
-;-;-;2025-02-01 22:43:46, took 00:15:25, with 50 workers, on 3634 cases, 0 failed, 0 traces, 0 retries
-;-;-;./rtr.bin
http://sources.freertr.org/cfg/basic01.tst;basic01.tst;success;dummy test
http://sources.freertr.org/cfg/basic02.tst;basic02.tst;success;interface with slot
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v25.2.1-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-02-01 20:51:59, took 00:15:02, with 50 workers, on 3634 cases, 0 failed, 0 traces, 4 retries<br/>
tested: 2025-02-01 22:43:46, took 00:15:25, with 50 workers, on 3634 cases, 0 failed, 0 traces, 0 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down
2 changes: 1 addition & 1 deletion src/rtr8.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v25.2.1-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-02-01 21:03:16, took 00:10:47, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries
-;-;-;2025-02-01 22:54:36, took 00:10:21, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries
-;-;-;./rtr.bin
http://sources.freertr.org/cfg/p4lang-acl001.tst;p4lang-acl001.tst;success;p4lang: copp
http://sources.freertr.org/cfg/p4lang-acl002.tst;p4lang-acl002.tst;success;p4lang: ingress access list
Expand Down
2 changes: 1 addition & 1 deletion src/rtr8.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v25.2.1-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-02-01 21:03:16, took 00:10:47, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries<br/>
tested: 2025-02-01 22:54:36, took 00:10:21, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down

0 comments on commit e93e498

Please sign in to comment.