Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
mediastreamer2
Commits
51feb8dc
Commit
51feb8dc
authored
12 years ago
by
Ghislain MARY
Browse files
Options
Download
Patches
Plain Diff
Add the void_source filter that generates silence.
parent
e5f7137b
master
2.11.x
2.12.x
2.13.x
2.14.x
2.15.x
android-3.1.1
dev/mbedtls-2.16.0
dev/parallel_tests
dev_android_aaudio
dev_lime_v2
dev_opus
dev_screensharing
dev_smoothed_rtp_output
dev_speaker
ecc
encoder_native_format
feature/5.0
feature/AEC-tests
feature/AEC3
feature/add_id_setter_getter
feature/alsa_hot_update
feature/android_agc
feature/android_camera2
feature/audio-conference-package
feature/call_device_id_setter_getter
feature/cherry_pick_fixes
feature/client_audio_mixer
feature/dummy_video_codec
feature/factory_video_router_to_packet_router
feature/fec
feature/fec_adaptation
feature/improved_capture_texture_view
feature/key_exchange_protocol_identification
feature/local-recorder
feature/mac_hotreload
feature/mac_reload
feature/mediacodec_resilience_improvements
feature/mediastream_direction
feature/mselph264
feature/opensles_api_audio_route
feature/remove-ortp-deps-directory
feature/screensharing_packet_router
feature/screensharing_x11
feature/sfu
feature/sfu-audio-conf
feature/snd_card_conservation
feature/update-mbedtls-2.16
feature/videoconf
fix/ECC-for-desktop
fix/add-srtp-logs
fix/add_usable_dtmf_feedback
fix/android-texture-display
fix/audio_only_participant
fix/audio_restart_on_ringback
fix/audio_route_issue
fix/audio_units_bugs
fix/audio_units_bugs2
fix/autofocus
fix/build-without-glu-header-file
fix/callkit-audiounit
fix/commented_broken_tests
fix/compilation-ios
fix/conference_video_policy
fix/conference_without_bundle_mode
fix/crash_tests
fix/dtmf_soundcard
fix/early_update
fix/extra_audio_route_logs_master
fix/fec-clean-log
fix/fix/ubuntu_glew_find_package_wrong_so_version
fix/frameRegulator
fix/g729
fix/ice_ortp_packet_source_redirection
fix/id_setter_getter
fix/improve_test_notify_speaking_device
fix/infinite_fps_reconfigure
fix/ios-definition
fix/ios_9_compatibility
fix/ios_audio_routes_0010142_master
fix/local_player
fix/mac_freeze_camera
fix/mac_sreenfreeze
fix/media_codec_dec_increase_input_timeout_for_rokchip_X9-LX_device
fix/mid-warnings
fix/missing_commit_ms2
fix/ms2_plugin_ios
fix/netsync-device
fix/no-longer-use-deprecated-findpythoninterp-cmake-module
fix/no_thumbnail_if_enter_conf_with_video
fix/opengl_51
fix/opengl_compatibility
fix/opengl_dependencies
fix/opensles_audio_routing
fix/opensles_mic_switch_in_speaker
fix/participant_video_no_conf_event_pkg
fix/prack_auth
fix/printf-format-causing-errors-when-building-for-yocto
fix/qt_crash
fix/remote-address-adaptation
fix/resume-with-music
fix/rewrite-tone-manager
fix/screen_jul
fix/session_preset_iphone_xs
fix/set_ptr_to_null_after_unref
fix/slowdown_tone
fix/smff-crash
fix/srtp_key_length
fix/test_crashs
fix/test_orphan_check_script_squash
fix/test_video_file_stream
fix/textureview_infinite_loop
fix/ticker_time_func_race_condition
fix/tmp-branch-audio-conf
fix/tone-manager-crash
fix/transcient-video-stretching
fix/unwanted_ring_on_stop
fix/video-conference-ssrc-changed
fix/video_windows_store
fix/xcode-compilation-issues
fix/xcode-compilation-issues-2
fix/xcode15_build
fix/yuv-pix-strides-size
fix/zrtp_auto_start
hotfix/4.0.1-ios
hotfix/4.0.2-ios
hotfix/android
hotfix/flow_controler_accumulated_size_evaluation
hotfix/gh_issues_templates_syntax_error
interrupt
ives/check-pli
ives/feat/macos-vol-ctrl
linphone-iphone-3.16.5.x
maintenance/51
maintenance/customer-28
peioTest
release/2.16
release/4.2
release/4.3
release/4.4
release/4.5
release/5.0
release/5.1
release/5.2
release/5.3
release/5.4
release/linphone-android/4.0.1
release/linphone-desktop/4.2
rework_aaudio
sqlzidcache
test/dummy_change_to_trigger_tester_launch
5.5.0-alpha
5.4.0
5.4.0-beta
5.4.0-alpha
5.3.106
5.3.105
5.3.104
5.3.103
5.3.102
5.3.101
5.3.100
5.3.99
5.3.97
5.3.96
5.3.95
5.3.94
5.3.93
5.3.92
5.3.90
5.3.89
5.3.88
5.3.87
5.3.86
5.3.85
5.3.84
5.3.83
5.3.81
5.3.79
5.3.78
5.3.77
5.3.75
5.3.74
5.3.73
5.3.72
5.3.71
5.3.70
5.3.69
5.3.67
5.3.65
5.3.64
5.3.63
5.3.62
5.3.61
5.3.60
5.3.59
5.3.58
5.3.57
5.3.56
5.3.55
5.3.54
5.3.53
5.3.52
5.3.51
5.3.50
5.3.49
5.3.46
5.3.45
5.3.44
5.3.42
5.3.41
5.3.40
5.3.38
5.3.37
5.3.36
5.3.35
5.3.34
5.3.33
5.3.30
5.3.29
5.3.27
5.3.26
5.3.25
5.3.24
5.3.23
5.3.22
5.3.21
5.3.19
5.3.18
5.3.15
5.3.14
5.3.13
5.3.12
5.3.11
5.3.10
5.3.9
5.3.7
5.3.6
5.3.5
5.3.4
5.3.3
5.3.1
5.3.0
5.3.0-beta
5.3.0-alpha
5.2.114
5.2.113
5.2.112
5.2.111
5.2.109
5.2.108
5.2.107
5.2.106
5.2.105
5.2.102
5.2.100
5.2.98
5.2.97
5.2.95
5.2.94
5.2.93
5.2.91
5.2.90
5.2.89
5.2.88
5.2.87
5.2.86
5.2.85
5.2.83
5.2.82
5.2.81
5.2.75
5.2.74
5.2.73
5.2.71
5.2.70
5.2.64
5.2.63
5.2.62
5.2.61
5.2.59
5.2.58
5.2.57
5.2.55
5.2.54
5.2.53
5.2.52
5.2.51
5.2.49
5.2.48
5.2.45
5.2.43
5.2.42
5.2.37
5.2.34
5.2.33
5.2.32
5.2.30
5.2.29
5.2.28
5.2.27
5.2.26
5.2.25
5.2.24
5.2.23
5.2.22
5.2.21
5.2.16
5.2.15
5.2.13
5.2.12
5.2.11
5.2.9
5.2.6
5.2.5
5.2.4
5.2.2
5.2.1
5.2.0
5.2.0-beta
5.2.0-alpha
5.1.72
5.1.71
5.1.67
5.1.66
5.1.64
5.1.61
5.1.58
5.1.55
5.1.51
5.1.45
5.1.44
5.1.43
5.1.32
5.1.31
5.1.30
5.1.29
5.1.28
5.1.20
5.1.18
5.1.15
5.1.12
5.1.11
5.1.10
5.1.3
5.1.2
5.1.0
5.1.0-beta
5.1.0-alpha
5.0.71
5.0.70
5.0.68
5.0.67
5.0.66
5.0.63
5.0.62
5.0.61
5.0.58
5.0.56
5.0.55
5.0.53
5.0.51
5.0.50
5.0.49
5.0.46
5.0.44
5.0.37
5.0.36
5.0.35
5.0.32
5.0.28
5.0.27
5.0.26
5.0.24
5.0.23
5.0.22
5.0.18
5.0.16
5.0.15
5.0.13
5.0.11
5.0.10
5.0.8
5.0.6
5.0.5
5.0.3
5.0.0
5.0.0-beta
5.0.0-alpha
4.5.22
4.5.20
4.5.16
4.5.15
4.5.14
4.5.13
4.5.10
4.5.7
4.5.3
4.5.1
4.5.0
4.5.0-alpha
4.4.35
4.4.34
4.4.33
4.4.32
4.4.31
4.4.29
4.4.28
4.4.27
4.4.26
4.4.25
4.4.24
4.4.22
4.4.21
4.4.19
4.4.18
4.4.17
4.4.16
4.4.13
4.4.12
4.4.10
4.4.9
4.4.8
4.4.7
4.4.6
4.4.5
4.4.4
4.4.3
4.4.2
4.4.0
4.4.0-beta
4.4.0-alpha
4.3.3
4.3.2
4.3.1
4.3.0
4.3.0-beta
4.0.25
2.16.1
2.16.0
2.15.1
2.15.0
2.14.0
2.13.0
2.12.1
2.12.0
2.11.2
2.11.1
2.11.0
2.10.0
2.9.1
2.9.0
linphone-iphone-3.16.5
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
build/android/basedescs.h
+2
-0
build/android/basedescs.h
build/iphone/basedescs.h
+2
-0
build/iphone/basedescs.h
include/mediastreamer2/allfilters.h
+1
-0
include/mediastreamer2/allfilters.h
src/otherfilters/void.c
+82
-0
src/otherfilters/void.c
with
87 additions
and
0 deletions
build/android/basedescs.h
+
2
−
0
View file @
51feb8dc
...
...
@@ -2,12 +2,14 @@
extern
MSFilterDesc
ms_tee_desc
;
extern
MSFilterDesc
ms_join_desc
;
extern
MSFilterDesc
ms_void_source_desc
;
extern
MSFilterDesc
ms_void_sink_desc
;
MSFilterDesc
*
ms_base_filter_descs
[]
=
{
&
ms_tee_desc
,
&
ms_join_desc
,
&
ms_void_source_desc
,
&
ms_void_sink_desc
,
NULL
};
...
...
This diff is collapsed.
Click to expand it.
build/iphone/basedescs.h
+
2
−
0
View file @
51feb8dc
...
...
@@ -2,6 +2,7 @@
extern
MSFilterDesc
ms_tee_desc
;
extern
MSFilterDesc
ms_join_desc
;
extern
MSFilterDesc
ms_void_source_desc
;
extern
MSFilterDesc
ms_void_sink_desc
;
extern
MSFilterDesc
ms_itc_source_desc
;
extern
MSFilterDesc
ms_itc_sink_desc
;
...
...
@@ -9,6 +10,7 @@ extern MSFilterDesc ms_itc_sink_desc;
MSFilterDesc
*
ms_base_filter_descs
[]
=
{
&
ms_tee_desc
,
&
ms_join_desc
,
&
ms_void_source_desc
,
&
ms_void_sink_desc
,
&
ms_itc_source_desc
,
&
ms_itc_sink_desc
,
...
...
This diff is collapsed.
Click to expand it.
include/mediastreamer2/allfilters.h
+
1
−
0
View file @
51feb8dc
...
...
@@ -81,6 +81,7 @@ typedef enum MSFilterId{
MS_H263_OLD_ENC_ID
,
MS_MIRE_ID
,
MS_VFW_ID
,
MS_VOID_SOURCE_ID
,
MS_VOID_SINK_ID
,
MS_DSCAP_ID
,
MS_AQ_READ_ID
,
...
...
This diff is collapsed.
Click to expand it.
src/otherfilters/void.c
+
82
−
0
View file @
51feb8dc
...
...
@@ -18,8 +18,58 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include
"mediastreamer2/msfilter.h"
#include
"mediastreamer2/msticker.h"
struct
VoidSourceState
{
int
rate
;
int
nchannels
;
};
typedef
struct
VoidSourceState
VoidSourceState
;
static
void
void_source_init
(
MSFilter
*
f
)
{
VoidSourceState
*
s
=
(
VoidSourceState
*
)
ms_new
(
VoidSourceState
,
1
);
s
->
rate
=
8000
;
s
->
nchannels
=
1
;
f
->
data
=
s
;
}
static
void
void_source_uninit
(
MSFilter
*
f
)
{
ms_free
(
f
->
data
);
}
static
void
void_source_process
(
MSFilter
*
f
)
{
mblk_t
*
m
;
VoidSourceState
*
s
=
(
VoidSourceState
*
)
f
->
data
;
int
nsamples
;
nsamples
=
(
f
->
ticker
->
interval
*
s
->
rate
)
/
1000
;
m
=
allocb
(
nsamples
*
s
->
nchannels
*
2
,
0
);
memset
(
m
->
b_wptr
,
0
,
nsamples
*
s
->
nchannels
*
2
);
m
->
b_wptr
+=
nsamples
*
s
->
nchannels
*
2
;
ms_queue_put
(
f
->
outputs
[
0
],
m
);
}
static
int
void_source_set_rate
(
MSFilter
*
f
,
void
*
arg
)
{
VoidSourceState
*
s
=
(
VoidSourceState
*
)
f
->
data
;
s
->
rate
=
*
((
int
*
)
arg
);
return
0
;
}
static
int
void_source_set_nchannels
(
MSFilter
*
f
,
void
*
arg
)
{
VoidSourceState
*
s
=
(
VoidSourceState
*
)
f
->
data
;
s
->
nchannels
=
*
(
int
*
)
arg
;
return
0
;
}
MSFilterMethod
void_source_methods
[]
=
{
{
MS_FILTER_SET_SAMPLE_RATE
,
void_source_set_rate
},
{
MS_FILTER_SET_NCHANNELS
,
void_source_set_nchannels
},
{
0
,
NULL
}
};
static
void
void_sink_process
(
MSFilter
*
f
){
mblk_t
*
im
;
while
((
im
=
ms_queue_get
(
f
->
inputs
[
0
]))
!=
NULL
){
...
...
@@ -29,6 +79,23 @@ static void void_sink_process(MSFilter *f){
#ifdef _MSC_VER
MSFilterDesc
ms_void_source_desc
=
{
MS_VOID_SOURCE_ID
,
"MSVoidSource"
,
N_
(
"A filter that generates silence on its output (useful for beginning some graphs)."
),
MS_FILTER_OTHER
,
NULL
,
0
,
1
,
void_source_init
,
NULL
,
void_source_process
,
NULL
,
void_source_uninit
,
void_source_methods
,
MS_FILTER_IS_PUMP
};
MSFilterDesc
ms_void_sink_desc
=
{
MS_VOID_SINK_ID
,
"MSVoidSink"
,
...
...
@@ -46,6 +113,20 @@ MSFilterDesc ms_void_sink_desc={
#else
MSFilterDesc
ms_void_source_desc
=
{
.
id
=
MS_VOID_SOURCE_ID
,
.
name
=
"MSVoidSource"
,
.
text
=
N_
(
"A filter that generates silence on its output (useful for beginning some graphs)."
),
.
category
=
MS_FILTER_OTHER
,
.
ninputs
=
0
,
.
noutputs
=
1
,
.
init
=
void_source_init
,
.
process
=
void_source_process
,
.
uninit
=
void_source_uninit
,
.
methods
=
void_source_methods
,
.
flags
=
MS_FILTER_IS_PUMP
};
MSFilterDesc
ms_void_sink_desc
=
{
.
id
=
MS_VOID_SINK_ID
,
.
name
=
"MSVoidSink"
,
...
...
@@ -58,4 +139,5 @@ MSFilterDesc ms_void_sink_desc={
#endif
MS_FILTER_DESC_EXPORT
(
ms_void_source_desc
)
MS_FILTER_DESC_EXPORT
(
ms_void_sink_desc
)
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets