2013-07-25 46 views
0

我試圖寫一個UDP流媒體應用程序與directshow打算在局域網環境中工作。直到客戶在尋找時纔開始遇到凍結問題,情況變得很好。爲活動源過濾器創建媒體樣本時間戳?

這裏是我做過什麼:

服務器

enter image description here

客戶

enter image description here

在服務器端,我有兩個變換濾波器,一個對於視頻和一個音頻。在這兩個過濾器中,每個過濾器創建一個讀取MediaSamples並執行多播而不修改時間戳/標記的線程。同時,視頻轉換過濾器只是將媒體樣本傳遞給解碼器。音頻轉換過濾器也會這樣做。

在客戶端。實時源過濾器只是從UDP端口讀取視頻和音頻MediaSamples。在這裏,我執行一些簡單的時間戳的計算是:

MediaSample開始時間=當前流時間+ 40毫秒

的視頻流會在局域網環境就好了。但是,當我找到時,我發現客戶端會凍結一會兒。當我檢查渲染器時,它會顯示很多幀被丟棄。我猜測時間戳導致幀丟失。

我也注意到,無論何時執行搜尋,初始幀通常都有負面郵票。如果我不發送這些幀到客戶端,客戶端不會凍結。但有些框架會被打破。我猜這是因爲這些消極的框架是導致尋求位置的關鍵幀。如果他們錯過了,圖像將被打破。

做一些研究之後,我嘗試這樣的做法:

  1. 設置第一個樣本的時間戳當前流時間。

    T1 =流時間。

  2. 使用此第一個樣本的時間戳作爲基準。

    基地= T1

  3. 每個樣品後的計算公式爲

    Tn的=流時間+ Tn的 - 基本

其中也沒有工作。我猜這是因爲服務器和客戶端的時鐘不同步。但是,我認爲它可能會起作用,因爲在服務器端的每次查找後,時間戳都會從0開始。

我想弄清楚下一步該做什麼。 我真的很感激,如果有人可以給我一些建議。

2013年7月26日更新

羅馬,感謝您的幫助。我試圖與在http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/c1c762a0-af92-4987-b084-f0d194766999/is-a-video-sample-with-negative-timestamp-a-preroll-sample

  1. 客戶提及的方法變基時間戳通過檢查IMediaSample :: IsDiscontinuity
  2. 如果發生不連續檢測不連續性,設置基線(B)所接收到的時間戳
  3. 然後每時間戳被計算爲

TS - 接收時間戳TC - 計算時間戳

TC = Current Stream Time + TS - B + 40ms 

,我用CRefTimeStreamTime()

獲取當前流時間作出上述變動,當我開始流之後,客戶端的視頻移動緩慢一段時間並最終凍結。在停止服務器發送數據後,客戶端的屏幕再次活動約半秒鐘。

我在這裏做錯了什麼?是關於時鐘頻率?

2013年8月1日更新

繼羅馬的建議下,我能夠通過,讓我檢查從SourceFilter的到來時間戳的SourceFilter後加入具有通濾波器來找到我的時間戳錯誤視頻輸出引腳。

但是,現在我在尋求時遇到了另一個問題。在客戶端,儘管所有幀都能正確顯示,但在開始更新新幀之前,它會遭受巨大的延遲。

我檢查了這些框架,他們是預導幀,導致我的查找位置的幀。我通過將媒體樣本中的預卷標誌設置爲false並讓它播放來確認它。看起來,圖表正在客戶端以正常速率處理這些預卷幀,但在服務器端,這些預卷幀處理更快。

有沒有辦法避開這個延遲或者它只是我必須處理的事情?

這些是我通過過濾器捕獲的樣本。

服務器

