PageRenderTime 61ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/mediaserver.core/src/main/java/org/chii2/mediaserver/content/xbox/MicrosoftCodec.java

https://github.com/tigerking/chii2
Java | 68 lines | 43 code | 2 blank | 23 comment | 22 complexity | c6b438263c14980189a1de057563647b MD5 | raw file
  1. package org.chii2.mediaserver.content.xbox;
  2. /**
  3. * Helper Class for res@microsoft:codec
  4. */
  5. public class MicrosoftCodec {
  6. // Video encoded using the Windows Media Video codec version 7.
  7. public static final String WMMEDIASUBTYPE_WMV1 = "31564D57-0000-0010-8000-00AA00389B71";
  8. // Video encoded using the Windows Media Video 8 codec.
  9. public static final String WMMEDIASUBTYPE_WMV2 = "32564D57-0000-0010-8000-00AA00389B71";
  10. // Video encoded using the Windows Media Video 9 codec.
  11. public static final String WMMEDIASUBTYPE_WMV3 = "33564D57-0000-0010-8000-00AA00389B71";
  12. // Video encoded using the version of the Windows Media Video 9 Advanced Profile codec that was released with the Windows Media Format 9 Series SDK.
  13. public static final String WMMEDIASUBTYPE_WMVA = "41564D57-0000-0010-8000-00AA00389B71";
  14. // Video encoded with the Windows Media Video 9 Image codec to transform bitmaps and deformation data into a video stream.
  15. public static final String WMMEDIASUBTYPE_WMVP = "50564D57-0000-0010-8000-00AA00389B71";
  16. // Video encoded with the Windows Media Video 9 Image v2 codec.
  17. public static final String WMMEDIASUBTYPE_WVP2 = "32505657-0000-0010-8000-00AA00389B71";
  18. // Video encoded using the version of the Windows Media Video 9 Advanced Profile codec that was released with the Windows Media Format 11 SDK. This subtype identifies a bit stream that is compliant with the SMPTE VC-1 standard.
  19. public static final String WMMEDIASUBTYPE_WVC1 = "31435657-0000-0010-8000-00AA00389B71";
  20. // Video encoded by the Microsoft MPEG 4 codec version 3. This codec is no longer supported by the Windows Media Format SDK. If this codec is already installed on a computer, installing the Windows Media Format SDK or the redistribution package on a computer will not remove this codec.
  21. public static final String WMMEDIASUBTYPE_MP43 = "3334504D-0000-0010-8000-00AA00389B71";
  22. // Video encoded using the ISO MPEG 4 codec version 1.
  23. public static final String WMMEDIASUBTYPE_MP4S = "5334504D-0000-0010-8000-00AA00389B71";
  24. // Video encoded with the ISO MPEG4 v1.1 codec.
  25. public static final String WMMEDIASUBTYPE_M4S2 = "3253344D-0000-0010-8000-00AA00389B71";
  26. // Video encoded to MPEG 2 specifications.
  27. public static final String WMMEDIASUBTYPE_MPEG2_VIDEO = "e06d8026-db46-11cf-b4d1-00805f6cbbea";
  28. // Video encoded with the Windows Media Screen codec version 1.
  29. public static final String WMMEDIASUBTYPE_MSS1 = "3153534D-0000-0010-8000-00AA00389B71";
  30. // Video encoded with the Windows Media Video 9 Screen codec.
  31. public static final String WMMEDIASUBTYPE_MSS2 = "3253534D-0000-0010-8000-00AA00389B71";
  32. /**
  33. * Get Video Codec ID (Microsoft Codec ID)
  34. * TODO: This is not complete yet
  35. *
  36. * @param codecName Codec Name
  37. * @return Codec ID
  38. */
  39. public static String getVideoCodecId(String codecName) {
  40. if ("WMV1".equalsIgnoreCase(codecName)) {
  41. return "{" + WMMEDIASUBTYPE_WMV1 + "}";
  42. } else if ("WMV2".equalsIgnoreCase(codecName)) {
  43. return "{" + WMMEDIASUBTYPE_WMV2 + "}";
  44. } else if ("WMV3".equalsIgnoreCase(codecName)) {
  45. return "{" + WMMEDIASUBTYPE_WMV3 + "}";
  46. } else if ("WMVA".equalsIgnoreCase(codecName)) {
  47. return "{" + WMMEDIASUBTYPE_WMVA + "}";
  48. } else if ("WVC1".equalsIgnoreCase(codecName)) {
  49. return "{" + WMMEDIASUBTYPE_WVC1 + "}";
  50. } else if ("MP43".equalsIgnoreCase(codecName)) {
  51. return "{" + WMMEDIASUBTYPE_MP43 + "}";
  52. } else if ("MP4S".equalsIgnoreCase(codecName)) {
  53. return "{" + WMMEDIASUBTYPE_MP4S + "}";
  54. } else if ("M4S2".equalsIgnoreCase(codecName)) {
  55. return "{" + WMMEDIASUBTYPE_M4S2 + "}";
  56. } else if ("MSS1".equalsIgnoreCase(codecName)) {
  57. return "{" + WMMEDIASUBTYPE_MSS1 + "}";
  58. } else if ("MSS2".equalsIgnoreCase(codecName)) {
  59. return "{" + WMMEDIASUBTYPE_MSS2 + "}";
  60. } else if ("MPEG-2V".equalsIgnoreCase(codecName)) {
  61. return "{" + WMMEDIASUBTYPE_MPEG2_VIDEO + "}";
  62. } else {
  63. return null;
  64. }
  65. }
  66. }