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
8c432e88
Commit
8c432e88
authored
Jun 13, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
White space and indentation fixes.
parent
6372b374
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
26 deletions
+24
-26
modules/control/dbus.c
modules/control/dbus.c
+23
-25
modules/control/dbus.h
modules/control/dbus.h
+1
-1
No files found.
modules/control/dbus.c
View file @
8c432e88
...
...
@@ -59,7 +59,6 @@
#include <vlc_input.h>
#include <vlc_playlist.h>
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
...
...
@@ -68,7 +67,6 @@ static int Open ( vlc_object_t * );
static
void
Close
(
vlc_object_t
*
);
static
void
Run
(
intf_thread_t
*
);
static
int
TrackChange
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
);
...
...
@@ -434,11 +432,11 @@ DBUS_METHOD( GetMetadata )
dbus_error_free
(
&
error
);
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
while
(
i_count
<
i_position
)
{
i_count
++
;
TEST_NEXT
;
TEST_NEXT
;
}
GetInputMeta
(
p_tested_item
->
p_input
,
&
args
);
...
...
@@ -448,24 +446,24 @@ DBUS_METHOD( GetMetadata )
}
DBUS_METHOD
(
GetLength
)
{
{
REPLY_INIT
;
OUT_ARGUMENTS
;
dbus_int32_t
i_elements
=
0
;
playlist_t
*
p_playlist
=
pl_Yield
(
(
vlc_object_t
*
)
p_this
);
playlist_item_t
*
p_tested_item
=
p_playlist
->
p_root_onelevel
;
playlist_item_t
*
p_last_item
=
playlist_GetLastLeaf
(
p_playlist
,
playlist_item_t
*
p_last_item
=
playlist_GetLastLeaf
(
p_playlist
,
p_playlist
->
p_root_onelevel
);
while
(
p_tested_item
->
p_input
->
i_id
!=
p_last_item
->
p_input
->
i_id
)
{
i_elements
++
;
TEST_NEXT
;
TEST_NEXT
;
}
pl_Release
(
p_playlist
);
ADD_INT32
(
&
i_elements
);
REPLY_SEND
;
}
...
...
@@ -492,7 +490,7 @@ DBUS_METHOD( DelTrack )
dbus_error_free
(
&
error
);
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
while
(
i_count
<
i_position
)
{
i_count
++
;
...
...
@@ -500,13 +498,13 @@ DBUS_METHOD( DelTrack )
}
PL_LOCK
;
playlist_DeleteFromInput
(
p_playlist
,
p_tested_item
->
p_input
->
i_id
,
VLC_TRUE
);
playlist_DeleteFromInput
(
p_playlist
,
p_tested_item
->
p_input
->
i_id
,
VLC_TRUE
);
PL_UNLOCK
;
pl_Release
(
p_playlist
);
REPLY_SEND
;
}
...
...
@@ -519,12 +517,12 @@ DBUS_METHOD( Loop )
dbus_bool_t
b_loop
;
vlc_value_t
val
;
playlist_t
*
p_playlist
=
NULL
;
dbus_error_init
(
&
error
);
dbus_message_get_args
(
p_from
,
&
error
,
DBUS_TYPE_BOOLEAN
,
&
b_loop
,
DBUS_TYPE_INVALID
);
if
(
dbus_error_is_set
(
&
error
)
)
{
msg_Err
(
(
vlc_object_t
*
)
p_this
,
"D-Bus message reading : %s
\n
"
,
...
...
@@ -550,12 +548,12 @@ DBUS_METHOD( Repeat )
dbus_bool_t
b_repeat
;
vlc_value_t
val
;
playlist_t
*
p_playlist
=
NULL
;
dbus_error_init
(
&
error
);
dbus_message_get_args
(
p_from
,
&
error
,
DBUS_TYPE_BOOLEAN
,
&
b_repeat
,
DBUS_TYPE_INVALID
);
if
(
dbus_error_is_set
(
&
error
)
)
{
msg_Err
(
(
vlc_object_t
*
)
p_this
,
"D-Bus message reading : %s
\n
"
,
...
...
@@ -565,7 +563,7 @@ DBUS_METHOD( Repeat )
}
val
.
b_bool
=
(
b_repeat
==
TRUE
)
?
VLC_TRUE
:
VLC_FALSE
;
p_playlist
=
pl_Yield
(
(
vlc_object_t
*
)
p_this
);
var_Set
(
p_playlist
,
"repeat"
,
val
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
...
...
@@ -849,7 +847,7 @@ static int TrackChange( vlc_object_t *p_this, const char *psz_var,
NULL, &dict_entry ); \
dbus_message_iter_append_basic( &dict_entry, DBUS_TYPE_STRING, \
&ppsz_meta_items[entry] ); \
dbus_message_iter_open_container( &dict_entry, DBUS_TYPE_VARIANT, \
dbus_message_iter_open_container( &dict_entry, DBUS_TYPE_VARIANT, \
type##_AS_STRING, &variant ); \
dbus_message_iter_append_basic( &variant, \
type, \
...
...
@@ -861,10 +859,10 @@ static int TrackChange( vlc_object_t *p_this, const char *psz_var,
ADD_META( entry, DBUS_TYPE_STRING, \
p_input->p_meta->psz_##item );
static
int
GetInputMeta
(
input_item_t
*
p_input
,
static
int
GetInputMeta
(
input_item_t
*
p_input
,
DBusMessageIter
*
args
)
{
/*FIXME: Works only for already read metadata. */
{
/*FIXME: Works only for already read metadata. */
DBusMessageIter
dict
,
dict_entry
,
variant
;
/* We need the track length to be expressed in seconds
* instead of milliseconds */
...
...
@@ -879,7 +877,7 @@ static int GetInputMeta( input_item_t* p_input,
"status"
,
"URI"
,
"length"
,
"video-codec"
,
"audio-codec"
,
"video-bitrate"
,
"audio-bitrate"
,
"audio-samplerate"
};
dbus_message_iter_open_container
(
args
,
DBUS_TYPE_ARRAY
,
"{sv}"
,
&
dict
);
ADD_VLC_META_STRING
(
0
,
title
);
...
...
@@ -901,8 +899,8 @@ static int GetInputMeta( input_item_t* p_input,
ADD_VLC_META_STRING
(
16
,
trackid
);
ADD_META
(
17
,
DBUS_TYPE_INT32
,
p_input
->
p_meta
->
i_status
);
ADD_META
(
18
,
DBUS_TYPE_STRING
,
p_input
->
psz_uri
);
ADD_META
(
19
,
DBUS_TYPE_INT64
,
i_length
);
ADD_META
(
18
,
DBUS_TYPE_STRING
,
p_input
->
psz_uri
);
ADD_META
(
19
,
DBUS_TYPE_INT64
,
i_length
);
dbus_message_iter_close_container
(
args
,
&
dict
);
return
VLC_SUCCESS
;
...
...
modules/control/dbus.h
View file @
8c432e88
...
...
@@ -60,7 +60,7 @@
#define SIGNAL_SEND \
if( !dbus_connection_send( p_conn, p_msg, NULL ) ) \
return DBUS_HANDLER_RESULT_NEED_MEMORY; \
return DBUS_HANDLER_RESULT_NEED_MEMORY; \
dbus_message_unref( p_msg ); \
dbus_connection_flush( p_conn ); \
return DBUS_HANDLER_RESULT_HANDLED
...
...
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