protected override void _initialize()
    {
        _player = new GstCustomPlayer();

        _imageGrabber = new Thread(new ThreadStart(ImageGrabberThread));
        _imageGrabber.Start();
    }
Пример #2
0
    public void Initialize()
    {
        m_HasBeenInitialized = true;

        GStreamerCore.Ref();
        _player = new GstCustomPlayer();

        // 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.");
        }
    }
Пример #3
0
    public override void Destroy()
    {
        _isDone = true;
        _imageGrabber.Join();

        base.Destroy();
        _player = null;
    }
 public void Destroy()
 {
     if (_player != null)
     {
         _player.Destroy ();
         _player = null;
         GStreamerCore.Unref();
     }
 }
Пример #5
0
 public void Destroy()
 {
     if (_player != null)
     {
         _player.Destroy();
         _player = null;
         GStreamerCore.Unref();
     }
 }
Пример #6
0
 public void SetFromGrabber(GstCustomPlayer player)
 {
     ImageInfo = player.GetLastImage(0);
 }
    public void Initialize()
    {
        m_HasBeenInitialized = true;

        GStreamerCore.Ref();
        _player = new GstCustomPlayer ();

        // 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.");
        }
    }
Пример #8
0
 public _AudioWrapper(GstCustomPlayer o)
 {
     _owner = o;
 }
 protected override void _initialize()
 {
     _player = new GstCustomPlayer ();
 }
Пример #10
0
 protected override void _destroy()
 {
     _player = null;
 }