1
0

FLVVideoHeader.h 797 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef NULLSOFT_FLVVIDEOHEADER_H
  2. #define NULLSOFT_FLVVIDEOHEADER_H
  3. namespace FLV
  4. {
  5. const int VIDEO_FORMAT_JPEG = 1;
  6. const int VIDEO_FORMAT_SORENSON = 2; // H.263
  7. const int VIDEO_FORMAT_SCREEN = 3;
  8. const int VIDEO_FORMAT_VP6 = 4;
  9. const int VIDEO_FORMAT_VP62 = 5;
  10. const int VIDEO_FORMAT_SCREEN_V2 = 6;
  11. const int VIDEO_FORMAT_AVC = 7; // MPEG-4 Part 10
  12. const int VIDEO_FRAMETYPE_KEYFRAME = 1;
  13. const int VIDEO_FRAMETYPE_IFRAME = 2;
  14. const int VIDEO_FRAMETYPE_IFRAME_DISPOSABLE = 3;
  15. const int VIDEO_FRAMETYPE_GENERATED = 4;
  16. const int VIDEO_FRAMETYPE_INFO = 5;
  17. };
  18. class FLVVideoHeader
  19. {
  20. public:
  21. bool Read(unsigned __int8 *data, size_t size); // size must be >=1, returns "true" if this was a valid header
  22. // attributes, consider these read-only
  23. int format;
  24. int frameType;
  25. };
  26. #endif