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
8e0d48c8
Commit
8e0d48c8
authored
Sep 21, 2011
by
Konstantin Pavlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stream out switcher: use existing kludges to port to new FFMpeg/Libav
API. Also, distinguish between SSE and SSE2 CPUs.
parent
64568cf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
modules/stream_out/switcher.c
modules/stream_out/switcher.c
+18
-10
No files found.
modules/stream_out/switcher.c
View file @
8e0d48c8
...
@@ -57,6 +57,8 @@
...
@@ -57,6 +57,8 @@
# include <libpostproc/postprocess.h>
# include <libpostproc/postprocess.h>
#endif
#endif
#include "../codec/avcodec/avcodec.h"
#define SOUT_CFG_PREFIX "sout-switcher-"
#define SOUT_CFG_PREFIX "sout-switcher-"
#define MAX_PICTURES 10
#define MAX_PICTURES 10
#define MAX_AUDIO 30
#define MAX_AUDIO 30
...
@@ -360,20 +362,23 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
...
@@ -360,20 +362,23 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
id
->
ff_enc_c
->
dsp_mask
=
0
;
id
->
ff_enc_c
->
dsp_mask
=
0
;
if
(
!
(
i_cpu
&
CPU_CAPABILITY_MMX
)
)
if
(
!
(
i_cpu
&
CPU_CAPABILITY_MMX
)
)
{
{
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM
_MMX
;
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG
_MMX
;
}
}
if
(
!
(
i_cpu
&
CPU_CAPABILITY_MMXEXT
)
)
if
(
!
(
i_cpu
&
CPU_CAPABILITY_MMXEXT
)
)
{
{
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM_MMXEXT
;
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG_MMX2
;
}
}
if
(
!
(
i_cpu
&
CPU_CAPABILITY_3DNOW
)
)
if
(
!
(
i_cpu
&
CPU_CAPABILITY_3DNOW
)
)
{
{
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM
_3DNOW
;
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG
_3DNOW
;
}
}
if
(
!
(
i_cpu
&
CPU_CAPABILITY_SSE
)
)
if
(
!
(
i_cpu
&
CPU_CAPABILITY_SSE
)
)
{
{
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM_SSE
;
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG_SSE
;
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM_SSE2
;
}
if
(
!
(
i_cpu
&
CPU_CAPABILITY_SSE2
)
)
{
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG_SSE2
;
}
}
id
->
ff_enc_c
->
sample_rate
=
p_fmt
->
audio
.
i_rate
;
id
->
ff_enc_c
->
sample_rate
=
p_fmt
->
audio
.
i_rate
;
...
@@ -749,20 +754,23 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id )
...
@@ -749,20 +754,23 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id )
id
->
ff_enc_c
->
dsp_mask
=
0
;
id
->
ff_enc_c
->
dsp_mask
=
0
;
if
(
!
(
i_cpu
&
CPU_CAPABILITY_MMX
)
)
if
(
!
(
i_cpu
&
CPU_CAPABILITY_MMX
)
)
{
{
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM
_MMX
;
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG
_MMX
;
}
}
if
(
!
(
i_cpu
&
CPU_CAPABILITY_MMXEXT
)
)
if
(
!
(
i_cpu
&
CPU_CAPABILITY_MMXEXT
)
)
{
{
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM_MMXEXT
;
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG_MMX2
;
}
}
if
(
!
(
i_cpu
&
CPU_CAPABILITY_3DNOW
)
)
if
(
!
(
i_cpu
&
CPU_CAPABILITY_3DNOW
)
)
{
{
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM
_3DNOW
;
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG
_3DNOW
;
}
}
if
(
!
(
i_cpu
&
CPU_CAPABILITY_SSE
)
)
if
(
!
(
i_cpu
&
CPU_CAPABILITY_SSE
)
)
{
{
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM_SSE
;
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG_SSE
;
id
->
ff_enc_c
->
dsp_mask
|=
FF_MM_SSE2
;
}
if
(
!
(
i_cpu
&
CPU_CAPABILITY_SSE2
)
)
{
id
->
ff_enc_c
->
dsp_mask
|=
AV_CPU_FLAG_SSE2
;
}
}
id
->
ff_enc_c
->
width
=
p_sys
->
p_pictures
[
p_sys
->
i_cmd
-
1
].
format
.
i_width
;
id
->
ff_enc_c
->
width
=
p_sys
->
p_pictures
[
p_sys
->
i_cmd
-
1
].
format
.
i_width
;
...
...
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