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
2255350f
Commit
2255350f
authored
Nov 02, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALL: backport of 13058,13059,13070,13088,13090,13091,13099 from trunk.
parent
83c0719b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
30 deletions
+66
-30
modules/codec/ffmpeg/demux.c
modules/codec/ffmpeg/demux.c
+9
-0
modules/codec/x264.c
modules/codec/x264.c
+8
-2
modules/gui/wxwidgets/playlist.cpp
modules/gui/wxwidgets/playlist.cpp
+46
-28
modules/gui/wxwidgets/wxwidgets.h
modules/gui/wxwidgets/wxwidgets.h
+1
-0
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+2
-0
No files found.
modules/codec/ffmpeg/demux.c
View file @
2255350f
...
@@ -191,8 +191,17 @@ int E_(OpenDemux)( vlc_object_t *p_this )
...
@@ -191,8 +191,17 @@ int E_(OpenDemux)( vlc_object_t *p_this )
vlc_fourcc_t
fcc
;
vlc_fourcc_t
fcc
;
if
(
!
E_
(
GetVlcFourcc
)(
cc
->
codec_id
,
NULL
,
&
fcc
,
NULL
)
)
if
(
!
E_
(
GetVlcFourcc
)(
cc
->
codec_id
,
NULL
,
&
fcc
,
NULL
)
)
{
fcc
=
VLC_FOURCC
(
'u'
,
'n'
,
'd'
,
'f'
);
fcc
=
VLC_FOURCC
(
'u'
,
'n'
,
'd'
,
'f'
);
/* Special case for raw video data */
if
(
cc
->
codec_id
==
CODEC_ID_RAWVIDEO
)
{
msg_Dbg
(
p_demux
,
"raw video, pixel format: %i"
,
cc
->
pix_fmt
);
fcc
=
E_
(
GetVlcChroma
)(
cc
->
pix_fmt
);
}
}
switch
(
cc
->
codec_type
)
switch
(
cc
->
codec_type
)
{
{
case
CODEC_TYPE_AUDIO
:
case
CODEC_TYPE_AUDIO
:
...
...
modules/codec/x264.c
View file @
2255350f
...
@@ -236,6 +236,7 @@ static int Open ( vlc_object_t *p_this )
...
@@ -236,6 +236,7 @@ static int Open ( vlc_object_t *p_this )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
#if X264_BUILD < 37
if
(
p_enc
->
fmt_in
.
video
.
i_width
%
16
!=
0
||
if
(
p_enc
->
fmt_in
.
video
.
i_width
%
16
!=
0
||
p_enc
->
fmt_in
.
video
.
i_height
%
16
!=
0
)
p_enc
->
fmt_in
.
video
.
i_height
%
16
!=
0
)
{
{
...
@@ -253,6 +254,7 @@ static int Open ( vlc_object_t *p_this )
...
@@ -253,6 +254,7 @@ static int Open ( vlc_object_t *p_this )
p_enc
->
fmt_in
.
video
.
i_width
>>
4
<<
4
,
p_enc
->
fmt_in
.
video
.
i_width
>>
4
<<
4
,
p_enc
->
fmt_in
.
video
.
i_height
>>
4
<<
4
);
p_enc
->
fmt_in
.
video
.
i_height
>>
4
<<
4
);
}
}
#endif
sout_CfgParse
(
p_enc
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_enc
->
p_cfg
);
sout_CfgParse
(
p_enc
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_enc
->
p_cfg
);
...
@@ -265,8 +267,12 @@ static int Open ( vlc_object_t *p_this )
...
@@ -265,8 +267,12 @@ static int Open ( vlc_object_t *p_this )
p_sys
->
i_last_ref_pts
=
0
;
p_sys
->
i_last_ref_pts
=
0
;
x264_param_default
(
&
p_sys
->
param
);
x264_param_default
(
&
p_sys
->
param
);
p_sys
->
param
.
i_width
=
p_enc
->
fmt_in
.
video
.
i_width
>>
4
<<
4
;
p_sys
->
param
.
i_width
=
p_enc
->
fmt_in
.
video
.
i_width
;
p_sys
->
param
.
i_height
=
p_enc
->
fmt_in
.
video
.
i_height
>>
4
<<
4
;
p_sys
->
param
.
i_height
=
p_enc
->
fmt_in
.
video
.
i_height
;
#if X264_BUILD < 37
p_sys
->
param
.
i_width
=
p_sys
->
param
.
i_width
>>
4
<<
4
;
p_sys
->
param
.
i_height
=
p_sys
->
param
.
i_height
>>
4
<<
4
;
#endif
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"qp-min"
,
&
val
);
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"qp-min"
,
&
val
);
if
(
val
.
i_int
>=
1
&&
val
.
i_int
<=
51
)
i_qmin
=
val
.
i_int
;
if
(
val
.
i_int
>=
1
&&
val
.
i_int
<=
51
)
i_qmin
=
val
.
i_int
;
...
...
modules/gui/wxwidgets/playlist.cpp
View file @
2255350f
...
@@ -204,6 +204,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
...
@@ -204,6 +204,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
i_update_counter
=
0
;
i_update_counter
=
0
;
i_sort_mode
=
MODE_NONE
;
i_sort_mode
=
MODE_NONE
;
b_need_update
=
VLC_FALSE
;
b_need_update
=
VLC_FALSE
;
i_items_to_append
=
0
;
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
==
NULL
)
return
;
...
@@ -483,15 +484,23 @@ void Playlist::UpdateTreeItem( wxTreeItemId item )
...
@@ -483,15 +484,23 @@ void Playlist::UpdateTreeItem( wxTreeItemId item )
LockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
LockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
((
PlaylistItem
*
)
p_data
)
->
i_id
);
((
PlaylistItem
*
)
p_data
)
->
i_id
);
if
(
!
p_item
)
return
;
if
(
!
p_item
)
{
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
return
;
}
wxString
msg
;
wxString
msg
;
wxString
duration
=
wxU
(
""
);
wxString
duration
=
wxU
(
""
);
char
*
psz_author
=
vlc_input_item_GetInfo
(
&
p_item
->
input
,
char
*
psz_author
=
vlc_input_item_GetInfo
(
&
p_item
->
input
,
_
(
"Meta-information"
),
_
(
"Meta-information"
),
_
(
"Artist"
));
_
(
"Artist"
));
if
(
psz_author
==
NULL
)
if
(
!
psz_author
)
{
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
return
;
return
;
}
char
psz_duration
[
MSTRTIME_MAX_SIZE
];
char
psz_duration
[
MSTRTIME_MAX_SIZE
];
mtime_t
dur
=
p_item
->
input
.
i_duration
;
mtime_t
dur
=
p_item
->
input
.
i_duration
;
...
@@ -518,7 +527,11 @@ void Playlist::UpdateTreeItem( wxTreeItemId item )
...
@@ -518,7 +527,11 @@ void Playlist::UpdateTreeItem( wxTreeItemId item )
if
(
p_playlist
->
status
.
p_item
==
p_item
)
if
(
p_playlist
->
status
.
p_item
==
p_item
)
{
{
treectrl
->
SetItemBold
(
item
,
true
);
treectrl
->
SetItemBold
(
item
,
true
);
treectrl
->
EnsureVisible
(
item
);
while
(
treectrl
->
GetItemParent
(
item
).
IsOk
()
)
{
item
=
treectrl
->
GetItemParent
(
item
);
treectrl
->
Expand
(
item
);
}
}
}
else
else
{
{
...
@@ -532,23 +545,23 @@ void Playlist::AppendItem( wxCommandEvent& event )
...
@@ -532,23 +545,23 @@ void Playlist::AppendItem( wxCommandEvent& event )
{
{
playlist_add_t
*
p_add
=
(
playlist_add_t
*
)
event
.
GetClientData
();
playlist_add_t
*
p_add
=
(
playlist_add_t
*
)
event
.
GetClientData
();
playlist_item_t
*
p_item
=
NULL
;
playlist_item_t
*
p_item
=
NULL
;
wxTreeItemId
item
,
node
;
wxTreeItemId
item
,
node
;
i_items_to_append
--
;
if
(
p_add
->
i_view
!=
i_current_view
)
/* No need to do anything if the playlist is going to be rebuilt */
{
if
(
b_need_update
)
return
;
goto
update
;
}
if
(
p_add
->
i_view
!=
i_current_view
)
goto
update
;
node
=
FindItem
(
treectrl
->
GetRootItem
(),
p_add
->
i_node
);
node
=
FindItem
(
treectrl
->
GetRootItem
(),
p_add
->
i_node
);
if
(
!
node
.
IsOk
()
)
if
(
!
node
.
IsOk
()
)
goto
update
;
{
goto
update
;
}
p_item
=
playlist_ItemGetById
(
p_playlist
,
p_add
->
i_item
);
p_item
=
playlist_ItemGetById
(
p_playlist
,
p_add
->
i_item
);
if
(
!
p_item
)
if
(
!
p_item
)
goto
update
;
goto
update
;
item
=
FindItem
(
treectrl
->
GetRootItem
(),
p_add
->
i_item
);
if
(
item
.
IsOk
()
)
goto
update
;
item
=
treectrl
->
AppendItem
(
node
,
item
=
treectrl
->
AppendItem
(
node
,
wxL2U
(
p_item
->
input
.
psz_name
),
-
1
,
-
1
,
wxL2U
(
p_item
->
input
.
psz_name
),
-
1
,
-
1
,
...
@@ -747,6 +760,8 @@ void Playlist::Rebuild( vlc_bool_t b_root )
...
@@ -747,6 +760,8 @@ void Playlist::Rebuild( vlc_bool_t b_root )
{
{
playlist_view_t
*
p_view
;
playlist_view_t
*
p_view
;
i_items_to_append
=
0
;
/* We can remove the callbacks before locking, anyway, we won't
/* We can remove the callbacks before locking, anyway, we won't
* miss anything */
* miss anything */
if
(
b_root
)
if
(
b_root
)
...
@@ -851,21 +866,13 @@ void Playlist::DeleteTreeItem( wxTreeItemId item )
...
@@ -851,21 +866,13 @@ void Playlist::DeleteTreeItem( wxTreeItemId item )
return
;
return
;
}
}
if
(
p_item
->
i_children
==
-
1
)
if
(
p_item
->
i_children
==
-
1
)
DeleteItem
(
p_item
->
input
.
i_id
);
{
else
DeleteNode
(
p_item
);
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
DeleteItem
(
p_item
->
input
.
i_id
);
}
else
{
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
DeleteNode
(
p_item
);
}
RemoveItem
(
item
);
RemoveItem
(
item
);
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
}
}
void
Playlist
::
DeleteItem
(
int
item_id
)
void
Playlist
::
DeleteItem
(
int
item_id
)
{
{
playlist_LockDelete
(
p_playlist
,
item_id
);
playlist_LockDelete
(
p_playlist
,
item_id
);
...
@@ -1078,7 +1085,11 @@ void Playlist::OnActivateItem( wxTreeEvent& event )
...
@@ -1078,7 +1085,11 @@ void Playlist::OnActivateItem( wxTreeEvent& event )
LockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
LockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
if
(
!
(
p_wxitem
&&
p_wxparent
)
)
return
;
if
(
!
(
p_wxitem
&&
p_wxparent
)
)
{
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
return
;
}
p_item2
=
playlist_ItemGetById
(
p_playlist
,
p_wxitem
->
i_id
);
p_item2
=
playlist_ItemGetById
(
p_playlist
,
p_wxitem
->
i_id
);
p_node2
=
playlist_ItemGetById
(
p_playlist
,
p_wxparent
->
i_id
);
p_node2
=
playlist_ItemGetById
(
p_playlist
,
p_wxparent
->
i_id
);
...
@@ -1505,9 +1516,16 @@ static int ItemAppended( vlc_object_t *p_this, const char *psz_variable,
...
@@ -1505,9 +1516,16 @@ static int ItemAppended( vlc_object_t *p_this, const char *psz_variable,
Playlist
*
p_playlist_dialog
=
(
Playlist
*
)
param
;
Playlist
*
p_playlist_dialog
=
(
Playlist
*
)
param
;
playlist_add_t
*
p_add
=
(
playlist_add_t
*
)
malloc
(
sizeof
(
playlist_add_t
));
playlist_add_t
*
p_add
=
(
playlist_add_t
*
)
malloc
(
sizeof
(
playlist_add_t
));
memcpy
(
p_add
,
nval
.
p_address
,
sizeof
(
playlist_add_t
)
);
memcpy
(
p_add
,
nval
.
p_address
,
sizeof
(
playlist_add_t
)
);
if
(
p_playlist_dialog
->
i_items_to_append
++
>
50
)
{
/* Too many items waiting to be added, it will be quicker to rebuild
* the whole playlist */
p_playlist_dialog
->
b_need_update
=
VLC_TRUE
;
return
VLC_SUCCESS
;
}
wxCommandEvent
event
(
wxEVT_PLAYLIST
,
AppendItem_Event
);
wxCommandEvent
event
(
wxEVT_PLAYLIST
,
AppendItem_Event
);
event
.
SetClientData
(
(
void
*
)
p_add
);
event
.
SetClientData
(
(
void
*
)
p_add
);
p_playlist_dialog
->
AddPendingEvent
(
event
);
p_playlist_dialog
->
AddPendingEvent
(
event
);
...
...
modules/gui/wxwidgets/wxwidgets.h
View file @
2255350f
...
@@ -878,6 +878,7 @@ public:
...
@@ -878,6 +878,7 @@ public:
void
AppendItem
(
wxCommandEvent
&
);
void
AppendItem
(
wxCommandEvent
&
);
bool
b_need_update
;
bool
b_need_update
;
int
i_items_to_append
;
private:
private:
void
RemoveItem
(
int
);
void
RemoveItem
(
int
);
...
...
modules/stream_out/transcode.c
View file @
2255350f
...
@@ -1500,6 +1500,8 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
...
@@ -1500,6 +1500,8 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
/* Close the encoder.
/* Close the encoder.
* We'll open it only when we have the first frame. */
* We'll open it only when we have the first frame. */
module_Unneed
(
id
->
p_encoder
,
id
->
p_encoder
->
p_module
);
module_Unneed
(
id
->
p_encoder
,
id
->
p_encoder
->
p_module
);
if
(
id
->
p_encoder
->
fmt_out
.
p_extra
)
free
(
id
->
p_encoder
->
fmt_out
.
p_extra
);
id
->
p_encoder
->
p_module
=
NULL
;
id
->
p_encoder
->
p_module
=
NULL
;
if
(
p_sys
->
i_threads
>=
1
)
if
(
p_sys
->
i_threads
>=
1
)
...
...
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