/// <summary> /// Gets the specified parameter of the specified stream kind. /// </summary> /// <param name="streamKind">Kind of the stream.</param> /// <param name="streamNumber">The stream number.</param> /// <param name="parameter">The parameter.</param> /// <param name="kindOfInfo">The kind of info.</param> /// <returns></returns> /// <remarks>Documented by CFI, 2009-03-27</remarks> public string Get(StreamKindEnum streamKind, int streamNumber, int parameter, InfoKind kindOfInfo) { if (MustUseAnsi) { return(Marshal.PtrToStringAnsi(MediaInfoA_GetI(Handle, (IntPtr)streamKind, (IntPtr)streamNumber, (IntPtr)parameter, (IntPtr)kindOfInfo))); } else { return(Marshal.PtrToStringUni(MediaInfo_GetI(Handle, (IntPtr)streamKind, (IntPtr)streamNumber, (IntPtr)parameter, (IntPtr)kindOfInfo))); } }
/// <summary> /// Gets the specified parameter of the specified stream kind. /// </summary> /// <param name="streamKind">Kind of the stream.</param> /// <param name="streamNumber">The stream number.</param> /// <param name="parameter">The parameter.</param> /// <param name="kindOfInfo">The kind of info.</param> /// <param name="kindOfSearch">The kind of search.</param> /// <returns></returns> /// <remarks>Documented by CFI, 2009-03-27</remarks> public string Get(StreamKindEnum streamKind, int streamNumber, string parameter, InfoKind kindOfInfo, InfoKind kindOfSearch) { if (MustUseAnsi) { IntPtr Parameter_Ptr = Marshal.StringToHGlobalAnsi(parameter); string result = Marshal.PtrToStringAnsi(MediaInfoA_Get(Handle, (IntPtr)streamKind, (IntPtr)streamNumber, Parameter_Ptr, (IntPtr)kindOfInfo, (IntPtr)kindOfSearch)); Marshal.FreeHGlobal(Parameter_Ptr); return(result); } else { return(Marshal.PtrToStringUni(MediaInfo_Get(Handle, (IntPtr)streamKind, (IntPtr)streamNumber, parameter, (IntPtr)kindOfInfo, (IntPtr)kindOfSearch))); } }
/// <summary> /// Initializes a new instance of the <see cref="StreamKindStruct"/> class. /// </summary> /// <param name="id">The id.</param> /// <param name="streamKind">Kind of the stream.</param> /// <param name="mediaInfo">The media info.</param> internal StreamKindStruct(int id, StreamKindEnum streamKind, MediaInfo mediaInfo) { Id = id; StreamKind = streamKind; string pos = mediaInfo.Get(id, ParametersGeneral.StreamKindPos); int position; if (Int32.TryParse(pos, out position)) { Position = position; } else { Position = -1; } name = mediaInfo.Get(0, ParametersGeneral.StreamKind_AS_String); }
/// <summary> /// Get the count of streams of the specified stream kind. /// </summary> /// <param name="streamKind">Kind of the stream.</param> /// <param name="streamNumber">The stream number.</param> /// <returns></returns> /// <remarks>Documented by CFI, 2009-03-27</remarks> public int Count(StreamKindEnum streamKind, int streamNumber) { return((int)MediaInfo_Count_Get(Handle, (IntPtr)streamKind, (IntPtr)streamNumber)); }
/// <summary> /// Get the count of streams of the specified stream kind. /// </summary> /// <param name="streamKind">Kind of the stream.</param> /// <returns></returns> /// <remarks>Documented by CFI, 2009-03-27</remarks> public int Count(StreamKindEnum streamKind) { return(Count(streamKind, -1)); }
/// <summary> /// Gets the specified parameter of the specified stream kind. /// </summary> /// <param name="streamKind">Kind of the stream.</param> /// <param name="streamNumber">The stream number.</param> /// <param name="parameter">The parameter.</param> /// <param name="kindOfInfo">The kind of info.</param> /// <returns></returns> /// <remarks>Documented by CFI, 2009-03-27</remarks> public string Get(StreamKindEnum streamKind, int streamNumber, string parameter, InfoKind kindOfInfo) { return(Get(streamKind, streamNumber, parameter, kindOfInfo, InfoKind.Name)); }
/// <summary> /// Gets the specified parameter of the specified stream kind. /// </summary> /// <param name="streamKind">Kind of the stream.</param> /// <param name="streamNumber">The stream number.</param> /// <param name="parameter">The parameter.</param> /// <returns></returns> /// <remarks>Documented by CFI, 2009-03-27</remarks> public string Get(StreamKindEnum streamKind, int streamNumber, string parameter) { return(Get(streamKind, streamNumber, parameter, InfoKind.Text, InfoKind.Name)); }
/// <summary> /// Gets the specified parameter of the specified stream kind. /// </summary> /// <param name="streamKind">Kind of the stream.</param> /// <param name="streamNumber">The stream number.</param> /// <param name="parameter">The parameter.</param> /// <returns></returns> /// <remarks>Documented by CFI, 2009-03-27</remarks> internal string Get(StreamKindEnum streamKind, int streamNumber, Enum parameter) { return(Get(streamKind, streamNumber, parameter.ToString().Replace("_AS_", "/").Replace("_IN_", "-").Replace("_OpenBracket_", "(").Replace("_CloseBracket_", ")").Replace("_x_", "*"))); }