Пример #1
0
 public TranscodeContext (TrackInfo track, SafeUri out_uri, ProfileConfiguration config,
     TrackTranscodedHandler handler, TranscodeCancelledHandler cancelledHandler, TranscodeErrorHandler errorHandler)
 {
     Track = track;
     OutUri = out_uri;
     Config = config;
     Handler = handler;
     CancelledHandler = cancelledHandler;
     ErrorHandler = errorHandler;
 }
Пример #2
0
 public void SetConfiguration(ProfileConfiguration configuration)
 {
     this.configuration = configuration;
     foreach(KeyValuePair<string, string> variable in configuration) {
         pipeline[variable.Key] = variable.Value;
     }
 }
Пример #3
0
 public void Enqueue (TrackInfo track, ProfileConfiguration config,
     TrackTranscodedHandler handler, TranscodeCancelledHandler cancelledHandler, TranscodeErrorHandler errorHandler)
 {
     Enqueue (track, GetTempUriFor (config.Profile.OutputFileExtension), config, handler, cancelledHandler, errorHandler);
 }
Пример #4
0
        public void Enqueue (TrackInfo track, SafeUri out_uri, ProfileConfiguration config,
            TrackTranscodedHandler handler, TranscodeCancelledHandler cancelledHandler, TranscodeErrorHandler errorHandler)
        {
            bool start = false;
            lock (queue) {
                start = (queue.Count == 0 && !transcoding);
                queue.Enqueue (new TranscodeContext (track, out_uri, config, handler, cancelledHandler, errorHandler));
                UserJob.Total++;
            }

            if (start)
                ProcessQueue ();
        }
Пример #5
0
        public void TranscodeTrack (TrackInfo track, SafeUri outputUri, ProfileConfiguration config)
        {
            if(IsTranscoding) {
                throw new ApplicationException("Transcoder is busy");
            }

            Log.DebugFormat ("Transcoding {0} to {1}", track.Uri, outputUri);
            output_uri = outputUri;

            error_message = null;

            current_track = track;
            Transcode (config.Profile.Pipeline.GetProcessById("gstreamer"));

        }
Пример #6
0
        public void TranscodeTrack(TrackInfo track, SafeUri outputUri, ProfileConfiguration config)
        {
            if(IsTranscoding) {
                throw new ApplicationException("Transcoder is busy");
            }

            Log.DebugFormat ("Transcoding {0} to {1}", track.Uri, outputUri);
            SafeUri inputUri = track.Uri;
            managed_output_uri = outputUri;
            IntPtr input_uri = GLib.Marshaller.StringToPtrGStrdup(inputUri.AbsoluteUri);
            IntPtr output_uri = GLib.Marshaller.StringToPtrGStrdup(outputUri.AbsoluteUri);

            error_message = null;

            current_track = track;
            gst_transcoder_transcode(handle, input_uri, output_uri, config.Profile.Pipeline.GetProcessById("gstreamer"));

            GLib.Marshaller.Free(input_uri);
            GLib.Marshaller.Free(output_uri);
        }
Пример #7
0
 /// <summary> init sets the criteria for which an TLS connection is made when
 /// a TLS channel is started for a profile.  It should only be
 /// called once.  For the properties, the initiator is defined as
 /// the peer who starts the channel for the TLS profile, the
 /// listener is the peer that receives the the channel start
 /// request, irregardless of which actually started the session.<p>
 /// Each subclass that encapsulates an implementation has its own
 /// properties as to what it needs to initialise.  See the individual
 /// implementations for their properties.
 /// 
 /// </summary>
 /// <param name="uri">used to start a channel with TLS protection
 /// </param>
 /// <param name="config">used to specify the parameters for sessions protected
 /// by this profile's version of TLS.  In other words, if you want another
 /// set of paramters, you must either recall this method or create another
 /// instance of a <code>TLSProfile</code>.
 /// </param>
 public abstract StartChannelListener init(System.String uri, ProfileConfiguration config);
Пример #8
0
        /// <summary> Method init is used to construct various static data
        /// used in the SASL OTP profile.
        /// </summary>
        public virtual StartChannelListener init(System.String uri, ProfileConfiguration config)
        {
            md5 = new MD5();
            sha1 = new SHA1();
            authenticators = new System.Collections.Hashtable();

            if (instance_Renamed_Field == null)
            {
                instance_Renamed_Field = this;
                algorithms = new System.Collections.Hashtable();

                SupportClass.PutElement(algorithms, MD5.AlgorithmName, md5);
                SupportClass.PutElement(algorithms, SHA1.AlgorithmName, sha1);
                userDatabase = new UserDatabasePool();
            }

            return this;
        }
Пример #9
0
 public virtual StartChannelListener init(System.String uri, ProfileConfiguration config)
 {
     return this;
 }