• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# StreamType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中StreamType的典型用法代码示例。如果您正苦于以下问题:C# StreamType类的具体用法?C# StreamType怎么用?C# StreamType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StreamType类属于命名空间,在下文中一共展示了StreamType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ReadAjax

 public ActionResult ReadAjax(StreamType streamType, long id, ShowReadEntries showReadEntries = ShowReadEntries.Hide)
 {
     var entries = this.rssSubscriptionService
         .LoadAllUnreadRssEntriesToReadForCurrentUserFromSubscription(streamType, id, showReadEntries);
     var result = this.Json(entries, JsonRequestBehavior.AllowGet);
     return result;
 }
开发者ID:jstadnicki,项目名称:isthereanynews,代码行数:7,代码来源:StreamController.cs


示例2: GetActivityStreamAsync

        /// <summary>
        /// Gets an activity stream asynchronously.
        /// </summary>
        /// <param name="activityId">The Strava activity id.</param>
        /// <param name="typeFlags">Specifies the type of stream.</param>
        /// <param name="resolution">Specifies the resolution of the stream.</param>
        /// <returns>The stream data.</returns>
        public async Task<List<ActivityStream>> GetActivityStreamAsync(String activityId, StreamType typeFlags, StreamResolution resolution = StreamResolution.All)
        {
            StringBuilder types = new StringBuilder();

            foreach (StreamType type in (StreamType[])Enum.GetValues(typeof(StreamType)))
            {
                if (typeFlags.HasFlag(type))
                {
                    types.Append(type.ToString().ToLower());
                    types.Append(",");
                }
            }

            types.Remove(types.ToString().Length - 1, 1);

            String getUrl = String.Format("{0}/{1}/streams/{2}?{3}&access_token={4}",
                Endpoints.Activity,
                activityId,
                types,
                resolution != StreamResolution.All ? "resolution=" + resolution.ToString().ToLower() : "",
                Authentication.AccessToken
                );

            String json = await WebRequest.SendGetAsync(new Uri(getUrl));

            return Unmarshaller<List<ActivityStream>>.Unmarshal(json);
        }
开发者ID:rnrbrste,项目名称:stravadotnet,代码行数:34,代码来源:StreamClient.cs


示例3: StreamInfo

		private StreamInfo (int streamIndex, StreamType st, String streamName, Dictionary<String, String> attributeDictionary) {
			m_streamIndex = streamIndex;
			m_streamType = st;
			m_language = null;
			m_streamName = streamName;
			m_attributeDictionary = attributeDictionary;
		}
开发者ID:ChangSpivey,项目名称:SubtitleMemorize,代码行数:7,代码来源:StreamInfo.cs


示例4: MiStreamRecord

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public MiStreamRecord (StreamType streamType, string stream)
      : base ()
    {
      Type = streamType;

      Stream = stream;
    }
开发者ID:ashumeow,项目名称:android-plus-plus,代码行数:11,代码来源:MiStreamRecord.cs


示例5: Stream

 public Stream(int HabboId, int AchievedItemId, Object AchievedItem, StreamType StreamType)
 {
     this.HabboId = HabboId;
     this.AchievedItemId = AchievedItemId;
     this.AchievedItem = AchievedItem;
     this.StreamType = StreamType;
 }
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:7,代码来源:Stream.cs


示例6: LogFile

        public LogFile(string filename, StreamType streams = StreamType.All, ScriptBlock errorCallback = null)
        {
            fileName = System.IO.Path.GetFileName(filename);
            path = System.IO.Path.GetDirectoryName(filename);

            Streams = streams;
            ErrorCallback = errorCallback;
        }
开发者ID:dbeiler,项目名称:PowerShellLoggingModule,代码行数:8,代码来源:LogFile.cs


示例7: IsStreamEnabled

        public bool IsStreamEnabled( StreamType stream )
        {
            IntPtr error = IntPtr.Zero;
            var value = NativeMethod.Device.rs_is_stream_enabled( device, stream, out error );
            RealSenseException.Handle( error );

            return value != 0;
        }
开发者ID:kaorun55,项目名称:librealsense.net,代码行数:8,代码来源:Device.cs


示例8: GetStreamWidth

        public int GetStreamWidth( StreamType stream )
        {
            IntPtr error = IntPtr.Zero;
            var value = NativeMethod.Device.rs_get_stream_width( device, stream, out error );
            RealSenseException.Handle( error );

            return value;
        }
开发者ID:kaorun55,项目名称:librealsense.net,代码行数:8,代码来源:Device.cs


示例9: GetStreamFormat

        public FormatType GetStreamFormat( StreamType stream )
        {
            IntPtr error = IntPtr.Zero;
            var value = NativeMethod.Device.rs_get_stream_format( device, stream, out error );
            RealSenseException.Handle( error );

            return value;
        }
开发者ID:kaorun55,项目名称:librealsense.net,代码行数:8,代码来源:Device.cs