6848 : GetState 2 
31772 : 11210a90 BeginFlush 
31784 : 11210a90 EndFlush 
31784 : NewSegment: 38700000..300900000 at 1x 
31814 : GetState 1 
31814 : GetState 1 
31814 : GetState 1 
31815 : GetState 1 
31815 : GetState 1 
31816 : 11210a90 Sample 4515 bytesD time -3870.0 to -3837.0 latency 0.0 <-- Preroll Starts 
31828 : 11210a90 Sample 62335 bytes time -3837.0 to -3804.0 latency 0.0 
31834 : GetState 1 
31843 : 11210a90 Sample 51483 bytes time -3804.0 to -3770.0 latency 0.0 
31844 : GetState 1 
31856 : 11210a90 Sample 62535 bytes time -3770.0 to -3737.0 latency 0.0 
31864 : GetState 1 
31869 : 11210a90 Sample 62041 bytes time -3737.0 to -3704.0 latency 0.0 
31874 : GetState 1 
31885 : 11210a90 Sample 61509 bytes time -3704.0 to -3670.0 latency 0.0 
31888 : GetState 1 
31900 : 11210a90 Sample 62280 bytes time -3670.0 to -3637.0 latency 0.0 
31906 : GetState 1 
31912 : 11210a90 Sample 63084 bytes time -3637.0 to -3604.0 latency 0.0 
31926 : GetState 1 
31929 : 11210a90 Sample 62388 bytes time -3604.0 to -3570.0 latency 0.0 
31936 : GetState 1 
31941 : 11210a90 Sample 61956 bytes time -3570.0 to -3537.0 latency 0.0 
31951 : GetState 1 
31956 : 11210a90 Sample 52196 bytes time -3537.0 to -3503.0 latency 0.0 
31967 : GetState 1 
31968 : 11210a90 Sample 53707 bytes time -3503.0 to -3470.0 latency 0.0 
31980 : 11210a90 Sample 55162 bytes time -3470.0 to -3437.0 latency 0.0 
31982 : GetState 1 
31991 : 11210a90 Sample 54511 bytes time -3437.0 to -3403.0 latency 0.0 
31998 : GetState 1 
32002 : 11210a90 Sample 53676 bytes time -3403.0 to -3370.0 latency 0.0 
32013 : 11210a90 Sample 54214 bytes time -3370.0 to -3337.0 latency 0.0 
32016 : GetState 1 
32031 : 11210a90 Sample 53590 bytes time -3337.0 to -3303.0 latency 0.0 
32036 : GetState 1 
32042 : 11210a90 Sample 54067 bytes time -3303.0 to -3270.0 latency 0.0 
32046 : GetState 1 
32055 : 11210a90 Sample 55115 bytes time -3270.0 to -3237.0 latency 0.0 
32066 : GetState 1 
32067 : 11210a90 Sample 56462 bytes time -3237.0 to -3203.0 latency 0.0 
32076 : GetState 1 
32079 : 11210a90 Sample 45412 bytes time -3203.0 to -3170.0 latency 0.0 
32090 : 11210a90 Sample 49165 bytes time -3170.0 to -3136.0 latency 0.0 
32096 : GetState 1 
2 : 11210a90 Sample 47378 bytes time -3136.0 to -3103.0 latency 0.0 
32113 : 11210a90 Sample 47024 bytes time -3103.0 to -3070.0 latency 0.0 
32116 : GetState 1 
32123 : GetState 1 
32127 : 11210a90 Sample 46739 bytes time -3070.0 to -3036.0 latency 0.0 
32138 : GetState 1 
32141 : 11210a90 Sample 45601 bytes time -3036.0 to -3003.0 latency 0.0 
32152 : 11210a90 Sample 45939 bytes time -3003.0 to -2970.0 latency 0.0 
32154 : GetState 1 
32163 : 11210a90 Sample 47212 bytes time -2970.0 to -2936.0 latency 0.0 
32170 : GetState 1 
32180 : 11210a90 Sample 44130 bytes time -2936.0 to -2903.0 latency 0.0 
32190 : GetState 1 
32190 : 11210a90 Sample 43858 bytes time -2903.0 to -2869.0 latency 0.0 
32200 : GetState 1 
32201 : 11210a90 Sample 44417 bytes time -2869.0 to -2836.0 latency 0.0 
32211 : 11210a90 Sample 44330 bytes time -2836.0 to -2803.0 latency 0.0 
32217 : GetState 1 
32224 : 11210a90 Sample 44660 bytes time -2803.0 to -2769.0 latency 0.0 
32236 : 11210a90 Sample 43832 bytes time -2769.0 to -2736.0 latency 0.0 
32237 : GetState 1 
32247 : GetState 1 
32248 : 11210a90 Sample 43512 bytes time -2736.0 to -2703.0 latency 0.0 
32260 : 11210a90 Sample 43342 bytes time -2703.0 to -2669.0 latency 0.0 
32267 : GetState 1 
32272 : 11210a90 Sample 43589 bytes time -2669.0 to -2636.0 latency 0.0 
32286 : 11210a90 Sample 42888 bytes time -2636.0 to -2603.0 latency 0.0 
32287 : GetState 1 
32297 : GetState 1 
32297 : 11210a90 Sample 44217 bytes time -2603.0 to -2569.0 latency 0.0 
32308 : 11210a90 Sample 46987 bytes time -2569.0 to -2536.0 latency 0.0 
32311 : GetState 1 
32321 : 11210a90 Sample 45233 bytes time -2536.0 to -2502.0 latency 0.0 
32331 : GetState 1 
32332 : 11210a90 Sample 46052 bytes time -2502.0 to -2469.0 latency 0.0 
32343 : GetState 1 
32343 : 11210a90 Sample 45819 bytes time -2469.0 to -2436.0 latency 0.0 
32357 : 11210a90 Sample 46946 bytes time -2436.0 to -2402.0 latency 0.0 
32363 : GetState 1 
32371 : 11210a90 Sample 44469 bytes time -2402.0 to -2369.0 latency 0.0 
32373 : GetState 1 
32387 : 11210a90 Sample 44398 bytes time -2369.0 to -2336.0 latency 0.0 
32393 : GetState 1 
32401 : 11210a90 Sample 45456 bytes time -2336.0 to -2302.0 latency 0.0 
32403 : GetState 1 
32412 : 11210a90 Sample 46051 bytes time -2302.0 to -2269.0 latency 0.0 
32423 : GetState 1 
32425 : 11210a90 Sample 38146 bytes time -2269.0 to -2236.0 latency 0.0 
32436 : 11210a90 Sample 38028 bytes time -2236.0 to -2202.0 latency 0.0 
32443 : GetState 1 
32446 : 11210a90 Sample 39705 bytes time -2202.0 to -2169.0 latency 0.0 
32455 : GetState 1 
32460 : 11210a90 Sample 36533 bytes time -2169.0 to -2135.0 latency 0.0 
32468 : GetState 1 
32472 : 11210a90 Sample 37019 bytes time -2135.0 to -2102.0 latency 0.0 
32483 : 11210a90 Sample 37277 bytes time -2102.0 to -2069.0 latency 0.0 
32488 : GetState 1 
32494 : 11210a90 Sample 36698 bytes time -2069.0 to -2035.0 latency 0.0 
32498 : GetState 1 
32506 : 11210a90 Sample 36436 bytes time -2035.0 to -2002.0 latency 0.0 
32516 : GetState 1 
32516 : 11210a90 Sample 37650 bytes time -2002.0 to -1969.0 latency 0.0 
32528 : 11210a90 Sample 38623 bytes time -1969.0 to -1935.0 latency 0.0 
32536 : GetState 1 
32538 : 11210a90 Sample 38525 bytes time -1935.0 to -1902.0 latency 0.0 
32546 : GetState 1 
32549 : 11210a90 Sample 38196 bytes time -1902.0 to -1868.0 latency 0.0 
32559 : 11210a90 Sample 38130 bytes time -1868.0 to -1835.0 latency 0.0 
32564 : GetState 1 
32575 : 11210a90 Sample 39116 bytes time -1835.0 to -1802.0 latency 0.0 
32583 : GetState 1 
32587 : 11210a90 Sample 45008 bytes time -1802.0 to -1768.0 latency 0.0 
32593 : GetState 1 
32599 : 11210a90 Sample 40588 bytes time -1768.0 to -1735.0 latency 0.0 
32610 : 11210a90 Sample 40633 bytes time -1735.0 to -1702.0 latency 0.0 
32613 : GetState 1 
32621 : 11210a90 Sample 41867 bytes time -1702.0 to -1668.0 latency 0.0 
32623 : GetState 1 
32633 : 11210a90 Sample 40974 bytes time -1668.0 to -1635.0 latency 0.0 
32643 : GetState 1 
32643 : 11210a90 Sample 41854 bytes time -1635.0 to -1602.0 latency 0.0 
32653 : GetState 1 
32654 : 11210a90 Sample 42312 bytes time -1602.0 to -1568.0 latency 0.0 
32665 : 11210a90 Sample 42155 bytes time -1568.0 to -1535.0 latency 0.0 
32668 : GetState 1 
32681 : 11210a90 Sample 41618 bytes time -1535.0 to -1501.0 latency 0.0 
32688 : GetState 1 
32696 : 11210a90 Sample 41394 bytes time -1501.0 to -1468.0 latency 0.0 
32703 : GetState 1 
32715 : GetState 1 
32719 : 11210a90 Sample 41221 bytes time -1468.0 to -1435.0 latency 0.0 
32731 : 11210a90 Sample 41515 bytes time -1435.0 to -1401.0 latency 0.0 
32735 : GetState 1 
32742 : 11210a90 Sample 41570 bytes time -1401.0 to -1368.0 latency 0.0 
32748 : GetState 1 
32752 : 11210a90 Sample 43045 bytes time -1368.0 to -1335.0 latency 0.0 
32762 : GetState 1 
32765 : 11210a90 Sample 42187 bytes time -1335.0 to -1301.0 latency 0.0 
32778 : GetState 1 
32780 : 11210a90 Sample 41181 bytes time -1301.0 to -1268.0 latency 0.0 
32791 : 11210a90 Sample 41675 bytes time -1268.0 to -1235.0 latency 0.0 
32793 : GetState 1 
32804 : 11210a90 Sample 42541 bytes time -1235.0 to -1201.0 latency 0.0 
32813 : GetState 1 
32818 : 11210a90 Sample 41916 bytes time -1201.0 to -1168.0 latency 0.0 
32827 : GetState 1 
32833 : 11210a90 Sample 40903 bytes time -1168.0 to -1134.0 latency 0.0 
32843 : 11210a90 Sample 41798 bytes time -1134.0 to -1101.0 latency 0.0 
32846 : GetState 1 
32855 : 11210a90 Sample 41537 bytes time -1101.0 to -1068.0 latency 0.0 
32860 : GetState 1 
32866 : 11210a90 Sample 40623 bytes time -1068.0 to -1034.0 latency 0.0 
32877 : GetState 1 
32880 : 11210a90 Sample 40275 bytes time -1034.0 to -1001.0 latency 0.0 
32889 : GetState 1 
32890 : 11210a90 Sample 37519 bytes time -1001.0 to -968.0 latency 0.0 
32901 : 11210a90 Sample 37575 bytes time -968.0 to -934.0 latency 0.0 
32903 : GetState 1 
32912 : 11210a90 Sample 38719 bytes time -934.0 to -901.0 latency 0.0 
32920 : GetState 1 
32928 : 11210a90 Sample 36653 bytes time -901.0 to -867.0 latency 0.0 
32934 : GetState 1 
32940 : 11210a90 Sample 36593 bytes time -867.0 to -834.0 latency 0.0 
32951 : 11210a90 Sample 35818 bytes time -834.0 to -801.0 latency 0.0 
32954 : GetState 1 
32960 : 11210a90 Sample 36516 bytes time -801.0 to -767.0 latency 0.0 
32966 : GetState 1 
32974 : 11210a90 Sample 35436 bytes time -767.0 to -734.0 latency 0.0 
32986 : 11210a90 Sample 36906 bytes time -734.0 to -701.0 latency 0.0 
32986 : GetState 1 
32996 : 11210a90 Sample 37786 bytes time -701.0 to -667.0 latency 0.0 
32998 : GetState 1 
33008 : 11210a90 Sample 36125 bytes time -667.0 to -634.0 latency 0.0 
33012 : GetState 1 
33019 : 11210a90 Sample 36410 bytes time -634.0 to -601.0 latency 0.0 
33027 : GetState 1 
33034 : 11210a90 Sample 36077 bytes time -601.0 to -567.0 latency 0.0 
33045 : 11210a90 Sample 37942 bytes time -567.0 to -534.0 latency 0.0 
33047 : GetState 1 
33060 : 11210a90 Sample 36691 bytes time -534.0 to -500.0 latency 0.0 
33066 : GetState 1 
33071 : 11210a90 Sample 36991 bytes time -500.0 to -467.0 latency 0.0 
33075 : GetState 1 
33082 : 11210a90 Sample 37085 bytes time -467.0 to -434.0 latency 0.0 
33091 : GetState 1 
33092 : 11210a90 Sample 36362 bytes time -434.0 to -400.0 latency 0.0 
33103 : 11210a90 Sample 36669 bytes time -400.0 to -367.0 latency 0.0 
33109 : GetState 1 
33112 : 11210a90 Sample 36624 bytes time -367.0 to -334.0 latency 0.0 
33126 : 11210a90 Sample 38299 bytes time -334.0 to -300.0 latency 0.0 
33129 : GetState 1 
33139 : GetState 1 
33140 : 11210a90 Sample 37931 bytes time -300.0 to -267.0 latency 0.0 
33152 : GetState 1 
33153 : 11210a90 Sample 38297 bytes time -267.0 to -234.0 latency 0.0 
33163 : 11210a90 Sample 38490 bytes time -234.0 to -200.0 latency 0.0 
33172 : GetState 1 
33176 : 11210a90 Sample 40219 bytes time -200.0 to -167.0 latency 0.0 
33184 : GetState 1 
33188 : 11210a90 Sample 45656 bytes time -167.0 to -133.0 latency 0.0 
33199 : 11210a90 Sample 44289 bytes time -133.0 to -100.0 latency 0.0 
33204 : GetState 1 
: 11210a90 Sample 39973 bytes time -100.0 to -67.0 latency 0.0 
33216 : GetState 1 
33222 : 11210a90 Sample 38835 bytes time -67.0 to -33.0 latency 0.0 
33230 : GetState 1 
33234 : 11210a90 Sample 43513 bytes time -33.0 to 0.0 latency 0.0 
33246 : 11210a90 Sample 39879 bytes time 0.0 to 1.0 latency 0.0 <-- Preroll ends 
33250 : GetState 1 
33262 : GetState 1 
33262 : 11210a90 Run STO 23440168ms ST 0ms 
33262 : 11210a90 Sample 40240 bytes time 33.0 to 34.0 latency 33.0 
33302 : 11210a90 Sample 40200 bytes time 67.0 to 68.0 latency 42.204 
33337 : 11210a90 Sample 40430 bytes time 100.0 to 101.0 latency 41.204 
33464 : 11210a90 Sample 40407 bytes time 134.0 to 135.0 latency 37.8390 
33497 : 11210a90 Sample 43949 bytes time 167.0 to 168.0 latency 36.8390 
33531 : 11210a90 Sample 40345 bytes time 200.0 to 201.0 latency 35.8390 
33559 : 11210a90 Sample 40497 bytes time 234.0 to 235.0 latency 41.6530 
33600 : 11210a90 Sample 40504 bytes time 267.0 to 268.0 latency 33.7936 
33626 : 11210a90 Sample 114853 bytes time 300.0 to 301.0 latency 40.7936 
33658 : 11210a90 Sample 20719 bytes time 334.0 to 335.0 latency 42.7936 

