public void ParseStreamInfo()
        {
            //int audios_streams;
            int video_streams;
            //int text_streams;
            Pad vpad = null;

            //audios_streams = playbin.NAudio;
            video_streams = playbin.NVideo;
            //text_streams = playbin.NText;

            if (video_streams > 0)
            {
                int i;
                /* Try to obtain a video pad */
                for (i = 0; i < video_streams && vpad == null; i++)
                {
                    vpad = playbin.GetVideoPad(i);
                }
            }

            if (vpad != null)
            {
                Caps caps = vpad.NegotiatedCaps;
                if (caps != null)
                {
                    OnCapsSet(vpad, null);
                }
                vpad.AddNotification("caps", OnCapsSet);
            }
        }
Example #2
0
        public void ParseStreamInfo()
        {
            int audios_streams;
            int video_streams;
            int text_streams;
            Pad vpad = null;

            audios_streams = (int)playbin["n-audio"];
            video_streams  = (int)playbin ["n-video"];
            text_streams   = (int)playbin["n-text"];

            if (video_streams > 0)
            {
                int i;
                /* Try to obtain a video pad */
                for (i = 0; i < video_streams; i++)
                {
                    vpad = (Pad)playbin.Emit("get-video-pad", new object [] { i });
                    if (vpad != null)
                    {
                        break;
                    }
                }
            }

            if (vpad != null)
            {
                Caps caps = vpad.CurrentCaps;
                if (caps != null)
                {
                    OnCapsSet(vpad, null);
                }
                vpad.AddNotification("caps", OnCapsSet);
            }
        }