private void TestMarkerName() { int hr; string s; // Returns Invalid Parameter, c++ does the same thing hr = m_es.GetMarkerName(1, out s); //DsError.ThrowExceptionForHR(hr); }
protected virtual void EnumerateChapters(bool forceRefresh) { if (_graphBuilder == null || !_initialized || !forceRefresh && _chapterTimestamps != null) { return; } // Try to find a filter implementing IAMExtendSeeking for chapter support IAMExtendedSeeking extendSeeking = FilterGraphTools.FindFilterByInterface <IAMExtendedSeeking>(_graphBuilder); if (extendSeeking == null) { return; } try { int markerCount; if (extendSeeking.get_MarkerCount(out markerCount) != 0 || markerCount <= 0) { return; } _chapterTimestamps = new double[markerCount]; _chapterNames = new string[markerCount]; for (int i = 1; i <= markerCount; i++) { double markerTime; string markerName; extendSeeking.GetMarkerTime(i, out markerTime); extendSeeking.GetMarkerName(i, out markerName); _chapterTimestamps[i - 1] = markerTime; _chapterNames[i - 1] = !string.IsNullOrEmpty(markerName) ? markerName : GetChapterName(i); } } finally { Marshal.ReleaseComObject(extendSeeking); } }