1
0

FLVStreamHeader.h 512 B

123456789101112131415161718192021222324252627
  1. #ifndef NULLSOFT_FLVSTREAMHEADER_H
  2. #define NULLSOFT_FLVSTREAMHEADER_H
  3. #include <bfc/platform/types.h>
  4. namespace FLV
  5. {
  6. enum
  7. {
  8. FRAME_TYPE_AUDIO = 0x8,
  9. FRAME_TYPE_VIDEO = 0x9,
  10. FRAME_TYPE_METADATA = 0x12,
  11. };
  12. }
  13. class FLVStreamHeader
  14. {
  15. public:
  16. bool Read(unsigned __int8 *data, size_t size); // size must be >=15, returns "true" if this was a valid header
  17. // attributes, consider these read-only
  18. uint32_t previousSize;
  19. uint8_t type;
  20. uint32_t dataSize;
  21. uint32_t timestamp;
  22. uint32_t streamID;
  23. };
  24. #endif