示例10: FieldRemappingDialog

        /*----------------------------------------------------------------
        ** Constructor
         * 
         * Parameters:  templatePath - the template to be loaded
         *              streamType - the document format of the template
         *              dataSource - new fields for the remapping
        **--------------------------------------------------------------*/
        public FieldRemappingDialog(string templatePath, StreamType streamType, DataSet dataSource)
        {
            InitializeComponent();

            m_template = templatePath;
            m_datasource = dataSource;
            templateStreamType = streamType;
        }
开发者ID:TextControl,项目名称:TextControl.MailMerge.FieldRemapping,代码行数:15,代码来源:FieldRemappingDialog.cs


示例11: StreamWrapper

 //
 // Readable stream constructor
 //
 public StreamWrapper(int size, BasicStream s)
 {
     type_ = StreamType.Read;
     s_ = s;
     spos_ = 0;
     bytes_ = null;
     pos_ = 0;
     length_ = size;
 }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:12,代码来源:StreamWrapper.cs


示例12: HekaDAQOutputStream

 public HekaDAQOutputStream(string name, StreamType streamType, ushort channelNumber, HekaDAQController controller)
     : base(name, controller)
 {
     this.ChannelType = streamType;
     this.ChannelNumber = channelNumber;
     this.MeasurementConversionTarget = (ChannelType == StreamType.DO_PORT || ChannelType == StreamType.XO)
         ? Measurement.UNITLESS : DAQCountUnits;
     this.Controller = controller;
     this.Clock = controller.Clock;
 }
开发者ID:Symphony-DAS,项目名称:symphony-core,代码行数:10,代码来源:HekaDAQOutputStream.cs


示例13: HekaDAQInputStream

 public HekaDAQInputStream(string name, StreamType streamType, ushort channelNumber, HekaDAQController controller)
     : base(name, controller)
 {
     this.ChannelType = streamType;
     this.ChannelNumber = channelNumber;
     this.MeasurementConversionTarget = (ChannelType == StreamType.DIGITAL_IN || ChannelType == StreamType.AUX_IN)
         ? Measurement.UNITLESS : "V";
     this.Controller = controller;
     this.Clock = controller;
 }
开发者ID:physion,项目名称:symphony-core,代码行数:10,代码来源:HekaDAQInputStream.cs


示例14: StreamTypeToIndex

 /** 
     @brief Get the stream index number
     @param[in] StreamType	The stream type
     @return The stream index numebr.
 **/
 public static Int32 StreamTypeToIndex(StreamType type)
 {
     Int32 s = 0;
     while ((Int32)type > 1)
     {
         type = (StreamType)((Int32)type >> 1);
         s++;
     }
     return s;
 }
开发者ID:mbahar94,项目名称:libpxcclr.cs,代码行数:15,代码来源:pxcmcapture.cs


示例15: FeatureRequest

 public FeatureRequest(
     long userId,
     long rssEntryId,
     StreamType modelStreamType,
     FeatureRequestType featureRequestType)
 {
     this.UserId = userId;
     this.RssEntryId = rssEntryId;
     this.StreamType = modelStreamType;
     this.Type = featureRequestType;
 }
开发者ID:jstadnicki,项目名称:isthereanynews,代码行数:11,代码来源:FeatureRequest.cs


示例16: Play

 public string Play(string id, StreamType type = StreamType.Live)
 {
     if (_contents.ContainsKey(id))
         return type == StreamType.Live ? GenContentUrlHls(id) : GenContentUrl(id);
     int max = 0;
     if (_contents.Count > 0)
         max = _contents.Max(c => c.Value);
     max++;
     _contents.Add(id, max);
     return type == StreamType.Live ? GenContentUrlHls(id) : GenContentUrl(id);
 }
开发者ID:northspb,项目名称:p2pproxy,代码行数:11,代码来源:AceStream31.cs


示例17: GetStream

        public Stream GetStream(StreamType streamType, StreamParameters streamParameters)
        {
            LoadStreamFactories();

            if (_streamFactoriesHash.ContainsKey(streamType))
            {
                return _streamFactoriesHash[streamType].Create(streamParameters);
            }

            throw new ArgumentException(string.Format("No Factory defined for type {0}", streamType));
        }
开发者ID:johnbrunnings,项目名称:Neat-Legacy,代码行数:11,代码来源:StreamManager.cs


示例18: ProcessLine

        public override void ProcessLine(string line, StreamType stream)
        {
            if (Regex.IsMatch(line, @"^[0-9]{1,3}\.[0-9]{1}%", RegexOptions.Compiled))
            {
                su.PercentageDoneExact = getPercentage(line);
            }
            else
                base.ProcessLine(line, stream);

            lastLine = line;
        }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:11,代码来源:tsMuxeR.cs


示例19: StreamTypeToString

 /** 
     @brief Get the stream type string representation
     @param[in] type		The stream type
     @return The corresponding string representation.
 **/
 public static String StreamTypeToString(StreamType stream)
 {
     switch (stream)
     {
         case StreamType.STREAM_TYPE_COLOR: return "Color";
         case StreamType.STREAM_TYPE_DEPTH: return "Depth";
         case StreamType.STREAM_TYPE_IR: return "IR";
         case StreamType.STREAM_TYPE_LEFT: return "Left";
         case StreamType.STREAM_TYPE_RIGHT: return "Right";
     }
     return "Unknown";
 }
