Hi,
I have run tuner from DirectX filter graphs. My Tv Tuner Card does not provide I/Q samples(Low frequency) as Realtek RTL2832u based USB Tuners so i need to get RF samples directly from TV Tuner Analog Audio out pin and store it in hard disk for digital signal processing post processing. I am unable to find any information on this topic also the Directx (Graphedit) application does not allow TV Tuner output pins to be connected to its Sample Capture filter. Please provide info with source code example.

Dani AI

Generated

Regarding : short answer — you cannot get raw RF I/Q samples by attaching a SampleGrabber to a TV tuner’s analog audio pin. The analog “audio out” on a tuner is the demodulated baseband audio (the tuner/demodulator already extracts the sound from the RF/IF chain), and ordinary audio sample rates/paths are orders of magnitude too narrow to represent RF I/Q. (en.wikipedia.org)

Why GraphEdit/DirectShow behaves the way you saw: Windows exposes TV tuner, TV‑audio and crossbar as user‑mode wrapper filters (control/topology elements) rather than raw kernel‑streaming RF pins, so those pins are for selecting/control and for passing already‑decoded streams into the graph — not for supplying pre‑demodulated I/Q. SampleGrabber itself only accepts a connected media type you specify (e.g. MEDIATYPE_Audio) and will return the decoded audio samples, not RF. (learn.microsoft.com)

If raw I/Q is required, the usual, practical options are: use an SDR device/driver that explicitly exposes raw I/Q (RTL2832U/RTL‑SDR, HackRF, Airspy, SDRplay, etc.) or use a vendor driver/SDK that provides kernel streaming of raw ADC data. Most consumer TV tuner drivers do not expose raw RF samples to user mode; the RTL‑SDR discovery is a special case where the chipset/driver let users read I/Q. (rtl-sdr.com)

If your goal is simply to record the demodulated audio from the tuner (for later DSP on audio-band signals), build a DirectShow graph and insert SampleGrabber configured for audio, then render the stream to a null renderer and pull buffers or use callbacks. Example (high‑level):

// set desired media type for SampleGrabber (audio/PCM)
AM_MEDIA_TYPE mt = {};
mt.majortype = MEDIATYPE_Audio;
mt.subtype  = MEDIASUBTYPE_PCM; // or leave subtype GUID_NULL to accept what device offers
pSampleGrabber->SetMediaType(&mt);

// connect: pCaptureFilter is your capture (TV audio) filter
pBuilder->RenderStream(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Audio,
                       pCaptureFilter, pSampleGrabberFilter, pNullRenderer);

// buffer samples or set callback, then Run the graph and GetCurrentBuffer / BufferCB.
pSampleGrabber->SetBufferSamples(TRUE);
pControl->Run();

See the Sample Grabber and Capture Graph Builder docs for details, plus note that Qedit.h/SampleGrabber are legacy APIs (consider Media Foundation for new projects). Troubleshooting tips: enumerate the capture filter pins with ICaptureGraphBuilder2::FindPin, call ISampleGrabber::GetConnectedMediaType to learn exact WAVEFORMATEX, and watch for driver‑specific crossbar routing (some cards require selecting the correct crossbar input). (learn.microsoft.com)

Hi,
I wanted to capture RAW RF (Radio Frequency) data coming as output from Tv Tuner's Analog Audio output pin and record in hard disk for digital signal processing. The data is analog and only digtal data comes after crossbar filter.
can anyone tell would it be demodulated data or not because then it goes to filter named USB Tv device?
in any case how can i grab sampes and store them in hard disk using SampleGrabber filter programmatically?
please provide info with source code example.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.