[FFmpeg-devel] [GSoC] BDA (DTV) Capture / tuning -- work-in-progress

Roger Pack rogerdpack2 at gmail.com
Thu Dec 17 20:57:34 CET 2015


On 8/22/15, Michael Niedermayer <michael at niedermayer.cc> wrote:
> On Sat, Aug 22, 2015 at 05:18:04AM +0200, Máté Sebők wrote:
>> >
>> > fails to build with mingw due to missing header
>> > In file included from ffmpeg/libavdevice/dshow.c:33:0:
>> > ffmpeg/libavdevice/bdadefs.h:8:24: fatal error: combaseapi.h: No such
>> > file or directory
>> > compilation terminated.
>> > make: *** [libavdevice/dshow.o] Error 1
>> > maybe a header check is needed in configure
>>
>>
>> Maybe fixed... unnecessary headers removed (also some cleanup in the
>> interface-descriptions)
>
> i can confirm, the new patch builds fine with mingw here
>
>
> [...]
>
>> > +
>> > > +            gfilename = malloc((strlen(ctx->dtv_graph_
>> > file)+4)*sizeof(WCHAR));
>> > is this intended to be malloc() instead of av_malloc() ?
>>
>>
>> Yes, it was intended, only a filename buffer for char-to-widechar
>> conversion.
>
> normally code in FFmpeg uses av_malloc() unless there is need for
> the buffer to be passed into external functions which require a
> different allocation
>
> full review left to roger and anyone else who wants to review

OK I had this great idea to capture the incoming MPEG2 transport
stream from the digital TV capture device.  Kind of like "raw" stream,
so FFmpeg could have access to, for instance, all the audio stream.

It appears that the type coming out of the tuner is:
MEDIATYPE_Stream
with subtype
KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT
which is apparently treated the same as MEDIASUBTYPE_MPEG2_TRANSPORT
by the built in directshow mpeg demuxer [1] so I assume is some kind
of typical MPEG2 TS stream.

I had hoped that if I set dshow's AVStream's codec_id to
         codec->codec_id = AV_CODEC_ID_NONE;
         codec->codec_type = AVMEDIA_TYPE_DATA;

That it would somehow recognize that I was sending it an MPEG stream
and insert an appropriate demuxer for me.

However, when I run it, it fails like this:

Input #0, dshow, from 'video=Hauppauge WinTV 885 BDA Tuner/Demod':
  Duration: N/A, bitrate: N/A
Codec 0x20000 is not in the full list.
    Stream #0:0, 0, 1/27000000: Data: unknown_codec, 0/1
Successfully opened the file.
Output #0, mp4, to 'yo.mp4':
Output file #0 does not contain any stream

so it's definitely not, for instance, doing a probe or analyze on the
MPEG stream....

Is this possible or any hints/tips/tricks I could possibly use?
Thanks!

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/dd390716(v=vs.85).aspx


More information about the ffmpeg-devel mailing list