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
7965c4dd
Commit
7965c4dd
authored
Mar 22, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* http: implemented vlm_save/load.
parent
ee90a81d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
6 deletions
+37
-6
modules/control/http.c
modules/control/http.c
+37
-6
No files found.
modules/control/http.c
View file @
7965c4dd
...
@@ -1123,7 +1123,7 @@ static mvar_t *mvar_VlmSetNew( char *name, vlm_t *vlm )
...
@@ -1123,7 +1123,7 @@ static mvar_t *mvar_VlmSetNew( char *name, vlm_t *vlm )
vlm_message_t
*
msg
;
vlm_message_t
*
msg
;
int
i
;
int
i
;
fprintf
(
stderr
,
" mvar_VlmSetNew: name=`%s'
\n
"
,
name
);
/* fprintf( stderr," mvar_VlmSetNew: name=`%s'\n", name ); */
if
(
vlm
==
NULL
)
if
(
vlm
==
NULL
)
return
s
;
return
s
;
if
(
vlm_ExecuteCommand
(
vlm
,
"show"
,
&
msg
)
)
if
(
vlm_ExecuteCommand
(
vlm
,
"show"
,
&
msg
)
)
...
@@ -1155,7 +1155,7 @@ static mvar_t *mvar_VlmSetNew( char *name, vlm_t *vlm )
...
@@ -1155,7 +1155,7 @@ static mvar_t *mvar_VlmSetNew( char *name, vlm_t *vlm )
set
=
mvar_New
(
name
,
"set"
);
set
=
mvar_New
(
name
,
"set"
);
mvar_AppendNewVar
(
set
,
"name"
,
el
->
psz_name
);
mvar_AppendNewVar
(
set
,
"name"
,
el
->
psz_name
);
fprintf
(
stderr
,
"#### name=%s
\n
"
,
el
->
psz_name
);
/* fprintf( stderr, "#### name=%s\n", el->psz_name ); */
for
(
k
=
0
;
k
<
desc
->
i_child
;
k
++
)
for
(
k
=
0
;
k
<
desc
->
i_child
;
k
++
)
{
{
...
@@ -1165,19 +1165,19 @@ static mvar_t *mvar_VlmSetNew( char *name, vlm_t *vlm )
...
@@ -1165,19 +1165,19 @@ static mvar_t *mvar_VlmSetNew( char *name, vlm_t *vlm )
int
c
;
int
c
;
mvar_t
*
n
=
mvar_New
(
ch
->
psz_name
,
"set"
);
mvar_t
*
n
=
mvar_New
(
ch
->
psz_name
,
"set"
);
fprintf
(
stderr
,
" child=%s [%d]
\n
"
,
ch
->
psz_name
,
ch
->
i_child
);
/* fprintf( stderr, " child=%s [%d]\n", ch->psz_name, ch->i_child ); */
for
(
c
=
0
;
c
<
ch
->
i_child
;
c
++
)
for
(
c
=
0
;
c
<
ch
->
i_child
;
c
++
)
{
{
mvar_t
*
in
=
mvar_New
(
ch
->
psz_name
,
ch
->
child
[
c
]
->
psz_name
);
mvar_t
*
in
=
mvar_New
(
ch
->
psz_name
,
ch
->
child
[
c
]
->
psz_name
);
mvar_AppendVar
(
n
,
in
);
mvar_AppendVar
(
n
,
in
);
fprintf
(
stderr
,
" sub=%s
\n
"
,
ch
->
child
[
c
]
->
psz_name
);
/* fprintf( stderr, " sub=%s\n", ch->child[c]->psz_name );*/
}
}
mvar_AppendVar
(
set
,
n
);
mvar_AppendVar
(
set
,
n
);
}
}
else
else
{
{
fprintf
(
stderr
,
" child=%s->%s
\n
"
,
ch
->
psz_name
,
ch
->
psz_value
);
/* fprintf( stderr, " child=%s->%s\n", ch->psz_name, ch->psz_value ); */
mvar_AppendNewVar
(
set
,
ch
->
psz_name
,
ch
->
psz_value
);
mvar_AppendNewVar
(
set
,
ch
->
psz_name
,
ch
->
psz_value
);
}
}
}
}
...
@@ -1350,6 +1350,8 @@ enum macroType
...
@@ -1350,6 +1350,8 @@ enum macroType
MVLC_VLM_PAUSE
,
MVLC_VLM_PAUSE
,
MVLC_VLM_STOP
,
MVLC_VLM_STOP
,
MVLC_VLM_SEEK
,
MVLC_VLM_SEEK
,
MVLC_VLM_LOAD
,
MVLC_VLM_SAVE
,
MVLC_FOREACH
,
MVLC_FOREACH
,
MVLC_IF
,
MVLC_IF
,
...
@@ -1403,6 +1405,8 @@ StrToMacroTypeTab [] =
...
@@ -1403,6 +1405,8 @@ StrToMacroTypeTab [] =
{
"vlm_pause"
,
MVLC_VLM_PAUSE
},
{
"vlm_pause"
,
MVLC_VLM_PAUSE
},
{
"vlm_stop"
,
MVLC_VLM_STOP
},
{
"vlm_stop"
,
MVLC_VLM_STOP
},
{
"vlm_seek"
,
MVLC_VLM_SEEK
},
{
"vlm_seek"
,
MVLC_VLM_SEEK
},
{
"vlm_load"
,
MVLC_VLM_LOAD
},
{
"vlm_save"
,
MVLC_VLM_SAVE
},
{
"rpn"
,
MVLC_RPN
},
{
"rpn"
,
MVLC_RPN
},
...
@@ -1990,6 +1994,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
...
@@ -1990,6 +1994,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
p
+=
sprintf
(
p
,
" %s"
,
vlm_properties
[
i
]
);
p
+=
sprintf
(
p
,
" %s"
,
vlm_properties
[
i
]
);
}
}
}
}
fprintf
(
stderr
,
"vlm_ExecuteCommand: %s
\n
"
,
psz
);
vlm_ExecuteCommand
(
p_intf
->
p_sys
->
p_vlm
,
psz
,
&
vlm_answer
);
vlm_ExecuteCommand
(
p_intf
->
p_sys
->
p_vlm
,
psz
,
&
vlm_answer
);
if
(
vlm_answer
->
psz_value
==
NULL
)
/* there is no error */
if
(
vlm_answer
->
psz_value
==
NULL
)
/* there is no error */
{
{
...
@@ -2059,9 +2064,35 @@ static void MacroDo( httpd_file_sys_t *p_args,
...
@@ -2059,9 +2064,35 @@ static void MacroDo( httpd_file_sys_t *p_args,
vlm_MessageDelete
(
vlm_answer
);
vlm_MessageDelete
(
vlm_answer
);
break
;
break
;
}
}
case
MVLC_VLM_LOAD
:
case
MVLC_VLM_SAVE
:
{
vlm_message_t
*
vlm_answer
;
char
file
[
512
];
char
psz
[
512
];
if
(
p_intf
->
p_sys
->
p_vlm
==
NULL
)
p_intf
->
p_sys
->
p_vlm
=
vlm_New
(
p_intf
);
uri_extract_value
(
p_request
,
"file"
,
file
,
512
);
uri_decode_url_encoded
(
file
);
if
(
StrToMacroType
(
control
)
==
MVLC_VLM_LOAD
)
sprintf
(
psz
,
"load %s"
,
file
);
else
sprintf
(
psz
,
"save %s"
,
file
);
vlm_ExecuteCommand
(
p_intf
->
p_sys
->
p_vlm
,
psz
,
&
vlm_answer
);
/* FIXME do a vlm_answer -> var stack conversion */
vlm_MessageDelete
(
vlm_answer
);
break
;
}
default:
default:
PRINTS
(
"<!-- control param(%s) unsuported -->"
,
control
);
if
(
*
control
)
{
PRINTS
(
"<!-- control param(%s) unsuported -->"
,
control
);
}
break
;
break
;
}
}
break
;
break
;
...
...
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