Class RTPH265


public class RTPH265 extends RTPCodec
  • Field Summary

    Fields inherited from class javaforce.voip.RTPCodec

    random
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    canDecodePacket(byte type)
     
    void
    decode(byte[] rtp, int offset, int length, PacketReceiver pr)
    Combines RTP fragments into full H265 packets.
    void
    encode(byte[] data, int x, int y, int id, PacketReceiver pr)
    Encodes raw H.265 packets into multiple RTP packets (fragments).
    static byte
    get_nal_type(byte[] packet, int offset)
    Returns NAL unit type.
    static byte
    get_nal_type_slice_flag(byte[] packet, int offset)
    Returns NAL unit and first_slice_segment_in_pic_flag.
    static CodecInfo
     
    boolean
    isFrame(byte this_type, byte next_type)
    Returns true only in last slice of key-frame or i-frame.
    boolean
    isIFrame(byte this_type, byte next_type)
    Returns true if any i-frame.
    boolean
    isKeyFrame(byte this_type, byte next_type)
    Returns true only in last slice of key-frame.
    boolean
    isStart(byte type)
     
    void
    setLog(int id)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RTPH265

      public RTPH265()
  • Method Details

    • setLog

      public void setLog(int id)
    • encode

      public void encode(byte[] data, int x, int y, int id, PacketReceiver pr)
      Encodes raw H.265 packets into multiple RTP packets (fragments). TODO : Use AP packets to increase efficiency.
      Specified by:
      encode in class RTPCodec
    • decode

      public void decode(byte[] rtp, int offset, int length, PacketReceiver pr)
      Combines RTP fragments into full H265 packets.
      Specified by:
      decode in class RTPCodec
    • 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

      public static CodecInfo getCodecInfo(Packet sps)