Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
8366eddb
Commit
8366eddb
authored
Aug 29, 2006
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fix an issue with DAR vs. Canvas size with matroska files
parent
a8c5e794
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
17 deletions
+29
-17
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+29
-17
No files found.
modules/demux/mkv.cpp
View file @
8366eddb
...
...
@@ -4309,6 +4309,8 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
{
EbmlMaster
*
tkv
=
static_cast
<
EbmlMaster
*>
(
l
);
unsigned
int
j
;
unsigned
int
i_crop_right
=
0
,
i_crop_left
=
0
,
i_crop_top
=
0
,
i_crop_bottom
=
0
;
unsigned
int
i_display_unit
=
0
,
i_display_width
=
0
,
i_display_height
=
0
;
msg_Dbg
(
&
sys
.
demuxer
,
"| | | + Track Video"
);
tk
->
f_fps
=
0.0
;
...
...
@@ -4350,44 +4352,42 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
{
KaxVideoDisplayWidth
&
vwidth
=
*
(
KaxVideoDisplayWidth
*
)
l
;
tk
->
fmt
.
video
.
i_visible
_width
=
uint16
(
vwidth
);
i_display
_width
=
uint16
(
vwidth
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + display width=%d"
,
uint16
(
vwidth
)
);
}
else
if
(
MKV_IS_ID
(
l
,
KaxVideoDisplayHeight
)
)
{
KaxVideoDisplayWidth
&
vheight
=
*
(
KaxVideoDisplayWidth
*
)
l
;
tk
->
fmt
.
video
.
i_visible
_height
=
uint16
(
vheight
);
i_display
_height
=
uint16
(
vheight
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + display height=%d"
,
uint16
(
vheight
)
);
}
else
if
(
MKV_IS_ID
(
l
,
KaxVideoPixelCropBottom
)
)
{
KaxVideoPixelCropBottom
&
cropval
=
*
(
KaxVideoPixelCropBottom
*
)
l
;
tk
->
fmt
.
video
.
i_height
-
=
uint16
(
cropval
);
i_crop_bottom
=
uint16
(
cropval
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + crop pixel bottom=%d"
,
uint16
(
cropval
)
);
}
else
if
(
MKV_IS_ID
(
l
,
KaxVideoPixelCropTop
)
)
{
KaxVideoPixelCropTop
&
cropval
=
*
(
KaxVideoPixelCropTop
*
)
l
;
tk
->
fmt
.
video
.
i_height
-=
uint16
(
cropval
);
tk
->
fmt
.
video
.
i_y_offset
+=
uint16
(
cropval
);
i_crop_top
=
uint16
(
cropval
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + crop pixel top=%d"
,
uint16
(
cropval
)
);
}
else
if
(
MKV_IS_ID
(
l
,
KaxVideoPixelCropRight
)
)
{
KaxVideoPixelCropRight
&
cropval
=
*
(
KaxVideoPixelCropRight
*
)
l
;
tk
->
fmt
.
video
.
i_width
-
=
uint16
(
cropval
);
i_crop_right
=
uint16
(
cropval
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + crop pixel right=%d"
,
uint16
(
cropval
)
);
}
else
if
(
MKV_IS_ID
(
l
,
KaxVideoPixelCropLeft
)
)
{
KaxVideoPixelCropLeft
&
cropval
=
*
(
KaxVideoPixelCropLeft
*
)
l
;
tk
->
fmt
.
video
.
i_width
-=
uint16
(
cropval
);
tk
->
fmt
.
video
.
i_x_offset
+=
uint16
(
cropval
);
i_crop_left
=
uint16
(
cropval
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + crop pixel left=%d"
,
uint16
(
cropval
)
);
}
else
if
(
MKV_IS_ID
(
l
,
KaxVideoFrameRate
)
)
...
...
@@ -4397,13 +4397,14 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
tk
->
f_fps
=
float
(
vfps
);
msg_Dbg
(
&
sys
.
demuxer
,
" | | | + fps=%f"
,
float
(
vfps
)
);
}
//
else if( EbmlId( *l ) == KaxVideoDisplayUnit::ClassInfos.GlobalId )
//
{
//
KaxVideoDisplayUnit &vdmode = *(KaxVideoDisplayUnit*)l;
else
if
(
EbmlId
(
*
l
)
==
KaxVideoDisplayUnit
::
ClassInfos
.
GlobalId
)
{
KaxVideoDisplayUnit
&
vdmode
=
*
(
KaxVideoDisplayUnit
*
)
l
;
// msg_Dbg( &sys.demuxer, "| | | | + Track Video Display Unit=%s",
// uint8( vdmode ) == 0 ? "pixels" : ( uint8( vdmode ) == 1 ? "centimeters": "inches" ) );
// }
i_display_unit
=
uint8
(
vdmode
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + Track Video Display Unit=%s"
,
uint8
(
vdmode
)
==
0
?
"pixels"
:
(
uint8
(
vdmode
)
==
1
?
"centimeters"
:
"inches"
)
);
}
// else if( EbmlId( *l ) == KaxVideoAspectRatio::ClassInfos.GlobalId )
// {
// KaxVideoAspectRatio &ratio = *(KaxVideoAspectRatio*)l;
...
...
@@ -4414,15 +4415,26 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
// {
// KaxVideoGamma &gamma = *(KaxVideoGamma*)l;
// msg_Dbg( &sys.demuxer, " | | | +
fps
=%f", float( gamma ) );
// msg_Dbg( &sys.demuxer, " | | | +
gamma
=%f", float( gamma ) );
// }
else
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + Unknown (%s)"
,
typeid
(
*
l
).
name
()
);
}
}
if
(
tk
->
fmt
.
video
.
i_visible_height
&&
tk
->
fmt
.
video
.
i_visible_width
)
tk
->
fmt
.
video
.
i_aspect
=
VOUT_ASPECT_FACTOR
*
tk
->
fmt
.
video
.
i_visible_width
/
tk
->
fmt
.
video
.
i_visible_height
;
if
(
i_display_height
&&
i_display_width
)
tk
->
fmt
.
video
.
i_aspect
=
VOUT_ASPECT_FACTOR
*
i_display_width
/
i_display_height
;
if
(
i_crop_left
||
i_crop_right
||
i_crop_top
||
i_crop_bottom
)
{
tk
->
fmt
.
video
.
i_visible_width
=
tk
->
fmt
.
video
.
i_width
;
tk
->
fmt
.
video
.
i_visible_height
=
tk
->
fmt
.
video
.
i_height
;
tk
->
fmt
.
video
.
i_x_offset
=
i_crop_left
;
tk
->
fmt
.
video
.
i_y_offset
=
i_crop_top
;
tk
->
fmt
.
video
.
i_visible_width
-=
i_crop_left
+
i_crop_right
;
tk
->
fmt
.
video
.
i_visible_height
-=
i_crop_top
+
i_crop_bottom
;
}
/* FIXME: i_display_* allows you to not only set DAR, but also a zoom factor.
we do not support this atm */
}
else
if
(
MKV_IS_ID
(
l
,
KaxTrackAudio
)
)
{
...
...
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