Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
24c14d6d
Commit
24c14d6d
authored
Jan 21, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify GUIDs
Originally committed as revision 7611 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
efbd19fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
61 deletions
+32
-61
asf-enc.c
libavformat/asf-enc.c
+2
-7
asf.c
libavformat/asf.c
+7
-26
asf.h
libavformat/asf.h
+23
-28
No files found.
libavformat/asf-enc.c
View file @
24c14d6d
...
...
@@ -200,13 +200,8 @@ static const uint8_t error_spread_ADPCM_G726[] = { 0x01, 0x90, 0x01, 0x90, 0x01,
static
void
put_guid
(
ByteIOContext
*
s
,
const
GUID
*
g
)
{
int
i
;
put_le32
(
s
,
g
->
v1
);
put_le16
(
s
,
g
->
v2
);
put_le16
(
s
,
g
->
v3
);
for
(
i
=
0
;
i
<
8
;
i
++
)
put_byte
(
s
,
g
->
v4
[
i
]);
assert
(
sizeof
(
*
g
)
==
16
);
put_buffer
(
s
,
g
,
sizeof
(
*
g
));
}
static
void
put_str16_nolen
(
ByteIOContext
*
s
,
const
char
*
tag
);
...
...
libavformat/asf.c
View file @
24c14d6d
...
...
@@ -31,7 +31,7 @@
// Fix Me! FRAME_HEADER_SIZE may be different.
static
const
GUID
index_guid
=
{
0x
33000890
,
0xe5b1
,
0x11cf
,
{
0x89
,
0xf4
,
0x00
,
0xa0
,
0xc9
,
0x03
,
0x49
,
0xcb
},
0x
90
,
0x08
,
0x00
,
0x33
,
0xb1
,
0xe5
,
0xcf
,
0x11
,
0x89
,
0xf4
,
0x00
,
0xa0
,
0xc9
,
0x03
,
0x49
,
0xcb
};
/**********************************/
...
...
@@ -69,9 +69,8 @@ static void print_guid(const GUID *g)
else
PRINT_IF_GUID
(
g
,
ext_stream_audio_stream
);
else
printf
(
"(GUID: unknown) "
);
printf
(
"0x%08x, 0x%04x, 0x%04x, {"
,
g
->
v1
,
g
->
v2
,
g
->
v3
);
for
(
i
=
0
;
i
<
8
;
i
++
)
printf
(
" 0x%02x,"
,
g
->
v4
[
i
]);
for
(
i
=
0
;
i
<
16
;
i
++
)
printf
(
" 0x%02x,"
,
(
*
g
)[
i
]);
printf
(
"}
\n
"
);
}
#undef PRINT_IF_GUID
...
...
@@ -79,13 +78,8 @@ static void print_guid(const GUID *g)
static
void
get_guid
(
ByteIOContext
*
s
,
GUID
*
g
)
{
int
i
;
g
->
v1
=
get_le32
(
s
);
g
->
v2
=
get_le16
(
s
);
g
->
v3
=
get_le16
(
s
);
for
(
i
=
0
;
i
<
8
;
i
++
)
g
->
v4
[
i
]
=
get_byte
(
s
);
assert
(
sizeof
(
*
g
)
==
16
);
get_buffer
(
s
,
g
,
sizeof
(
*
g
));
}
#if 0
...
...
@@ -119,24 +113,11 @@ static void get_str16_nolen(ByteIOContext *pb, int len, char *buf, int buf_size)
static
int
asf_probe
(
AVProbeData
*
pd
)
{
GUID
g
;
const
unsigned
char
*
p
;
int
i
;
/* check file header */
if
(
pd
->
buf_size
<=
32
)
return
0
;
p
=
pd
->
buf
;
g
.
v1
=
p
[
0
]
|
(
p
[
1
]
<<
8
)
|
(
p
[
2
]
<<
16
)
|
(
p
[
3
]
<<
24
);
p
+=
4
;
g
.
v2
=
p
[
0
]
|
(
p
[
1
]
<<
8
);
p
+=
2
;
g
.
v3
=
p
[
0
]
|
(
p
[
1
]
<<
8
);
p
+=
2
;
for
(
i
=
0
;
i
<
8
;
i
++
)
g
.
v4
[
i
]
=
*
p
++
;
if
(
!
memcmp
(
&
g
,
&
asf_header
,
sizeof
(
GUID
)))
if
(
!
memcmp
(
pd
->
buf
,
&
asf_header
,
sizeof
(
GUID
)))
return
AVPROBE_SCORE_MAX
;
else
return
0
;
...
...
libavformat/asf.h
View file @
24c14d6d
...
...
@@ -38,12 +38,7 @@ typedef struct {
}
ASFStream
;
typedef
struct
{
uint32_t
v1
;
uint16_t
v2
;
uint16_t
v3
;
uint8_t
v4
[
8
];
}
GUID
;
typedef
uint8_t
GUID
[
16
];
typedef
struct
{
GUID
guid
;
// generated by client computer
...
...
@@ -137,90 +132,90 @@ typedef struct {
}
ASFContext
;
static
const
GUID
asf_header
=
{
0x
75B22630
,
0x668E
,
0x11CF
,
{
0xA6
,
0xD9
,
0x00
,
0xAA
,
0x00
,
0x62
,
0xCE
,
0x6C
},
0x
30
,
0x26
,
0xB2
,
0x75
,
0x8E
,
0x66
,
0xCF
,
0x11
,
0xA6
,
0xD9
,
0x00
,
0xAA
,
0x00
,
0x62
,
0xCE
,
0x6C
};
static
const
GUID
file_header
=
{
0x
8CABDCA1
,
0xA947
,
0x11CF
,
{
0x8E
,
0xE4
,
0x00
,
0xC0
,
0x0C
,
0x20
,
0x53
,
0x65
},
0x
A1
,
0xDC
,
0xAB
,
0x8C
,
0x47
,
0xA9
,
0xCF
,
0x11
,
0x8E
,
0xE4
,
0x00
,
0xC0
,
0x0C
,
0x20
,
0x53
,
0x65
};
static
const
GUID
stream_header
=
{
0x
B7DC0791
,
0xA9B7
,
0x11CF
,
{
0x8E
,
0xE6
,
0x00
,
0xC0
,
0x0C
,
0x20
,
0x53
,
0x65
},
0x
91
,
0x07
,
0xDC
,
0xB7
,
0xB7
,
0xA9
,
0xCF
,
0x11
,
0x8E
,
0xE6
,
0x00
,
0xC0
,
0x0C
,
0x20
,
0x53
,
0x65
};
static
const
GUID
ext_stream_header
=
{
0x
14E6A5CB
,
0xC672
,
0x4332
,
{
0x83
,
0x99
,
0xA9
,
0x69
,
0x52
,
0x06
,
0x5B
,
0x5A
},
0x
CB
,
0xA5
,
0xE6
,
0x14
,
0x72
,
0xC6
,
0x32
,
0x43
,
0x83
,
0x99
,
0xA9
,
0x69
,
0x52
,
0x06
,
0x5B
,
0x5A
};
static
const
GUID
audio_stream
=
{
0x
F8699E40
,
0x5B4D
,
0x11CF
,
{
0xA8
,
0xFD
,
0x00
,
0x80
,
0x5F
,
0x5C
,
0x44
,
0x2B
},
0x
40
,
0x9E
,
0x69
,
0xF8
,
0x4D
,
0x5B
,
0xCF
,
0x11
,
0xA8
,
0xFD
,
0x00
,
0x80
,
0x5F
,
0x5C
,
0x44
,
0x2B
};
static
const
GUID
audio_conceal_none
=
{
// 0x4
9f1a440, 0x4ece, 0x11d0, { 0xa3, 0xac, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6 },
// 0x4
0, 0xa4, 0xf1, 0x49, 0x4ece, 0x11d0, 0xa3, 0xac, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6
// New value lifted from avifile
0x
20fb5700
,
0x5b55
,
0x11cf
,
{
0xa8
,
0xfd
,
0x00
,
0x80
,
0x5f
,
0x5c
,
0x44
,
0x2b
},
0x
00
,
0x57
,
0xfb
,
0x20
,
0x55
,
0x5B
,
0xCF
,
0x11
,
0xa8
,
0xfd
,
0x00
,
0x80
,
0x5f
,
0x5c
,
0x44
,
0x2b
};
static
const
GUID
audio_conceal_spread
=
{
0x
BFC3CD50
,
0x618F
,
0x11CF
,
{
0x8B
,
0xB2
,
0x00
,
0xAA
,
0x00
,
0xB4
,
0xE2
,
0x20
},
0x
50
,
0xCD
,
0xC3
,
0xBF
,
0x8F
,
0x61
,
0xCF
,
0x11
,
0x8B
,
0xB2
,
0x00
,
0xAA
,
0x00
,
0xB4
,
0xE2
,
0x20
};
static
const
GUID
video_stream
=
{
0x
BC19EFC0
,
0x5B4D
,
0x11CF
,
{
0xA8
,
0xFD
,
0x00
,
0x80
,
0x5F
,
0x5C
,
0x44
,
0x2B
},
0x
C0
,
0xEF
,
0x19
,
0xBC
,
0x4D
,
0x5B
,
0xCF
,
0x11
,
0xA8
,
0xFD
,
0x00
,
0x80
,
0x5F
,
0x5C
,
0x44
,
0x2B
};
static
const
GUID
video_conceal_none
=
{
0x
20FB5700
,
0x5B55
,
0x11CF
,
{
0xA8
,
0xFD
,
0x00
,
0x80
,
0x5F
,
0x5C
,
0x44
,
0x2B
},
0x
00
,
0x57
,
0xFB
,
0x20
,
0x55
,
0x5B
,
0xCF
,
0x11
,
0xA8
,
0xFD
,
0x00
,
0x80
,
0x5F
,
0x5C
,
0x44
,
0x2B
};
static
const
GUID
command_stream
=
{
0x
59DACFC0
,
0x59E6
,
0x11D0
,
{
0xA3
,
0xAC
,
0x00
,
0xA0
,
0xC9
,
0x03
,
0x48
,
0xF6
},
0x
C0
,
0xCF
,
0xDA
,
0x59
,
0xE6
,
0x59
,
0xD0
,
0x11
,
0xA3
,
0xAC
,
0x00
,
0xA0
,
0xC9
,
0x03
,
0x48
,
0xF6
};
static
const
GUID
comment_header
=
{
0x
75b22633
,
0x668e
,
0x11cf
,
{
0xa6
,
0xd9
,
0x00
,
0xaa
,
0x00
,
0x62
,
0xce
,
0x6c
},
0x
33
,
0x26
,
0xb2
,
0x75
,
0x8E
,
0x66
,
0xCF
,
0x11
,
0xa6
,
0xd9
,
0x00
,
0xaa
,
0x00
,
0x62
,
0xce
,
0x6c
};
static
const
GUID
codec_comment_header
=
{
0x
86D15240
,
0x311D
,
0x11D0
,
{
0xA3
,
0xA4
,
0x00
,
0xA0
,
0xC9
,
0x03
,
0x48
,
0xF6
},
0x
40
,
0x52
,
0xD1
,
0x86
,
0x1D
,
0x31
,
0xD0
,
0x11
,
0xA3
,
0xA4
,
0x00
,
0xA0
,
0xC9
,
0x03
,
0x48
,
0xF6
};
static
const
GUID
codec_comment1_header
=
{
0x
86d15241
,
0x311d
,
0x11d0
,
{
0xa3
,
0xa4
,
0x00
,
0xa0
,
0xc9
,
0x03
,
0x48
,
0xf6
},
0x
41
,
0x52
,
0xd1
,
0x86
,
0x1D
,
0x31
,
0xD0
,
0x11
,
0xa3
,
0xa4
,
0x00
,
0xa0
,
0xc9
,
0x03
,
0x48
,
0xf6
};
static
const
GUID
data_header
=
{
0x
75b22636
,
0x668e
,
0x11cf
,
{
0xa6
,
0xd9
,
0x00
,
0xaa
,
0x00
,
0x62
,
0xce
,
0x6c
},
0x
36
,
0x26
,
0xb2
,
0x75
,
0x8E
,
0x66
,
0xCF
,
0x11
,
0xa6
,
0xd9
,
0x00
,
0xaa
,
0x00
,
0x62
,
0xce
,
0x6c
};
static
const
GUID
head1_guid
=
{
0x
5fbf03b5
,
0xa92e
,
0x11cf
,
{
0x8e
,
0xe3
,
0x00
,
0xc0
,
0x0c
,
0x20
,
0x53
,
0x65
},
0x
b5
,
0x03
,
0xbf
,
0x5f
,
0x2E
,
0xA9
,
0xCF
,
0x11
,
0x8e
,
0xe3
,
0x00
,
0xc0
,
0x0c
,
0x20
,
0x53
,
0x65
};
static
const
GUID
head2_guid
=
{
0x
abd3d211
,
0xa9ba
,
0x11cf
,
{
0x8e
,
0xe6
,
0x00
,
0xc0
,
0x0c
,
0x20
,
0x53
,
0x65
},
0x
11
,
0xd2
,
0xd3
,
0xab
,
0xBA
,
0xA9
,
0xCF
,
0x11
,
0x8e
,
0xe6
,
0x00
,
0xc0
,
0x0c
,
0x20
,
0x53
,
0x65
};
static
const
GUID
extended_content_header
=
{
0x
D2D0A440
,
0xE307
,
0x11D2
,
{
0x97
,
0xF0
,
0x00
,
0xA0
,
0xC9
,
0x5E
,
0xA8
,
0x50
},
0x
40
,
0xA4
,
0xD0
,
0xD2
,
0x07
,
0xE3
,
0xD2
,
0x11
,
0x97
,
0xF0
,
0x00
,
0xA0
,
0xC9
,
0x5E
,
0xA8
,
0x50
};
static
const
GUID
simple_index_header
=
{
0x
33000890
,
0xE5B1
,
0x11CF
,
{
0x89
,
0xF4
,
0x00
,
0xA0
,
0xC9
,
0x03
,
0x49
,
0xCB
},
0x
90
,
0x08
,
0x00
,
0x33
,
0xB1
,
0xE5
,
0xCF
,
0x11
,
0x89
,
0xF4
,
0x00
,
0xA0
,
0xC9
,
0x03
,
0x49
,
0xCB
};
static
const
GUID
ext_stream_embed_stream_header
=
{
0x
3afb65e2
,
0x47ef
,
0x40f2
,
{
0xac
,
0x2c
,
0x70
,
0xa9
,
0x0d
,
0x71
,
0xd3
,
0x43
}
0x
e2
,
0x65
,
0xfb
,
0x3a
,
0xEF
,
0x47
,
0xF2
,
0x40
,
0xac
,
0x2c
,
0x70
,
0xa9
,
0x0d
,
0x71
,
0xd3
,
0x43
};
static
const
GUID
ext_stream_audio_stream
=
{
0x
31178c9d
,
0x03e1
,
0x4528
,
{
0xb5
,
0x82
,
0x3d
,
0xf9
,
0xdb
,
0x22
,
0xf5
,
0x03
}
0x
9d
,
0x8c
,
0x17
,
0x31
,
0xE1
,
0x03
,
0x28
,
0x45
,
0xb5
,
0x82
,
0x3d
,
0xf9
,
0xdb
,
0x22
,
0xf5
,
0x03
};
/* I am not a number !!! This GUID is the one found on the PC used to
generate the stream */
static
const
GUID
my_guid
=
{
0
,
0
,
0
,
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
#define ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT 0x80 //1000 0000
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment