Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
c90be618
Commit
c90be618
authored
Aug 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More libvlc_global presumed abuse
parent
64f49994
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
50 deletions
+50
-50
modules/control/rc.c
modules/control/rc.c
+3
-3
modules/gui/macosx/sfilters.m
modules/gui/macosx/sfilters.m
+23
-23
modules/misc/testsuite/test4.c
modules/misc/testsuite/test4.c
+8
-8
modules/video_filter/logo.c
modules/video_filter/logo.c
+7
-7
modules/video_filter/opencv_example.cpp
modules/video_filter/opencv_example.cpp
+9
-9
No files found.
modules/control/rc.c
View file @
c90be618
...
...
@@ -638,15 +638,15 @@ static void Run( intf_thread_t *p_intf )
psz_cmd
,
i_ret
,
vlc_error
(
i_ret
)
);
}
/* Or maybe it's a global command */
else
if
(
var_Type
(
p_intf
->
p_libvlc
_global
,
psz_cmd
)
&
VLC_VAR_ISCOMMAND
)
else
if
(
var_Type
(
p_intf
->
p_libvlc
,
psz_cmd
)
&
VLC_VAR_ISCOMMAND
)
{
vlc_value_t
val
;
int
i_ret
;
val
.
psz_string
=
psz_arg
;
/* FIXME: it's a global command, but we should pass the
* local object as an argument, not p_intf->p_libvlc
_global
. */
i_ret
=
var_Set
(
p_intf
->
p_libvlc
_global
,
psz_cmd
,
val
);
* local object as an argument, not p_intf->p_libvlc. */
i_ret
=
var_Set
(
p_intf
->
p_libvlc
,
psz_cmd
,
val
);
if
(
i_ret
!=
0
)
{
msg_rc
(
"%s: returned %i (%s)"
,
...
...
modules/gui/macosx/sfilters.m
View file @
c90be618
...
...
@@ -321,58 +321,58 @@ static VLCsFilters *_o_sharedInstance = nil;
}
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"marq-marquee"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"marq-marquee"
,
val
);
config_PutPsz
(
p_intf
,
"marq-marquee"
,
val
.
psz_string
);
}
else
if
(
sender
==
o_marq_pos_radio
)
{
val
.
i_int
=
[[
o_marq_pos_radio
selectedCell
]
tag
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"marq-position"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"marq-position"
,
val
);
config_PutInt
(
p_intf
,
"marq-position"
,
val
.
i_int
);
}
else
if
(
sender
==
o_marq_color_pop
)
{
val
.
i_int
=
strtol
(
[[[
o_colors
objectAtIndex
:
[
o_marq_color_pop
indexOfSelectedItem
]]
objectAtIndex
:
1
]
UTF8String
],
NULL
,
0
);
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"marq-color"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"marq-color"
,
val
);
config_PutInt
(
p_intf
,
"marq-color"
,
val
.
i_int
);
}
else
if
(
sender
==
o_marq_opaque_sld
)
{
val
.
i_int
=
[
o_marq_opaque_sld
intValue
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"marq-opacity"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"marq-opacity"
,
val
);
config_PutInt
(
p_intf
,
"marq-opacity"
,
val
.
i_int
);
}
else
if
(
sender
==
o_marq_size_pop
)
{
val
.
i_int
=
[[
o_marq_size_pop
titleOfSelectedItem
]
intValue
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"marq-size"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"marq-size"
,
val
);
config_PutInt
(
p_intf
,
"marq-size"
,
val
.
i_int
);
}
else
if
(
sender
==
o_marq_tmOut_fld
&&
[[
sender
stringValue
]
length
]
>
0
)
{
val
.
i_int
=
[
o_marq_tmOut_fld
intValue
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"marq-timeout"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"marq-timeout"
,
val
);
config_PutInt
(
p_intf
,
"marq-timeout"
,
val
.
i_int
);
}
...
...
@@ -391,7 +391,7 @@ static VLCsFilters *_o_sharedInstance = nil;
}
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"time-format"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"time-format"
,
val
);
config_PutPsz
(
p_intf
,
"time-format"
,
val
.
psz_string
);
}
...
...
@@ -401,38 +401,38 @@ static VLCsFilters *_o_sharedInstance = nil;
val
.
i_int
=
[[
o_time_pos_radio
selectedCell
]
tag
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"time-position"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"time-position"
,
val
);
config_PutInt
(
p_intf
,
"time-position"
,
val
.
i_int
);
}
else
if
(
sender
==
o_time_color_pop
)
{
val
.
i_int
=
strtol
(
[[[
o_colors
objectAtIndex
:
[
o_time_color_pop
indexOfSelectedItem
]]
objectAtIndex
:
1
]
UTF8String
],
NULL
,
0
);
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"time-color"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"time-color"
,
val
);
config_PutInt
(
p_intf
,
"time-color"
,
val
.
i_int
);
}
else
if
(
sender
==
o_time_opaque_sld
)
{
val
.
i_int
=
[
o_time_opaque_sld
intValue
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"time-opacity"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"time-opacity"
,
val
);
config_PutInt
(
p_intf
,
"time-opacity"
,
val
.
i_int
);
}
else
if
(
sender
==
o_time_size_pop
)
{
val
.
i_int
=
[[
o_time_size_pop
titleOfSelectedItem
]
intValue
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"time-size"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"time-size"
,
val
);
config_PutInt
(
p_intf
,
"time-size"
,
val
.
i_int
);
}
...
...
@@ -443,17 +443,17 @@ static VLCsFilters *_o_sharedInstance = nil;
val
.
i_int
=
[
o_logo_opaque_sld
intValue
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"logo-transparency"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"logo-transparency"
,
val
);
config_PutInt
(
p_intf
,
"logo-transparency"
,
val
.
i_int
);
}
else
if
(
sender
==
o_logo_pos_radio
)
{
val
.
i_int
=
[[
o_logo_pos_radio
selectedCell
]
tag
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"logo-position"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"logo-position"
,
val
);
config_PutInt
(
p_intf
,
"logo-position"
,
val
.
i_int
);
}
...
...
@@ -462,7 +462,7 @@ static VLCsFilters *_o_sharedInstance = nil;
val
.
psz_string
=
(
char
*
)[[
o_logo_image_fld
stringValue
]
UTF8String
];
if
(
p_input
)
var_Set
(
p_input
->
p_libvlc
_global
,
"logo-file"
,
val
);
var_Set
(
p_input
->
p_libvlc
,
"logo-file"
,
val
);
config_PutPsz
(
p_intf
,
"logo-file"
,
val
.
psz_string
);
}
...
...
modules/misc/testsuite/test4.c
View file @
c90be618
...
...
@@ -61,18 +61,18 @@ static int Signal ( vlc_object_t *, char const *,
*****************************************************************************/
vlc_module_begin
();
set_description
(
_
(
"Miscellaneous stress tests"
)
);
var_Create
(
p_module
->
p_libvlc
_global
,
"foo-test"
,
var_Create
(
p_module
->
p_libvlc
,
"foo-test"
,
VLC_VAR_VOID
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_module
->
p_libvlc
_global
,
"foo-test"
,
Foo
,
NULL
);
var_Create
(
p_module
->
p_libvlc
_global
,
"callback-test"
,
var_AddCallback
(
p_module
->
p_libvlc
,
"foo-test"
,
Foo
,
NULL
);
var_Create
(
p_module
->
p_libvlc
,
"callback-test"
,
VLC_VAR_VOID
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_module
->
p_libvlc
_global
,
"callback-test"
,
Callback
,
NULL
);
var_Create
(
p_module
->
p_libvlc
_global
,
"stress-test"
,
var_AddCallback
(
p_module
->
p_libvlc
,
"callback-test"
,
Callback
,
NULL
);
var_Create
(
p_module
->
p_libvlc
,
"stress-test"
,
VLC_VAR_STRING
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_module
->
p_libvlc
_global
,
"stress-test"
,
Stress
,
NULL
);
var_Create
(
p_module
->
p_libvlc
_global
,
"signal"
,
var_AddCallback
(
p_module
->
p_libvlc
,
"stress-test"
,
Stress
,
NULL
);
var_Create
(
p_module
->
p_libvlc
,
"signal"
,
VLC_VAR_STRING
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_module
->
p_libvlc
_global
,
"signal"
,
Signal
,
NULL
);
var_AddCallback
(
p_module
->
p_libvlc
,
"signal"
,
Signal
,
NULL
);
vlc_module_end
();
/*****************************************************************************
...
...
modules/video_filter/logo.c
View file @
c90be618
...
...
@@ -778,13 +778,13 @@ static void DestroyFilter( vlc_object_t *p_this )
free
(
p_sys
);
/* Delete the logo variables from INPUT */
var_Destroy
(
p_filter
->
p_libvlc
_global
,
"logo-file"
);
var_Destroy
(
p_filter
->
p_libvlc
_global
,
"logo-x"
);
var_Destroy
(
p_filter
->
p_libvlc
_global
,
"logo-y"
);
var_Destroy
(
p_filter
->
p_libvlc
_global
,
"logo-delay"
);
var_Destroy
(
p_filter
->
p_libvlc
_global
,
"logo-repeat"
);
var_Destroy
(
p_filter
->
p_libvlc
_global
,
"logo-position"
);
var_Destroy
(
p_filter
->
p_libvlc
_global
,
"logo-transparency"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"logo-file"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"logo-x"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"logo-y"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"logo-delay"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"logo-repeat"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"logo-position"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"logo-transparency"
);
}
/*****************************************************************************
...
...
modules/video_filter/opencv_example.cpp
View file @
c90be618
...
...
@@ -64,7 +64,7 @@ vlc_module_begin();
set_shortname
(
_
(
"OpenCV example"
));
set_capability
(
"opencv example"
,
1
);
add_shortcut
(
"opencv_example"
);
set_category
(
CAT_VIDEO
);
set_subcategory
(
SUBCAT_VIDEO_VFILTER2
);
set_callbacks
(
OpenFilter
,
CloseFilter
);
...
...
@@ -89,7 +89,7 @@ static int OpenFilter( vlc_object_t *p_this )
msg_Err
(
p_filter
,
"out of memory"
);
return
VLC_EGENERIC
;
}
//init the video_filter_event_info_t struct
p_sys
->
event_info
.
i_region_size
=
0
;
p_sys
->
event_info
.
p_region
=
NULL
;
...
...
@@ -99,11 +99,11 @@ static int OpenFilter( vlc_object_t *p_this )
//create the VIDEO_FILTER_EVENT_VARIABLE
vlc_value_t
val
;
if
(
var_Create
(
p_filter
->
p_libvlc
_global
,
VIDEO_FILTER_EVENT_VARIABLE
,
VLC_VAR_ADDRESS
|
VLC_VAR_DOINHERIT
)
!=
VLC_SUCCESS
)
if
(
var_Create
(
p_filter
->
p_libvlc
,
VIDEO_FILTER_EVENT_VARIABLE
,
VLC_VAR_ADDRESS
|
VLC_VAR_DOINHERIT
)
!=
VLC_SUCCESS
)
msg_Err
(
p_filter
,
"Could not create %s
\n
"
,
VIDEO_FILTER_EVENT_VARIABLE
);
val
.
p_address
=
&
(
p_sys
->
event_info
);
if
(
var_Set
(
p_filter
->
p_libvlc
_global
,
VIDEO_FILTER_EVENT_VARIABLE
,
val
)
!=
VLC_SUCCESS
)
if
(
var_Set
(
p_filter
->
p_libvlc
,
VIDEO_FILTER_EVENT_VARIABLE
,
val
)
!=
VLC_SUCCESS
)
msg_Err
(
p_filter
,
"Could not set %s
\n
"
,
VIDEO_FILTER_EVENT_VARIABLE
);
//OpenCV init specific to this example
...
...
@@ -121,7 +121,7 @@ static void CloseFilter( vlc_object_t *p_this )
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
if
(
p_filter
->
p_sys
->
p_cascade
)
cvReleaseHaarClassifierCascade
(
&
p_filter
->
p_sys
->
p_cascade
);
...
...
@@ -133,7 +133,7 @@ static void CloseFilter( vlc_object_t *p_this )
free
(
p_sys
);
var_Destroy
(
p_filter
->
p_libvlc
_global
,
VIDEO_FILTER_EVENT_VARIABLE
);
var_Destroy
(
p_filter
->
p_libvlc
,
VIDEO_FILTER_EVENT_VARIABLE
);
}
/****************************************************************************
...
...
@@ -225,11 +225,11 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
}
if
(
faces
&&
(
faces
->
total
>
0
))
//raise the video filter event
var_Change
(
p_filter
->
p_libvlc
_global
,
VIDEO_FILTER_EVENT_VARIABLE
,
VLC_VAR_TRIGGER_CALLBACKS
,
NULL
,
NULL
);
var_Change
(
p_filter
->
p_libvlc
,
VIDEO_FILTER_EVENT_VARIABLE
,
VLC_VAR_TRIGGER_CALLBACKS
,
NULL
,
NULL
);
}
else
msg_Err
(
p_filter
,
"No cascade - is opencv-haarcascade-file valid?"
);
return
p_pic
;
}
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