Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MPEG/DVB TS capture: graph runs but got no data

72 views
Skip to first unread message

Foo44

unread,
Feb 15, 2008, 11:46:18 AM2/15/08
to
Hello,

I have some problems running a graph to capture an MPEG/DVB transport stream.
The graph can run but the last filter gets no data.

I am new to DirectShow and already got tremendous help from this newsgroup
and I would like to thank you for your help.

In the application, I build the following graph:

Microsoft DVT Network Provider ->
Nova-T Stick DVB-T Tuner (Dev1 Path0) ->
Nova-T Stick DVB-T Capture (Dev1 Path0) ->
Custom filter

The last filter is a custom one, more or less inspired from ideas in VLC.
The filter has one input pin and no output pin. The purpose is to capture
all packets in the transport stream. Since I want to grab the complete TS,
there is no MPEG demultiplexer.

My custom filter is a direct subclass of IBaseFilter and implements no
other interface. The input pin implements IPin and IMemInputPin. It
accepts only two media types: MEDIASUBTYPE_MPEG2_TRANSPORT and
MEDIASUBTYPE_MPEG2_TRANSPORT_STRIDE.

Because this filter is dedicated to this application, it does not
have its own DLL, it is not declared system-wide. I just allocate
one instance (C++ "new") and pass this instance to AddFilter and
RenderStream.

I have added traces everywhere in the filter and pin for debug purpose.
I can see the negociation between the pins and connections.

Once the graph is built, I create a tune request:

- Get ITuner from network provider filter
- get_TuningSpace from ITuner (get DVB-T tuning space)
- CreateTuneRequest from tuning space
- Set ONID, TSID, SID to -1 in tune request (no demux)
- CoCreateInstance DVBTLocator
- Set DVBTLocator params (yes, I saw that frequency is in kHz, not Hz)
- put_Locator on tune request
- put_TuneRequest on ITune (network provider)
- finally invoke Run on IMediaControl (from graph manager)

The method Run is invoked in my filter. Then, nothing happens.
Specifically, the pin methods Receive and ReceiveMultiple are
never invoked.

The carrier frequency and other modulation parameters seem correct.
Using Hauppauge WinTV with the same device on the same system,
I can view TV on this frequency.

If this can help troubleshooting the problem, I have inserted below
a trace of all methods in my filter and pin (except the AddRef and
Release for simplicity).

Did I miss something obvious (or less obvious) ?


