Skip to content
This repository was archived by the owner on May 28, 2022. It is now read-only.

Migrate to GStreamer 1.0 #407

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Autoaudiosource take 2
-I jumped the gun and hadn't saved my changes for the OS guard
Biskelion committed Nov 6, 2013
commit ff002f3538e75e7f99431fc4388d8b32a21b908a
11 changes: 8 additions & 3 deletions src/freeseer/plugins/audioinput/autoaudiosrc/__init__.py
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@

@author: Thanh Ha
'''
import sys

import gi
gi.require_version('Gst', '1.0')
@@ -42,10 +43,14 @@ class AutoAudioSrc(IAudioInput):

def get_audioinput_bin(self):
bin = Gst.Bin() # Do not pass a name so that we can load this input more than once.
if sys.platform.startswith("linux"):
audiosrc = Gst.ElementFactory.make("autoaudiosrc", None)

# audiosrc = Gst.ElementFactory.make("autoaudiosrc", None)
# autoaudiosrc causes python to lock up in Windows
audiosrc = Gst.ElementFactory.make("audiotestsrc", None)
elif sys.platform in ["win32", "cygwin"]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why you need to do this. If the plugin doesn't support windows then just remove it from the "os" list on line 41. The os variable represents what OSes this plugin supports and Freeseer will automatically filter the plugin out when someone tries to run it on an unsupported OS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in IRC my thinking was along the lines of, I knew that it didn't work currently but that it would probably be supported in an upcoming version of Gst so that it would a simple matter of just deleting the added code to allow Windows to use an audio source once the feature was implemented.

I didn't think at this point that this would be a functional product that I'd be delivering but one that could be built upon in the future.

# autoaudiosrc causes python to lock up in Windows
audiosrc = Gst.ElementFactory.make("audiotestsrc", None)


bin.add(audiosrc)

# Setup ghost pad