public void Initialize() { m_HasBeenInitialized = true; GStreamerCore.Ref(); _initialize(); }
public void Init(RobotInfo ifo) { GStreamerCore.Ref(); m_Texture = TargetNode.AddComponent <GstCustomTexture> (); m_Texture.Initialize(); FileName = ifo.URL; _Processor = new OffscreenProcessor(); _Processor.ShaderName = "Image/I420ToRGB"; _needProcessing = false; string path = Application.dataPath + "/" + FileName; m_Texture.SetPipeline("filesrc location=\"" + path + "\" ! qtdemux name=demux " + "demux.video_0 ! queue ! avdec_h264 ! videoconvert ! video/x-raw,format=I420 ! appsink name=videoSink " + "demux.audio_0 ! queue ! decodebin ! audioconvert ! volume volume=5 ! appsink name=audioSink"); m_Texture.OnFrameGrabbed += OnFrameGrabbed; m_Texture.Play(); GameObject audioObj = new GameObject("AudioObject_" + TargetNode.name); audioObj.transform.parent = TargetNode.transform; audioObj.transform.position = Vector3.zero; AudioObject = audioObj.AddComponent <AudioSource> (); AudioObject.loop = true; _player = audioObj.AddComponent <GstAudioPlayer> (); _player.Player = m_Texture.Player.AudioWrapper; _player.TargetSrc = AudioObject; }
public void Initialize() { m_HasBeenInitialized = true; GStreamerCore.Ref(); _player = new GstNetworkPlayer(); // Call resize which will create a texture and a webview for us if they do not exist yet at this point. Resize(m_Width, m_Height); if (GetComponent <GUITexture>()) { GetComponent <GUITexture>().texture = m_Texture; } else if (GetComponent <Renderer>() && GetComponent <Renderer>().material) { GetComponent <Renderer>().material.mainTexture = m_Texture; GetComponent <Renderer>().material.mainTextureScale = new Vector2(Mathf.Abs(GetComponent <Renderer>().material.mainTextureScale.x) * (m_FlipX ? -1.0f : 1.0f), Mathf.Abs(GetComponent <Renderer>().material.mainTextureScale.y) * (m_FlipY ? -1.0f : 1.0f)); } else { Debug.LogWarning("There is no Renderer or guiTexture attached to this GameObject! GstTexture will render to a texture but it will not be visible."); } }
protected override GstIAudioGrabber GetAudioGrabber() { if (_grabber == null) { GStreamerCore.Ref(); _grabber = new GstNetworkAudioGrabber(); _grabber.Init(port, Channels, SamplingRate); _grabber.Start(); } return(_grabber); }
// Use this for initialization void Start() { GStreamerCore.Ref(); _Processor = new OffscreenProcessor(); _Processor.ShaderName = "Image/I420ToRGB"; _needProcessing = false; _texture = gameObject.AddComponent <GstCustomTexture> (); _texture.Initialize(); string path = Application.dataPath + "/" + FileName; _texture.SetPipeline("filesrc location=\"" + path + "\" ! qtdemux name=demux demux.video_0 ! avdec_h264 ! videorate ! videoconvert ! video/x-raw,format=I420,framerate=30/1 "); _texture.OnFrameGrabbed += _OnFrameGrabbed; _texture.Play(); }
public GstLocalAudioGrabber() { GStreamerCore.Ref(); m_Instance = mray_gst_createLocalAudioGrabber(); }
public GstNetworkAudioPlayer() { GStreamerCore.Ref(); m_Instance = mray_gst_createNetworkAudioPlayer(); _audioWrapper = new Wrapper(this); }
public GstUnityImageGrabber() { GStreamerCore.Ref(); m_Instance = mray_gst_createUnityImageGrabber(); }
public GstAppAudioPlayer() { GStreamerCore.Ref(); m_Instance = mray_gst_createAppAudioPlayer(); }
public GstCustomDataPlayer() { GStreamerCore.Ref(); m_Instance = mray_gst_customDataPlayerCreate(); }
public GstIAudioGrabber() { GStreamerCore.Ref(); }
public GstCustomVideoStreamer() { GStreamerCore.Ref(); m_Instance = mray_gst_createCustomImageStreamer(); }
public GstIAudioGrabber() { GStreamerCore.Ref(); Ref(); _processingThread = new Thread(new ThreadStart(_Process)); }
public GstNetworkAudioStreamer() { GStreamerCore.Ref(); m_Instance = mray_gst_createAudioNetworkStreamer(); }
public GstCustomAudioGrabber() { GStreamerCore.Ref(); m_Instance = mray_gst_createCustomAudioGrabber(); }
public GstNetworkImageStreamer() { GStreamerCore.Ref(); m_Instance = mray_gst_createNetworkStreamer(); }