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
42b5a6f6
Commit
42b5a6f6
authored
Nov 05, 2011
by
Peter Ross
Committed by
Michael Niedermayer
Nov 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtvenc: use ff_put_guid and remove local copy of this function
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b7c9512f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
18 deletions
+13
-18
Makefile
libavformat/Makefile
+1
-1
wtvenc.c
libavformat/wtvenc.c
+12
-17
No files found.
libavformat/Makefile
View file @
42b5a6f6
...
@@ -317,7 +317,7 @@ OBJS-$(CONFIG_WSAUD_DEMUXER) += westwood.o
...
@@ -317,7 +317,7 @@ OBJS-$(CONFIG_WSAUD_DEMUXER) += westwood.o
OBJS-$(CONFIG_WSVQA_DEMUXER)
+=
westwood.o
OBJS-$(CONFIG_WSVQA_DEMUXER)
+=
westwood.o
OBJS-$(CONFIG_WTV_DEMUXER)
+=
wtvdec.o
wtv.o
asfdec.o
asf.o
asfcrypt.o
\
OBJS-$(CONFIG_WTV_DEMUXER)
+=
wtvdec.o
wtv.o
asfdec.o
asf.o
asfcrypt.o
\
avlanguage.o
mpegts.o
isom.o
riff.o
avlanguage.o
mpegts.o
isom.o
riff.o
OBJS-$(CONFIG_WTV_MUXER)
+=
wtvenc.o
wtv.o
asf.o
riff.o
OBJS-$(CONFIG_WTV_MUXER)
+=
wtvenc.o
wtv.o
asf.o
asfenc.o
riff.o
OBJS-$(CONFIG_WV_DEMUXER)
+=
wv.o
apetag.o
OBJS-$(CONFIG_WV_DEMUXER)
+=
wv.o
apetag.o
OBJS-$(CONFIG_XA_DEMUXER)
+=
xa.o
OBJS-$(CONFIG_XA_DEMUXER)
+=
xa.o
OBJS-$(CONFIG_XBIN_DEMUXER)
+=
bintext.o
sauce.o
OBJS-$(CONFIG_XBIN_DEMUXER)
+=
bintext.o
sauce.o
...
...
libavformat/wtvenc.c
View file @
42b5a6f6
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "avformat.h"
#include "avformat.h"
#include "internal.h"
#include "internal.h"
#include "wtv.h"
#include "wtv.h"
#include "asf.h"
#define WTV_BIGSECTOR_SIZE (1 << WTV_BIGSECTOR_BITS)
#define WTV_BIGSECTOR_SIZE (1 << WTV_BIGSECTOR_BITS)
#define INDEX_BASE 0x2
#define INDEX_BASE 0x2
...
@@ -112,12 +113,6 @@ static int write_pad(AVIOContext *pb, int size)
...
@@ -112,12 +113,6 @@ static int write_pad(AVIOContext *pb, int size)
return
0
;
return
0
;
}
}
static
void
put_guid
(
AVIOContext
*
s
,
const
ff_asf_guid
*
g
)
{
assert
(
sizeof
(
*
g
)
==
16
);
avio_write
(
s
,
*
g
,
sizeof
(
*
g
));
}
static
const
ff_asf_guid
*
get_codec_guid
(
enum
CodecID
id
,
const
AVCodecGuid
*
av_guid
)
static
const
ff_asf_guid
*
get_codec_guid
(
enum
CodecID
id
,
const
AVCodecGuid
*
av_guid
)
{
{
int
i
;
int
i
;
...
@@ -137,7 +132,7 @@ static void write_chunk_header(AVFormatContext *s, const ff_asf_guid *guid, int
...
@@ -137,7 +132,7 @@ static void write_chunk_header(AVFormatContext *s, const ff_asf_guid *guid, int
AVIOContext
*
pb
=
s
->
pb
;
AVIOContext
*
pb
=
s
->
pb
;
wctx
->
last_chunk_pos
=
avio_tell
(
pb
)
-
wctx
->
timeline_start_pos
;
wctx
->
last_chunk_pos
=
avio_tell
(
pb
)
-
wctx
->
timeline_start_pos
;
put_guid
(
pb
,
guid
);
ff_
put_guid
(
pb
,
guid
);
avio_wl32
(
pb
,
32
+
length
);
avio_wl32
(
pb
,
32
+
length
);
avio_wl32
(
pb
,
stream_id
);
avio_wl32
(
pb
,
stream_id
);
avio_wl64
(
pb
,
wctx
->
serial
);
avio_wl64
(
pb
,
wctx
->
serial
);
...
@@ -190,7 +185,7 @@ static void write_index(AVFormatContext *s)
...
@@ -190,7 +185,7 @@ static void write_index(AVFormatContext *s)
for
(
i
=
0
;
i
<
wctx
->
nb_index
;
i
++
)
{
for
(
i
=
0
;
i
<
wctx
->
nb_index
;
i
++
)
{
WtvChunkEntry
*
t
=
wctx
->
index
+
i
;
WtvChunkEntry
*
t
=
wctx
->
index
+
i
;
put_guid
(
pb
,
t
->
guid
);
ff_
put_guid
(
pb
,
t
->
guid
);
avio_wl64
(
pb
,
t
->
pos
);
avio_wl64
(
pb
,
t
->
pos
);
avio_wl32
(
pb
,
t
->
stream_id
);
avio_wl32
(
pb
,
t
->
stream_id
);
avio_wl32
(
pb
,
0
);
// checksum?
avio_wl32
(
pb
,
0
);
// checksum?
...
@@ -234,10 +229,10 @@ static int write_stream_codec_info(AVFormatContext *s, AVStream *st)
...
@@ -234,10 +229,10 @@ static int write_stream_codec_info(AVFormatContext *s, AVStream *st)
return
-
1
;
return
-
1
;
}
}
put_guid
(
pb
,
media_type
);
// mediatype
ff_
put_guid
(
pb
,
media_type
);
// mediatype
put_guid
(
pb
,
&
ff_mediasubtype_cpfilters_processed
);
// subtype
ff_
put_guid
(
pb
,
&
ff_mediasubtype_cpfilters_processed
);
// subtype
write_pad
(
pb
,
12
);
write_pad
(
pb
,
12
);
put_guid
(
pb
,
&
ff_format_cpfilters_processed
);
// format type
ff_
put_guid
(
pb
,
&
ff_format_cpfilters_processed
);
// format type
avio_wl32
(
pb
,
0
);
// size
avio_wl32
(
pb
,
0
);
// size
hdr_pos_start
=
avio_tell
(
pb
);
hdr_pos_start
=
avio_tell
(
pb
);
...
@@ -258,8 +253,8 @@ static int write_stream_codec_info(AVFormatContext *s, AVStream *st)
...
@@ -258,8 +253,8 @@ static int write_stream_codec_info(AVFormatContext *s, AVStream *st)
avio_seek
(
pb
,
-
(
hdr_size
+
4
),
SEEK_CUR
);
avio_seek
(
pb
,
-
(
hdr_size
+
4
),
SEEK_CUR
);
avio_wl32
(
pb
,
hdr_size
+
32
);
avio_wl32
(
pb
,
hdr_size
+
32
);
avio_seek
(
pb
,
hdr_size
,
SEEK_CUR
);
avio_seek
(
pb
,
hdr_size
,
SEEK_CUR
);
put_guid
(
pb
,
g
);
// actual_subtype
ff_
put_guid
(
pb
,
g
);
// actual_subtype
put_guid
(
pb
,
format_type
);
// actual_formattype
ff_
put_guid
(
pb
,
format_type
);
// actual_formattype
return
0
;
return
0
;
}
}
...
@@ -344,8 +339,8 @@ static int write_header(AVFormatContext *s)
...
@@ -344,8 +339,8 @@ static int write_header(AVFormatContext *s)
int
i
,
pad
,
ret
;
int
i
,
pad
,
ret
;
AVStream
*
st
;
AVStream
*
st
;
put_guid
(
pb
,
&
ff_wtv_guid
);
ff_
put_guid
(
pb
,
&
ff_wtv_guid
);
put_guid
(
pb
,
&
sub_wtv_guid
);
ff_
put_guid
(
pb
,
&
sub_wtv_guid
);
avio_wl32
(
pb
,
0x01
);
avio_wl32
(
pb
,
0x01
);
avio_wl32
(
pb
,
0x02
);
avio_wl32
(
pb
,
0x02
);
...
@@ -498,7 +493,7 @@ static int write_root_table(AVFormatContext *s, int64_t sector_pos)
...
@@ -498,7 +493,7 @@ static int write_root_table(AVFormatContext *s, int64_t sector_pos)
int
len
=
0
;
int
len
=
0
;
int64_t
len_pos
;
int64_t
len_pos
;
put_guid
(
pb
,
&
ff_dir_entry_guid
);
ff_
put_guid
(
pb
,
&
ff_dir_entry_guid
);
len_pos
=
avio_tell
(
pb
);
len_pos
=
avio_tell
(
pb
);
avio_wl16
(
pb
,
40
+
h
->
header_size
+
filename_padding
+
8
);
// maybe updated later
avio_wl16
(
pb
,
40
+
h
->
header_size
+
filename_padding
+
8
);
// maybe updated later
write_pad
(
pb
,
6
);
write_pad
(
pb
,
6
);
...
@@ -572,7 +567,7 @@ static void write_table_entries_events(AVFormatContext *s)
...
@@ -572,7 +567,7 @@ static void write_table_entries_events(AVFormatContext *s)
static
void
write_tag
(
AVIOContext
*
pb
,
const
char
*
key
,
const
char
*
value
)
static
void
write_tag
(
AVIOContext
*
pb
,
const
char
*
key
,
const
char
*
value
)
{
{
put_guid
(
pb
,
&
ff_metadata_guid
);
ff_
put_guid
(
pb
,
&
ff_metadata_guid
);
avio_wl32
(
pb
,
1
);
avio_wl32
(
pb
,
1
);
avio_wl32
(
pb
,
strlen
(
value
)
*
2
+
2
);
avio_wl32
(
pb
,
strlen
(
value
)
*
2
+
2
);
avio_put_str16le
(
pb
,
key
);
avio_put_str16le
(
pb
,
key
);
...
...
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