blob: 29554feaeafe9658fce6e9aead1ef479745d8512
1 | /* ***** BEGIN LICENSE BLOCK ***** |
2 | * Source last modified: $Id: rv_format_info.h,v 1.1.1.1.2.1 2005/05/04 18:20:57 hubbe Exp $ |
3 | * |
4 | * REALNETWORKS CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM |
5 | * Portions Copyright (c) 1995-2005 RealNetworks, Inc. |
6 | * All Rights Reserved. |
7 | * |
8 | * The contents of this file, and the files included with this file, |
9 | * are subject to the current version of the Real Format Source Code |
10 | * Porting and Optimization License, available at |
11 | * https://helixcommunity.org/2005/license/realformatsource (unless |
12 | * RealNetworks otherwise expressly agrees in writing that you are |
13 | * subject to a different license). You may also obtain the license |
14 | * terms directly from RealNetworks. You may not use this file except |
15 | * in compliance with the Real Format Source Code Porting and |
16 | * Optimization License. There are no redistribution rights for the |
17 | * source code of this file. Please see the Real Format Source Code |
18 | * Porting and Optimization License for the rights, obligations and |
19 | * limitations governing use of the contents of the file. |
20 | * |
21 | * RealNetworks is the developer of the Original Code and owns the |
22 | * copyrights in the portions it created. |
23 | * |
24 | * This file, and the files included with this file, is distributed and |
25 | * made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, |
26 | * EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL |
27 | * SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF |
28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT |
29 | * OR NON-INFRINGEMENT. |
30 | * |
31 | * Technology Compatibility Kit Test Suite(s) Location: |
32 | * https://rarvcode-tck.helixcommunity.org |
33 | * |
34 | * Contributor(s): |
35 | * |
36 | * ***** END LICENSE BLOCK ***** */ |
37 | |
38 | #ifndef RV_FORMAT_INFO_H |
39 | #define RV_FORMAT_INFO_H |
40 | |
41 | #ifdef __cplusplus |
42 | extern "C" { |
43 | #endif /* #ifdef __cplusplus */ |
44 | |
45 | #include "helix_types.h" |
46 | |
47 | typedef struct rv_format_info_struct { |
48 | UINT32 ulLength; |
49 | UINT32 ulMOFTag; |
50 | UINT32 ulSubMOFTag; |
51 | UINT16 usWidth; |
52 | UINT16 usHeight; |
53 | UINT16 usBitCount; |
54 | UINT16 usPadWidth; |
55 | UINT16 usPadHeight; |
56 | UFIXED32 ufFramesPerSecond; |
57 | UINT32 ulOpaqueDataSize; |
58 | BYTE* pOpaqueData; |
59 | } rv_format_info; |
60 | |
61 | /* |
62 | * RV frame struct. |
63 | */ |
64 | typedef struct rv_segment_struct { |
65 | HXBOOL bIsValid; |
66 | UINT32 ulOffset; |
67 | } rv_segment; |
68 | |
69 | typedef struct rv_frame_struct { |
70 | UINT32 ulDataLen; |
71 | BYTE* pData; |
72 | UINT32 ulTimestamp; |
73 | UINT16 usSequenceNum; |
74 | UINT16 usFlags; |
75 | HXBOOL bLastPacket; |
76 | UINT32 ulNumSegments; |
77 | rv_segment* pSegment; |
78 | } rv_frame; |
79 | |
80 | #define BYTE_SWAP_UINT16(A) ((((UINT16)(A) & 0xff00) >> 8) | \ |
81 | (((UINT16)(A) & 0x00ff) << 8)) |
82 | #define BYTE_SWAP_UINT32(A) ((((UINT32)(A) & 0xff000000) >> 24) | \ |
83 | (((UINT32)(A) & 0x00ff0000) >> 8) | \ |
84 | (((UINT32)(A) & 0x0000ff00) << 8) | \ |
85 | (((UINT32)(A) & 0x000000ff) << 24)) |
86 | |
87 | #ifdef __cplusplus |
88 | } |
89 | #endif /* #ifdef __cplusplus */ |
90 | |
91 | #endif /* #ifndef RV_FORMAT_INFO_H */ |
92 |