Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
d5150951
Commit
d5150951
authored
Jan 05, 2011
by
Simon Morlat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mingw compilation revisited.
parent
be95244f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
autogen.sh
autogen.sh
+5
-1
drawdib-display.c
src/drawdib-display.c
+9
-10
No files found.
autogen.sh
View file @
d5150951
...
...
@@ -33,7 +33,11 @@ if test -d /opt/local/share/aclocal ; then
ACLOCAL_ARGS
=
"-I /opt/local/share/aclocal"
fi
if
test
-d
/usr/local/share/aclocal
;
then
ACLOCAL_ARGS
=
"-I /usr/local/share/aclocal"
ACLOCAL_ARGS
=
"
$ACLOCAL_ARGS
-I /usr/local/share/aclocal"
fi
if
test
-d
/share/aclocal
;
then
ACLOCAL_ARGS
=
"
$ACLOCAL_ARGS
-I /share/aclocal"
fi
echo
"Generating build scripts in mediastreamer..."
...
...
src/drawdib-display.c
View file @
d5150951
...
...
@@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2/msfilter.h"
#include "mediastreamer2/msvideo.h"
#include "ffmpeg-priv.h"
#include "layouts.h"
#define SCALE_FACTOR 4.0f
...
...
@@ -38,7 +37,7 @@ typedef struct Yuv2RgbCtx{
size_t
rgblen
;
MSVideoSize
dsize
;
MSVideoSize
ssize
;
struct
ms_Sws
Context
*
sws
;
MSScaler
Context
*
sws
;
}
Yuv2RgbCtx
;
static
void
yuv2rgb_init
(
Yuv2RgbCtx
*
ctx
){
...
...
@@ -58,7 +57,7 @@ static void yuv2rgb_uninit(Yuv2RgbCtx *ctx){
ctx
->
rgblen
=
0
;
}
if
(
ctx
->
sws
){
ms_s
ws_freeContext
(
ctx
->
sws
);
ms_s
caler_context_free
(
ctx
->
sws
);
ctx
->
sws
=
NULL
;
}
ctx
->
dsize
.
width
=
0
;
...
...
@@ -69,9 +68,9 @@ static void yuv2rgb_uninit(Yuv2RgbCtx *ctx){
static
void
yuv2rgb_prepare
(
Yuv2RgbCtx
*
ctx
,
MSVideoSize
src
,
MSVideoSize
dst
){
if
(
ctx
->
sws
!=
NULL
)
yuv2rgb_uninit
(
ctx
);
ctx
->
sws
=
ms_s
ws_getContext
(
src
.
width
,
src
.
height
,
PIX_FMT
_YUV420P
,
dst
.
width
,
dst
.
height
,
PIX_FMT_BGR24
,
SWS_FAST_BILINEAR
,
NULL
,
NULL
,
NULL
);
ctx
->
sws
=
ms_s
caler_create_context
(
src
.
width
,
src
.
height
,
MS
_YUV420P
,
dst
.
width
,
dst
.
height
,
MS_RGB24_REV
,
MS_SCALER_METHOD_BILINEAR
);
ctx
->
dsize
=
dst
;
ctx
->
ssize
=
src
;
ctx
->
rgblen
=
dst
.
width
*
dst
.
height
*
3
;
...
...
@@ -97,9 +96,8 @@ static void yuv2rgb_process(Yuv2RgbCtx *ctx, MSPicture *src, MSVideoSize dstsize
uint8_t
*
p
;
p
=
ctx
->
rgb
+
(
dstsize
.
width
*
3
*
(
dstsize
.
height
-
1
));
if
(
ms_sws_scale
(
ctx
->
sws
,
src
->
planes
,
src
->
strides
,
0
,
src
->
h
,
&
p
,
&
rgb_stride
)
<
0
){
ms_error
(
"Error in 420->rgb ms_sws_scale()."
);
if
(
ms_scaler_process
(
ctx
->
sws
,
src
->
planes
,
src
->
strides
,
&
p
,
&
rgb_stride
)
<
0
){
ms_error
(
"Error in 420->rgb ms_scaler_process()."
);
}
if
(
mirroring
)
rgb24_mirror
(
ctx
->
rgb
,
dstsize
.
width
,
dstsize
.
height
,
dstsize
.
width
*
3
);
}
...
...
@@ -507,7 +505,7 @@ static int set_scalefactor(MSFilter *f,void *arg){
return
0
;
}
#if 0
static int set_selfview_pos(MSFilter *f,void *arg){
DDDisplay *s=(DDDisplay*)f->data;
s->sv_posx=((float*)arg)[0];
...
...
@@ -523,6 +521,7 @@ static int get_selfview_pos(MSFilter *f,void *arg){
((float*)arg)[2]=(float)100.0/s->sv_scalefactor;
return 0;
}
#endif
static
int
set_background_color
(
MSFilter
*
f
,
void
*
arg
){
DDDisplay
*
s
=
(
DDDisplay
*
)
f
->
data
;
...
...
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