Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
mediastreamer2
Commits
468f53bb
Commit
468f53bb
authored
Jan 06, 2011
by
Simon Morlat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows bugfixes and improvements
parent
d5150951
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
5 deletions
+27
-5
msvideo.h
include/mediastreamer2/msvideo.h
+2
-1
msdscap-mingw.cc
src/msdscap-mingw.cc
+1
-1
msvideo.c
src/msvideo.c
+23
-2
pixconv.c
src/pixconv.c
+1
-1
No files found.
include/mediastreamer2/msvideo.h
View file @
468f53bb
...
...
@@ -192,7 +192,8 @@ MSPixFmt ffmpeg_pix_fmt_to_ms(int fmt);
MSPixFmt
ms_fourcc_to_pix_fmt
(
uint32_t
fourcc
);
void
ms_ffmpeg_check_init
(
void
);
int
ms_yuv_buf_init_from_mblk
(
MSPicture
*
buf
,
mblk_t
*
m
);
void
ms_yuv_buf_init_from_mblk_with_size
(
MSPicture
*
buf
,
mblk_t
*
m
,
int
w
,
int
h
);
int
ms_yuv_buf_init_from_mblk_with_size
(
MSPicture
*
buf
,
mblk_t
*
m
,
int
w
,
int
h
);
int
ms_picture_init_from_mblk_with_size
(
MSPicture
*
buf
,
mblk_t
*
m
,
MSPixFmt
fmt
,
int
w
,
int
h
);
mblk_t
*
ms_yuv_buf_alloc
(
MSPicture
*
buf
,
int
w
,
int
h
);
void
ms_yuv_buf_copy
(
uint8_t
*
src_planes
[],
const
int
src_strides
[],
uint8_t
*
dst_planes
[],
const
int
dst_strides
[
3
],
MSVideoSize
roi
);
...
...
src/msdscap-mingw.cc
View file @
468f53bb
...
...
@@ -731,7 +731,7 @@ static int find_best_format(ComPtr<IAMStreamConfig> streamConfig, int count, MSV
MSVideoSize
cur
;
cur
.
width
=
infoHeader
->
bmiHeader
.
biWidth
;
cur
.
height
=
infoHeader
->
bmiHeader
.
biHeight
;
if
(
ms_video_size_greater_than
(
cur
,
*
requested_size
)){
if
(
ms_video_size_greater_than
(
*
requested_size
,
cur
)){
if
(
ms_video_size_greater_than
(
best_found
,
cur
)){
best_found
=
cur
;
best_index
=
i
;
...
...
src/msvideo.c
View file @
468f53bb
...
...
@@ -138,8 +138,29 @@ int ms_yuv_buf_init_from_mblk(YuvBuf *buf, mblk_t *m){
return
0
;
}
void
ms_yuv_buf_init_from_mblk_with_size
(
YuvBuf
*
buf
,
mblk_t
*
m
,
int
w
,
int
h
){
yuv_buf_init
(
buf
,
w
,
h
,
m
->
b_rptr
);
int
ms_yuv_buf_init_from_mblk_with_size
(
YuvBuf
*
buf
,
mblk_t
*
m
,
int
w
,
int
h
){
yuv_buf_init
(
buf
,
w
,
h
,
m
->
b_rptr
);
return
0
;
}
int
ms_picture_init_from_mblk_with_size
(
MSPicture
*
buf
,
mblk_t
*
m
,
MSPixFmt
fmt
,
int
w
,
int
h
){
switch
(
fmt
){
case
MS_YUV420P
:
return
ms_yuv_buf_init_from_mblk_with_size
(
buf
,
m
,
w
,
h
);
break
;
case
MS_YUY2
:
memset
(
buf
,
0
,
sizeof
(
*
buf
));
buf
->
w
=
w
;
buf
->
h
=
h
;
buf
->
planes
[
0
]
=
m
->
b_rptr
;
buf
->
strides
[
0
]
=
w
*
2
;
break
;
default
:
ms_fatal
(
"FIXME: unsupported format %i"
,
fmt
);
return
-
1
;
}
return
0
;
}
mblk_t
*
ms_yuv_buf_alloc
(
YuvBuf
*
buf
,
int
w
,
int
h
){
...
...
src/pixconv.c
View file @
468f53bb
...
...
@@ -81,7 +81,7 @@ static void pixconv_process(MSFilter *f){
om
=
im
;
}
else
{
MSPicture
inbuf
;
if
(
ms_
yuv_buf_init_from_mblk
(
&
inbuf
,
im
)
==
0
){
if
(
ms_
picture_init_from_mblk_with_size
(
&
inbuf
,
im
,
s
->
in_fmt
,
s
->
size
.
width
,
s
->
size
.
height
)
==
0
){
om
=
pixconv_alloc_mblk
(
s
);
if
(
s
->
scaler
==
NULL
){
s
->
scaler
=
ms_scaler_create_context
(
inbuf
.
w
,
inbuf
.
h
,
...
...
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