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
e3223c2d
Commit
e3223c2d
authored
Jun 09, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display media title for 15 seconds right at the start of the video.
parent
7c5073f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
1 deletion
+69
-1
src/video_output/video_output.c
src/video_output/video_output.c
+69
-1
No files found.
src/video_output/video_output.c
View file @
e3223c2d
...
...
@@ -83,6 +83,9 @@ int vout_Snapshot( vout_thread_t *, picture_t * );
static
int
ParseVideoFilter2Chain
(
vout_thread_t
*
,
char
*
);
static
void
RemoveVideoFilters2
(
vout_thread_t
*
p_vout
);
/* Display media title in OSD */
static
void
DisplayTitleOnOSD
(
vout_thread_t
*
p_vout
);
/*****************************************************************************
* Video Filter2 functions
*****************************************************************************/
...
...
@@ -427,7 +430,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
}
var_AddCallback
(
p_vout
,
"deinterlace"
,
DeinterlaceCallback
,
NULL
);
var_Create
(
p_vout
,
"vout-filter"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
text
.
psz_string
=
_
(
"Filters"
);
var_Change
(
p_vout
,
"vout-filter"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
...
...
@@ -756,6 +758,8 @@ static void RunThread( vout_thread_t *p_vout)
return
;
}
DisplayTitleOnOSD
(
p_vout
);
/*
* Main loop - it is not executed if an error occurred during
* initialization
...
...
@@ -1627,3 +1631,67 @@ static void RemoveVideoFilters2( vout_thread_t *p_vout )
}
p_vout
->
i_vfilters
=
0
;
}
static
void
DisplayTitleOnOSD
(
vout_thread_t
*
p_vout
)
{
input_thread_t
*
p_input
;
mtime_t
i_now
,
i_stop
;
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_vout
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
if
(
p_input
)
{
i_now
=
mdate
();
i_stop
=
i_now
+
(
mtime_t
)(
15000000
);
if
(
input_GetItem
(
p_input
)
->
p_meta
&&
input_GetItem
(
p_input
)
->
p_meta
->
psz_nowplaying
&&
*
input_GetItem
(
p_input
)
->
p_meta
->
psz_nowplaying
)
{
vout_ShowTextAbsolute
(
p_vout
,
DEFAULT_CHAN
,
input_GetItem
(
p_input
)
->
p_meta
->
psz_nowplaying
,
NULL
,
OSD_ALIGN_BOTTOM
,
30
+
p_vout
->
fmt_in
.
i_width
-
p_vout
->
fmt_in
.
i_visible_width
-
p_vout
->
fmt_in
.
i_x_offset
,
20
+
p_vout
->
fmt_in
.
i_y_offset
,
i_now
,
i_stop
);
}
else
if
(
input_GetItem
(
p_input
)
->
p_meta
&&
input_GetItem
(
p_input
)
->
p_meta
->
psz_artist
&&
*
input_GetItem
(
p_input
)
->
p_meta
->
psz_artist
)
{
char
*
psz_string
=
NULL
;
psz_string
=
malloc
(
strlen
(
input_GetItem
(
p_input
)
->
psz_name
)
+
strlen
(
input_GetItem
(
p_input
)
->
p_meta
->
psz_artist
)
);
if
(
psz_string
)
{
sprintf
(
psz_string
,
"%s - %s"
,
input_GetItem
(
p_input
)
->
psz_name
,
input_GetItem
(
p_input
)
->
p_meta
->
psz_artist
);
vout_ShowTextAbsolute
(
p_vout
,
DEFAULT_CHAN
,
psz_string
,
NULL
,
OSD_ALIGN_BOTTOM
,
30
+
p_vout
->
fmt_in
.
i_width
-
p_vout
->
fmt_in
.
i_visible_width
-
p_vout
->
fmt_in
.
i_x_offset
,
20
+
p_vout
->
fmt_in
.
i_y_offset
,
i_now
,
i_stop
);
free
(
psz_string
);
}
}
else
{
vout_ShowTextAbsolute
(
p_vout
,
DEFAULT_CHAN
,
input_GetItem
(
p_input
)
->
psz_name
,
NULL
,
OSD_ALIGN_BOTTOM
,
30
+
p_vout
->
fmt_in
.
i_width
-
p_vout
->
fmt_in
.
i_visible_width
-
p_vout
->
fmt_in
.
i_x_offset
,
20
+
p_vout
->
fmt_in
.
i_y_offset
,
i_now
,
i_stop
);
}
vlc_object_release
(
p_input
);
}
}
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