//========================================================================== internal VideoTrack(int index, LibVLCLibrary.libvlc_track_description_t trackDescription, LibVLCLibrary.libvlc_media_track_info_t?trackInfo) : base(index, trackDescription, trackInfo) { if (trackInfo.HasValue) { m_Width = (int)trackInfo.Value.video.i_width; m_Height = (int)trackInfo.Value.video.i_height; } }
//========================================================================== internal AudioTrack(int index, LibVLCLibrary.libvlc_track_description_t trackDescription, LibVLCLibrary.libvlc_media_track_info_t?trackInfo) : base(index, trackDescription, trackInfo) { if (trackInfo.HasValue) { m_BitRate = (int)trackInfo.Value.audio.i_rate; m_Channels = (int)trackInfo.Value.audio.i_channels; } }
//========================================================================== internal Track(int index, LibVLCLibrary.libvlc_track_description_t trackDescription, LibVLCLibrary.libvlc_media_track_info_t?trackInfo) { m_Name = trackDescription.psz_name; // Title 1 - [Deutsch] // Title 2 - [English] Match match = m_NameLanguageRegex.Match(m_Name); if (match.Success) { m_Title = match.Groups[1].Value; m_Language = match.Groups[2].Value; m_Culture = GetCulture(m_Language); } else { m_Title = trackDescription.psz_name; m_Language = null; m_Culture = null; } if (trackInfo.HasValue) { m_Codec = Encoding.ASCII.GetString(BitConverter.GetBytes(trackInfo.Value.i_codec)); for (int i = 0; i < m_Codec.Length; ++i) { if (m_Codec[i] == '\0') { m_Codec = m_Codec.Substring(0, i); break; } } } else { m_Codec = null; } m_Index = index; }
//========================================================================== internal SubtitleTrack(int index, LibVLCLibrary.libvlc_track_description_t trackDescription, LibVLCLibrary.libvlc_media_track_info_t?trackInfo) : base(index, trackDescription, trackInfo) { // ... }