MediaTrackInfoAudio.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System.Text;
  2. namespace UMP
  3. {
  4. public class MediaTrackInfoAudio : MediaTrackInfoExpanded
  5. {
  6. private readonly int _trackChannels;
  7. private readonly int _trackRate;
  8. /// <summary>
  9. /// Create a new audio track info.
  10. /// </summary>
  11. /// <param name="trackId">Track ID</param>
  12. /// <param name="trackCodec">Track Codec (fourcc)</param>
  13. /// <param name="trackProfile">Track Profile</param>
  14. /// <param name="trackLevel">Track Level</param>
  15. /// <param name="trackChannels">Track Channels Number</param>
  16. /// <param name="trackRate">Track Rate</param>
  17. internal MediaTrackInfoAudio(int trackId, int trackCodec, int trackProfile, int trackLevel, int trackChannels, int trackRate) : base(trackId, trackCodec, trackProfile, trackLevel)
  18. {
  19. _trackChannels = trackChannels;
  20. _trackRate = trackRate;
  21. }
  22. /// <summary>
  23. /// Get the number of channels.
  24. /// </summary>
  25. public int Channels
  26. {
  27. get { return _trackChannels; }
  28. }
  29. /// <summary>
  30. /// Get the rate.
  31. /// </summary>
  32. public int Rate
  33. {
  34. get { return _trackRate; }
  35. }
  36. public override string ToString()
  37. {
  38. StringBuilder sb = new StringBuilder(200);
  39. sb.Append(base.ToString()).Append('[');
  40. sb.Append("CHANNELS=").Append(_trackChannels).Append(", ");
  41. sb.Append("RATE=").Append(_trackRate).Append(']');
  42. return sb.ToString();
  43. }
  44. }
  45. }