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
1c94ebe4
Commit
1c94ebe4
authored
Jul 21, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use pl_Release an factorise two lines.
parent
64868251
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
34 deletions
+31
-34
modules/misc/lua/libs/input.c
modules/misc/lua/libs/input.c
+1
-1
modules/misc/lua/libs/playlist.c
modules/misc/lua/libs/playlist.c
+20
-20
modules/misc/lua/libs/sd.c
modules/misc/lua/libs/sd.c
+3
-3
modules/misc/notify/growl.m
modules/misc/notify/growl.m
+1
-1
modules/misc/notify/growl_udp.c
modules/misc/notify/growl_udp.c
+1
-1
modules/misc/notify/xosd.c
modules/misc/notify/xosd.c
+5
-8
No files found.
modules/misc/lua/libs/input.c
View file @
1c94ebe4
...
@@ -51,7 +51,7 @@ input_thread_t * vlclua_get_input_internal( lua_State *L )
...
@@ -51,7 +51,7 @@ input_thread_t * vlclua_get_input_internal( lua_State *L )
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
input_thread_t
*
p_input
=
p_playlist
->
p_input
;
input_thread_t
*
p_input
=
p_playlist
->
p_input
;
if
(
p_input
)
vlc_object_yield
(
p_input
);
if
(
p_input
)
vlc_object_yield
(
p_input
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
p_input
;
return
p_input
;
}
}
...
...
modules/misc/lua/libs/playlist.c
View file @
1c94ebe4
...
@@ -58,7 +58,7 @@ static int vlclua_playlist_prev( lua_State * L )
...
@@ -58,7 +58,7 @@ static int vlclua_playlist_prev( lua_State * L )
{
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_Prev
(
p_playlist
);
playlist_Prev
(
p_playlist
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
0
;
return
0
;
}
}
...
@@ -66,7 +66,7 @@ static int vlclua_playlist_next( lua_State * L )
...
@@ -66,7 +66,7 @@ static int vlclua_playlist_next( lua_State * L )
{
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_Next
(
p_playlist
);
playlist_Next
(
p_playlist
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
0
;
return
0
;
}
}
...
@@ -75,7 +75,7 @@ static int vlclua_playlist_skip( lua_State * L )
...
@@ -75,7 +75,7 @@ static int vlclua_playlist_skip( lua_State * L )
int
i_skip
=
luaL_checkint
(
L
,
1
);
int
i_skip
=
luaL_checkint
(
L
,
1
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_Skip
(
p_playlist
,
i_skip
);
playlist_Skip
(
p_playlist
,
i_skip
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
0
;
return
0
;
}
}
...
@@ -83,7 +83,7 @@ static int vlclua_playlist_play( lua_State * L )
...
@@ -83,7 +83,7 @@ static int vlclua_playlist_play( lua_State * L )
{
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_Play
(
p_playlist
);
playlist_Play
(
p_playlist
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
0
;
return
0
;
}
}
...
@@ -91,7 +91,7 @@ static int vlclua_playlist_pause( lua_State * L )
...
@@ -91,7 +91,7 @@ static int vlclua_playlist_pause( lua_State * L )
{
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_Pause
(
p_playlist
);
playlist_Pause
(
p_playlist
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
0
;
return
0
;
}
}
...
@@ -99,7 +99,7 @@ static int vlclua_playlist_stop( lua_State * L )
...
@@ -99,7 +99,7 @@ static int vlclua_playlist_stop( lua_State * L )
{
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_Stop
(
p_playlist
);
playlist_Stop
(
p_playlist
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
0
;
return
0
;
}
}
...
@@ -108,7 +108,7 @@ static int vlclua_playlist_clear( lua_State * L )
...
@@ -108,7 +108,7 @@ static int vlclua_playlist_clear( lua_State * L )
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_Stop
(
p_playlist
);
/* Isn't this already implied by Clear? */
playlist_Stop
(
p_playlist
);
/* Isn't this already implied by Clear? */
playlist_Clear
(
p_playlist
,
pl_Unlocked
);
playlist_Clear
(
p_playlist
,
pl_Unlocked
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
0
;
return
0
;
}
}
...
@@ -116,7 +116,7 @@ static int vlclua_playlist_repeat( lua_State * L )
...
@@ -116,7 +116,7 @@ static int vlclua_playlist_repeat( lua_State * L )
{
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
int
i_ret
=
vlclua_var_toggle_or_set
(
L
,
p_playlist
,
"repeat"
);
int
i_ret
=
vlclua_var_toggle_or_set
(
L
,
p_playlist
,
"repeat"
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
i_ret
;
return
i_ret
;
}
}
...
@@ -124,7 +124,7 @@ static int vlclua_playlist_loop( lua_State * L )
...
@@ -124,7 +124,7 @@ static int vlclua_playlist_loop( lua_State * L )
{
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
int
i_ret
=
vlclua_var_toggle_or_set
(
L
,
p_playlist
,
"loop"
);
int
i_ret
=
vlclua_var_toggle_or_set
(
L
,
p_playlist
,
"loop"
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
i_ret
;
return
i_ret
;
}
}
...
@@ -132,7 +132,7 @@ static int vlclua_playlist_random( lua_State * L )
...
@@ -132,7 +132,7 @@ static int vlclua_playlist_random( lua_State * L )
{
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
int
i_ret
=
vlclua_var_toggle_or_set
(
L
,
p_playlist
,
"random"
);
int
i_ret
=
vlclua_var_toggle_or_set
(
L
,
p_playlist
,
"random"
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
i_ret
;
return
i_ret
;
}
}
...
@@ -144,7 +144,7 @@ static int vlclua_playlist_goto( lua_State * L )
...
@@ -144,7 +144,7 @@ static int vlclua_playlist_goto( lua_State * L )
true
,
NULL
,
true
,
NULL
,
playlist_ItemGetById
(
p_playlist
,
i_id
,
playlist_ItemGetById
(
p_playlist
,
i_id
,
true
)
);
true
)
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
vlclua_push_ret
(
L
,
i_ret
);
return
vlclua_push_ret
(
L
,
i_ret
);
}
}
...
@@ -155,7 +155,7 @@ static int vlclua_playlist_add( lua_State *L )
...
@@ -155,7 +155,7 @@ static int vlclua_playlist_add( lua_State *L )
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
i_count
=
vlclua_playlist_add_internal
(
p_this
,
L
,
p_playlist
,
i_count
=
vlclua_playlist_add_internal
(
p_this
,
L
,
p_playlist
,
NULL
,
true
);
NULL
,
true
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
lua_pushinteger
(
L
,
i_count
);
lua_pushinteger
(
L
,
i_count
);
return
1
;
return
1
;
}
}
...
@@ -167,7 +167,7 @@ static int vlclua_playlist_enqueue( lua_State *L )
...
@@ -167,7 +167,7 @@ static int vlclua_playlist_enqueue( lua_State *L )
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
i_count
=
vlclua_playlist_add_internal
(
p_this
,
L
,
p_playlist
,
i_count
=
vlclua_playlist_add_internal
(
p_this
,
L
,
p_playlist
,
NULL
,
false
);
NULL
,
false
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
lua_pushinteger
(
L
,
i_count
);
lua_pushinteger
(
L
,
i_count
);
return
1
;
return
1
;
}
}
...
@@ -235,7 +235,7 @@ static int vlclua_playlist_get( lua_State *L )
...
@@ -235,7 +235,7 @@ static int vlclua_playlist_get( lua_State *L )
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_id
,
true
);
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_id
,
true
);
if
(
!
p_item
)
if
(
!
p_item
)
{
{
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
0
;
/* Should we return an error instead? */
return
0
;
/* Should we return an error instead? */
}
}
}
}
...
@@ -268,7 +268,7 @@ static int vlclua_playlist_get( lua_State *L )
...
@@ -268,7 +268,7 @@ static int vlclua_playlist_get( lua_State *L )
}
}
if
(
!
p_item
)
if
(
!
p_item
)
{
{
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
0
;
/* Should we return an error instead? */
return
0
;
/* Should we return an error instead? */
}
}
}
}
...
@@ -279,7 +279,7 @@ static int vlclua_playlist_get( lua_State *L )
...
@@ -279,7 +279,7 @@ static int vlclua_playlist_get( lua_State *L )
:
p_playlist
->
p_root_onelevel
;
:
p_playlist
->
p_root_onelevel
;
}
}
push_playlist_item
(
L
,
p_item
);
push_playlist_item
(
L
,
p_item
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
1
;
return
1
;
}
}
...
@@ -292,7 +292,7 @@ static int vlclua_playlist_search( lua_State *L )
...
@@ -292,7 +292,7 @@ static int vlclua_playlist_search( lua_State *L )
:
p_playlist
->
p_root_onelevel
;
:
p_playlist
->
p_root_onelevel
;
playlist_LiveSearchUpdate
(
p_playlist
,
p_item
,
psz_string
);
playlist_LiveSearchUpdate
(
p_playlist
,
p_item
,
psz_string
);
push_playlist_item
(
L
,
p_item
);
push_playlist_item
(
L
,
p_item
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
1
;
return
1
;
}
}
...
@@ -300,7 +300,7 @@ static int vlclua_playlist_current( lua_State *L )
...
@@ -300,7 +300,7 @@ static int vlclua_playlist_current( lua_State *L )
{
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
lua_pushinteger
(
L
,
var_GetInteger
(
p_playlist
,
"playlist-current"
)
);
lua_pushinteger
(
L
,
var_GetInteger
(
p_playlist
,
"playlist-current"
)
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
1
;
return
1
;
}
}
...
@@ -343,7 +343,7 @@ static int vlclua_playlist_sort( lua_State *L )
...
@@ -343,7 +343,7 @@ static int vlclua_playlist_sort( lua_State *L )
:
p_playlist
->
p_local_onelevel
;
:
p_playlist
->
p_local_onelevel
;
int
i_ret
=
playlist_RecursiveNodeSort
(
p_playlist
,
p_root
,
i_mode
,
int
i_ret
=
playlist_RecursiveNodeSort
(
p_playlist
,
p_root
,
i_mode
,
i_type
);
i_type
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
vlclua_push_ret
(
L
,
i_ret
);
return
vlclua_push_ret
(
L
,
i_ret
);
}
}
...
@@ -385,7 +385,7 @@ static int vlclua_playlist_status( lua_State *L )
...
@@ -385,7 +385,7 @@ static int vlclua_playlist_status( lua_State *L )
{
{
lua_pushstring
(
L
,
"stopped"
);
lua_pushstring
(
L
,
"stopped"
);
}
}
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
1
;
return
1
;
}
}
...
...
modules/misc/lua/libs/sd.c
View file @
1c94ebe4
...
@@ -76,7 +76,7 @@ static int vlclua_sd_add( lua_State *L )
...
@@ -76,7 +76,7 @@ static int vlclua_sd_add( lua_State *L )
const
char
*
psz_sd
=
luaL_checkstring
(
L
,
1
);
const
char
*
psz_sd
=
luaL_checkstring
(
L
,
1
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
int
i_ret
=
playlist_ServicesDiscoveryAdd
(
p_playlist
,
psz_sd
);
int
i_ret
=
playlist_ServicesDiscoveryAdd
(
p_playlist
,
psz_sd
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
vlclua_push_ret
(
L
,
i_ret
);
return
vlclua_push_ret
(
L
,
i_ret
);
}
}
...
@@ -85,7 +85,7 @@ static int vlclua_sd_remove( lua_State *L )
...
@@ -85,7 +85,7 @@ static int vlclua_sd_remove( lua_State *L )
const
char
*
psz_sd
=
luaL_checkstring
(
L
,
1
);
const
char
*
psz_sd
=
luaL_checkstring
(
L
,
1
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
int
i_ret
=
playlist_ServicesDiscoveryRemove
(
p_playlist
,
psz_sd
);
int
i_ret
=
playlist_ServicesDiscoveryRemove
(
p_playlist
,
psz_sd
);
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
vlclua_push_ret
(
L
,
i_ret
);
return
vlclua_push_ret
(
L
,
i_ret
);
}
}
...
@@ -94,7 +94,7 @@ static int vlclua_sd_is_loaded( lua_State *L )
...
@@ -94,7 +94,7 @@ static int vlclua_sd_is_loaded( lua_State *L )
const
char
*
psz_sd
=
luaL_checkstring
(
L
,
1
);
const
char
*
psz_sd
=
luaL_checkstring
(
L
,
1
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
lua_pushboolean
(
L
,
playlist_IsServicesDiscoveryLoaded
(
p_playlist
,
psz_sd
));
lua_pushboolean
(
L
,
playlist_IsServicesDiscoveryLoaded
(
p_playlist
,
psz_sd
));
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
return
1
;
return
1
;
}
}
...
...
modules/misc/notify/growl.m
View file @
1c94ebe4
...
@@ -162,7 +162,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -162,7 +162,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
playlist_t *p_playlist = pl_Yield( p_this );
playlist_t *p_playlist = pl_Yield( p_this );
p_input = p_playlist->p_input;
p_input = p_playlist->p_input;
vlc_object_r
elease( p_playlist );
pl_R
elease( p_playlist );
if( !p_input ) return VLC_SUCCESS;
if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input );
vlc_object_yield( p_input );
...
...
modules/misc/notify/growl_udp.c
View file @
1c94ebe4
...
@@ -124,7 +124,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -124,7 +124,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
playlist_t
*
p_playlist
=
pl_Yield
(
p_this
);
playlist_t
*
p_playlist
=
pl_Yield
(
p_this
);
p_input
=
p_playlist
->
p_input
;
p_input
=
p_playlist
->
p_input
;
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
if
(
!
p_input
)
return
VLC_SUCCESS
;
if
(
!
p_input
)
return
VLC_SUCCESS
;
vlc_object_yield
(
p_input
);
vlc_object_yield
(
p_input
);
...
...
modules/misc/notify/xosd.c
View file @
1c94ebe4
...
@@ -220,7 +220,7 @@ static void Run( intf_thread_t *p_intf )
...
@@ -220,7 +220,7 @@ static void Run( intf_thread_t *p_intf )
if
(
playlist_IsEmpty
(
p_playlist
)
)
if
(
playlist_IsEmpty
(
p_playlist
)
)
{
{
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
continue
;
continue
;
}
}
free
(
psz_display
);
free
(
psz_display
);
...
@@ -228,24 +228,21 @@ static void Run( intf_thread_t *p_intf )
...
@@ -228,24 +228,21 @@ static void Run( intf_thread_t *p_intf )
if
(
p_playlist
->
status
.
i_status
==
PLAYLIST_STOPPED
)
if
(
p_playlist
->
status
.
i_status
==
PLAYLIST_STOPPED
)
{
{
psz_display
=
strdup
(
_
(
"Stop"
));
psz_display
=
strdup
(
_
(
"Stop"
));
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
else
if
(
p_playlist
->
status
.
i_status
==
PLAYLIST_PAUSED
)
else
if
(
p_playlist
->
status
.
i_status
==
PLAYLIST_PAUSED
)
{
{
psz_display
=
strdup
(
_
(
"Pause"
));
psz_display
=
strdup
(
_
(
"Pause"
));
vlc_object_r
elease
(
p_playlist
);
pl_R
elease
(
p_playlist
);
}
}
else
else
{
{
p_item
=
p_playlist
->
status
.
p_item
;
p_item
=
p_playlist
->
status
.
p_item
;
p_input
=
p_item
->
p_input
;
p_input
=
p_item
->
p_input
;
pl_Release
(
p_playlist
);
if
(
!
p_item
)
if
(
!
p_item
)
{
vlc_object_release
(
p_playlist
);
continue
;
continue
;
}
vlc_object_release
(
p_playlist
);
mtime_t
i_duration
=
input_item_GetDuration
(
p_input
);
mtime_t
i_duration
=
input_item_GetDuration
(
p_input
);
if
(
i_duration
!=
-
1
)
if
(
i_duration
!=
-
1
)
...
...
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