Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
152b1687
Commit
152b1687
authored
May 23, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 1.0-bugfix into master
Conflicts: modules/video_output/drawable.c src/control/libvlc_internal.h
parents
4d4f701e
0577234c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
111 additions
and
30 deletions
+111
-30
modules/codec/fluidsynth.c
modules/codec/fluidsynth.c
+8
-10
modules/video_output/drawable.c
modules/video_output/drawable.c
+80
-7
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+4
-0
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+5
-0
po/fr.po
po/fr.po
+1
-1
src/control/libvlc_internal.h
src/control/libvlc_internal.h
+0
-12
src/control/media_list_player.c
src/control/media_list_player.c
+13
-0
No files found.
modules/codec/fluidsynth.c
View file @
152b1687
...
...
@@ -128,12 +128,14 @@ static aout_buffer_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block)
{
block_t
*
p_block
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
aout_buffer_t
*
p_out
=
NULL
;
if
(
pp_block
==
NULL
)
return
NULL
;
p_block
=
*
pp_block
;
if
(
p_block
==
NULL
)
return
NULL
;
*
pp_block
=
NULL
;
if
(
p_block
->
i_pts
&&
!
aout_DateGet
(
&
p_sys
->
end_date
))
aout_DateSet
(
&
p_sys
->
end_date
,
p_block
->
i_pts
);
...
...
@@ -141,12 +143,11 @@ static aout_buffer_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block)
if
(
p_block
->
i_pts
<
aout_DateGet
(
&
p_sys
->
end_date
))
{
msg_Warn
(
p_dec
,
"MIDI message in the past?"
);
block_Release
(
p_block
);
return
NULL
;
goto
drop
;
}
if
(
p_block
->
i_buffer
<
1
)
return
NULL
;
goto
drop
;
uint8_t
channel
=
p_block
->
p_buffer
[
0
]
&
0xf
;
uint8_t
p1
=
(
p_block
->
i_buffer
>
1
)
?
(
p_block
->
p_buffer
[
1
]
&
0x7f
)
:
0
;
...
...
@@ -170,25 +171,22 @@ static aout_buffer_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block)
fluid_synth_pitch_bend
(
p_sys
->
synth
,
channel
,
(
p1
<<
7
)
|
p2
);
break
;
}
p_block
->
p_buffer
+=
p_block
->
i_buffer
;
p_block
->
i_buffer
=
0
;
unsigned
samples
=
(
p_block
->
i_pts
-
aout_DateGet
(
&
p_sys
->
end_date
))
*
441
/
10000
;
if
(
samples
==
0
)
return
NULL
;
aout_buffer_t
*
p_out
=
decoder_NewAudioBuffer
(
p_dec
,
samples
);
p_out
=
decoder_NewAudioBuffer
(
p_dec
,
samples
);
if
(
p_out
==
NULL
)
{
block_Release
(
p_block
);
return
NULL
;
}
goto
drop
;
p_out
->
start_date
=
aout_DateGet
(
&
p_sys
->
end_date
);
p_out
->
end_date
=
aout_DateIncrement
(
&
p_sys
->
end_date
,
samples
);
fluid_synth_write_float
(
p_sys
->
synth
,
samples
,
p_out
->
p_buffer
,
0
,
2
,
p_out
->
p_buffer
,
1
,
2
);
drop:
block_Release
(
p_block
);
return
p_out
;
}
modules/video_output/drawable.c
View file @
152b1687
...
...
@@ -64,32 +64,80 @@ vlc_module_end ()
static
int
Control
(
vout_window_t
*
,
int
,
va_list
);
/* TODO: move to vlc_variables.h */
static
inline
void
*
var_GetAddress
(
vlc_object_t
*
o
,
const
char
*
name
)
{
vlc_value_t
val
;
return
var_Get
(
o
,
name
,
&
val
)
?
NULL
:
val
.
p_address
;
}
static
vlc_mutex_t
serializer
=
VLC_STATIC_MUTEX
;
/**
* Find the drawable set by libvlc application.
*/
static
int
Open
(
vlc_object_t
*
obj
,
const
char
*
varname
,
bool
ptr
)
{
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
vlc_value_t
val
;
void
**
used
,
*
val
;
size_t
n
=
0
;
if
(
var_Create
(
obj
,
varname
,
VLC_VAR_DOINHERIT
if
(
var_Create
(
obj
->
p_libvlc
,
"drawables-in-use"
,
VLC_VAR_ADDRESS
)
||
var_Create
(
obj
,
varname
,
VLC_VAR_DOINHERIT
|
(
ptr
?
VLC_VAR_ADDRESS
:
VLC_VAR_INTEGER
)))
return
VLC_ENOMEM
;
var_Get
(
obj
,
varname
,
&
val
);
if
(
ptr
)
val
=
var_GetAddress
(
obj
,
varname
);
else
val
=
(
void
*
)(
uintptr_t
)
var_GetInteger
(
obj
,
varname
);
var_Destroy
(
obj
,
varname
);
msg_Err
(
wnd
,
"%zu, %p"
,
n
,
val
);
/* Keep a list of busy drawables, so we don't overlap videos if there are
* more than one video track in the stream. */
vlc_mutex_lock
(
&
serializer
);
/* TODO: per-type list of busy drawables */
used
=
var_GetAddress
(
VLC_OBJECT
(
obj
->
p_libvlc
),
"drawables-in-use"
);
if
(
used
!=
NULL
)
{
while
(
used
[
n
]
!=
NULL
)
{
if
(
used
[
n
]
==
val
)
goto
skip
;
n
++
;
}
}
used
=
realloc
(
used
,
sizeof
(
*
used
)
*
(
n
+
2
));
if
(
used
!=
NULL
)
{
used
[
n
]
=
val
;
used
[
n
+
1
]
=
NULL
;
var_SetAddress
(
obj
->
p_libvlc
,
"drawables-in-use"
,
used
);
}
else
{
skip:
msg_Warn
(
wnd
,
"drawable %p is busy"
,
val
);
val
=
NULL
;
}
vlc_mutex_unlock
(
&
serializer
);
msg_Err
(
wnd
,
"%zu, %p"
,
n
,
val
);
if
(
ptr
?
(
val
.
p_address
==
NULL
)
:
(
val
.
i_int
==
0
)
)
if
(
val
==
NULL
)
return
VLC_EGENERIC
;
if
(
ptr
)
wnd
->
handle
.
hwnd
=
val
.
p_address
;
wnd
->
handle
.
hwnd
=
val
;
else
wnd
->
handle
.
xid
=
val
.
i_int
;
wnd
->
handle
.
xid
=
(
uintptr_t
)
val
;
/* FIXME: check that X server matches --x11-display (if specified) */
/* FIXME: get window size (in platform-dependent ways) */
wnd
->
control
=
Control
;
wnd
->
p_sys
=
val
;
return
VLC_SUCCESS
;
}
...
...
@@ -109,7 +157,32 @@ static int OpenHWND (vlc_object_t *obj)
*/
static
void
Close
(
vlc_object_t
*
obj
)
{
(
void
)
obj
;
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
void
**
used
,
*
val
=
wnd
->
p_sys
;
size_t
n
=
0
;
/* Remove this drawable from the list of busy ones */
vlc_mutex_lock
(
&
serializer
);
used
=
var_GetAddress
(
VLC_OBJECT
(
obj
->
p_libvlc
),
"drawables-in-use"
);
assert
(
used
);
while
(
used
[
n
]
!=
val
)
{
assert
(
used
[
n
]);
n
++
;
}
do
used
[
n
]
=
used
[
n
+
1
];
while
(
used
[
n
+
1
]
!=
NULL
);
if
(
n
==
0
)
/* should not be needed (var_Destroy...) but better safe than sorry: */
var_SetAddress
(
obj
->
p_libvlc
,
"drawables-in-use"
,
NULL
);
vlc_mutex_unlock
(
&
serializer
);
if
(
n
==
0
)
free
(
used
);
/* Variables are reference-counted... */
var_Destroy
(
obj
->
p_libvlc
,
"drawables-in-use"
);
}
...
...
modules/video_output/xcb/x11.c
View file @
152b1687
...
...
@@ -115,7 +115,10 @@ static int Open (vlc_object_t *obj)
/* Connect to X */
p_sys
->
conn
=
Connect
(
obj
);
if
(
p_sys
->
conn
==
NULL
)
{
free
(
p_sys
);
return
VLC_EGENERIC
;
}
/* Get window */
const
xcb_screen_t
*
scr
;
...
...
@@ -123,6 +126,7 @@ static int Open (vlc_object_t *obj)
if
(
p_sys
->
embed
==
NULL
)
{
xcb_disconnect
(
p_sys
->
conn
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
modules/video_output/xcb/xvideo.c
View file @
152b1687
...
...
@@ -159,12 +159,16 @@ static int Open (vlc_object_t *obj)
/* Connect to X */
p_sys
->
conn
=
Connect
(
obj
);
if
(
p_sys
->
conn
==
NULL
)
{
free
(
p_sys
);
return
VLC_EGENERIC
;
}
if
(
!
CheckXVideo
(
vout
,
p_sys
->
conn
))
{
msg_Warn
(
vout
,
"Please enable XVideo 2.2 for faster video display"
);
xcb_disconnect
(
p_sys
->
conn
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -173,6 +177,7 @@ static int Open (vlc_object_t *obj)
if
(
p_sys
->
embed
==
NULL
)
{
xcb_disconnect
(
p_sys
->
conn
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
po/fr.po
View file @
152b1687
...
...
@@ -980,7 +980,7 @@ msgid ""
"VLC does not support the audio or video format \"%4.4s\". Unfortunately "
"there is no way for you to fix this."
msgstr ""
"VLC ne supporte probablement pas le format audio ou vidéo « %4.4s »."
"VLC ne supporte probablement pas le format audio ou vidéo « %4.4s ».
"
"Malheureusement il n’y a rien à faire."
#: src/input/es_out.c:911 src/input/es_out.c:916 src/libvlc-module.c:346
...
...
src/control/libvlc_internal.h
View file @
152b1687
...
...
@@ -164,18 +164,6 @@ struct libvlc_media_player_t
}
drawable
;
};
struct
libvlc_media_list_player_t
{
libvlc_event_manager_t
*
p_event_manager
;
libvlc_instance_t
*
p_libvlc_instance
;
unsigned
i_refcount
;
vlc_mutex_t
object_lock
;
libvlc_media_list_path_t
current_playing_item_path
;
libvlc_media_t
*
p_current_playing_item
;
libvlc_media_list_t
*
p_mlist
;
libvlc_media_player_t
*
p_mi
;
};
struct
libvlc_media_library_t
{
libvlc_event_manager_t
*
p_event_manager
;
...
...
src/control/media_list_player.c
View file @
152b1687
...
...
@@ -24,6 +24,19 @@
#include <vlc/libvlc.h>
#include "media_list_path.h"
struct
libvlc_media_list_player_t
{
libvlc_event_manager_t
*
p_event_manager
;
libvlc_instance_t
*
p_libvlc_instance
;
int
i_refcount
;
vlc_mutex_t
object_lock
;
libvlc_media_list_path_t
current_playing_item_path
;
libvlc_media_t
*
p_current_playing_item
;
libvlc_media_list_t
*
p_mlist
;
libvlc_media_player_t
*
p_mi
;
};
/*
* Private functions
*/
...
...
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