File tree Expand file tree Collapse file tree
src/main/java/com/github/serezhka/jap2server/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11plugins {
22 id ' maven'
33 id ' java-library'
4- id " io.freefair.lombok" version " 4.1.6"
54}
65
76group ' com.github.serezhka'
@@ -23,7 +22,6 @@ dependencies {
2322 implementation " com.github.serezhka:java-airplay-lib:1.0.0"
2423 implementation " org.slf4j:slf4j-api:1.7.30"
2524
26-
2725 testImplementation " org.junit.jupiter:junit-jupiter-api:5.4.2"
2826 testRuntimeOnly " org.junit.jupiter:junit-jupiter-engine:5.4.2"
2927}
Original file line number Diff line number Diff line change 1212import io .netty .channel .socket .ServerSocketChannel ;
1313import io .netty .channel .socket .SocketChannel ;
1414import io .netty .channel .socket .nio .NioServerSocketChannel ;
15- import lombok .extern .slf4j .Slf4j ;
15+ import org .slf4j .Logger ;
16+ import org .slf4j .LoggerFactory ;
1617
1718import java .net .InetSocketAddress ;
1819
19- @ Slf4j
2020public class AirPlayReceiver implements Runnable {
2121
22+ private static final Logger log = LoggerFactory .getLogger (MirroringHandler .class );
23+
2224 private final int port ;
2325 private final MirroringHandler mirroringHandler ;
2426
Original file line number Diff line number Diff line change 55import com .github .serezhka .jap2server .internal .handler .HeartBeatHandler ;
66import com .github .serezhka .jap2server .internal .handler .PairingHandler ;
77import com .github .serezhka .jap2server .internal .handler .RTSPHandler ;
8+ import com .github .serezhka .jap2server .internal .handler .mirroring .MirroringHandler ;
89import com .github .serezhka .jap2server .internal .handler .session .SessionManager ;
910import io .netty .bootstrap .ServerBootstrap ;
1011import io .netty .channel .ChannelInitializer ;
2223import io .netty .handler .codec .rtsp .RtspEncoder ;
2324import io .netty .handler .logging .LogLevel ;
2425import io .netty .handler .logging .LoggingHandler ;
25- import lombok .extern .slf4j .Slf4j ;
26+ import org .slf4j .Logger ;
27+ import org .slf4j .LoggerFactory ;
2628
2729import java .net .InetSocketAddress ;
2830
29- @ Slf4j
3031public class AirTunesServer implements Runnable {
3132
33+ private static final Logger log = LoggerFactory .getLogger (MirroringHandler .class );
34+
3235 private final PairingHandler pairingHandler ;
3336 private final FairPlayHandler fairPlayHandler ;
3437 private final RTSPHandler rtspHandler ;
Original file line number Diff line number Diff line change 11package com .github .serezhka .jap2server .internal .handler .mirroring ;
22
33import io .netty .buffer .ByteBuf ;
4- import lombok .Getter ;
5- import lombok .ToString ;
64
7- @ Getter
8- @ ToString
95class AirPlayHeader {
106 private final int payloadSize ;
117 private final short payloadType ;
@@ -30,4 +26,48 @@ class AirPlayHeader {
3026 height = (int ) header .readFloatLE ();
3127 }
3228 }
29+
30+ public int getPayloadSize () {
31+ return payloadSize ;
32+ }
33+
34+ public short getPayloadType () {
35+ return payloadType ;
36+ }
37+
38+ public short getPayloadOption () {
39+ return payloadOption ;
40+ }
41+
42+ public int getWidthSource () {
43+ return widthSource ;
44+ }
45+
46+ public void setWidthSource (int widthSource ) {
47+ this .widthSource = widthSource ;
48+ }
49+
50+ public int getHeightSource () {
51+ return heightSource ;
52+ }
53+
54+ public void setHeightSource (int heightSource ) {
55+ this .heightSource = heightSource ;
56+ }
57+
58+ public int getWidth () {
59+ return width ;
60+ }
61+
62+ public void setWidth (int width ) {
63+ this .width = width ;
64+ }
65+
66+ public int getHeight () {
67+ return height ;
68+ }
69+
70+ public void setHeight (int height ) {
71+ this .height = height ;
72+ }
3373}
Original file line number Diff line number Diff line change 66import io .netty .buffer .ByteBufAllocator ;
77import io .netty .channel .ChannelHandlerContext ;
88import io .netty .channel .SimpleChannelInboundHandler ;
9- import lombok .extern .slf4j .Slf4j ;
9+ import org .slf4j .Logger ;
10+ import org .slf4j .LoggerFactory ;
1011
11- @ Slf4j
1212public class MirroringHandler extends SimpleChannelInboundHandler <ByteBuf > {
1313
14+ private static final Logger log = LoggerFactory .getLogger (MirroringHandler .class );
15+
1416 private final ByteBuf headerBuf = ByteBufAllocator .DEFAULT .ioBuffer (128 , 128 );
1517 private final AirPlay airPlay ;
1618 private final MirrorDataConsumer dataConsumer ;
Original file line number Diff line number Diff line change 11package com .github .serezhka .jap2server .internal .handler .session ;
22
33import com .github .serezhka .jap2lib .AirPlay ;
4- import lombok .Getter ;
54
6- @ Getter
75public class Session {
86
97 private final AirPlay airPlay ;
108 private Thread airPlayReceiverThread ;
119
12- public Session () {airPlay = new AirPlay ();}
10+ Session () {airPlay = new AirPlay ();}
11+
12+ public AirPlay getAirPlay () {
13+ return airPlay ;
14+ }
1315
1416 public Thread getAirPlayReceiverThread () {
1517 return airPlayReceiverThread ;
You can’t perform that action at this time.
0 commit comments