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
862174ec
Commit
862174ec
authored
Jan 28, 2014
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move GUID-related objects to riffenc.c and riff.c.
This simplifies the following eac3-in-wav patch.
parent
4151b995
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
27 deletions
+27
-27
configure
configure
+1
-0
asf.h
libavformat/asf.h
+0
-2
asfenc.c
libavformat/asfenc.c
+0
-6
riff.c
libavformat/riff.c
+8
-0
riff.h
libavformat/riff.h
+2
-0
riffdec.c
libavformat/riffdec.c
+0
-8
riffenc.c
libavformat/riffenc.c
+16
-0
wtvenc.c
libavformat/wtvenc.c
+0
-11
No files found.
configure
View file @
862174ec
...
...
@@ -2247,6 +2247,7 @@ wav_demuxer_select="riffdec"
wav_muxer_select
=
"riffenc"
webm_muxer_select
=
"riffenc"
wtv_demuxer_select
=
"riffdec"
wtv_muxer_select
=
"riffenc"
xmv_demuxer_select
=
"riffdec"
xwma_demuxer_select
=
"riffdec"
...
...
libavformat/asf.h
View file @
862174ec
...
...
@@ -189,6 +189,4 @@ extern const AVMetadataConv ff_asf_metadata_conv[];
extern
AVInputFormat
ff_asf_demuxer
;
void
ff_put_guid
(
AVIOContext
*
s
,
const
ff_asf_guid
*
g
);
#endif
/* AVFORMAT_ASF_H */
libavformat/asfenc.c
View file @
862174ec
...
...
@@ -223,12 +223,6 @@ static const AVCodecTag codec_asf_bmp_tags[] = {
#define PREROLL_TIME 3100
void
ff_put_guid
(
AVIOContext
*
s
,
const
ff_asf_guid
*
g
)
{
av_assert0
(
sizeof
(
*
g
)
==
16
);
avio_write
(
s
,
*
g
,
sizeof
(
*
g
));
}
static
void
put_str16
(
AVIOContext
*
s
,
const
char
*
tag
)
{
int
len
;
...
...
libavformat/riff.c
View file @
862174ec
...
...
@@ -456,3 +456,11 @@ const struct AVCodecTag *avformat_get_riff_audio_tags(void)
{
return
ff_codec_wav_tags
;
}
const
AVCodecGuid
ff_codec_wav_guids
[]
=
{
{
AV_CODEC_ID_AC3
,
{
0x2C
,
0x80
,
0x6D
,
0xE0
,
0x46
,
0xDB
,
0xCF
,
0x11
,
0xB4
,
0xD1
,
0x00
,
0x80
,
0x5F
,
0x6C
,
0xBB
,
0xEA
}
},
{
AV_CODEC_ID_ATRAC3P
,
{
0xBF
,
0xAA
,
0x23
,
0xE9
,
0x58
,
0xCB
,
0x71
,
0x44
,
0xA1
,
0x19
,
0xFF
,
0xFA
,
0x01
,
0xE4
,
0xCE
,
0x62
}
},
{
AV_CODEC_ID_EAC3
,
{
0xAF
,
0x87
,
0xFB
,
0xA7
,
0x02
,
0x2D
,
0xFB
,
0x42
,
0xA4
,
0xD4
,
0x05
,
0xCD
,
0x93
,
0x84
,
0x3B
,
0xDD
}
},
{
AV_CODEC_ID_MP2
,
{
0x2B
,
0x80
,
0x6D
,
0xE0
,
0x46
,
0xDB
,
0xCF
,
0x11
,
0xB4
,
0xD1
,
0x00
,
0x80
,
0x5F
,
0x6C
,
0xBB
,
0xEA
}
},
{
AV_CODEC_ID_NONE
}
};
libavformat/riff.h
View file @
862174ec
...
...
@@ -92,6 +92,8 @@ static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
}
void
ff_get_guid
(
AVIOContext
*
s
,
ff_asf_guid
*
g
);
void
ff_put_guid
(
AVIOContext
*
s
,
const
ff_asf_guid
*
g
);
const
ff_asf_guid
*
get_codec_guid
(
enum
AVCodecID
id
,
const
AVCodecGuid
*
av_guid
);
enum
AVCodecID
ff_codec_guid_get_id
(
const
AVCodecGuid
*
guids
,
ff_asf_guid
guid
);
...
...
libavformat/riffdec.c
View file @
862174ec
...
...
@@ -29,14 +29,6 @@
#include "avio_internal.h"
#include "riff.h"
const
AVCodecGuid
ff_codec_wav_guids
[]
=
{
{
AV_CODEC_ID_AC3
,
{
0x2C
,
0x80
,
0x6D
,
0xE0
,
0x46
,
0xDB
,
0xCF
,
0x11
,
0xB4
,
0xD1
,
0x00
,
0x80
,
0x5F
,
0x6C
,
0xBB
,
0xEA
}
},
{
AV_CODEC_ID_ATRAC3P
,
{
0xBF
,
0xAA
,
0x23
,
0xE9
,
0x58
,
0xCB
,
0x71
,
0x44
,
0xA1
,
0x19
,
0xFF
,
0xFA
,
0x01
,
0xE4
,
0xCE
,
0x62
}
},
{
AV_CODEC_ID_EAC3
,
{
0xAF
,
0x87
,
0xFB
,
0xA7
,
0x02
,
0x2D
,
0xFB
,
0x42
,
0xA4
,
0xD4
,
0x05
,
0xCD
,
0x93
,
0x84
,
0x3B
,
0xDD
}
},
{
AV_CODEC_ID_MP2
,
{
0x2B
,
0x80
,
0x6D
,
0xE0
,
0x46
,
0xDB
,
0xCF
,
0x11
,
0xB4
,
0xD1
,
0x00
,
0x80
,
0x5F
,
0x6C
,
0xBB
,
0xEA
}
},
{
AV_CODEC_ID_NONE
}
};
void
ff_get_guid
(
AVIOContext
*
s
,
ff_asf_guid
*
g
)
{
av_assert0
(
sizeof
(
*
g
)
==
16
);
//compiler will optimize this out
...
...
libavformat/riffenc.c
View file @
862174ec
...
...
@@ -312,3 +312,19 @@ void ff_riff_write_info(AVFormatContext *s)
ff_riff_write_info_tag
(
s
->
pb
,
t
->
key
,
t
->
value
);
ff_end_tag
(
pb
,
list_pos
);
}
void
ff_put_guid
(
AVIOContext
*
s
,
const
ff_asf_guid
*
g
)
{
av_assert0
(
sizeof
(
*
g
)
==
16
);
avio_write
(
s
,
*
g
,
sizeof
(
*
g
));
}
const
ff_asf_guid
*
get_codec_guid
(
enum
AVCodecID
id
,
const
AVCodecGuid
*
av_guid
)
{
int
i
;
for
(
i
=
0
;
av_guid
[
i
].
id
!=
AV_CODEC_ID_NONE
;
i
++
)
{
if
(
id
==
av_guid
[
i
].
id
)
return
&
(
av_guid
[
i
].
guid
);
}
return
NULL
;
}
libavformat/wtvenc.c
View file @
862174ec
...
...
@@ -31,7 +31,6 @@
#include "avio_internal.h"
#include "internal.h"
#include "wtv.h"
#include "asf.h"
#define WTV_BIGSECTOR_SIZE (1 << WTV_BIGSECTOR_BITS)
#define INDEX_BASE 0x2
...
...
@@ -130,16 +129,6 @@ typedef struct {
#define write_pad(pb, size) ffio_fill(pb, 0, size)
static
const
ff_asf_guid
*
get_codec_guid
(
enum
AVCodecID
id
,
const
AVCodecGuid
*
av_guid
)
{
int
i
;
for
(
i
=
0
;
av_guid
[
i
].
id
!=
AV_CODEC_ID_NONE
;
i
++
)
{
if
(
id
==
av_guid
[
i
].
id
)
return
&
(
av_guid
[
i
].
guid
);
}
return
NULL
;
}
/**
* Write chunk header. If header chunk (0x80000000 set) then add to list of header chunks
*/
...
...
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