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.");
        }
    }
 public void Destroy()
 {
     if (_player != null)
     {
         _player.Destroy();
         _player = null;
         GStreamerCore.Unref();
     }
 }
    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.");
        }
    }
 public void Destroy()
 {
     if (_player != null)
     {
         _player.Destroy ();
         _player = null;
         GStreamerCore.Unref();
     }
 }
 protected override void _initialize()
 {
     _player = new GstNetworkPlayer ();
 }
 protected override void _destroy()
 {
     _player = null;
 }
 public override void Destroy()
 {
     base.Destroy();
     _player = null;
 }
 protected override void _initialize()
 {
     _player = new GstNetworkPlayer();
 }