DirectShow is one of the worse libraries ever created by Microsoft. If you can afford it, you can cut corners with LeadTools. At one point, years ago, I looked at MediaLooks. It's probably worth a try. There's also Qt's Phonon library (which I know nothing about other than it exists.)
One of my favorite statements was spoken in “theory of information” lecture.
Our elderly professor stated that “ for information to exist, it must be something new, change must be indicated”.
Using this simple definition stating the quality of DirectShow is no longer an information.
The real issue with MS is they just cannot put anything together, mainly because the guy who wrote the first paragraph in this jewel is no longer contracting for them.
I had few “aw s..t” moments with implementing DirectShow, but the worst part is that it is literary scattered in many “SDKs” and for us greenhorns it seldom makes sense.
For example - I ended up rendering the stream and than setting up the display's window.
To me it should be the other way around, but I have not tried that or been successful analyzing why it works that way. And I just hate “it works, but I have no clue why” feelings.
One does not learn much this way , using this “just copy it any pray” approach.
And the other “gripe” - why do so many so called experts write software without using the function / method or whatever COM calls it (!) return values?
Anyway, ISamplerGrabber – here I come.
I have declared one static fstream file under header.h
static ofstream myfile_logs("D:\\Elec...");
myfile_logs << "verify...";
//end of main .cpp
myfile_logs << "calculate Mem";
//end of cal_mem
When i run this program, on opening the log file
i get only
"calculate Mem" text displayed
the control does come to verify_data but the file is not appended or updated with verify.. text
The log file seems to work only for commonFunc.cpp
how to have this log file appended for multiple cpps?
You have created two separate streams, one in main.cpp and one in commonFunc.cpp. Even though they both use the same filename they will not be synchronised. You should create a function that manages the file and does all the logging, and call that from the other parts of your program.
The static doesn't do what you're assuming. In a class it makes it "global" (shared by all instances) but at namespace scope it makes the variable private to the compilation unit. Every file that includes your header has it's own stream.
I am looking for a C++ library like syslog-ng[^] but with the possibility to run under Windows (syslog-ng needs a POSIX system ). Has anyone an idea or a suggestion?
Not required anymore, I simply took a hour-long Google search on me and made my Windows POSIX-compatible [^] . Since syslog-ng needs POSIX I suppose it will run well and smooth...
FYI... if you're required to export your application to end users, Cygwin might still be an easier option. You may be surprised at the number of commercial applications that rely on Cygwin to run on Windows.
thank you for the information, but I am talking about the controller software of this medical diagnostics instrument[^] (pointed that not well enough out, sorry). Because of the regulations in the market we are going to do a hardening process on the OS anyways and can set up the image anyway we want to, so installing the kernel patch is no problem since we decide what the customers OS will look like. And using the kernel patch we get a faster response time anyways, so this is the way to go for us.
But thank you very much for the additional info.
i am trying to write a program that counts the no. of records in a file by placing the get pointer at the end of file and using tellg() function to get the pointer position and dividing the no. of bytes with the size of one record to get the no. of total records
but when i write
and then inquire the position of get pointer
the result that i am getting is -1.
please tell me what am i doing wrong?
Last Visit: 31-Dec-99 19:00 Last Update: 10-Dec-23 3:05