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
22466842
Commit
22466842
authored
Jan 29, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmo: use VLC BITMAPINFO types
close #5950
parent
9403ca58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
modules/codec/dmo/dmo.c
modules/codec/dmo/dmo.c
+7
-6
No files found.
modules/codec/dmo/dmo.c
View file @
22466842
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_plugin.h>
#include <vlc_codec.h>
#include <vlc_codec.h>
#include <vlc_codecs.h>
#include <vlc_aout.h>
#include <vlc_aout.h>
#ifndef WIN32
#ifndef WIN32
...
@@ -420,7 +421,7 @@ static int DecOpen( decoder_t *p_dec )
...
@@ -420,7 +421,7 @@ static int DecOpen( decoder_t *p_dec )
}
}
else
else
{
{
BITMAPINFOHEADER
*
p_bih
;
VLC_
BITMAPINFOHEADER
*
p_bih
;
int
i_size
=
sizeof
(
VIDEOINFOHEADER
)
+
p_dec
->
fmt_in
.
i_extra
;
int
i_size
=
sizeof
(
VIDEOINFOHEADER
)
+
p_dec
->
fmt_in
.
i_extra
;
p_vih
=
malloc
(
i_size
);
p_vih
=
malloc
(
i_size
);
...
@@ -436,7 +437,7 @@ static int DecOpen( decoder_t *p_dec )
...
@@ -436,7 +437,7 @@ static int DecOpen( decoder_t *p_dec )
p_bih
->
biBitCount
=
p_dec
->
fmt_in
.
video
.
i_bits_per_pixel
;
p_bih
->
biBitCount
=
p_dec
->
fmt_in
.
video
.
i_bits_per_pixel
;
p_bih
->
biPlanes
=
1
;
p_bih
->
biPlanes
=
1
;
p_bih
->
biSize
=
i_size
-
sizeof
(
VIDEOINFOHEADER
)
+
p_bih
->
biSize
=
i_size
-
sizeof
(
VIDEOINFOHEADER
)
+
sizeof
(
BITMAPINFOHEADER
);
sizeof
(
VLC_
BITMAPINFOHEADER
);
p_vih
->
rcSource
.
left
=
p_vih
->
rcSource
.
top
=
0
;
p_vih
->
rcSource
.
left
=
p_vih
->
rcSource
.
top
=
0
;
p_vih
->
rcSource
.
right
=
p_dec
->
fmt_in
.
video
.
i_width
;
p_vih
->
rcSource
.
right
=
p_dec
->
fmt_in
.
video
.
i_width
;
...
@@ -496,7 +497,7 @@ static int DecOpen( decoder_t *p_dec )
...
@@ -496,7 +497,7 @@ static int DecOpen( decoder_t *p_dec )
}
}
else
else
{
{
BITMAPINFOHEADER
*
p_bih
;
VLC_
BITMAPINFOHEADER
*
p_bih
;
DMO_MEDIA_TYPE
mt
;
DMO_MEDIA_TYPE
mt
;
unsigned
i_chroma
=
VLC_CODEC_YUYV
;
unsigned
i_chroma
=
VLC_CODEC_YUYV
;
int
i_bpp
=
16
;
int
i_bpp
=
16
;
...
@@ -542,7 +543,7 @@ static int DecOpen( decoder_t *p_dec )
...
@@ -542,7 +543,7 @@ static int DecOpen( decoder_t *p_dec )
(
p_dec
->
fmt_in
.
video
.
i_bits_per_pixel
+
7
)
/
8
;
(
p_dec
->
fmt_in
.
video
.
i_bits_per_pixel
+
7
)
/
8
;
p_bih
->
biPlanes
=
1
;
/* http://msdn.microsoft.com/en-us/library/dd183376%28v=vs.85%29.aspx */
p_bih
->
biPlanes
=
1
;
/* http://msdn.microsoft.com/en-us/library/dd183376%28v=vs.85%29.aspx */
p_bih
->
biSize
=
sizeof
(
BITMAPINFOHEADER
);
p_bih
->
biSize
=
sizeof
(
VLC_
BITMAPINFOHEADER
);
dmo_output_type
.
majortype
=
MEDIATYPE_Video
;
dmo_output_type
.
majortype
=
MEDIATYPE_Video
;
dmo_output_type
.
formattype
=
FORMAT_VideoInfo
;
dmo_output_type
.
formattype
=
FORMAT_VideoInfo
;
...
@@ -1108,7 +1109,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
...
@@ -1108,7 +1109,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
int
i
,
i_selected
,
i_err
;
int
i
,
i_selected
,
i_err
;
DMO_MEDIA_TYPE
dmo_type
;
DMO_MEDIA_TYPE
dmo_type
;
VIDEOINFOHEADER
vih
,
*
p_vih
;
VIDEOINFOHEADER
vih
,
*
p_vih
;
BITMAPINFOHEADER
*
p_bih
;
VLC_
BITMAPINFOHEADER
*
p_bih
;
/* FIXME */
/* FIXME */
p_enc
->
fmt_in
.
video
.
i_bits_per_pixel
=
p_enc
->
fmt_in
.
video
.
i_bits_per_pixel
=
...
@@ -1142,7 +1143,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
...
@@ -1142,7 +1143,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
p_bih
->
biSizeImage
=
p_enc
->
fmt_in
.
video
.
i_width
*
p_bih
->
biSizeImage
=
p_enc
->
fmt_in
.
video
.
i_width
*
p_enc
->
fmt_in
.
video
.
i_height
*
p_enc
->
fmt_in
.
video
.
i_bits_per_pixel
/
8
;
p_enc
->
fmt_in
.
video
.
i_height
*
p_enc
->
fmt_in
.
video
.
i_bits_per_pixel
/
8
;
p_bih
->
biPlanes
=
3
;
p_bih
->
biPlanes
=
3
;
p_bih
->
biSize
=
sizeof
(
BITMAPINFOHEADER
);
p_bih
->
biSize
=
sizeof
(
VLC_
BITMAPINFOHEADER
);
vih
.
rcSource
.
left
=
vih
.
rcSource
.
top
=
0
;
vih
.
rcSource
.
left
=
vih
.
rcSource
.
top
=
0
;
vih
.
rcSource
.
right
=
p_enc
->
fmt_in
.
video
.
i_width
;
vih
.
rcSource
.
right
=
p_enc
->
fmt_in
.
video
.
i_width
;
...
...
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