File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
core/src/main/java/io/github/thibaultbee/streampack/core/internal/data Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -25,20 +25,24 @@ open class Packet(
2525 /* *
2626 * Contains data.
2727 */
28- var buffer : ByteBuffer ,
28+ val buffer : ByteBuffer ,
2929
3030 /* *
3131 * Frame timestamp in µs.
3232 */
33- var ts : Long , // in µs
33+ val ts : Long , // in µs
3434
3535 /* *
3636 * Packet data type
3737 */
38- var type : PacketType = PacketType .UNKNOWN ,
38+ val type : PacketType = PacketType .UNKNOWN ,
3939) {
4040 val isVideo = type == PacketType .VIDEO
4141 val isAudio = type == PacketType .AUDIO
42+
43+ override fun toString (): String {
44+ return " Packet(buffer=$buffer , ts=$ts , type=$type )"
45+ }
4246}
4347
4448enum class PacketType {
Original file line number Diff line number Diff line change @@ -29,13 +29,18 @@ class SrtPacket(
2929 /* *
3030 * [Boolean.true] if this is the first packet that describes a frame.
3131 */
32- var isFirstPacketFrame : Boolean ,
32+ val isFirstPacketFrame : Boolean ,
3333 /* *
3434 * [Boolean.true] if this is the last packet that describes a frame.
3535 */
36- var isLastPacketFrame : Boolean ,
36+ val isLastPacketFrame : Boolean ,
3737 /* *
3838 * Frame timestamp in µs.
3939 */
4040 ts : Long , // in µs
41- ) : Packet(buffer, ts)
41+
42+ /* *
43+ * Packet data type
44+ */
45+ type : PacketType = PacketType .UNKNOWN ,
46+ ) : Packet(buffer, ts, type)
You can’t perform that action at this time.
0 commit comments