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
75f733bc
Commit
75f733bc
authored
Jan 27, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add "export" command. It behaves exactly like "save" except that commands
are printed in a vlm_message and not in a file.
parent
f02e9483
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
src/misc/vlm.c
src/misc/vlm.c
+19
-1
No files found.
src/misc/vlm.c
View file @
75f733bc
...
@@ -617,6 +617,18 @@ static int ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
...
@@ -617,6 +617,18 @@ static int ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
}
}
}
}
else
if
(
!
strcmp
(
ppsz_command
[
0
],
"export"
)
)
{
char
*
psz_buf
;
if
(
i_command
!=
1
)
goto
syntax_error
;
p_message
=
vlm_MessageNew
(
"export"
,
psz_buf
=
Save
(
p_vlm
)
);
free
(
psz_buf
);
goto
success
;
}
else
if
(
!
strcmp
(
ppsz_command
[
0
],
"load"
)
)
else
if
(
!
strcmp
(
ppsz_command
[
0
],
"load"
)
)
{
{
if
(
i_command
!=
2
)
goto
syntax_error
;
if
(
i_command
!=
2
)
goto
syntax_error
;
...
@@ -1911,6 +1923,7 @@ static vlm_message_t *vlm_Help( vlm_t *vlm, char *psz_filter )
...
@@ -1911,6 +1923,7 @@ static vlm_message_t *vlm_Help( vlm_t *vlm, char *psz_filter )
MessageAddChild
(
"del (name)|all|media|schedule"
);
MessageAddChild
(
"del (name)|all|media|schedule"
);
MessageAddChild
(
"control (name) [instance_name] (command)"
);
MessageAddChild
(
"control (name) [instance_name] (command)"
);
MessageAddChild
(
"save (config_file)"
);
MessageAddChild
(
"save (config_file)"
);
MessageAddChild
(
"export"
);
MessageAddChild
(
"load (config_file)"
);
MessageAddChild
(
"load (config_file)"
);
message_child
=
MessageAdd
(
"Media Proprieties Syntax:"
);
message_child
=
MessageAdd
(
"Media Proprieties Syntax:"
);
...
@@ -1992,9 +2005,12 @@ static int Load( vlm_t *vlm, char *file )
...
@@ -1992,9 +2005,12 @@ static int Load( vlm_t *vlm, char *file )
static
char
*
Save
(
vlm_t
*
vlm
)
static
char
*
Save
(
vlm_t
*
vlm
)
{
{
char
*
save
=
NULL
;
char
*
save
=
NULL
;
char
psz_header
[]
=
"
\n
"
"# VLC media player VLM command batch
\n
"
"# http://www.videolan.org/vlc/
\n\n
"
;
char
*
p
;
char
*
p
;
int
i
,
j
;
int
i
,
j
;
int
i_length
=
0
;
int
i_length
=
strlen
(
psz_header
)
;
for
(
i
=
0
;
i
<
vlm
->
i_media
;
i
++
)
for
(
i
=
0
;
i
<
vlm
->
i_media
;
i
++
)
{
{
...
@@ -2096,6 +2112,8 @@ static char *Save( vlm_t *vlm )
...
@@ -2096,6 +2112,8 @@ static char *Save( vlm_t *vlm )
p
=
save
=
malloc
(
i_length
);
p
=
save
=
malloc
(
i_length
);
*
save
=
'\0'
;
*
save
=
'\0'
;
p
+=
sprintf
(
p
,
"%s"
,
psz_header
);
/* finally we can write in it */
/* finally we can write in it */
for
(
i
=
0
;
i
<
vlm
->
i_media
;
i
++
)
for
(
i
=
0
;
i
<
vlm
->
i_media
;
i
++
)
{
{
...
...
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