Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
438
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
22c02e96
Commit
22c02e96
authored
2 years ago
by
Phil Eichinger
Committed by
Jean-Baptiste Kempf
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
flaschen: add support for offset-{x,y,z}
parent
7ae453c8
No related branches found
No related tags found
1 merge request
!2198
flaschen: add support for offset_{x,y,z}
Pipeline
#241389
passed with stage
in 15 minutes and 2 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/video_output/flaschen.c
+23
-3
23 additions, 3 deletions
modules/video_output/flaschen.c
with
23 additions
and
3 deletions
modules/video_output/flaschen.c
+
23
−
3
View file @
22c02e96
...
...
@@ -54,6 +54,15 @@
#define T_HEIGHT N_("Height")
#define LT_HEIGHT NULL
#define T_OFFSET_X N_("Offset X")
#define LT_OFFSET_X NULL
#define T_OFFSET_Y N_("Offset Y")
#define LT_OFFSET_Y NULL
#define T_OFFSET_Z N_("Offset Z")
#define LT_OFFSET_Z NULL
static
int
Open
(
vout_display_t
*
vd
,
video_format_t
*
fmtp
,
vlc_video_context
*
context
);
static
void
Close
(
vout_display_t
*
vd
);
...
...
@@ -68,6 +77,9 @@ vlc_module_begin ()
add_string
(
"flaschen-display"
,
NULL
,
T_FLDISPLAY
,
LT_FLDISPLAY
)
add_integer
(
"flaschen-width"
,
25
,
T_WIDTH
,
LT_WIDTH
)
add_integer
(
"flaschen-height"
,
20
,
T_HEIGHT
,
LT_HEIGHT
)
add_integer
(
"flaschen-offset-x"
,
0
,
T_OFFSET_X
,
LT_OFFSET_X
)
add_integer
(
"flaschen-offset-y"
,
0
,
T_OFFSET_Y
,
LT_OFFSET_Y
)
add_integer
(
"flaschen-offset-z"
,
0
,
T_OFFSET_Z
,
LT_OFFSET_Z
)
vlc_module_end
()
...
...
@@ -169,9 +181,17 @@ static void Display(vout_display_t *vd, picture_t *picture)
int
result
;
char
buffer
[
64
];
int
header_len
=
snprintf
(
buffer
,
sizeof
(
buffer
),
"P6
\n
%d %d
\n
255
\n
"
,
fmt
->
i_width
,
fmt
->
i_height
);
/* TODO: support offset_{x,y,z}? (#FT:...) */
int
header_len
;
int
offset_x
=
var_InheritInteger
(
vd
,
"flaschen-offset-x"
);
int
offset_y
=
var_InheritInteger
(
vd
,
"flaschen-offset-y"
);
int
offset_z
=
var_InheritInteger
(
vd
,
"flaschen-offset-z"
);
if
(
offset_x
||
offset_y
||
offset_z
)
header_len
=
snprintf
(
buffer
,
sizeof
(
buffer
),
"P6
\n
%d %d
\n
#FT: %d %d %d
\n
255
\n
"
,
fmt
->
i_width
,
fmt
->
i_height
,
offset_x
,
offset_y
,
offset_z
);
else
header_len
=
snprintf
(
buffer
,
sizeof
(
buffer
),
"P6
\n
%d %d
\n
255
\n
"
,
fmt
->
i_width
,
fmt
->
i_height
);
/* Note the protocol doesn't include any picture order field. */
/* (maybe add as comment?) */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment