Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
5d0b102f
Commit
5d0b102f
authored
Apr 16, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled support for video splitter directly at the core.
It isn't complete yet (no mouse/crop/...).
parent
95cee7fc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
37 deletions
+38
-37
src/video_output/display.c
src/video_output/display.c
+24
-37
src/video_output/display.h
src/video_output/display.h
+8
-0
src/video_output/vout_wrapper.c
src/video_output/vout_wrapper.c
+6
-0
No files found.
src/video_output/display.c
View file @
5d0b102f
...
...
@@ -1164,17 +1164,11 @@ vout_display_t *vout_NewDisplay(vout_thread_t *vout,
double_click_timeout
,
hide_timeout
,
NULL
);
}
static
void
SplitterClose
(
vout_display_t
*
vd
)
{
VLC_UNUSED
(
vd
);
assert
(
0
);
}
#if 0
/*****************************************************************************
*
*****************************************************************************/
struct
vout_display_sys_t
{
picture_pool_t
*
pool
;
video_splitter_t
*
splitter
;
/* */
...
...
@@ -1205,7 +1199,7 @@ static void SplitterDelWindow(vout_display_t *vd, vout_window_t *window)
}
static
void
SplitterEvent
(
vout_display_t
*
vd
,
int
event
,
va_list
args
)
{
vout_display_owner_sys_t *osys = vd->owner.sys;
//
vout_display_owner_sys_t *osys = vd->owner.sys;
switch
(
event
)
{
#if 0
...
...
@@ -1231,10 +1225,12 @@ static void SplitterEvent(vout_display_t *vd, int event, va_list args)
}
}
static picture_
t *SplitterGet(vout_display_t *vd
)
static
picture_
pool_t
*
SplitterPool
(
vout_display_t
*
vd
,
unsigned
count
)
{
/* TODO pool ? */
return picture_NewFromFormat(&vd->fmt);
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
!
sys
->
pool
)
sys
->
pool
=
picture_pool_NewFromFormat
(
&
vd
->
fmt
,
count
);
return
sys
->
pool
;
}
static
void
SplitterPrepare
(
vout_display_t
*
vd
,
picture_t
*
picture
)
{
...
...
@@ -1250,27 +1246,10 @@ static void SplitterPrepare(vout_display_t *vd, picture_t *picture)
}
for
(
int
i
=
0
;
i
<
sys
->
count
;
i
++
)
{
/* */
/* FIXME now vout_FilterDisplay already return a direct buffer FIXME */
sys->picture[i] = vout_FilterDisplay(sys->display[i], sys->picture[i]);
if (!sys->picture[i])
continue;
/* */
picture_t *direct = vout_display_Get(sys->display[i]);
if (!direct) {
msg_Err(vd, "Failed to get a direct buffer");
picture_Release(sys->picture[i]);
sys->picture[i] = NULL;
continue;
}
/* FIXME not always needed (easy when there is a osys->filters) */
picture_Copy(direct, sys->picture[i]);
picture_Release(sys->picture[i]);
sys->picture[i] = direct;
vout_display_Prepare(sys->display[i], sys->picture[i]);
if
(
vout_IsDisplayFiltered
(
sys
->
display
[
i
]))
sys
->
picture
[
i
]
=
vout_FilterDisplay
(
sys
->
display
[
i
],
sys
->
picture
[
i
]);
if
(
sys
->
picture
[
i
])
vout_display_Prepare
(
sys
->
display
[
i
],
sys
->
picture
[
i
]);
}
}
static
void
SplitterDisplay
(
vout_display_t
*
vd
,
picture_t
*
picture
)
...
...
@@ -1292,7 +1271,7 @@ static void SplitterManage(vout_display_t *vd)
vout_display_sys_t
*
sys
=
vd
->
sys
;
for
(
int
i
=
0
;
i
<
sys
->
count
;
i
++
)
vout_ManageDisplay(sys->display[i]);
vout_ManageDisplay
(
sys
->
display
[
i
]
,
true
);
}
static
int
SplitterPictureNew
(
video_splitter_t
*
splitter
,
picture_t
*
picture
[])
...
...
@@ -1300,8 +1279,13 @@ static int SplitterPictureNew(video_splitter_t *splitter, picture_t *picture[])
vout_display_sys_t
*
wsys
=
splitter
->
p_owner
->
wrapper
->
sys
;
for
(
int
i
=
0
;
i
<
wsys
->
count
;
i
++
)
{
/* TODO pool ? */
picture[i] = picture_NewFromFormat(&wsys->display[i]->source);
if
(
vout_IsDisplayFiltered
(
wsys
->
display
[
i
]))
{
/* TODO use a pool ? */
picture
[
i
]
=
picture_NewFromFormat
(
&
wsys
->
display
[
i
]
->
source
);
}
else
{
picture_pool_t
*
pool
=
vout_display_Pool
(
wsys
->
display
[
i
],
1
);
picture
[
i
]
=
pool
?
picture_pool_Get
(
pool
)
:
NULL
;
}
if
(
!
picture
[
i
])
{
for
(
int
j
=
0
;
j
<
i
;
j
++
)
picture_Release
(
picture
[
j
]);
...
...
@@ -1326,6 +1310,9 @@ static void SplitterClose(vout_display_t *vd)
free
(
splitter
->
p_owner
);
video_splitter_Delete
(
splitter
);
if
(
sys
->
pool
)
picture_pool_Delete
(
sys
->
pool
);
/* */
for
(
int
i
=
0
;
i
<
sys
->
count
;
i
++
)
vout_DeleteDisplay
(
sys
->
display
[
i
],
NULL
);
...
...
@@ -1363,8 +1350,9 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
if
(
!
sys
->
picture
)
abort
();
sys
->
splitter
=
splitter
;
sys
->
pool
=
NULL
;
wrapper->
get = SplitterGet
;
wrapper
->
pool
=
SplitterPool
;
wrapper
->
prepare
=
SplitterPrepare
;
wrapper
->
display
=
SplitterDisplay
;
wrapper
->
control
=
SplitterControl
;
...
...
@@ -1414,7 +1402,6 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
return
wrapper
;
}
#endif
/*****************************************************************************
* TODO move out
...
...
src/video_output/display.h
View file @
5d0b102f
...
...
@@ -109,6 +109,14 @@ void vout_SetDisplayCrop(vout_display_t *,
#endif
vout_display_t
*
vout_NewSplitter
(
vout_thread_t
*
vout
,
const
video_format_t
*
source
,
const
vout_display_state_t
*
state
,
const
char
*
module
,
const
char
*
splitter_module
,
mtime_t
double_click_timeout
,
mtime_t
hide_timeout
);
/* FIXME should not be there */
void
vout_SendDisplayEventMouse
(
vout_thread_t
*
,
const
vlc_mouse_t
*
);
vout_window_t
*
vout_NewDisplayWindow
(
vout_thread_t
*
,
vout_display_t
*
,
const
vout_window_cfg_t
*
);
...
...
src/video_output/vout_wrapper.c
View file @
5d0b102f
...
...
@@ -35,6 +35,7 @@
#include <vlc_vout.h>
#include <assert.h>
#include "vout_internal.h"
#include "display.h"
/*****************************************************************************
*
...
...
@@ -99,6 +100,11 @@ int vout_OpenWrapper(vout_thread_t *vout, const char *name)
sys
->
vd
=
vout_NewDisplay
(
vout
,
&
source
,
&
state
,
name
?
name
:
"$vout"
,
double_click_timeout
,
hide_timeout
);
/* If we need to video filter and it fails, then try a splitter
* XXX it is a hack for now FIXME */
if
(
name
&&
!
sys
->
vd
)
sys
->
vd
=
vout_NewSplitter
(
vout
,
&
source
,
&
state
,
"$vout"
,
name
,
double_click_timeout
,
hide_timeout
);
if
(
!
sys
->
vd
)
{
free
(
sys
->
title
);
free
(
sys
);
...
...
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