Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5edb2329
Commit
5edb2329
authored
May 01, 2011
by
zhentan feng
Committed by
Michael Niedermayer
May 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WTV: Add ff_ prefix to the moved fields.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5ab826c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
31 deletions
+31
-31
wtv.c
libavformat/wtv.c
+9
-9
wtv.h
libavformat/wtv.h
+9
-9
wtvdec.c
libavformat/wtvdec.c
+13
-13
No files found.
libavformat/wtv.c
View file @
5edb2329
...
...
@@ -22,24 +22,24 @@
#include "wtv.h"
/* WTV GUIDs*/
const
ff_asf_guid
dir_entry_guid
=
const
ff_asf_guid
ff_
dir_entry_guid
=
{
0x92
,
0xB7
,
0x74
,
0x91
,
0x59
,
0x70
,
0x70
,
0x44
,
0x88
,
0xDF
,
0x06
,
0x3B
,
0x82
,
0xCC
,
0x21
,
0x3D
};
const
ff_asf_guid
wtv_guid
=
const
ff_asf_guid
ff_
wtv_guid
=
{
0xB7
,
0xD8
,
0x00
,
0x20
,
0x37
,
0x49
,
0xDA
,
0x11
,
0xA6
,
0x4E
,
0x00
,
0x07
,
0xE9
,
0x5E
,
0xAD
,
0x8D
};
const
ff_asf_guid
timestamp_guid
=
const
ff_asf_guid
ff_
timestamp_guid
=
{
0x5B
,
0x05
,
0xE6
,
0x1B
,
0x97
,
0xA9
,
0x49
,
0x43
,
0x88
,
0x17
,
0x1A
,
0x65
,
0x5A
,
0x29
,
0x8A
,
0x97
};
const
ff_asf_guid
data_guid
=
const
ff_asf_guid
ff_
data_guid
=
{
0x95
,
0xC3
,
0xD2
,
0xC2
,
0x7E
,
0x9A
,
0xDA
,
0x11
,
0x8B
,
0xF7
,
0x00
,
0x07
,
0xE9
,
0x5E
,
0xAD
,
0x8D
};
const
ff_asf_guid
stream_guid
=
const
ff_asf_guid
ff_
stream_guid
=
{
0xED
,
0xA4
,
0x13
,
0x23
,
0x2D
,
0xBF
,
0x4F
,
0x45
,
0xAD
,
0x8A
,
0xD9
,
0x5B
,
0xA7
,
0xF9
,
0x1F
,
0xEE
};
const
ff_asf_guid
mediatype_audio
=
const
ff_asf_guid
ff_
mediatype_audio
=
{
'a'
,
'u'
,
'd'
,
's'
,
FF_MEDIASUBTYPE_BASE_GUID
};
const
ff_asf_guid
mediatype_video
=
const
ff_asf_guid
ff_
mediatype_video
=
{
'v'
,
'i'
,
'd'
,
's'
,
FF_MEDIASUBTYPE_BASE_GUID
};
const
ff_asf_guid
format_none
=
const
ff_asf_guid
f
f_f
ormat_none
=
{
0xD6
,
0x17
,
0x64
,
0x0F
,
0x18
,
0xC3
,
0xD0
,
0x11
,
0xA4
,
0x3F
,
0x00
,
0xA0
,
0xC9
,
0x22
,
0x31
,
0x96
};
const
AVCodecGuid
video_guids
[]
=
{
const
AVCodecGuid
ff_
video_guids
[]
=
{
{
CODEC_ID_MPEG2VIDEO
,
{
0x26
,
0x80
,
0x6D
,
0xE0
,
0x46
,
0xDB
,
0xCF
,
0x11
,
0xB4
,
0xD1
,
0x00
,
0x80
,
0x5F
,
0x6C
,
0xBB
,
0xEA
}},
{
CODEC_ID_NONE
}
};
libavformat/wtv.h
View file @
5edb2329
...
...
@@ -29,13 +29,13 @@
#define WTV_SECTOR_SIZE (1 << WTV_SECTOR_BITS)
#define WTV_BIGSECTOR_BITS 18
extern
const
ff_asf_guid
dir_entry_guid
;
extern
const
ff_asf_guid
wtv_guid
;
extern
const
ff_asf_guid
timestamp_guid
;
extern
const
ff_asf_guid
data_guid
;
extern
const
ff_asf_guid
stream_guid
;
extern
const
ff_asf_guid
mediatype_audio
;
extern
const
ff_asf_guid
mediatype_video
;
extern
const
ff_asf_guid
format_none
;
extern
const
AVCodecGuid
video_guids
[];
extern
const
ff_asf_guid
ff_
dir_entry_guid
;
extern
const
ff_asf_guid
ff_
wtv_guid
;
extern
const
ff_asf_guid
ff_
timestamp_guid
;
extern
const
ff_asf_guid
ff_
data_guid
;
extern
const
ff_asf_guid
ff_
stream_guid
;
extern
const
ff_asf_guid
ff_
mediatype_audio
;
extern
const
ff_asf_guid
ff_
mediatype_video
;
extern
const
ff_asf_guid
f
f_f
ormat_none
;
extern
const
AVCodecGuid
ff_
video_guids
[];
#endif
/* AVFORMAT_WTV_H */
libavformat/wtvdec.c
View file @
5edb2329
...
...
@@ -252,7 +252,7 @@ static AVIOContext * wtvfile_open2(AVFormatContext *s, const uint8_t *buf, int b
int
dir_length
,
name_size
,
first_sector
,
depth
;
uint64_t
file_length
;
const
uint8_t
*
name
;
if
(
ff_guidcmp
(
buf
,
dir_entry_guid
))
{
if
(
ff_guidcmp
(
buf
,
ff_
dir_entry_guid
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"unknown guid "
FF_PRI_GUID
", expected dir_entry_guid; "
"remaining directory entries ignored
\n
"
,
FF_ARG_GUID
(
buf
));
break
;
...
...
@@ -375,7 +375,7 @@ static const ff_asf_guid format_mpeg2_video =
static
int
read_probe
(
AVProbeData
*
p
)
{
return
ff_guidcmp
(
p
->
buf
,
wtv_guid
)
?
0
:
AVPROBE_SCORE_MAX
;
return
ff_guidcmp
(
p
->
buf
,
ff_
wtv_guid
)
?
0
:
AVPROBE_SCORE_MAX
;
}
/**
...
...
@@ -613,7 +613,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
st
=
parse_media_type
(
s
,
st
,
sid
,
mediatype
,
actual_subtype
,
actual_formattype
,
size
-
32
);
avio_skip
(
pb
,
32
);
return
st
;
}
else
if
(
!
ff_guidcmp
(
mediatype
,
mediatype_audio
))
{
}
else
if
(
!
ff_guidcmp
(
mediatype
,
ff_
mediatype_audio
))
{
st
=
new_stream
(
s
,
st
,
sid
,
AVMEDIA_TYPE_AUDIO
);
if
(
!
st
)
return
NULL
;
...
...
@@ -622,7 +622,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
if
(
ret
<
0
)
return
NULL
;
}
else
{
if
(
ff_guidcmp
(
formattype
,
format_none
))
if
(
ff_guidcmp
(
formattype
,
f
f_f
ormat_none
))
av_log
(
s
,
AV_LOG_WARNING
,
"unknown formattype:"
FF_PRI_GUID
"
\n
"
,
FF_ARG_GUID
(
formattype
));
avio_skip
(
pb
,
size
);
}
...
...
@@ -640,7 +640,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
av_log
(
s
,
AV_LOG_WARNING
,
"unknown subtype:"
FF_PRI_GUID
"
\n
"
,
FF_ARG_GUID
(
subtype
));
}
return
st
;
}
else
if
(
!
ff_guidcmp
(
mediatype
,
mediatype_video
))
{
}
else
if
(
!
ff_guidcmp
(
mediatype
,
ff_
mediatype_video
))
{
st
=
new_stream
(
s
,
st
,
sid
,
AVMEDIA_TYPE_VIDEO
);
if
(
!
st
)
return
NULL
;
...
...
@@ -651,7 +651,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
int
consumed
=
parse_videoinfoheader2
(
s
,
st
);
avio_skip
(
pb
,
FFMAX
(
size
-
consumed
,
0
));
}
else
{
if
(
ff_guidcmp
(
formattype
,
format_none
))
if
(
ff_guidcmp
(
formattype
,
f
f_f
ormat_none
))
av_log
(
s
,
AV_LOG_WARNING
,
"unknown formattype:"
FF_PRI_GUID
"
\n
"
,
FF_ARG_GUID
(
formattype
));
avio_skip
(
pb
,
size
);
}
...
...
@@ -659,7 +659,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
if
(
!
memcmp
(
subtype
+
4
,
(
const
uint8_t
[]){
FF_MEDIASUBTYPE_BASE_GUID
},
12
))
{
st
->
codec
->
codec_id
=
ff_codec_get_id
(
ff_codec_bmp_tags
,
AV_RL32
(
subtype
));
}
else
{
st
->
codec
->
codec_id
=
ff_codec_guid_get_id
(
video_guids
,
subtype
);
st
->
codec
->
codec_id
=
ff_codec_guid_get_id
(
ff_
video_guids
,
subtype
);
}
if
(
st
->
codec
->
codec_id
==
CODEC_ID_NONE
)
av_log
(
s
,
AV_LOG_WARNING
,
"unknown subtype:"
FF_PRI_GUID
"
\n
"
,
FF_ARG_GUID
(
subtype
));
...
...
@@ -669,7 +669,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
st
=
new_stream
(
s
,
st
,
sid
,
AVMEDIA_TYPE_SUBTITLE
);
if
(
!
st
)
return
NULL
;
if
(
ff_guidcmp
(
formattype
,
format_none
))
if
(
ff_guidcmp
(
formattype
,
f
f_f
ormat_none
))
av_log
(
s
,
AV_LOG_WARNING
,
"unknown formattype:"
FF_PRI_GUID
"
\n
"
,
FF_ARG_GUID
(
formattype
));
avio_skip
(
pb
,
size
);
st
->
codec
->
codec_id
=
CODEC_ID_DVB_SUBTITLE
;
...
...
@@ -679,14 +679,14 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
st
=
new_stream
(
s
,
st
,
sid
,
AVMEDIA_TYPE_SUBTITLE
);
if
(
!
st
)
return
NULL
;
if
(
ff_guidcmp
(
formattype
,
format_none
))
if
(
ff_guidcmp
(
formattype
,
f
f_f
ormat_none
))
av_log
(
s
,
AV_LOG_WARNING
,
"unknown formattype:"
FF_PRI_GUID
"
\n
"
,
FF_ARG_GUID
(
formattype
));
avio_skip
(
pb
,
size
);
st
->
codec
->
codec_id
=
CODEC_ID_DVB_TELETEXT
;
return
st
;
}
else
if
(
!
ff_guidcmp
(
mediatype
,
mediatype_mpeg2_sections
)
&&
!
ff_guidcmp
(
subtype
,
mediasubtype_mpeg2_sections
))
{
if
(
ff_guidcmp
(
formattype
,
format_none
))
if
(
ff_guidcmp
(
formattype
,
f
f_f
ormat_none
))
av_log
(
s
,
AV_LOG_WARNING
,
"unknown formattype:"
FF_PRI_GUID
"
\n
"
,
FF_ARG_GUID
(
formattype
));
avio_skip
(
pb
,
size
);
return
NULL
;
...
...
@@ -727,7 +727,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
avio_skip
(
pb
,
8
);
consumed
=
32
;
if
(
!
ff_guidcmp
(
g
,
stream_guid
))
{
if
(
!
ff_guidcmp
(
g
,
ff_
stream_guid
))
{
if
(
ff_find_stream_index
(
s
,
sid
)
<
0
)
{
ff_asf_guid
mediatype
,
subtype
,
formattype
;
int
size
;
...
...
@@ -816,7 +816,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
}
consumed
+=
15
;
}
}
else
if
(
!
ff_guidcmp
(
g
,
timestamp_guid
))
{
}
else
if
(
!
ff_guidcmp
(
g
,
ff_
timestamp_guid
))
{
int
stream_index
=
ff_find_stream_index
(
s
,
sid
);
if
(
stream_index
>=
0
)
{
avio_skip
(
pb
,
8
);
...
...
@@ -835,7 +835,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
}
}
}
}
else
if
(
!
ff_guidcmp
(
g
,
data_guid
))
{
}
else
if
(
!
ff_guidcmp
(
g
,
ff_
data_guid
))
{
int
stream_index
=
ff_find_stream_index
(
s
,
sid
);
if
(
mode
==
SEEK_TO_DATA
&&
stream_index
>=
0
&&
len
>
32
)
{
WtvStream
*
wst
=
s
->
streams
[
stream_index
]
->
priv_data
;
...
...
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