/// <summary>
 /// Erstellt einen neuen Empfang.
 /// </summary>
 /// <param name="streamIdentifier">Die Datenstromkennung.</param>
 /// <param name="frontend">Das zugehörige Gerät.</param>
 internal DVBRawFilter(ushort streamIdentifier, DVBFrontend frontend)
 {
     // Remember
     m_streamIdentifier = streamIdentifier;
     FilterType         = FilterType.None;
     m_Frontend         = frontend;
 }
        /// <summary>
        /// Beendet den Empfang.
        /// </summary>
        /// <param name="remove">Gesetzt, wenn auch eine Abmeldung bei dem zugehörige Gerät erwünscht ist.</param>
        private void InternalStop(bool remove)
        {
            // Remove from frontend
            if (remove)
            {
                if (m_Frontend != null)
                {
                    // Remove
                    m_Frontend.RemoveFilter(m_streamIdentifier);

                    // Forget
                    m_Frontend = null;
                }
            }

            // Discard registered handler
            m_DataHandler = null;

            // Nothing to do
            if (m_Class == null)
            {
                return;
            }

            // With cleanup
            try
            {
                // Terminate
                Suspend();
            }
            finally
            {
                // Remove C++ instance
                m_Class.Dispose();

                // Detach from object
                m_Class = null;
            }
        }
 /// <summary>
 /// Erstellt einen neuen Empfang.
 /// </summary>
 /// <param name="streamIdentifier">Die Datenstromkennung.</param>
 /// <param name="frontend">Das zugehörige Gerät.</param>
 internal DVBRawFilter( ushort streamIdentifier, DVBFrontend frontend )
 {
     // Remember
     m_streamIdentifier = streamIdentifier;
     FilterType = FilterType.None;
     m_Frontend = frontend;
 }
        /// <summary>
        /// Beendet den Empfang.
        /// </summary>
        /// <param name="remove">Gesetzt, wenn auch eine Abmeldung bei dem zugehörige Gerät erwünscht ist.</param>
        private void InternalStop( bool remove )
        {
            // Remove from frontend
            if (remove)
                if (m_Frontend != null)
                {
                    // Remove
                    m_Frontend.RemoveFilter( m_streamIdentifier );

                    // Forget
                    m_Frontend = null;
                }

            // Discard registered handler
            m_DataHandler = null;

            // Nothing to do
            if (m_Class == null)
                return;

            // With cleanup
            try
            {
                // Terminate
                Suspend();
            }
            finally
            {
                // Remove C++ instance
                m_Class.Dispose();

                // Detach from object
                m_Class = null;
            }
        }
Exemple #5
0
        /// <summary>
        /// Cleanup all access to the various cached instances.
        /// </summary>
        /// <remarks>
        /// The most important task is to call <see cref="Dispose"/> on
        /// all objects cached. After that all references are released.
        /// If <see cref="m_MustClose"/> is set finally <see cref="CloseDevice"/>
        /// is called.
        /// </remarks>
        public void Dispose()
        {
            // Shutdown all
            if (m_AudioVideo != null)
                using (m_AudioVideo)
                {
                    // Shut up
                    SetPIDs( 0, 0 );

                    // Done
                    m_AudioVideo = null;
                }
            using (m_CI)
                m_CI = null;
            using (m_Frontend)
                m_Frontend = null;
            using (m_Board)
                m_Board = null;

            // Detach
            m_Users.Clear();
            m_AudioVideo = null;

            // Check for close
            if (m_MustClose)
                CloseDevice();
        }
 /// <summary>
 /// Create the accessor.
 /// </summary>
 /// <param name="pFilters">The map we manage.</param>
 /// <param name="frontend">Das zugehörige Frontend.</param>
 internal _Filters( Dictionary<ushort, DVBRawFilter> pFilters, DVBFrontend frontend )
 {
     // Remember
     m_Frontend = frontend;
     m_Filters = pFilters;
 }
Exemple #7
0
 /// <summary>
 /// Create the accessor.
 /// </summary>
 /// <param name="pFilters">The map we manage.</param>
 /// <param name="frontend">Das zugehörige Frontend.</param>
 internal _Filters(Dictionary <ushort, DVBRawFilter> pFilters, DVBFrontend frontend)
 {
     // Remember
     m_Frontend = frontend;
     m_Filters  = pFilters;
 }