mirror of https://bitbucket.org/ausocean/av.git
rtmp: added all consts/flags from C library
This commit is contained in:
parent
b846dbf2d7
commit
bd630fd893
|
@ -39,17 +39,19 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RTMP_PACKET_TYPE_CHUNK_SIZE = 0x01
|
RTMP_PACKET_TYPE_CHUNK_SIZE = 0x01
|
||||||
RTMP_PACKET_TYPE_BYTES_READ_REPORT = 0x03
|
RTMP_PACKET_TYPE_BYTES_READ_REPORT = 0x03
|
||||||
RTMP_PACKET_TYPE_CONTROL = 0x04
|
RTMP_PACKET_TYPE_CONTROL = 0x04
|
||||||
RTMP_PACKET_TYPE_SERVER_BW = 0x05
|
RTMP_PACKET_TYPE_SERVER_BW = 0x05
|
||||||
RTMP_PACKET_TYPE_CLIENT_BW = 0x06
|
RTMP_PACKET_TYPE_CLIENT_BW = 0x06
|
||||||
RTMP_PACKET_TYPE_AUDIO = 0x08
|
RTMP_PACKET_TYPE_AUDIO = 0x08
|
||||||
RTMP_PACKET_TYPE_VIDEO = 0x09
|
RTMP_PACKET_TYPE_VIDEO = 0x09
|
||||||
RTMP_PACKET_TYPE_FLEX_MESSAGE = 0x11
|
RTMP_PACKET_TYPE_FLEX_STREAM_SEND = 0x0F
|
||||||
RTMP_PACKET_TYPE_INFO = 0x12
|
RTMP_PACKET_TYPE_FLEX_SHARED_OBJECT = 0x10
|
||||||
RTMP_PACKET_TYPE_INVOKE = 0x14
|
RTMP_PACKET_TYPE_FLEX_MESSAGE = 0x11
|
||||||
RTMP_PACKET_TYPE_FLASH_VIDEO = 0x16
|
RTMP_PACKET_TYPE_INFO = 0x12
|
||||||
|
RTMP_PACKET_TYPE_INVOKE = 0x14
|
||||||
|
RTMP_PACKET_TYPE_FLASH_VIDEO = 0x16
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -58,16 +60,25 @@ const (
|
||||||
RTMP_PACKET_SIZE_SMALL = 2
|
RTMP_PACKET_SIZE_SMALL = 2
|
||||||
RTMP_PACKET_SIZE_MINIMUM = 3
|
RTMP_PACKET_SIZE_MINIMUM = 3
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RTMP_READ_HEADER = 0x01
|
RTMP_READ_HEADER = 0x01
|
||||||
RTMP_READ_SEEKING = 0x2
|
RTMP_READ_RESUME = 0x02
|
||||||
|
RTMP_READ_NO_IGNORE = 0x04
|
||||||
|
RTMP_READ_GOTKF = 0x08
|
||||||
|
RTMP_READ_GOTFLVK = 0x10
|
||||||
|
RTMP_READ_SEEKING = 0x20
|
||||||
|
RTMP_READ_COMPLETE = -3
|
||||||
|
RTMP_READ_ERROR = -2
|
||||||
|
RTMP_READ_EOF = -1
|
||||||
|
RTMP_READ_IGNORE = 0
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RTMP_LF_AUTH = 0x0001 /* using auth param */
|
RTMP_LF_AUTH = 0x0001 /* using auth param */
|
||||||
RTMP_LF_LIVE = 0x0002 /* stream is live */
|
RTMP_LF_LIVE = 0x0002 /* stream is live */
|
||||||
|
RTMP_LF_SWFV = 0x0004 /* do SWF verification */
|
||||||
RTMP_LF_PLST = 0x0008 /* send playlist before play */
|
RTMP_LF_PLST = 0x0008 /* send playlist before play */
|
||||||
|
RTMP_LF_BUFX = 0x0010 /* toggle stream on BufferEmpty msg */
|
||||||
RTMP_LF_FTCU = 0x0020 /* free tcUrl on close */
|
RTMP_LF_FTCU = 0x0020 /* free tcUrl on close */
|
||||||
RTMP_LF_FAPU = 0x0040 /* free app on close */
|
RTMP_LF_FAPU = 0x0040 /* free app on close */
|
||||||
)
|
)
|
||||||
|
@ -78,6 +89,7 @@ const (
|
||||||
RTMP_FEATURE_SSL = 0x04
|
RTMP_FEATURE_SSL = 0x04
|
||||||
RTMP_FEATURE_MFP = 0x08 /* not yet supported */
|
RTMP_FEATURE_MFP = 0x08 /* not yet supported */
|
||||||
RTMP_FEATURE_WRITE = 0x10 /* publish, not play */
|
RTMP_FEATURE_WRITE = 0x10 /* publish, not play */
|
||||||
|
RTMP_FEATURE_HTTP2 = 0x20 /* server-side rtmpt */
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -133,7 +145,7 @@ type C_RTMPSockBuf struct {
|
||||||
sb_ssl uintptr
|
sb_ssl uintptr
|
||||||
}
|
}
|
||||||
|
|
||||||
// #define RTMPPacket_IsReady(a)
|
// RTMPPacket_IsReady(a)
|
||||||
// rtmp.h +142
|
// rtmp.h +142
|
||||||
func C_RTMPPacket_IsReady(p *C_RTMPPacket) int {
|
func C_RTMPPacket_IsReady(p *C_RTMPPacket) int {
|
||||||
if p.m_nBytesRead == p.m_nBodySize {
|
if p.m_nBytesRead == p.m_nBodySize {
|
||||||
|
|
Loading…
Reference in New Issue