客戶

31372 : GetState 2 
32794 : f622d30 Sample 4515 bytesD time 30199.0 to 30232.0 latency -52.0 <---Discontinuity 
32809 : f622d30 Sample 62335 bytes time 30232.0 to 30265.0 latency -34.0 
32843 : f622d30 Sample 51483 bytes time 30265.0 to 30299.0 latency -35.0 
32869 : f622d30 Sample 62535 bytes time 30299.0 to 30332.0 latency -27.0 
32898 : f622d30 Sample 62041 bytes time 30332.0 to 30365.0 latency -23.0 
32917 : f622d30 Sample 61509 bytes time 30365.0 to 30399.0 latency -9.0 
32937 : f622d30 Sample 62280 bytes time 30399.0 to 30432.0 latency 5.0 
32958 : f622d30 Sample 63084 bytes time 30432.0 to 30465.0 latency 17.0 
32984 : f622d30 Sample 62388 bytes time 30465.0 to 30499.0 latency 24.0 
33019 : f622d30 Sample 61956 bytes time 30499.0 to 30532.0 latency 23.0 
33054 : f622d30 Sample 52196 bytes time 30532.0 to 30566.0 latency 21.0 
33104 : f622d30 Sample 53707 bytes time 30566.0 to 30599.0 latency 5.0 
33135 : f622d30 Sample 55162 bytes time 30599.0 to 30632.0 latency 8.0 
33196 : f622d30 Sample 54511 bytes time 30632.0 to 30666.0 latency -21.0 
33224 : f622d30 Sample 53676 bytes time 30666.0 to 30699.0 latency -15.0 
33265 : f622d30 Sample 54214 bytes time 30699.0 to 30732.0 latency -23.0 
33287 : f622d30 Sample 53590 bytes time 30732.0 to 30766.0 latency -12.0 
33336 : f622d30 Sample 54067 bytes time 30766.0 to 30799.0 latency -27.0 
33369 : f622d30 Sample 55115 bytes time 30799.0 to 30832.0 latency -27.0 
33416 : f622d30 Sample 56462 bytes time 30832.0 to 30866.0 latency -40.0 
33455 : f622d30 Sample 45412 bytes time 30866.0 to 30899.0 latency -46.0 
33487 : f622d30 Sample 49165 bytes time 30899.0 to 30933.0 latency -45.0 
33538 : f622d30 Sample 47378 bytes time 30933.0 to 30966.0 latency -62.0 
33577 : f622d30 Sample 47024 bytes time 30966.0 to 30999.0 latency -68.0 
33616 : f622d30 Sample 46739 bytes time 30999.0 to 31033.0 latency -74.0 
33663 : f622d30 Sample 45601 bytes time 31033.0 to 31066.0 latency -87.0 
33690 : f622d30 Sample 45939 bytes time 31066.0 to 31099.0 latency -81.0 
33732 : f622d30 Sample 47212 bytes time 31099.0 to 31133.0 latency -90.0 
33775 : f622d30 Sample 44130 bytes time 31133.0 to 31166.0 latency -98.0 
33819 : f622d30 Sample 43858 bytes time 31166.0 to 31200.0 latency -110.0 
33851 : f622d30 Sample 44417 bytes time 31200.0 to 31233.0 latency -108.0 
33880 : f622d30 Sample 44330 bytes time 31233.0 to 31266.0 latency -104.0 
33924 : f622d30 Sample 44660 bytes time 31266.0 to 31300.0 latency -115.0 
33959 : f622d30 Sample 43832 bytes time 31300.0 to 31333.0 latency -116.0 
33989 : f622d30 Sample 43512 bytes time 31333.0 to 31366.0 latency -113.0 
34023 : f622d30 Sample 43342 bytes time 31366.0 to 31400.0 latency -114.0 
34062 : f622d30 Sample 43589 bytes time 31400.0 to 31433.0 latency -119.0 
34088 : f622d30 Sample 42888 bytes time 31433.0 to 31466.0 latency -112.0 
34118 : f622d30 Sample 44217 bytes time 31466.0 to 31500.0 latency -108.0 
34159 : f622d30 Sample 46987 bytes time 31500.0 to 31533.0 latency -116.0 
34185 : f622d30 Sample 45233 bytes time 31533.0 to 31567.0 latency -109.0 
34209 : f622d30 Sample 46052 bytes time 31567.0 to 31600.0 latency -99.0 
34237 : f622d30 Sample 45819 bytes time 31600.0 to 31633.0 latency -94.0 
34258 : f622d30 Sample 46946 bytes time 31633.0 to 31667.0 latency -82.0 
34286 : f622d30 Sample 44469 bytes time 31667.0 to 31700.0 latency -76.0 
34306 : f622d30 Sample 44398 bytes time 31700.0 to 31733.0 latency -63.0 
34333 : f622d30 Sample 45456 bytes time 31733.0 to 31767.0 latency -57.0 
34354 : f622d30 Sample 46051 bytes time 31767.0 to 31800.0 latency -44.0 
34374 : f622d30 Sample 38146 bytes time 31800.0 to 31833.0 latency -31.0 
34402 : f622d30 Sample 38028 bytes time 31833.0 to 31867.0 latency -26.0 
34482 : f622d30 Sample 39705 bytes time 31867.0 to 31900.0 latency -72.0 
34507 : f622d30 Sample 36533 bytes time 31900.0 to 31934.0 latency -64.0 
34528 : f622d30 Sample 37019 bytes time 31934.0 to 31967.0 latency -51.0 
34569 : f622d30 Sample 37277 bytes time 31967.0 to 32000.0 latency -59.0 
34600 : f622d30 Sample 36698 bytes time 32000.0 to 32034.0 latency -56.0 
34626 : f622d30 Sample 36436 bytes time 32034.0 to 32067.0 latency -48.0 
34651 : f622d30 Sample 37650 bytes time 32067.0 to0.0 latency -41.0 
34670 : f622d30 Sample 38623 bytes time0.0 to 32134.0 latency -26.0 
34689 : f622d30 Sample 38525 bytes time 32134.0 to 32167.0 latency -12.0 
34723 : f622d30 Sample 38196 bytes time 32167.0 to 32201.0 latency -12.0 
34749 : f622d30 Sample 38130 bytes time 32201.0 to 32234.0 latency -5.0 
34771 : f622d30 Sample 39116 bytes time 32234.0 to 32267.0 latency 7.0 
34791 : f622d30 Sample 45008 bytes time 32267.0 to 32301.0 latency 19.0 
34818 : f622d30 Sample 40588 bytes time 32301.0 to 32334.0 latency 27.0 
34848 : f622d30 Sample 40633 bytes time 32334.0 to 32367.0 latency 29.0 
34948 : f622d30 Sample 41867 bytes time 32367.0 to 32401.0 latency -37.0 
34970 : f622d30 Sample 40974 bytes time 32401.0 to 32434.0 latency -26.0 
34999 : f622d30 Sample 41854 bytes time 32434.0 to 32467.0 latency -22.0 
35018 : f622d30 Sample 42312 bytes time 32467.0 to 32501.0 latency -8.0 
35050 : f622d30 Sample 42155 bytes time 32501.0 to 32534.0 latency -6.0 
35078 : f622d30 Sample 41618 bytes time 32534.0 to 32568.0 latency -1.0 
35102 : f622d30 Sample 41394 bytes time 32568.0 to 32601.0 latency 9.0 
35122 : f622d30 Sample 41221 bytes time 32601.0 to 32634.0 latency 22.0 
35148 : f622d30 Sample 41515 bytes time 32634.0 to 32668.0 latency 29.0 
35166 : f622d30 Sample 41570 bytes time 32668.0 to 32701.0 latency 45.0 
35198 : f622d30 Sample 43045 bytes time 32701.0 to 32734.0 latency 47.0 
35216 : f622d30 Sample 42187 bytes time 32734.0 to 32768.0 latency 61.0 
35239 : f622d30 Sample 41181 bytes time 32768.0 to 32801.0 latency 72.0 
35274 : f622d30 Sample 41675 bytes time 32801.0 to 32834.0 latency 70.0 
35301 : f622d30 Sample 42541 bytes time 32834.0 to 32868.0 latency 76.0 
35319 : f622d30 Sample 41916 bytes time 32868.0 to 32901.0 latency 92.0 
35370 : f622d30 Sample 40903 bytes time 32901.0 to 32935.0 latency 75.0 
35395 : f622d30 Sample 41798 bytes time 32935.0 to 32968.0 latency 84.0 
35415 : f622d30 Sample 41537 bytes time 32968.0 to 33001.0 latency 97.0 
35437 : f622d30 Sample 40623 bytes time 33001.0 to 33035.0 latency 107.0 
35461 : f622d30 Sample 40275 bytes time 33035.0 to 33068.0 latency 117.0 
35482 : f622d30 Sample 37519 bytes time 33068.0 to 33101.0 latency 129.0 
35518 : f622d30 Sample 37575 bytes time 33101.0 to 33135.0 latency 126.0 
35537 : f622d30 Sample 38719 bytes time 33135.0 to 33168.0 latency 142.0 
35559 : f622d30 Sample 36653 bytes time 33168.0 to 33202.0 latency 152.0 
35576 : f622d30 Sample 36593 bytes time 33202.0 to 33235.0 latency 170.0 
35607 : f622d30 Sample 35818 bytes time 33235.0 to 33268.0 latency 171.0 
35698 : f622d30 Sample 36516 bytes time 33268.0 to 33302.0 latency 113.0 
35724 : f622d30 Sample 35436 bytes time 33302.0 to 33335.0 latency 122.0 
35750 : f622d30 Sample 36906 bytes time 33335.0 to 33368.0 latency 128.0 
35769 : f622d30 Sample 37786 bytes time 33368.0 to 33402.0 latency 143.0 
35796 : f622d30 Sample 36125 bytes time 33402.0 to 33435.0 latency 149.0 
35827 : f622d30 Sample 36410 bytes time 33435.0 to 33468.0 latency 151.0 
35852 : f622d30 Sample 36077 bytes time 33468.0 to 33502.0 latency 159.0 
35871 : f622d30 Sample 37942 bytes time 33502.0 to 33535.0 latency 175.0 
35896 : f622d30 Sample 36691 bytes time 33535.0 to 33569.0 latency 182.0 
35926 : f622d30 Sample 36991 bytes time 33569.0 to 33602.0 latency 186.0 
35949 : f622d30 Sample 37085 bytes time 33602.0 to 33635.0 latency 196.0 
35971 : f622d30 Sample 36362 bytes time 33635.0 to 33669.0 latency 207.0 
35989 : f622d30 Sample 36669 bytes time 33669.0 to 33702.0 latency 223.0 
36017 : f622d30 Sample 36624 bytes time 33702.0 to 33735.0 latency 229.0 
36045 : f622d30 Sample 38299 bytes time 33735.0 to 33769.0 latency 233.0 
36064 : f622d30 Sample 37931 bytes time 33769.0 to 33802.0 latency 248.0 
36086 : f622d30 Sample 38297 bytes time 33802.0 to 33835.0 latency 259.0 
36108 : f622d30 Sample 38490 bytes time 33835.0 to 33869.0 latency 270.0 
36126 : f622d30 Sample 40219 bytes time 33869.0 to 33902.0 latency 286.0 
36157 : f622d30 Sample 45656 bytes time 33902.0 to 33936.0 latency 288.0 
36177 : f622d30 Sample 44289 bytes time 33936.0 to 33969.0 latency 302.0 
36205 : f622d30 Sample 39973 bytes time 33969.0 to 34002.0 latency 307.0 
36225 : f622d30 Sample 38835 bytes time 34002.0 to 34036.0 latency 321.0 
36251 : f622d30 Sample 43513 bytes time 34036.0 to 34069.0 latency 329.0 
36277 : f622d30 Sample 39879 bytes time 34069.0 to 34070.0 latency 336.0 <--- End of Preroll frames 
36608 : f622d30 Sample 40240 bytes time 34102.0 to 34103.0 latency 37.0 
36648 : f622d30 Sample 40200 bytes time 34136.0 to 34137.0 latency 32.0 
36676 : f622d30 Sample 40430 bytes time 34169.0 to 34170.0 latency 36.0 
36711 : f622d30 Sample 40407 bytes time 34203.0 to 34204.0 latency 35.0 
36748 : f622d30 Sample 43949 bytes time 34236.0 to 34237.0 latency 31.0 
36786 : f622d30 Sample 40345 bytes time 34269.0 to 34270.0 latency 26.0 
36805 : f622d30 Sample 40497 bytes time 34303.0 to 34304.0 latency 41.0 
36846 : f622d30 Sample 40504 bytes time 34336.0 to 34337.0 latency 33.0 
36872 : f622d30 Sample 114853 bytes time 34369.0 to 34370.0 latency 40.0 
36906 : f622d30 Sample 20719 bytes time 34403.0 to 34404.0 latency 41.0 

回答

1

尋求包括暫停和重新啓動流媒體:你有時間上的不連續衝壓。您必須在發送端自動重新分配時間戳以恢復連續性,或者在客戶端檢測此時間戳並重新設置時間戳。或者,另一種選擇是,客戶端會刷新隊列並繼續新鮮。

+0

我編輯了這個問題來顯示我重新設置時間戳的方式。這是做到這一點的正確方法嗎?萬分感謝! – HBZ

+0

我想說你寧願打印一系列實際上從源代碼過濾器發出的時間戳。而且你很可能會看到你在那裏發生了一些奇怪的事情。 –

+0

你是對的!我早該這麼做。我在SourceFilter之後插入了GDCL監視器過濾器,發現時間戳正在跳轉。解決之後,我能夠正確地看到所有幀。但是,現在我面臨的問題是,每次尋求之後,客戶端都會出現巨大的延遲。它比服務器端的緩衝時間長。可能是什麼問題? – HBZ