Click here to Skip to main content
15,913,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Change MFC Dialog name (when running) Pin
shiraztk29-May-07 9:52
shiraztk29-May-07 9:52 
AnswerRe: Change MFC Dialog name (when running) (solved) Pin
Johpoke29-May-07 20:06
Johpoke29-May-07 20:06 
QuestionQuestion about Creating Directshow Filter with a callback Pin
godspeed12329-May-07 8:29
godspeed12329-May-07 8:29 
AnswerRe: Question about Creating Directshow Filter with a callback Pin
Mark Salsbery29-May-07 9:03
Mark Salsbery29-May-07 9:03 
GeneralRe: Question about Creating Directshow Filter with a callback Pin
godspeed12329-May-07 10:42
godspeed12329-May-07 10:42 
GeneralRe: Question about Creating Directshow Filter with a callback Pin
Mark Salsbery29-May-07 13:27
Mark Salsbery29-May-07 13:27 
GeneralRe: Question about Creating Directshow Filter with a callback Pin
godspeed12330-May-07 7:13
godspeed12330-May-07 7:13 
GeneralRe: Question about Creating Directshow Filter with a callback Pin
Mark Salsbery30-May-07 7:27
Mark Salsbery30-May-07 7:27 
DoBufferProcessingLoop() is already running so you definitely don't want to call it. It is
called by the threadproc, so it is running on the sample-push thread.

I was speaking of overriding Active() and Inactive(), and in the overrides, don't create the
thread at all. Then, in your callback, do the processing that DoBufferProcessingLoop() does
on each iteration of its loop - get a sample buffer from the allocator, fill the sample with
data, set the sample's time, and send it on downstream.

So, instead of using CSourceStream for your pin class, derive a class from CSourceStream and do
the overrides. Then you're essentially using the benifits of CSourceStream without the built-in
thread (CSourceStream is derived from CAMThread).

Take a look at the source code for CSourceStream in the DirectShow base classes and you'll see
what I'm referring to (I think it's source.cpp/.h).

Mark


"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

GeneralRe: Question about Creating Directshow Filter with a callback Pin
godspeed12330-May-07 7:35
godspeed12330-May-07 7:35 
QuestionC++ basic question - parametrized and default constructors Pin
Vaclav_29-May-07 8:23
Vaclav_29-May-07 8:23 
AnswerRe: C++ basic question - parametrized and default constructors Pin
Mark Salsbery29-May-07 9:17
Mark Salsbery29-May-07 9:17 
AnswerRe: C++ basic question - parametrized and default constructors Pin
shiraztk29-May-07 10:05
shiraztk29-May-07 10:05 
GeneralRe: C++ basic question - parametrized and default constructors Pin
Vaclav_30-May-07 9:07
Vaclav_30-May-07 9:07 
QuestionHow to use a camera? Pin
smzhaq29-May-07 8:05
smzhaq29-May-07 8:05 
AnswerRe: How to use a camera? Pin
Vaclav_29-May-07 8:40
Vaclav_29-May-07 8:40 
AnswerRe: How to use a camera? Pin
Mark Salsbery29-May-07 9:11
Mark Salsbery29-May-07 9:11 
QuestionElegant way to read data from text file Pin
ldsdbomber29-May-07 7:31
ldsdbomber29-May-07 7:31 
AnswerRe: Elegant way to read data from text file Pin
David Crow29-May-07 8:03
David Crow29-May-07 8:03 
QuestionHow to use Create instead of LoadFrame Pin
prithaa29-May-07 7:11
prithaa29-May-07 7:11 
AnswerRe: How to use Create instead of LoadFrame Pin
Nibu babu thomas29-May-07 17:32
Nibu babu thomas29-May-07 17:32 
GeneralRe: How to use Create instead of LoadFrame Pin
prithaa29-May-07 18:03
prithaa29-May-07 18:03 
JokeHelp! [modified] Pin
Mark Salsbery29-May-07 6:55
Mark Salsbery29-May-07 6:55 
AnswerRe: Help! Pin
krmed29-May-07 7:02
krmed29-May-07 7:02 
GeneralRe: Help! Pin
David Crow29-May-07 7:27
David Crow29-May-07 7:27 
GeneralRe: Help! Pin
Mark Salsbery29-May-07 7:40
Mark Salsbery29-May-07 7:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.