== using provider filter "Microsoft DVBT Network Provider", tuning space "DVB-T" ("Local DVB-T Digital Antenna")
Pin constructor, ref=1
Filter constructor, ref=1
Filter::JoinFilterGraph
Filter::QueryInterface: no interface IID_IAMOpenProgress
Filter::QueryInterface: no interface IID_IAMDeviceRemoval
== trying receiver filter "Nova-T Stick DVB-T Capture (Dev1 Path0) "
Filter::EnumPins
EnumPins::Next
Pin::QueryDirection
Pin::ConnectedTo
Pin::EnumMediaTypes
EnumMediaTypes::Reset
EnumMediaTypes::Next
Filter::EnumPins
EnumPins::Next
Pin::QueryDirection
EnumPins::Next
Filter::EnumPins
EnumPins::Next
Pin::QueryDirection
Pin::ConnectedTo
EnumPins::Next
Filter::QueryInterface: no interface IID_IBDA_NetworkProvider
Pin::QueryPinInfo
Filter::QueryFilterInfo
Pin::QueryInternalConnections
Pin::QueryPinInfo
Filter::EnumPins
EnumPins::Next
Pin::QueryDirection
Pin::EnumMediaTypes
EnumMediaTypes::Reset
EnumMediaTypes::Next
Pin::QueryDirection
Pin::QueryInterface: MemInputPin, OK
Pin::QueryInterface: no interface IID_IKsPin
Pin::ReceiveConnection: checking
Pin::QueryAccept
Pin::ReceiveConnection: connected
Pin::QueryInterface: no interface IID_IKsPin
Pin::QueryInterface: Pin, OK
Pin::QueryInterface: no interface {E539CD90-A8B4-11D1-8189-00A0C9062802}
Pin::QueryInterface: no interface {E539CD90-A8B4-11D1-8189-00A0C9062802}
Pin::QueryInterface: no interface {E539CD90-A8B4-11D1-8189-00A0C9062802}
Pin::QueryInterface: no interface {E539CD90-A8B4-11D1-8189-00A0C9062802}
Pin::GetAllocatorRequirements
Pin::GetAllocator
Pin::NotifyAllocator
== using receiver filter "Nova-T Stick DVB-T Capture (Dev1 Path0) "
== using Nova-T Stick DVB-T Tuner (Dev1 Path0) (DVB-T)
Pin::QueryPinInfo
Filter::EnumPins
EnumPins::Next
Pin::QueryDirection
EnumPins::Next
Filter::EnumPins
EnumPins::Next
Pin::QueryDirection
EnumPins::Next
Pin::QueryPinInfo
Filter::EnumPins
EnumPins::Next
Pin::QueryDirection
EnumPins::Next
Pin::QueryPinInfo
Filter::EnumPins
EnumPins::Next
Pin::QueryDirection
EnumPins::Next
Filter::EnumPins
EnumPins::Next
Pin::QueryDirection
Pin::ConnectedTo
EnumPins::Next
Filter::QueryInterface: no interface IID_IAMFilterMiscFlags
Filter::QueryInterface: no interface IID_IKsPropertySet
Filter::QueryInterface: no interface IID_IReferenceClock
Filter::SetSyncSource
Filter::Pause
Pin::QueryInterface: no interface {E539CD90-A8B4-11D1-8189-00A0C9062802}
Filter::QueryInterface: no interface IID_IMediaSeeking
Filter::QueryInterface: no interface IID_IMediaPosition
Filter::QueryInterface: no interface IID_IAMFilterMiscFlags
Filter::QueryInterface: no interface IID_IBasicVideo
Filter::QueryInterface: no interface IID_IVideoWindow
Filter::QueryInterface: no interface IID_IBasicAudio
Filter::Run

then nothing ...

Foo44

unread,
Feb 21, 2008, 9:39:48 AM2/21/08
to
After multiple stupid testings, I found one stupid solution that works.
I share it here in case someone runs into the same problem.

Remember that I wanted the complete transport stream, ie. NO DEMULTIPLEXING.
However, it seems that the graph cannot run if it does not contain any
demultiplexer or TIF.

So, a demux filter and a TIF must be present in the graph, even it they
are unused and unparametered (no config set).

Since I need the full TS, I cannot connect my filter after the demux.
So, I need to split the graph into two branches: one contains my
filter, the other one is a dead end containing an unused/unset demux
and a TIF.

The graph looks like:

Microsoft DVT Network Provider ->
Nova-T Stick DVB-T Tuner (Dev1 Path0) ->
Nova-T Stick DVB-T Capture (Dev1 Path0) ->

Infinite tee filter -> 2 outputs:
Branch 1: Custom filter (the useful one)
Branch 2: MPEG-2 Demultiplexer ->
BDA MPEG2 Transport Information Filter

Assuming that a demux is mandatory is a mistake of DirectShow or BDA.
There are cases where it is useless.
Seems a bug to me, but it works...

rec...@gmail.com

unread,
Jun 29, 2014, 3:50:31 PM6/29/14
to
I have also tried it. In this case, I tried to demultiplex the data in branch 1 (by myself using an own filter), but I found a trouble:

It is supposed that the TS has many PES. I get every set of 188 bytes and I found that only one video and only one audio have the expected PES header. Only these PES can be decoded. The other PES (for other PIDs numbers) looks like noise data, and cannot be decoded. So, it look like we can only decode one "service" at same time. Is it true?

0 new messages