FLVHeader.h 410 B

123456789101112131415161718
  1. #ifndef NULLSOFT_FLVHEADER_H
  2. #define NULLSOFT_FLVHEADER_H
  3. #include <bfc/platform/types.h>
  4. class FLVHeader
  5. {
  6. public:
  7. FLVHeader() : version(0), hasAudio(0), hasVideo(0), headerSize(0) {}
  8. bool Read(uint8_t *data, size_t size); // size must be >=9, returns "true" if this was a valid header
  9. // attributes, consider these read-only
  10. uint8_t version;
  11. bool hasAudio, hasVideo;
  12. uint32_t headerSize;
  13. };
  14. #endif