{"id":915,"date":"2009-05-02T12:57:58","date_gmt":"2009-05-02T10:57:58","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=915"},"modified":"2009-05-02T13:26:52","modified_gmt":"2009-05-02T11:26:52","slug":"video-decoder-dmo-and-am_sample_preroll","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/915","title":{"rendered":"Video Decoder DMO and AM_SAMPLE_PREROLL"},"content":{"rendered":"<p>This does not seem to be documented anywhere, so it makes sense to mention. A video decoder, wrapped by <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd375519(VS.85).aspx\">DMO Wrapper Filter<\/a>, will receive preroll media samples with <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd373500(VS.85).aspx\">AM_SAMPLE_PREROLL<\/a> flag (alternatively available using <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd407014(VS.85).aspx\">IMediaSample::IsPreroll<\/a>), but it won&#8217;t even forward these samples to the underlying DMO, instead they are just ignored.<\/p>\n<p>MSDN says:<\/p>\n<p style=\"padding-left: 30px;\"><em>Preroll samples are processed but not displayed. They are located in the  media stream before the displayable samples.<\/em><\/p>\n<p>However this behavoir of DMO Wrapper Filter does not seem to be correct. A DMO might require (in my case, maybe there are other scenarios) to initialize its decoding context from a splice point and then be able to decode further samples. The way the wrapper is skipping samples it appears that DMO is not receiving splice point data and won&#8217;t be able to start decoding of non-preroll samples until it receives a non-preroll splice point media sample&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This does not seem to be documented anywhere, so it makes sense to mention. A video decoder, wrapped by DMO Wrapper Filter, will receive preroll media samples with AM_SAMPLE_PREROLL flag (alternatively available using IMediaSample::IsPreroll), but it won&#8217;t even forward these samples to the underlying DMO, instead they are just ignored. MSDN says: Preroll samples are&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/915\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,10],"tags":[78,83,486],"class_list":["post-915","post","type-post","status-publish","format-standard","hentry","category-technology","category-video","tag-directshow","tag-dmo","tag-video"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=915"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/915\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}