コード例 #1
0
        public PlayerEngine()
        {
            IntPtr ptr = bp_new();

            if (ptr == IntPtr.Zero)
            {
                throw new ApplicationException(Catalog.GetString("Could not initialize GStreamer library"));
            }

            handle = new HandleRef(this, ptr);

            bp_get_error_quarks(out GST_CORE_ERROR, out GST_LIBRARY_ERROR,
                                out GST_RESOURCE_ERROR, out GST_STREAM_ERROR);

            eos_callback                  = new BansheePlayerEosCallback(OnEos);
            error_callback                = new BansheePlayerErrorCallback(OnError);
            state_changed_callback        = new BansheePlayerStateChangedCallback(OnStateChange);
            iterate_callback              = new BansheePlayerIterateCallback(OnIterate);
            buffering_callback            = new BansheePlayerBufferingCallback(OnBuffering);
            vis_data_callback             = new BansheePlayerVisDataCallback(OnVisualizationData);
            video_pipeline_setup_callback = new VideoPipelineSetupHandler(OnVideoPipelineSetup);
            tag_found_callback            = new GstTaggerTagFoundCallback(OnTagFound);

            bp_set_eos_callback(handle, eos_callback);
            bp_set_iterate_callback(handle, iterate_callback);
            bp_set_error_callback(handle, error_callback);
            bp_set_state_changed_callback(handle, state_changed_callback);
            bp_set_buffering_callback(handle, buffering_callback);
            bp_set_tag_found_callback(handle, tag_found_callback);
            bp_set_video_pipeline_setup_callback(handle, video_pipeline_setup_callback);
        }
コード例 #2
0
 private static extern void bp_set_iterate_callback(HandleRef player,
                                                    BansheePlayerIterateCallback cb);