Who has DirectShow programming experience? at DVinfo.net

Go Back   DV Info Net > Windows / PC Post Production Solutions > Non-Linear Editing on the PC

Non-Linear Editing on the PC
Discussing the editing of all formats with Matrox, Pinnacle and more.


Reply
 
Thread Tools Search this Thread
Old October 31st, 2005, 10:22 PM   #1
Wrangler
 
Join Date: Feb 2002
Location: Cleveland, Ohio
Posts: 1,929
Who has DirectShow programming experience?

I'm writing an application in DirectShow but I have a few questions. DVi has always been my first stop for expert help--so have any of our developers tinkered with writing DirectShow video applications?

Specifically, I'm trying to get two video clips to play, sequentially, in the same screen space, with no pause in between. I've been using the Jukebox sample as my template, but it produces a little blip of a pause between clips while it builds the filter graph for the new clip and places/resizes the video window. If I know that both clips share the same video codec and size properties, how do I get away with not rebuilding the filter graph and not resizing the video window? Also, do I need to queue one clip up and get it playing before the last one ends in order not to have any pause between them?
__________________
All the best,
Robert K S

Search DVinfo.net for quick answers | The best in the business: DVinfo.net sponsors
Robert Knecht Schmidt is offline   Reply With Quote
Old November 1st, 2005, 10:32 AM   #2
Major Player
 
Join Date: Oct 2005
Location: Hillsborough, NC, USA
Posts: 968
This is a common problem but there's also a solution!

Start here: http://www.gdcl.co.uk/articles/MultipleGraphs.pdf

GDCL is Geraint Davies Consulting Limited in North Wales, UK. Geraint is really *the guru* for all things DirectShow. Here's part of his bio:

"While working for Microsoft's UK Development Lab, Geraint was architect and lead developer of the Quartz multimedia technology. This is a component-based multimedia architecture which is the basis for Microsoft's ActiveMovie and DirectShow and is now widely used for digital video playback, DVD and digital audio editing solutions, as well as being a key part of Microsoft's multimedia architecture."

John.

Enosoft
http://www.enosoft.net
high performance tools for music and video

Quote:
Originally Posted by Robert Knecht Schmidt
I'm writing an application in DirectShow but I have a few questions. DVi has always been my first stop for expert help--so have any of our developers tinkered with writing DirectShow video applications?

Specifically, I'm trying to get two video clips to play, sequentially, in the same screen space, with no pause in between. I've been using the Jukebox sample as my template, but it produces a little blip of a pause between clips while it builds the filter graph for the new clip and places/resizes the video window. If I know that both clips share the same video codec and size properties, how do I get away with not rebuilding the filter graph and not resizing the video window? Also, do I need to queue one clip up and get it playing before the last one ends in order not to have any pause between them?
John Miller is offline   Reply With Quote
Old November 2nd, 2005, 05:10 AM   #3
Wrangler
 
Join Date: Feb 2002
Location: Cleveland, Ohio
Posts: 1,929
It indeed looks like it may provide a path to seamless playback of video clips using DirectShow. Unfortunately, I can't get the samples to build. Here's the first compiler complaint holding me up:

Compiling...
source.cpp
c:\Documents and Settings\Administrator\Desktop\GMFBridge\source.cpp(235) : error C3861: 'wsprintfWInternal': identifier not found, even with argument-dependent lookup


The line of code it points to:

wsprintfW(wsz, L"FilterGraph %08p pid %08x", (DWORD_PTR)(IUnknown*)pGraph, GetCurrentProcessId());

It turns out wsprintfW is defined in wxutil.h:

#define wsprintfW wsprintfWInternal

But if I look for any definition of wsprintfWInternal, it's undefined. Further down in wxutil.h there's this commented section:

Code:
// miscellaneous string conversion functions
// NOTE: as we need to use the same binaries on Win95 as on NT this code should
// be compiled WITHOUT unicode being defined.  Otherwise we will not pick up
// these internal routines and the binary will not run on Win95.

// int WINAPIV wsprintfWInternal(LPWSTR, LPCWSTR, ...);

//LPWSTR
//WINAPI
//lstrcpyWInternal(
//    LPWSTR lpString1,
//    LPCWSTR lpString2
//    );
and in wxutil.cpp there's another commented section:

Code:
// int WINAPIV wsprintfWInternal(LPWSTR wszOut, LPCWSTR pszFmt, ...)
// {
//     char fmt[256]; // !!!
//     char ach[256]; // !!!
//     int i;
//
//     va_list va;
//     va_start(va, pszFmt);
//     WideCharToMultiByte(GetACP(), 0, pszFmt, -1, fmt, 256, NULL, NULL);
//     (void)StringCchVPrintf(ach, NUMELMS(ach), fmt, va);
//     i = lstrlenA(ach);
//     va_end(va);
//
//     MultiByteToWideChar(CP_ACP, 0, ach, -1, wszOut, i+1);
//
//     return i;
// }
but I'm not sure if any of the above is helpful.

Any suggestions? How can I get this puppy to compile? Has anyone else had success?
__________________
All the best,
Robert K S

Search DVinfo.net for quick answers | The best in the business: DVinfo.net sponsors
Robert Knecht Schmidt is offline   Reply With Quote
Old November 2nd, 2005, 07:47 PM   #4
Wrangler
 
Join Date: Feb 2002
Location: Cleveland, Ohio
Posts: 1,929
Geraint Davies offered the following two solutions, both of which I'm ashamed not to have come up with myself! :)

Quote:
I know they've been messing with this win-95 compatibility stuff recently. I
think the correct solution would be to remove the #define in wxutil.h, since
there's a wsprintfW on all interesting platforms now.

However, far the simplest solution is to remove the whole if (false) block.
Worry about that later if you think you need to debug the graph building
code. Same with the similar code in the sink filter.

G
__________________
All the best,
Robert K S

Search DVinfo.net for quick answers | The best in the business: DVinfo.net sponsors
Robert Knecht Schmidt is offline   Reply
Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

Professional Video
(800) 833-4801
Portland, OR

B&H Photo Video
(866) 521-7381
New York, NY

Z.G.C.
(973) 335-4460
Mountain Lakes, NJ

Abel Cine Tech
(888) 700-4416
N.Y. NY & L.A. CA

Precision Camera
(800) 677-1023
Austin, TX

DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > Windows / PC Post Production Solutions > Non-Linear Editing on the PC

Thread Tools Search this Thread
Search this Thread:

Advanced Search

 



Google
 

All times are GMT -6. The time now is 11:11 PM.


DV Info Net -- Real Names, Real People, Real Info!
1998-2017 The Digital Video Information Network