Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1cf827db
Commit
1cf827db
authored
May 11, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up vout object creation/destruction.
parent
0ae5c1cd
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
179 additions
and
227 deletions
+179
-227
src/video_output/video_output.c
src/video_output/video_output.c
+102
-201
src/video_output/vout_internal.h
src/video_output/vout_internal.h
+23
-26
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+54
-0
No files found.
src/video_output/video_output.c
View file @
1cf827db
This diff is collapsed.
Click to expand it.
src/video_output/vout_internal.h
View file @
1cf827db
...
...
@@ -42,15 +42,25 @@
/* */
struct
vout_thread_sys_t
{
/* module */
char
*
psz_module_name
;
/* Video output configuration */
config_chain_t
*
p_cfg
;
/* Splitter module if used */
char
*
splitter_name
;
/* */
video_format_t
original
;
/* Original format ie coming from the decoder */
/* Snapshot interface */
vout_snapshot_t
snapshot
;
/* Statistics */
vout_statistic_t
statistic
;
/* Subpicture unit */
spu_t
*
p_spu
;
/* Monitor Pixel Aspect Ratio */
unsigned
int
i_par_num
;
unsigned
int
i_par_den
;
/* Thread & synchronization */
vlc_thread_t
thread
;
bool
dead
;
...
...
@@ -90,37 +100,23 @@ struct vout_thread_sys_t
}
title
;
/* */
unsigned
int
i_par_num
;
/**< monitor pixel aspect-ratio */
unsigned
int
i_par_den
;
/**< monitor pixel aspect-ratio */
bool
is_late_dropped
;
/* Statistics */
vout_statistic_t
statistic
;
/* Filter chain */
char
*
psz_filter_chain
;
/* Video filter2 chain */
vlc_mutex_t
vfilter_lock
;
filter_chain_t
*
vfilter_chain
;
/* Snapshot interface */
vout_snapshot_t
snapshot
;
/* Subpicture unit */
spu_t
*
p_spu
;
/* */
vlc_mouse_t
mouse
;
/* */
vlc_mutex_t
picture_lock
;
/**< picture heap lock */
picture_pool_t
*
private_pool
;
picture_pool_t
*
display_pool
;
picture_pool_t
*
decoder_pool
;
picture_fifo_t
*
decoder_fifo
;
bool
is_decoder_pool_slow
;
vout_chrono_t
render
;
/**< picture render time estimator */
vlc_mutex_t
picture_lock
;
/**< picture heap lock */
picture_pool_t
*
private_pool
;
picture_pool_t
*
display_pool
;
picture_pool_t
*
decoder_pool
;
picture_fifo_t
*
decoder_fifo
;
bool
is_decoder_pool_slow
;
vout_chrono_t
render
;
/**< picture render time estimator */
};
/* TODO to move them to vlc_vout.h */
...
...
@@ -132,6 +128,7 @@ void vout_ControlChangeSampleAspectRatio(vout_thread_t *, unsigned num, unsigned
void
vout_ControlChangeCropRatio
(
vout_thread_t
*
,
unsigned
num
,
unsigned
den
);
void
vout_ControlChangeCropWindow
(
vout_thread_t
*
,
int
x
,
int
y
,
int
width
,
int
height
);
void
vout_ControlChangeCropBorder
(
vout_thread_t
*
,
int
left
,
int
top
,
int
right
,
int
bottom
);
void
vout_ControlChangeFilters
(
vout_thread_t
*
,
const
char
*
);
/* */
void
vout_IntfInit
(
vout_thread_t
*
);
...
...
src/video_output/vout_intf.c
View file @
1cf827db
...
...
@@ -69,6 +69,10 @@ static int FullscreenCallback( vlc_object_t *, char const *,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
SnapshotCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
VideoFilterCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
VideoSplitterCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
TitleShowCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
...
...
@@ -351,6 +355,20 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Change
(
p_vout
,
"video-snapshot"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
var_AddCallback
(
p_vout
,
"video-snapshot"
,
SnapshotCallback
,
NULL
);
/* Add a video-filter variable */
var_Create
(
p_vout
,
"video-filter"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_vout
,
"video-filter"
,
VideoFilterCallback
,
NULL
);
var_TriggerCallback
(
p_vout
,
"video-filter"
);
/* Add a video-splitter variable
* TODO rename vout-filter into vout-splitter */
var_Create
(
p_vout
,
"vout-filter"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
|
VLC_VAR_ISCOMMAND
);
text
.
psz_string
=
_
(
"Video splitter"
);
var_Change
(
p_vout
,
"vout-filter"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
var_AddCallback
(
p_vout
,
"vout-filter"
,
VideoSplitterCallback
,
NULL
);
/* Mouse coordinates */
var_Create
(
p_vout
,
"mouse-button-down"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"mouse-moved"
,
VLC_VAR_COORDS
);
...
...
@@ -727,6 +745,42 @@ static int SnapshotCallback( vlc_object_t *p_this, char const *psz_cmd,
return
VLC_SUCCESS
;
}
static
int
VideoFilterCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
VLC_UNUSED
(
psz_cmd
);
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
p_data
);
vout_ControlChangeFilters
(
p_vout
,
newval
.
psz_string
);
return
VLC_SUCCESS
;
}
static
int
VideoSplitterCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
input_thread_t
*
p_input
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_this
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
!
p_input
)
{
msg_Err
(
p_vout
,
"Input not found"
);
return
VLC_EGENERIC
;
}
/* Modify input as well because the vout might have to be restarted */
var_Create
(
p_input
,
"vout-filter"
,
VLC_VAR_STRING
);
var_SetString
(
p_input
,
"vout-filter"
,
newval
.
psz_string
);
/* Now restart current video stream */
input_Control
(
p_input
,
INPUT_RESTART_ES
,
-
VIDEO_ES
);
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
static
int
TitleShowCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_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