MediaTrackInfoVideo.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System.Text;
  2. namespace UMP
  3. {
  4. public class MediaTrackInfoVideo : MediaTrackInfoExpanded
  5. {
  6. private readonly int _trackWidth;
  7. private readonly int _trackHeight;
  8. /// <summary>
  9. /// Create new unknown 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="trackWidth">Track Video Width</param>
  16. /// <param name="trackHeight">Track Video Height</param>
  17. internal MediaTrackInfoVideo(int trackId, int trackCodec, int trackProfile, int trackLevel, int trackWidth, int trackHeight) : base(trackId, trackCodec, trackProfile, trackLevel)
  18. {
  19. _trackWidth = trackWidth;
  20. _trackHeight = trackHeight;
  21. }
  22. /// <summary>
  23. /// Get the video width.
  24. /// </summary>
  25. public int Width
  26. {
  27. get { return _trackWidth; }
  28. }
  29. /// <summary>
  30. /// Get the video height.
  31. /// </summary>
  32. public int Height
  33. {
  34. get { return _trackHeight; }
  35. }
  36. public override string ToString()
  37. {
  38. StringBuilder sb = new StringBuilder(200);
  39. sb.Append(base.ToString()).Append('[');
  40. sb.Append("WIDTH=").Append(_trackWidth).Append(", ");
  41. sb.Append("HEIGHT=").Append(_trackHeight).Append(']');
  42. return sb.ToString();
  43. }
  44. }
  45. }