Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
47fd5024
Commit
47fd5024
authored
Sep 28, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix playlist_CurrentInput usage.
parent
f5292e55
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
30 deletions
+17
-30
modules/control/dbus.c
modules/control/dbus.c
+6
-20
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/vlcproc.cpp
+4
-4
modules/misc/notify/notify.c
modules/misc/notify/notify.c
+0
-1
modules/misc/notify/telepathy.c
modules/misc/notify/telepathy.c
+3
-3
modules/video_filter/atmo/atmo.cpp
modules/video_filter/atmo/atmo.cpp
+4
-2
No files found.
modules/control/dbus.c
View file @
47fd5024
...
...
@@ -167,7 +167,6 @@ DBUS_METHOD( PositionGet )
dbus_int32_t
i_pos
;
playlist_t
*
p_playlist
=
pl_Hold
(
((
vlc_object_t
*
)
p_this
)
);
PL_LOCK
;
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
!
p_input
)
...
...
@@ -176,8 +175,8 @@ DBUS_METHOD( PositionGet )
{
var_Get
(
p_input
,
"time"
,
&
position
);
i_pos
=
position
.
i_time
/
1000
;
vlc_object_release
(
p_input
);
}
PL_UNLOCK
;
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
ADD_INT32
(
&
i_pos
);
REPLY_SEND
;
...
...
@@ -206,15 +205,14 @@ DBUS_METHOD( PositionSet )
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
p_playlist
=
pl_Hold
(
((
vlc_object_t
*
)
p_this
)
);
PL_LOCK
;
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
{
position
.
i_time
=
i_pos
*
1000
;
var_Set
(
p_input
,
"time"
,
position
);
vlc_object_release
(
p_input
);
}
PL_UNLOCK
;
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
}
...
...
@@ -319,11 +317,7 @@ DBUS_METHOD( Play )
REPLY_INIT
;
playlist_t
*
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
PL_LOCK
;
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
vlc_object_hold
(
p_input
);
PL_UNLOCK
;
if
(
p_input
)
{
...
...
@@ -796,7 +790,6 @@ static void Close ( vlc_object_t *p_this )
playlist_t
*
p_playlist
=
pl_Hold
(
p_intf
);;
input_thread_t
*
p_input
;
PL_LOCK
;
var_DelCallback
(
p_playlist
,
"playlist-current"
,
TrackChange
,
p_intf
);
var_DelCallback
(
p_playlist
,
"intf-change"
,
TrackListChangeEmit
,
p_intf
);
var_DelCallback
(
p_playlist
,
"item-append"
,
TrackListChangeEmit
,
p_intf
);
...
...
@@ -808,12 +801,10 @@ static void Close ( vlc_object_t *p_this )
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
{
vlc_object_hold
(
p_input
);
var_DelCallback
(
p_input
,
"state"
,
StateChange
,
p_intf
);
vlc_object_release
(
p_input
);
}
PL_UNLOCK
;
pl_Release
(
p_intf
);
dbus_connection_unref
(
p_intf
->
p_sys
->
p_conn
);
...
...
@@ -999,15 +990,12 @@ static int TrackChange( vlc_object_t *p_this, const char *psz_var,
p_playlist
=
pl_Hold
(
p_intf
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
!
p_input
)
{
PL_UNLOCK
;
pl_Release
(
p_intf
);
return
VLC_SUCCESS
;
}
vlc_object_hold
(
p_input
);
pl_Release
(
p_intf
);
p_item
=
input_GetItem
(
p_input
);
...
...
@@ -1041,7 +1029,8 @@ static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked )
if
(
p_playlist
->
current
.
i_size
>
0
)
i_caps
|=
CAPS_CAN_PLAY
|
CAPS_CAN_GO_PREV
|
CAPS_CAN_GO_NEXT
;
if
(
!
b_playlist_locked
)
PL_UNLOCK
;
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
{
...
...
@@ -1051,9 +1040,9 @@ static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked )
i_caps
|=
CAPS_CAN_PAUSE
;
if
(
var_GetBool
(
p_input
,
"seekable"
)
)
i_caps
|=
CAPS_CAN_SEEK
;
vlc_object_release
(
p_input
);
}
if
(
!
b_playlist_locked
)
PL_UNLOCK
;
pl_Release
(
p_intf
);
if
(
p_sys
->
b_meta_read
)
...
...
@@ -1163,8 +1152,6 @@ static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args,
input_thread_t
*
p_input
=
NULL
;
p_playlist
=
pl_Hold
(
p_intf
);
if
(
lock
)
PL_LOCK
;
i_state
=
2
;
...
...
@@ -1178,6 +1165,7 @@ static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args,
i_state
=
1
;
else
if
(
val
.
i_int
<=
PLAYING_S
)
i_state
=
0
;
vlc_object_release
(
p_input
);
}
i_random
=
var_CreateGetBool
(
p_playlist
,
"random"
);
...
...
@@ -1186,8 +1174,6 @@ static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args,
i_loop
=
var_CreateGetBool
(
p_playlist
,
"loop"
);
if
(
lock
)
PL_UNLOCK
;
pl_Release
(
p_intf
);
dbus_message_iter_open_container
(
args
,
DBUS_TYPE_STRUCT
,
NULL
,
&
status
);
...
...
modules/gui/skins2/src/vlcproc.cpp
View file @
47fd5024
...
...
@@ -330,8 +330,6 @@ void VlcProc::refreshInput()
{
getIntf
()
->
p_sys
->
p_input
=
playlist_CurrentInput
(
getIntf
()
->
p_sys
->
p_playlist
);
if
(
getIntf
()
->
p_sys
->
p_input
)
vlc_object_hold
(
getIntf
()
->
p_sys
->
p_input
);
}
else
if
(
getIntf
()
->
p_sys
->
p_input
->
b_dead
)
{
...
...
@@ -561,10 +559,11 @@ int VlcProc::onInteraction( vlc_object_t *pObj, const char *pVariable,
void
VlcProc
::
updateStreamName
(
playlist_t
*
p_playlist
)
{
if
(
p_playlist
&&
playlist_CurrentInput
(
p_playlist
)
)
if
(
p_playlist
)
{
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
)
// Get playlist item information
input_item_t
*
pItem
=
input_GetItem
(
playlist_CurrentInput
(
p_playlist
)
);
input_item_t
*
pItem
=
input_GetItem
(
p_input
);
VarText
&
rStreamName
=
getStreamNameVar
();
VarText
&
rStreamURI
=
getStreamURIVar
();
...
...
@@ -589,6 +588,7 @@ void VlcProc::updateStreamName( playlist_t *p_playlist )
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
getIntf
()
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd1
),
false
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd2
),
false
);
vlc_object_release
(
p_input
);
}
}
...
...
modules/misc/notify/notify.c
View file @
47fd5024
...
...
@@ -150,7 +150,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
if
(
!
p_input
)
return
VLC_SUCCESS
;
vlc_object_hold
(
p_input
);
if
(
p_input
->
b_dead
)
{
...
...
modules/misc/notify/telepathy.c
View file @
47fd5024
...
...
@@ -139,12 +139,13 @@ static void Close( vlc_object_t *p_this )
playlist_t
*
p_playlist
=
pl_Hold
(
p_this
);
input_thread_t
*
p_input
=
NULL
;
PL_LOCK
;
var_DelCallback
(
p_playlist
,
"item-change"
,
ItemChange
,
p_intf
);
var_DelCallback
(
p_playlist
,
"playlist-current"
,
ItemChange
,
p_intf
);
if
(
(
p_input
=
playlist_CurrentInput
(
p_playlist
))
)
{
var_DelCallback
(
p_input
,
"state"
,
StateChange
,
p_intf
);
PL_UNLOCK
;
vlc_object_release
(
p_input
);
}
pl_Release
(
p_this
);
/* Clears the Presence message ... else it looks like we're still playing
...
...
@@ -194,7 +195,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
!
p_input
)
return
VLC_SUCCESS
;
vlc_object_hold
(
p_input
);
if
(
p_input
->
b_dead
||
!
input_GetItem
(
p_input
)
->
psz_name
)
{
...
...
modules/video_filter/atmo/atmo.cpp
View file @
47fd5024
...
...
@@ -1934,8 +1934,9 @@ static void AddStateVariableCallback(filter_t *p_filter)
if
(
p_input
)
{
var_AddCallback
(
p_input
,
"state"
,
StateCallback
,
p_filter
);
vlc_object_release
(
p_input
);
}
vlc_object_release
(
p_playlist
);
pl_Release
(
p_filter
);
}
/*****************************************************************************
...
...
@@ -1952,8 +1953,9 @@ static void DelStateVariableCallback( filter_t *p_filter )
if
(
p_input
)
{
var_DelCallback
(
p_input
,
"state"
,
StateCallback
,
p_filter
);
vlc_object_release
(
p_input
);
}
vlc_object_release
(
p_playlist
);
pl_Release
(
p_filter
);
}
...
...
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