[vlc-commits] Guid: rename fields to better match Microsoft usage
Jean-Baptiste Kempf
git at videolan.org
Sun Aug 28 02:10:11 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Aug 28 01:52:40 2011 +0200| [7c7037db99f14d74ebc08c6c9f6d8a2d1a89e60f] | committer: Jean-Baptiste Kempf
Guid: rename fields to better match Microsoft usage
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c7037db99f14d74ebc08c6c9f6d8a2d1a89e60f
---
modules/access/mms/asf.c | 8 ++++----
modules/access/mms/buffer.c | 8 ++++----
modules/demux/asf/libasf_guid.h | 34 +++++++++++++++++-----------------
3 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/modules/access/mms/asf.c b/modules/access/mms/asf.c
index b5e099a..0640cc0 100644
--- a/modules/access/mms/asf.c
+++ b/modules/access/mms/asf.c
@@ -33,10 +33,10 @@
void GenerateGuid ( guid_t *p_guid )
{
- p_guid->v1 = 0xbabac001;
- vlc_rand_bytes(&p_guid->v2, sizeof(p_guid->v2));
- vlc_rand_bytes(&p_guid->v3, sizeof(p_guid->v3));
- vlc_rand_bytes(p_guid->v4, sizeof(p_guid->v4));
+ p_guid->Data1 = 0xbabac001;
+ vlc_rand_bytes(&p_guid->Data2, sizeof(p_guid->Data2));
+ vlc_rand_bytes(&p_guid->Data3, sizeof(p_guid->Data3));
+ vlc_rand_bytes(p_guid->Data4, sizeof(p_guid->Data4));
}
void asf_HeaderParse ( asf_header_t *hdr,
diff --git a/modules/access/mms/buffer.c b/modules/access/mms/buffer.c
index 13eff95..b1e8747 100644
--- a/modules/access/mms/buffer.c
+++ b/modules/access/mms/buffer.c
@@ -213,12 +213,12 @@ void var_buffer_getguid( var_buffer_t *p_buf, guid_t *p_guid )
{
int i;
- p_guid->v1 = var_buffer_get32( p_buf );
- p_guid->v2 = var_buffer_get16( p_buf );
- p_guid->v3 = var_buffer_get16( p_buf );
+ p_guid->Data1 = var_buffer_get32( p_buf );
+ p_guid->Data2 = var_buffer_get16( p_buf );
+ p_guid->Data3 = var_buffer_get16( p_buf );
for( i = 0; i < 8; i++ )
{
- p_guid->v4[i] = var_buffer_get8( p_buf );
+ p_guid->Data4[i] = var_buffer_get8( p_buf );
}
}
diff --git a/modules/demux/asf/libasf_guid.h b/modules/demux/asf/libasf_guid.h
index 6dcf42b..d8e656b 100644
--- a/modules/demux/asf/libasf_guid.h
+++ b/modules/demux/asf/libasf_guid.h
@@ -28,19 +28,19 @@
*****************************************************************************/
typedef struct guid_s
{
- uint32_t v1; /* le */
- uint16_t v2; /* le */
- uint16_t v3; /* le */
- uint8_t v4[8];
+ uint32_t Data1; /* le */
+ uint16_t Data2; /* le */
+ uint16_t Data3; /* le */
+ uint8_t Data4[8];
} guid_t;
#define GUID_FMT "0x%x-0x%x-0x%x-0x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x"
#define GUID_PRINT( guid ) \
- (guid).v1, \
- (guid).v2, \
- (guid).v3, \
- (guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3], \
- (guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
+ (guid).Data1, \
+ (guid).Data2, \
+ (guid).Data3, \
+ (guid).Data4[0],(guid).Data4[1],(guid).Data4[2],(guid).Data4[3], \
+ (guid).Data4[4],(guid).Data4[5],(guid).Data4[6],(guid).Data4[7]
enum
{
@@ -226,18 +226,18 @@ static const guid_t asf_guid_audio_conceal_spread =
****************************************************************************/
static inline void ASF_GetGUID( guid_t *p_guid, const uint8_t *p_data )
{
- p_guid->v1 = GetDWLE( p_data );
- p_guid->v2 = GetWLE( p_data + 4);
- p_guid->v3 = GetWLE( p_data + 6);
- memcpy( p_guid->v4, p_data + 8, 8 );
+ p_guid->Data1 = GetDWLE( p_data );
+ p_guid->Data2 = GetWLE( p_data + 4);
+ p_guid->Data3 = GetWLE( p_data + 6);
+ memcpy( p_guid->Data4, p_data + 8, 8 );
}
static inline bool CmpGUID( const guid_t *p_guid1, const guid_t *p_guid2 )
{
- if( (p_guid1->v1 != p_guid2->v1 )||
- (p_guid1->v2 != p_guid2->v2 )||
- (p_guid1->v3 != p_guid2->v3 )||
- ( memcmp( p_guid1->v4, p_guid2->v4, 8 )) )
+ if( (p_guid1->Data1 != p_guid2->Data1 )||
+ (p_guid1->Data2 != p_guid2->Data2 )||
+ (p_guid1->Data3 != p_guid2->Data3 )||
+ ( memcmp( p_guid1->Data4, p_guid2->Data4, 8 )) )
{
return false;
}
More information about the vlc-commits
mailing list