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
7fe659bf
Commit
7fe659bf
authored
Aug 22, 2008
by
Jean-Philippe Andre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a variable + callback to toggle the record status.
parent
11898ef3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
modules/access_filter/record.c
modules/access_filter/record.c
+35
-0
No files found.
modules/access_filter/record.c
View file @
7fe659bf
...
@@ -81,6 +81,8 @@ static void Dump( access_t *, uint8_t *, int );
...
@@ -81,6 +81,8 @@ static void Dump( access_t *, uint8_t *, int );
static
int
EventKey
(
vlc_object_t
*
,
char
const
*
,
static
int
EventKey
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ToggleRecord
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
struct
access_sys_t
struct
access_sys_t
{
{
...
@@ -157,6 +159,15 @@ static int Open( vlc_object_t *p_this )
...
@@ -157,6 +159,15 @@ static int Open( vlc_object_t *p_this )
p_sys
->
psz_path
=
psz
;
p_sys
->
psz_path
=
psz
;
msg_Dbg
(
p_access
,
"Record access filter path %s"
,
psz
);
msg_Dbg
(
p_access
,
"Record access filter path %s"
,
psz
);
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_access
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
p_input
)
{
var_Create
(
p_input
,
"record-toggle"
,
VLC_VAR_VOID
);
var_AddCallback
(
p_input
,
"record-toggle"
,
ToggleRecord
,
p_access
);
vlc_object_release
(
p_input
);
}
/* catch all key event */
/* catch all key event */
var_AddCallback
(
p_access
->
p_libvlc
,
"key-action"
,
EventKey
,
p_access
);
var_AddCallback
(
p_access
->
p_libvlc
,
"key-action"
,
EventKey
,
p_access
);
...
@@ -172,6 +183,13 @@ static void Close( vlc_object_t *p_this )
...
@@ -172,6 +183,13 @@ static void Close( vlc_object_t *p_this )
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
var_DelCallback
(
p_access
->
p_libvlc
,
"key-action"
,
EventKey
,
p_access
);
var_DelCallback
(
p_access
->
p_libvlc
,
"key-action"
,
EventKey
,
p_access
);
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_access
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
p_input
)
{
var_Destroy
(
p_input
,
"record-toggle"
);
vlc_object_release
(
p_input
);
}
if
(
p_sys
->
f
)
if
(
p_sys
->
f
)
{
{
...
@@ -279,6 +297,23 @@ static int EventKey( vlc_object_t *p_this, char const *psz_var,
...
@@ -279,6 +297,23 @@ static int EventKey( vlc_object_t *p_this, char const *psz_var,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
static
int
ToggleRecord
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
access_t
*
p_access
=
p_data
;
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
(
void
)
p_this
;
(
void
)
psz_var
;
(
void
)
oldval
;
(
void
)
newval
;
p_sys
->
b_dump
=
!
p_sys
->
b_dump
;
return
VLC_SUCCESS
;
}
/*****************************************************************************
/*****************************************************************************
*
*
*****************************************************************************/
*****************************************************************************/
...
...
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