Class RTPH265
java.lang.Object
javaforce.voip.RTPH265
- All Implemented Interfaces:
RTPVideoCoder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanDecodePacket(byte type) voiddecode(byte[] rtp, int offset, int length, PacketReceiver pr) Combines RTP fragments into full H265 packets.voidencode(byte[] data, int offset, int length, int x, int y, PacketReceiver pr) Encodes raw H.265 packets into multiple RTP packets (fragments).static byteget_nal_type(byte[] packet, int offset) Returns NAL unit type.static byteget_nal_type_slice_flag(byte[] packet, int offset) Returns NAL unit and first_slice_segment_in_pic_flag.static CodecInfogetCodecInfo(Packet sps) booleanisFrame(byte this_type, byte next_type) Returns true only in last slice of key-frame or i-frame.booleanisIFrame(byte this_type, byte next_type) Returns true if any i-frame.booleanisKeyFrame(byte this_type, byte next_type) Returns true only in last slice of key-frame.booleanisStart(byte type) voidsetid(int id) Sets RTP payload ID.voidsetLog(int id)
-
Constructor Details
-
RTPH265
public RTPH265()
-
-
Method Details
-
setid
public void setid(int id) Description copied from interface:RTPVideoCoderSets RTP payload ID. This value is exchanged in SDP packets. For some video codecs this value is fixed and ignored.- Specified by:
setidin interfaceRTPVideoCoder
-
setLog
public void setLog(int id) -
encode
Encodes raw H.265 packets into multiple RTP packets (fragments). TODO : Use AP packets to increase efficiency.- Specified by:
encodein interfaceRTPVideoCoder
-
decode
Combines RTP fragments into full H265 packets.- Specified by:
decodein interfaceRTPVideoCoder
-
get_nal_type
public static byte get_nal_type(byte[] packet, int offset) Returns NAL unit type. -
get_nal_type_slice_flag
public static byte get_nal_type_slice_flag(byte[] packet, int offset) Returns NAL unit and first_slice_segment_in_pic_flag. -
isKeyFrame
public boolean isKeyFrame(byte this_type, byte next_type) Returns true only in last slice of key-frame. -
isIFrame
public boolean isIFrame(byte this_type, byte next_type) Returns true if any i-frame. -
isFrame
public boolean isFrame(byte this_type, byte next_type) Returns true only in last slice of key-frame or i-frame. -
isStart
public boolean isStart(byte type) -
canDecodePacket
public static boolean canDecodePacket(byte type) -
getCodecInfo
-