Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Weblate
gajim
Commits
fe67de9b
Commit
fe67de9b
authored
15 years ago
by
Thibg
Browse files
Options
Downloads
Patches
Plain Diff
[Jingle] Add converters and simplify pipelines configuration-side
parent
132d71b0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/jingle_rtp.py
+16
-11
16 additions, 11 deletions
src/common/jingle_rtp.py
src/common/multimedia_helpers.py
+2
-4
2 additions, 4 deletions
src/common/multimedia_helpers.py
with
18 additions
and
15 deletions
src/common/jingle_rtp.py
+
16
−
11
View file @
fe67de9b
...
...
@@ -252,17 +252,20 @@ class JingleAudio(JingleRTPContent):
self
.
p2psession
.
set_codec_preferences
(
codecs
)
# the local parts
# TODO: Add queues?
try
:
self
.
sink
=
gst
.
parse_bin_from_description
(
gajim
.
config
.
get
(
'
audio_output_device
'
),
True
)
src_bin
=
gst
.
parse_bin_from_description
(
'
%s ! audioconvert
'
%
gajim
.
config
.
get
(
'
audio_input_device
'
),
True
)
except
:
self
.
session
.
connection
.
dispatch
(
'
ERROR
'
,
(
_
(
"
Audio configuration error
"
),
_
(
"
Couldn
'
t setup audio
out
put. Check your audio configuration.
"
)))
_
(
"
Couldn
'
t setup audio
in
put. Check your audio configuration.
"
)))
try
:
src_bin
=
gst
.
parse_bin_from_description
(
gajim
.
config
.
get
(
'
audio_input_device
'
),
True
)
self
.
sink
=
gst
.
parse_bin_from_description
(
'
audioconvert ! %s
'
%
gajim
.
config
.
get
(
'
audio_output_device
'
),
True
)
except
:
self
.
session
.
connection
.
dispatch
(
'
ERROR
'
,
(
_
(
"
Audio configuration error
"
),
_
(
"
Couldn
'
t setup audio
in
put. Check your audio configuration.
"
)))
_
(
"
Couldn
'
t setup audio
out
put. Check your audio configuration.
"
)))
self
.
mic_volume
=
src_bin
.
get_by_name
(
'
gajim_vol
'
)
self
.
mic_volume
.
set_property
(
'
volume
'
,
1
)
...
...
@@ -291,24 +294,26 @@ class JingleVideo(JingleRTPContent):
# the local parts
try
:
src_bin
=
gst
.
parse_bin_from_description
(
gajim
.
config
.
get
(
'
video_input_device
'
),
True
)
src_bin
=
gst
.
parse_bin_from_description
(
'
%s ! videoscale ! ffmpegcolorspace
'
%
gajim
.
config
.
get
(
'
video_input_device
'
),
True
)
except
:
self
.
session
.
connection
.
dispatch
(
'
ERROR
'
,
(
_
(
"
Video configuration error
"
),
_
(
"
Couldn
'
t setup video input. Check your video configuration.
"
)))
caps
=
gst
.
element_factory_make
(
'
capsfilter
'
)
caps
.
set_property
(
'
caps
'
,
gst
.
caps_from_string
(
'
video/x-raw-yuv, width=320, height=240
'
))
#
caps = gst.element_factory_make('capsfilter')
#
caps.set_property('caps', gst.caps_from_string('video/x-raw-yuv, width=320, height=240'))
self
.
pipeline
.
add
(
src_bin
,
caps
)
src_bin
.
link
(
caps
)
self
.
pipeline
.
add
(
src_bin
)
#
, caps)
#
src_bin.link(caps)
try
:
self
.
sink
=
gst
.
parse_bin_from_description
(
gajim
.
config
.
get
(
'
video_output_device
'
),
True
)
self
.
sink
=
gst
.
parse_bin_from_description
(
'
videoscale ! ffmpegcolorspace ! %s
'
%
gajim
.
config
.
get
(
'
video_output_device
'
),
True
)
except
:
self
.
session
.
connection
.
dispatch
(
'
ERROR
'
,
(
_
(
"
Video configuration error
"
),
_
(
"
Couldn
'
t setup video output. Check your video configuration.
"
)))
self
.
pipeline
.
add
(
self
.
sink
)
caps
.
get_pad
(
'
src
'
).
link
(
self
.
p2psession
.
get_property
(
'
sink-pad
'
))
src_bin
.
get_pad
(
'
src
'
).
link
(
self
.
p2psession
.
get_property
(
'
sink-pad
'
))
self
.
p2pstream
.
connect
(
'
src-pad-added
'
,
self
.
_on_src_pad_added
)
# The following is needed for farsight to process ICE requests:
...
...
This diff is collapsed.
Click to expand it.
src/common/multimedia_helpers.py
+
2
−
4
View file @
fe67de9b
...
...
@@ -78,11 +78,9 @@ class VideoInputManager(DeviceManager):
self
.
detect_element
(
'
videotestsrc
'
,
_
(
'
Video test
'
),
'
%s is-live=true
'
)
# Auto src
self
.
detect_element
(
'
autovideosrc
'
,
_
(
'
Autodetect
'
),
'
%s ! videoscale ! ffmpegcolorspace
'
)
self
.
detect_element
(
'
autovideosrc
'
,
_
(
'
Autodetect
'
))
# V4L2 src ; TODO: Figure out why it doesn't work
self
.
detect_element
(
'
v4l2src
'
,
_
(
'
V4L2: %s
'
),
'
%s ! videoscale ! ffmpegcolorspace
'
)
self
.
detect_element
(
'
v4l2src
'
,
_
(
'
V4L2: %s
'
))
# Funny things, just to test...
# self.devices['GOOM'] = 'audiotestsrc ! goom'
# self.devices['screen'] = 'ximagesrc'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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