Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6056225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:21:09+00:00 2026-05-23T08:21:09+00:00

I wrote my own RTSP Push Source DirectShow filter (CBaseFilter), that works for H264

  • 0

I wrote my own RTSP Push Source DirectShow filter (CBaseFilter), that works for H264 like a charm! But, when I tried to support MPEG4 (MP4V-ES stream), I stumbled upon a problem… My stream gets decoded (with ffdshow Video Decoder filter, or DivX Video Decoder) and rendered perfectly for exactly 10 seconds. Picture is fluent at 15fps, but after 10 secs fps drops drastically, and only IVOPs are decoded, and PVOPs/BVOPs are discarded… even though I recieve them, and send them to the decoder on time.

Then I started to fiddle with my code, and I discovered that I depacketize MPEG4 RTP payload correctly, and I send media samples to decoder correctly, and I release them correctly, also CBaseOutputPin::DecideBufferSize() does its job like it should, and I call IMediaSample::SetTime() correctly… BUT, if I change this code that delivers a sample to the decoder:

hr = videoPin->Deliver(sample);
sample->Release();

with this code (note the first line):

videoPin->DeliverNewSegment(REFERENCE_TIME(start), REFERENCE_TIME(end), 1.0);                                               
hr = videoPin->Deliver(sample);
sample->Release();

the video is fluent after 10 seconds and beyond (fps stays at 15), but the picture is all messed up… like IVOP is not decoded as it should, and there are some artefacts in static parts of the scene.

So, how do I use CBaseOutputPin::DeliverNewSegment()? And why the heck do I need it?

Because I guess I do need it, since it stops my video stream from not being decoded fluently…

I googled, but without luck.
Any help will be appreciated. Thanx.

UPDATE

In method videoPin->DeliverNewSegment(tStart, tStop, dRate) parameter dRate is:

Rate at which this segment should be processed, as a percentage of the original rate.

So if instead of 1.0 I put 100.0 stream is flowing as it is supposed to, but with some delay in between some frames. But this is the best so far!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:21:10+00:00Added an answer on May 23, 2026 at 8:21 am

    I’m not convinced that NewSegment causes the issues you are seeing. NewSegment is used for those cases where the data you push in a single packet crosses the start time or the stop time, and it allows the decoder to only deliver up to the stop time. In this case you could call NewSegment (0, MAX_LONGLONG, 1) once at start of streaming and it should be fine.

    If you see problems, then perhaps you should check the latency at the decoder output (compare timestamp with current stream time).

    G

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote my own control with some buttons and events - that works like
I have a Perl script I wrote for my own personal use that fetches
I wrote my own context by reading this article and many others, but none
I wrote my own function that keeps a sidebar fixed on screen after a
I have two collections of my own reference-type objects that I wrote my own
I wrote my own jquery plugin and was surprised that I haven't access to
I wrote my own cacheEngine for memcached as that's the extension I have installed
I wrote my own object Tag and I would like to to contains if
I wrote my own terminal program that reads from the serial port to read
i wrote a own Security Manager and my problem is, that i run code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.