最終更新:2015-02-20 (金) 13:59:32 (3324d)
UVC/ペイロードヘッダ
オフセット | フィールド | サイズ | 内容 | メモ |
0 | bHeaderLength | 1 | ||
1 | bmHeaderInfo | 1 | FID EOF PTS SCR RES STI ERR EOH | |
? | dwPresentationTime? | 4 | PTS | |
? | scrSourceClock? | 6 | SCR |
Bit Field Header (bmHeaderInfo)
- イメージ データのタイプ、ビデオ ストリームの状態、他のフィールドの有無を示す
FID Frame Identifier This bit toggles at each frame start boundary and stays constant for the rest of the frame. EOF End of Frame This bit indicates the end of a video frame and is set in the last video sample belonging to a frame. PTS Presentation Time Stamp This bit, when set, indicates the presence of a PTS field. SCR Source Clock Reference This bit, when set, indicates the presence of a SCR field. RES Reserved Set to 0 STI Still Image This bit, when set, identifies a video sample as belonging to a still image. ERR Error Bit This bit, when set, indicates an error in the device streaming. EOH End of Header This bit, when set, indicates the end of the BFH fields.
FID
- For frame-based formats, this bit toggles between 0 and 1 every time a new video frame begins.
- For stream-based formats, this bit toggles between 0 and 1 at the start of each new codec-specific segment.
EOF
- This bit is set if the following payload data marks the end of the current video or still image frame (for frame-based formats), or to indicate the end of a codec-specific segment (for stream-based formats).
Presentation time stamp (PTS) field
- The PTS field is present when the PTS bit is set in the BFH[0] field.
- システム時刻および USB のフレームの開始(SOF)トークン カウンタを示す
- The source clock time in native device clock units when the raw frame capture begins. This field may be repeated for multiple payload transfers comprising a single video frame, with the restriction that the value shall remain the same throughout that video frame.
Source clock reference (SCR) field
- The SCR field is present when the SCR bit is set in the BFH[0] field.
- ソース クロック時間をネイティブなデバイス クロック単位で示す
- D31..D0: Source Time Clock in native device clock units
- D42..D32: 1KHz SOF token counter
- D47..D43: Reserved, set to zero.
メモ
- PTSとSCRはLSB first(リトルエンディアン)
- 小さい桁のビット側から格納されている。
- 1フレームの転送の間にn回のトランザクションの転送が行われて、そのトランザクションのペイロードにヘッダが付く。(データは複数パケットにまたがる)
- 最後のUSB転送のときにEOFがセットされる