Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
3f174193
Commit
3f174193
authored
Jul 24, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mp4.c: compute avg/max bitrate info. removed a fprintf...
parent
bb1eff8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
7 deletions
+25
-7
modules/mux/mp4.c
modules/mux/mp4.c
+25
-7
No files found.
modules/mux/mp4.c
View file @
3f174193
...
...
@@ -742,7 +742,30 @@ static bo_t *GetESDS( mp4_stream_t *p_stream )
int
i_stream_type
;
int
i_object_type_indication
;
int
i_decoder_specific_info_size
;
int
i
;
int64_t
i_bitrate_avg
=
0
;
int64_t
i_bitrate_max
=
0
;
/* Compute avg/max bitrate */
for
(
i
=
0
;
i
<
p_stream
->
i_entry_count
;
i
++
)
{
i_bitrate_avg
+=
p_stream
->
entry
[
i
].
i_size
;
if
(
p_stream
->
entry
[
i
].
i_length
>
0
)
{
int64_t
i_bitrate
=
I64C
(
8000000
)
*
p_stream
->
entry
[
i
].
i_size
/
p_stream
->
entry
[
i
].
i_length
;
if
(
i_bitrate
>
i_bitrate_max
)
i_bitrate_max
=
i_bitrate
;
}
}
if
(
p_stream
->
i_duration
>
0
)
i_bitrate_avg
=
I64C
(
8000000
)
*
i_bitrate_avg
/
p_stream
->
i_duration
;
else
i_bitrate_avg
=
0
;
if
(
i_bitrate_max
<=
1
)
i_bitrate_max
=
0x7fffffff
;
/* */
if
(
p_stream
->
fmt
.
i_extra
>
0
)
{
i_decoder_specific_info_size
=
...
...
@@ -791,8 +814,8 @@ static bo_t *GetESDS( mp4_stream_t *p_stream )
bo_add_8
(
esds
,
i_object_type_indication
);
bo_add_8
(
esds
,
(
i_stream_type
<<
2
)
|
1
);
bo_add_24be
(
esds
,
1024
*
1024
);
// bufferSizeDB
bo_add_32be
(
esds
,
0x7fffffff
);
// maxBitrate
bo_add_32be
(
esds
,
0
);
// avgBitrate
bo_add_32be
(
esds
,
i_bitrate_max
);
// maxBitrate
bo_add_32be
(
esds
,
i_bitrate_avg
);
// avgBitrate
if
(
p_stream
->
fmt
.
i_extra
>
0
)
{
...
...
@@ -1561,11 +1584,6 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
((
int64_t
)
p_stream
->
fmt
.
video
.
i_height
<<
16
)
/
VOUT_ASPECT_FACTOR
;
}
fprintf
(
stderr
,
"%dx%d -> %dx%d a=%d/%d=%f
\n
"
,
p_stream
->
fmt
.
video
.
i_width
,
p_stream
->
fmt
.
video
.
i_height
,
i_width
,
p_stream
->
fmt
.
video
.
i_height
,
p_stream
->
fmt
.
video
.
i_aspect
,
VOUT_ASPECT_FACTOR
,
(
float
)
p_stream
->
fmt
.
video
.
i_aspect
/
(
float
)
VOUT_ASPECT_FACTOR
);
// width (presentation)
bo_add_32be
(
tkhd
,
i_width
);
// height(presentation)
...
...
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