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
57848e9a
Commit
57848e9a
authored
Sep 05, 2007
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doxygenize some comments
Originally committed as revision 10346 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
fd150eb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
matroskaenc.c
libavformat/matroskaenc.c
+22
-6
No files found.
libavformat/matroskaenc.c
View file @
57848e9a
...
...
@@ -130,7 +130,12 @@ static void put_ebml_string(ByteIOContext *pb, unsigned int elementid, const cha
put_ebml_binary
(
pb
,
elementid
,
str
,
strlen
(
str
));
}
// this reserves exactly the amount of space specified by size, which must be at least 2
/**
* Writes a void element of a given size. Useful for reserving space in the file to be
* written to later.
*
* @param size The amount of space to reserve, which must be at least 2.
*/
static
void
put_ebml_void
(
ByteIOContext
*
pb
,
uint64_t
size
)
{
offset_t
currentpos
=
url_ftell
(
pb
);
...
...
@@ -174,10 +179,15 @@ static void put_xiph_size(ByteIOContext *pb, int size)
put_byte
(
pb
,
size
%
255
);
}
// initializes a mkv_seekhead element to be ready to index level 1 matroska elements
// if numelements is greater than 0, it reserves enough space for that many elements
// at the current file position and writes the seekhead there, otherwise the seekhead
// will be appended to the file when end_mkv_seekhead() is called
/**
* Initialize a mkv_seekhead element to be ready to index level 1 Matroska elements.
* If a maximum number of elements is specified, enough space will be reserved at
* the current file location to write a seek head of that size.
*
* @param segment_offset the absolute offset into the file that the segment begins
* @param numelements the maximum number of elements that will be indexed by this
* seek head, 0 if unlimited.
*/
static
mkv_seekhead
*
mkv_start_seekhead
(
ByteIOContext
*
pb
,
offset_t
segment_offset
,
int
numelements
)
{
mkv_seekhead
*
new_seekhead
=
av_mallocz
(
sizeof
(
mkv_seekhead
));
...
...
@@ -220,7 +230,13 @@ static int mkv_add_seekhead_entry(mkv_seekhead *seekhead, unsigned int elementid
return
0
;
}
// returns the file offset where the seekhead was written and frees the seekhead
/**
* Write the seek head to the file and free it. If a maximum number of elements was
* specified to mkv_start_seekhead(), the seek head will be written at the location
* reserved for it. Otherwise, it is written at the current location in the file.
*
* @return the file offset where the seekhead was written
*/
static
offset_t
mkv_write_seekhead
(
ByteIOContext
*
pb
,
mkv_seekhead
*
seekhead
)
{
offset_t
metaseek
,
seekentry
,
currentpos
;
...
...
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