开发者ID:mbahar94,项目名称:libpxcclr.cs,代码行数:17,代码来源:pxcmcapture.cs


示例20: AddStreamInfo

        private void AddStreamInfo(TrackEntrySection trackEntry, StreamType type, int index)
        {
            ClusterSection.TrackInfo trackInfo = null;
            try {
                trackInfo = MFI.Segment.Cluster.Tracks[(int)trackEntry.TrackNumber.Value].TrackInfo;
            } catch(Exception) { }

            Add(type, index, EntryKey.Index, () => index.ToString(), null);
            Add(type, index, EntryKey.TrackNumber, () => trackEntry.TrackNumber.Value.ToString(), null);
            Add(type, index, EntryKey.Size, () => trackInfo.TrackSize.ToString(), "byte");
            Add(type, index, EntryKey.Bitrate, () => trackInfo.AverageBitrate.HasValue ? trackInfo.AverageBitrate.Value.ToString("0", CultureInfo.InvariantCulture) : null, "bit/s");
            Add(type, index, EntryKey.Duration, () => trackInfo.TrackLength.TotalSeconds.ToString(CultureInfo.InvariantCulture), "s");
            Add(type, index, EntryKey.Title, () => trackEntry.Name, null);
            Add(type, index, EntryKey.Language, () => trackEntry.Language, null);
            Add(type, index, EntryKey.CodecName, () => trackEntry.CodecName, null);
            Add(type, index, EntryKey.CodecId, () => trackEntry.CodecId, null);

            if(trackEntry.GetBitMapInfoHeader().HasValue && string.Equals(trackEntry.CodecId, "V_MS/VFW/FOURCC")) {
                var header = trackEntry.GetBitMapInfoHeader().Value;
                Add(type, index, EntryKey.FourCC, () => header.FourCC, null);
                //Add(type, index, EntryKey.ColorBitDepth, () => header.biBitCount.ToString(), null);
            }
            Add(type, index, EntryKey.TwoCC, () => string.Equals(trackEntry.CodecId, "A_MS/ACM") && trackEntry.GetWaveFormatEx().HasValue ? trackEntry.GetWaveFormatEx().Value.TwoCC : null, null);
            Add(type, index, EntryKey.Id, () => trackEntry.TrackUId.ToString(), null);

            switch(type) {
                case StreamType.Video:
                    Add(type, index, EntryKey.FrameCount, () => trackInfo.LaceCount.ToString(), null);
                    Add(type, index, EntryKey.FrameRate, () => (trackEntry.DefaultDuration.HasValue ? 1000000000d / trackEntry.DefaultDuration.Value : 0).ToString("0.000", CultureInfo.InvariantCulture), "fps");

                    //if(trackInfo.MinLaceRate + 2 < trackInfo.MaxLaceRate) {
                    if(trackInfo.AverageLaceRate.HasValue) Add(type, index, EntryKey.VFR, () => trackInfo.AverageLaceRate.Value.ToString("0.000", CultureInfo.InvariantCulture), "fps");
                    if(trackInfo.MinLaceRate.HasValue) Add(type, index, EntryKey.MinFrameRate, () => trackInfo.MinLaceRate.Value.ToString("0.000", CultureInfo.InvariantCulture), "fps");
                    if(trackInfo.MaxLaceRate.HasValue) Add(type, index, EntryKey.MaxFrameRate, () => trackInfo.MaxLaceRate.Value.ToString("0.000", CultureInfo.InvariantCulture), "fps");
                    //}

                    Add(type, index, EntryKey.Width, () => trackEntry.Video.PixelWidth.ToString(), "px");
                    Add(type, index, EntryKey.Height, () => trackEntry.Video.PixelHeight.ToString(), "px");
                    Add(type, index, EntryKey.DAR, () => (trackEntry.Video.DisplayWidth / (double)trackEntry.Video.DisplayHeight).ToString("0.000", CultureInfo.InvariantCulture), null);
                    //Add(type, index, EntryKey.ColorSpace, () => Encoding.ASCII.GetString(trackEntry.Video.ColorSpace), null);
                    break;
                case StreamType.Audio:
                    Add(type, index, EntryKey.SampleCount, () => ((int)(trackInfo.TrackLength.TotalSeconds * trackEntry.Audio.SamplingFrequency)).ToString(), null);
                    Add(type, index, EntryKey.SamplingRate, () => trackEntry.Audio.SamplingFrequency.ToString(CultureInfo.InvariantCulture), null);
                    Add(type, index, EntryKey.ChannelCount, () => trackEntry.Audio.ChannelCount.ToString(), null);
                    break;
                case StreamType.Text: break;
            }
        }
开发者ID:arucard21,项目名称:AniDB,代码行数:49,代码来源:MatroskaProvider.cs



注:本文中的StreamType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# StreamWriter类代码示例发布时间:2022-05-24
下一篇:
C# StreamState类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap