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
e7268258
Commit
e7268258
authored
May 18, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove trailing whitespace, add checks for malloc return value.
parent
4a66eee1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
38 deletions
+48
-38
src/control/core.c
src/control/core.c
+2
-2
src/control/event.c
src/control/event.c
+7
-6
src/control/media.c
src/control/media.c
+13
-9
src/control/media_discoverer.c
src/control/media_discoverer.c
+4
-5
src/control/media_player.c
src/control/media_player.c
+22
-16
No files found.
src/control/core.c
View file @
e7268258
src/control/event.c
View file @
e7268258
...
...
@@ -26,7 +26,6 @@
#include <vlc/libvlc.h>
#include <vlc_playlist.h>
/*
* Private functions
*/
...
...
@@ -64,7 +63,8 @@ group_contains_listener( libvlc_event_listeners_group_t * group,
**************************************************************************/
void
libvlc_event_init
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_instance
;(
void
)
p_e
;
VLC_UNUSED
(
p_instance
);
VLC_UNUSED
(
p_e
);
/* Will certainly be used to install libvlc_instance event */
}
...
...
@@ -75,7 +75,7 @@ void libvlc_event_init( libvlc_instance_t *p_instance, libvlc_exception_t *p_e )
**************************************************************************/
void
libvlc_event_fini
(
libvlc_instance_t
*
p_instance
)
{
(
void
)
p_instance
;
VLC_UNUSED
(
p_instance
)
;
}
/**************************************************************************
...
...
@@ -286,6 +286,7 @@ static const char * event_type_to_name[] =
EVENT
(
libvlc_MediaDiscovererEnded
)
#undef EVENT
};
static
const
char
*
unkwown_event_name
=
"Unknown Event"
;
const
char
*
libvlc_event_type_name
(
libvlc_event_type_t
event_type
)
...
...
src/control/media.c
View file @
e7268258
...
...
@@ -240,6 +240,12 @@ libvlc_media_t * libvlc_media_new_from_input_item(
}
p_md
=
malloc
(
sizeof
(
libvlc_media_t
)
);
if
(
!
p_md
)
{
libvlc_exception_raise
(
p_e
,
"Not enough memory"
);
return
NULL
;
}
p_md
->
p_libvlc_instance
=
p_instance
;
p_md
->
p_input_item
=
p_input_item
;
p_md
->
b_preparsed
=
false
;
...
...
@@ -339,7 +345,7 @@ void libvlc_media_add_option(
const
char
*
ppsz_option
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
VLC_UNUSED
(
p_e
)
;
input_ItemAddOpt
(
p_md
->
p_input_item
,
ppsz_option
,
VLC_INPUT_OPTION_UNIQUE
|
VLC_INPUT_OPTION_TRUSTED
);
}
...
...
@@ -404,7 +410,7 @@ char *
libvlc_media_get_mrl
(
libvlc_media_t
*
p_md
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
VLC_UNUSED
(
p_e
)
;
return
input_item_GetURI
(
p_md
->
p_input_item
);
}
...
...
@@ -416,9 +422,8 @@ char * libvlc_media_get_meta( libvlc_media_t *p_md,
libvlc_meta_t
e_meta
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
char
*
psz_meta
;
VLC_UNUSED
(
p_e
);
/* XXX: locking */
...
...
@@ -453,7 +458,7 @@ libvlc_state_t
libvlc_media_get_state
(
libvlc_media_t
*
p_md
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
VLC_UNUSED
(
p_e
)
;
return
p_md
->
state
;
}
...
...
@@ -466,8 +471,8 @@ libvlc_media_set_state( libvlc_media_t *p_md,
libvlc_state_t
state
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
libvlc_event_t
event
;
VLC_UNUSED
(
p_e
);
p_md
->
state
=
state
;
...
...
@@ -581,4 +586,3 @@ libvlc_media_get_user_data( libvlc_media_t * p_md,
return
NULL
;
}
}
src/control/media_discoverer.c
View file @
e7268258
...
...
@@ -113,7 +113,7 @@ static void services_discovery_item_removed( const vlc_event_t * p_event,
static
void
services_discovery_started
(
const
vlc_event_t
*
p_event
,
void
*
user_data
)
{
(
void
)
p_event
;
VLC_UNUSED
(
p_event
)
;
libvlc_media_discoverer_t
*
p_mdis
=
user_data
;
libvlc_event_t
event
;
p_mdis
->
running
=
true
;
...
...
@@ -128,7 +128,7 @@ static void services_discovery_started( const vlc_event_t * p_event,
static
void
services_discovery_ended
(
const
vlc_event_t
*
p_event
,
void
*
user_data
)
{
(
void
)
p_event
;
VLC_UNUSED
(
p_event
)
;
libvlc_media_discoverer_t
*
p_mdis
=
user_data
;
libvlc_event_t
event
;
p_mdis
->
running
=
false
;
...
...
@@ -270,4 +270,3 @@ libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis )
{
return
p_mdis
->
running
;
}
src/control/media_player.c
View file @
e7268258
...
...
@@ -59,6 +59,7 @@ static const libvlc_state_t vlc_to_libvlc_state_array[] =
[
END_S
]
=
libvlc_Ended
,
[
ERROR_S
]
=
libvlc_Error
,
};
static
inline
libvlc_state_t
vlc_to_libvlc_state
(
int
vlc_state
)
{
if
(
vlc_state
<
0
||
vlc_state
>
6
)
...
...
@@ -290,6 +291,11 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance,
}
p_mi
=
malloc
(
sizeof
(
libvlc_media_player_t
)
);
if
(
!
p_mi
)
{
libvlc_exception_raise
(
p_e
,
"Not enough memory"
);
return
NULL
;
}
p_mi
->
p_md
=
NULL
;
p_mi
->
drawable
=
0
;
p_mi
->
p_libvlc_instance
=
p_libvlc_instance
;
...
...
@@ -477,7 +483,7 @@ void libvlc_media_player_set_media(
libvlc_media_t
*
p_md
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
VLC_UNUSED
(
p_e
)
;
if
(
!
p_mi
)
return
;
...
...
@@ -516,7 +522,7 @@ libvlc_media_player_get_media(
libvlc_media_player_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
VLC_UNUSED
(
p_e
)
;
if
(
!
p_mi
->
p_md
)
return
NULL
;
...
...
@@ -533,7 +539,7 @@ libvlc_media_player_event_manager(
libvlc_media_player_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
VLC_UNUSED
(
p_e
)
;
return
p_mi
->
p_event_manager
;
}
...
...
@@ -665,7 +671,7 @@ void libvlc_media_player_set_drawable( libvlc_media_player_t *p_mi,
libvlc_drawable_t
drawable
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
VLC_UNUSED
(
p_e
)
;
p_mi
->
drawable
=
drawable
;
}
...
...
@@ -675,7 +681,7 @@ void libvlc_media_player_set_drawable( libvlc_media_player_t *p_mi,
libvlc_drawable_t
libvlc_media_player_get_drawable
(
libvlc_media_player_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
VLC_UNUSED
(
p_e
)
;
return
p_mi
->
drawable
;
}
...
...
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