25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.3KB

  1. #ifndef _flv_proto_h_
  2. #define _flv_proto_h_
  3. // FLV Tag Type
  4. #define FLV_TYPE_AUDIO 8
  5. #define FLV_TYPE_VIDEO 9
  6. #define FLV_TYPE_SCRIPT 18
  7. // FLV Audio Type
  8. #define FLV_AUDIO_LPCM (0 << 4) // Linear PCM, platform endian
  9. #define FLV_AUDIO_ADPCM (1 << 4)
  10. #define FLV_AUDIO_MP3 (2 << 4)
  11. #define FLV_AUDIO_LLPCM (3 << 4) // Linear PCM, little endian
  12. #define FLV_AUDIO_G711A (7 << 4) // G711 A-law
  13. #define FLV_AUDIO_G711U (8 << 4) // G711 mu-law
  14. #define FLV_AUDIO_AAC (10 << 4)
  15. #define FLV_AUDIO_SPEEX (11 << 4)
  16. #define FLV_AUDIO_OPUS (13 << 4)
  17. #define FLV_AUDIO_MP3_8K (14 << 4) // MP3 8 kHz
  18. #define FLV_AUDIO_DEVIDE (15 << 4) // Device-specific sound
  19. #define FLV_AUDIO_ASC 0x100 // AudioSpecificConfig(ISO-14496-3)
  20. #define FLV_AUDIO_OPUS_HEAD 0x101 // opus-codec.org
  21. // FLV Video Type
  22. #define FLV_VIDEO_H263 2 // Sorenson H.263
  23. #define FLV_VIDEO_SCREEN 3 // Screen video
  24. #define FLV_VIDEO_VP6 4 // On2 VP6
  25. #define FLV_VIDEO_H264 7 // AVC
  26. #define FLV_VIDEO_H265 12 // https://github.com/CDN-Union/H265
  27. #define FLV_VIDEO_AV1 13 // https://aomediacodec.github.io/av1-isobmff
  28. #define FLV_VIDEO_AVCC 0x200 // AVCDecoderConfigurationRecord(ISO-14496-15)
  29. #define FLV_VIDEO_HVCC 0x201 // HEVCDecoderConfigurationRecord(ISO-14496-15)
  30. #define FLV_VIDEO_AV1C 0x202 // AV1CodecConfigurationRecord(av1-isobmff)
  31. #define FLV_SCRIPT_METADATA 0x300 // onMetaData
  32. enum
  33. {
  34. FLV_SEQUENCE_HEADER = 0, // AVC/AAC sequence header
  35. FLV_AVPACKET = 1, // AVC NALU / AAC raw
  36. FLV_END_OF_SEQUENCE = 2, // AVC end of sequence (lower level NALU sequence ender is not required or supported)
  37. };
  38. enum
  39. {
  40. FLV_VIDEO_KEY_FRAME = 1, // key frame (for AVC, a seekable frame)
  41. FLV_VIDEO_INTER_FRAME = 2, // inter frame (for AVC, a non-seekable frame)
  42. FLV_VIDEO_DISPOSABLE_INTER_FRAME = 3, // H.263 only
  43. FLV_VIDEO_GENERATED_KEY_FRAME = 4, // generated key frame (reserved for server use only)
  44. FLV_VIDEO_COMMAND_FRAME = 5, // video info/command frame
  45. };
  46. enum
  47. {
  48. FLV_SOUND_RATE_5500 = 0, // 5.5 kHz
  49. FLV_SOUND_RATE_11025 = 1, // 11 kHz
  50. FLV_SOUND_RATE_22050 = 2, // 22 kHz
  51. FLV_SOUND_RATE_44100 = 3, // 44 kHz
  52. };
  53. enum
  54. {
  55. FLV_SOUND_BIT_8 = 0, // 8-bit samples
  56. FLV_SOUND_BIT_16 = 1, // 16-bit samples
  57. };
  58. enum
  59. {
  60. FLV_SOUND_CHANNEL_MONO = 0, // 1-channel
  61. FLV_SOUND_CHANNEL_STEREO = 1, // 2-channels
  62. };
  63. #endif /* !_flv_proto_h_ */