Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
8a3dd2f3
Commit
8a3dd2f3
authored
Mar 03, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image.c: add --image-out-replace option. If enabled, the image vout will
always overwrite the same file.
parent
ebb944ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
modules/video_output/image.c
modules/video_output/image.c
+21
-4
No files found.
modules/video_output/image.c
View file @
8a3dd2f3
...
...
@@ -56,6 +56,9 @@ static void Display ( vout_thread_t *, picture_t * );
#define PREFIX_LONGTEXT N_( "Set the prefix of the filename. Output filename "\
"will have the form prefixNUMBER.format" )
#define REPLACE_TEXT N_( "Always write to the same file" )
#define REPLACE_LONGTEXT N_( "Always write to the same file" )
static
char
*
psz_format_list
[]
=
{
"png"
,
"jpeg"
};
static
char
*
psz_format_list_text
[]
=
{
"PNG"
,
"JPEG"
};
...
...
@@ -72,7 +75,9 @@ vlc_module_begin( );
add_integer
(
"image-out-ratio"
,
3
,
NULL
,
RATIO_TEXT
,
RATIO_LONGTEXT
,
VLC_FALSE
);
add_string
(
"image-out-prefix"
,
"img"
,
NULL
,
PREFIX_TEXT
,
PREFIX_LONGTEXT
,
VLC_FALSE
);
VLC_FALSE
);
add_bool
(
"image-out-replace"
,
0
,
NULL
,
REPLACE_TEXT
,
REPLACE_LONGTEXT
,
VLC_FALSE
);
set_callbacks
(
Create
,
Destroy
);
vlc_module_end
();
...
...
@@ -88,6 +93,8 @@ struct vout_sys_t
int
i_current
;
/* Current image */
int
i_frames
;
/* Number of frames */
vlc_bool_t
b_replace
;
image_handler_t
*
p_image
;
};
...
...
@@ -113,6 +120,8 @@ static int Create( vlc_object_t *p_this )
var_CreateGetString
(
p_this
,
"image-out-format"
);
p_vout
->
p_sys
->
i_ratio
=
var_CreateGetInteger
(
p_this
,
"image-out-ratio"
);
p_vout
->
p_sys
->
b_replace
=
var_CreateGetBool
(
p_this
,
"image-out-replace"
);
p_vout
->
p_sys
->
i_current
=
0
;
p_vout
->
p_sys
->
p_image
=
image_HandlerCreate
(
p_vout
);
...
...
@@ -235,9 +244,17 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
fmt_out
.
i_width
=
fmt_in
.
i_width
=
p_vout
->
render
.
i_width
;
fmt_out
.
i_height
=
fmt_in
.
i_height
=
p_vout
->
render
.
i_height
;
sprintf
(
psz_filename
,
"%s%.6i.%s"
,
p_vout
->
p_sys
->
psz_prefix
,
p_vout
->
p_sys
->
i_current
,
p_vout
->
p_sys
->
psz_format
);
if
(
p_vout
->
p_sys
->
b_replace
)
{
sprintf
(
psz_filename
,
"%s.%s"
,
p_vout
->
p_sys
->
psz_prefix
,
p_vout
->
p_sys
->
psz_format
);
}
else
{
sprintf
(
psz_filename
,
"%s%.6i.%s"
,
p_vout
->
p_sys
->
psz_prefix
,
p_vout
->
p_sys
->
i_current
,
p_vout
->
p_sys
->
psz_format
);
}
image_WriteUrl
(
p_vout
->
p_sys
->
p_image
,
p_pic
,
&
fmt_in
,
&
fmt_out
,
psz_filename
)
;
free
(
psz_filename
);
...
...
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