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
5f15a425
Commit
5f15a425
authored
Nov 27, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix new HAL interaction
parent
7af8b241
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
modules/services_discovery/hal.c
modules/services_discovery/hal.c
+21
-3
src/libvlc.c
src/libvlc.c
+17
-1
No files found.
modules/services_discovery/hal.c
View file @
5f15a425
...
...
@@ -104,6 +104,7 @@ static int Open( vlc_object_t *p_this )
playlist_view_t
*
p_view
;
DBusError
dbus_error
;
DBusConnection
*
p_connection
;
p_sd
->
pf_run
=
Run
;
p_sd
->
p_sys
=
p_sys
;
...
...
@@ -111,13 +112,30 @@ static int Open( vlc_object_t *p_this )
dbus_error_init
(
&
dbus_error
);
#ifdef HAVE_HAL_1
if
(
!
(
p_sys
->
p_ctx
=
libhal_ctx_init_direct
(
&
dbus_error
)
)
)
p_sys
->
p_ctx
=
libhal_ctx_new
();
if
(
!
p_sys
->
p_ctx
)
{
msg_Err
(
p_sd
,
"Unable to create HAL context"
)
;
free
(
p_sys
);
return
VLC_EGENERIC
;
}
p_connection
=
dbus_bus_get
(
DBUS_BUS_SYSTEM
,
&
dbus_error
);
if
(
dbus_error_is_set
(
&
dbus_error
)
)
{
msg_Err
(
p_sd
,
"Unable to connect to DBUS: %s"
,
dbus_error
.
message
);
dbus_error_free
(
&
dbus_error
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
libhal_ctx_set_dbus_connection
(
p_sys
->
p_ctx
,
p_connection
);
if
(
!
libhal_ctx_init
(
p_sys
->
p_ctx
,
&
dbus_error
)
)
#else
if
(
!
(
p_sys
->
p_ctx
=
hal_initialize
(
NULL
,
FALSE
)
)
)
if
(
!
(
p_sys
->
p_ctx
=
hal_initialize
(
NULL
,
FALSE
)
)
)
#endif
{
free
(
p_sys
);
msg_Err
(
p_sd
,
"hal not available : %s"
,
dbus_error
.
message
);
dbus_error_free
(
&
dbus_error
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
src/libvlc.c
View file @
5f15a425
...
...
@@ -2556,9 +2556,21 @@ static void InitDeviceValues( vlc_t *p_vlc )
char
**
devices
;
char
*
block_dev
;
dbus_bool_t
b_dvd
;
DBusConnection
*
p_connection
;
DBusError
error
;
#ifdef HAVE_HAL_1
if
(
(
ctx
=
libhal_ctx_init_direct
(
NULL
)
)
)
ctx
=
libhal_ctx_new
();
if
(
!
ctx
)
return
;
dbus_error_init
(
&
error
);
p_connection
=
dbus_bus_get
(
DBUS_BUS_SYSTEM
,
&
error
);
if
(
dbus_error_is_set
(
&
error
)
)
{
dbus_error_free
(
&
error
);
return
;
}
libhal_ctx_set_dbus_connection
(
ctx
,
p_connection
);
if
(
!
libhal_ctx_init
(
ctx
,
&
error
)
)
#else
if
(
(
ctx
=
hal_initialize
(
NULL
,
FALSE
)
)
)
#endif
...
...
@@ -2618,6 +2630,10 @@ static void InitDeviceValues( vlc_t *p_vlc )
hal_shutdown
(
ctx
);
#endif
}
else
{
msg_Dbg
(
p_vlc
,
"Unable to get HAL device properties"
);
}
#endif
}
...
...
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