|
This is a technical forum, you cannot expect to get full tutorials on something as wide and complex as this subject. You have not even stated which platform you are planning to work on.
|
|
|
|
|
linux platform,well i'm not asking for tutorial i know that this forum is full of programmers , well anyway Thank you.
|
|
|
|
|
OmarSH wrote: linux platform Then I suggest you do a Google search and you will find lots of useful references.
|
|
|
|
|
OSR online is a very good resource.
Book wise you need Walter Oneys book on kernel programming.
Other than that you need 2 machines, the WDK, windbg, a firewire or serial x over cable and start putting code into the kernel.
PS, I have been doing windows kernel for about 16 years. It is fun, but complex, very very complex, but if you can stick at it for about 2 years you should know enough to be able to write useful code. (And use Verifier, a lot)
==============================
Nothing to say.
modified 8-Feb-13 8:24am.
|
|
|
|
|
|
You'll probably want to get really familiar and comfortable with C. It may also be helpful to experiment with Linux drivers since you can browse all the existent code to see what other people are doing (although that may confuse you at first, specially if you're not comfortable with C). A lot of people try to dive right in without reading documentation, I'd recommend going over the documentation first, it might not make sense while you're reading it but when you finally dive in, things will start to make sense.
One thing you can do is take an existent driver from Linux and see if you can modify it to do something different. That should get you comfortable with it.
|
|
|
|
|
Hi,
Until now I used MCI to playback my videos directly from memory. I used this trick, because my avi's where inside a huge file archive, so I read them directly without any extraction.
Now I want to update my code to use DirectShow for video playback, but it lacks a callback functionality like mmioInstallIOProc. Is there any approach in my situation ?
Regards,
George
sdancer75
|
|
|
|
|
1. Google for DirectShow input filters that can read from memory
OR
2. try writing your own filter to stream data from memory
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Yes, i suppose this is what I am gonna do.....
I just wished to avoid time and effort in case there was something already out there that did the trick.
sdancer75
|
|
|
|
|
That's understandable, i tried googling around some too but didn't really find anything readymade either. I can think of two alternatives to writing your own source filter:
1. Extract your videos into some temporary files and play those from the file system, this can be a bit costy in both time and resource wise (you need time to extract the videos to temp files and you will need extra disk space for the videos) but i supose this is quite a straightforward solution. Alternatively you might try using a named pipe and specifying that as the source for the file reader filter, no idea if that would work or not, never tried, but i kinda suspect it wouldn't work.
2. Implement a "small" HTTP server in your application that can stream the video from your big file and try to render the stream with DirectShow like "http:\\localhost:12345\a.avi" or somesuch. This might be more work than just writing the filter though.
Good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Thanks for the reply.
I already thought both of your solutions you suggest. The 1st is abandoned from the very beggining since the archive file is delivered in retail-DVD and as you can imagine the time needed to extract it in the hard disk is critical. The 2nd solution is also rejected, since this is a retail product and the configuration of end computer is unknown, any anti-virus or general other protection software may block my application to work as it expected. So I think a custom filter in my case is more than imperative.
Thanks anyway,
sdancer75
|
|
|
|
|
I want to display my image on window without saving it.
When data is received window size changes but there is no display
on window.
My Code is:
int iBufferLength;
int iEnd;
int iSpaceRemaining;
int i;
iBufferLength = iSpaceRemaining = sizeof(chIncomingDataBuffer);
iEnd = 0;
iSpaceRemaining -= iEnd;
iBytesRead = recv(Socket, chIncomingDataBuffer+iEnd, iSpaceRemaining, 0);
iEnd+=iBytesRead;
if (iBytesRead == SOCKET_ERROR)
MessageBox(hWnd,
"Socket Error",
"Connection strt",
MB_ICONINFORMATION|MB_OK);
chIncomingDataBuffer[iEnd] = '\0';
if (lstrlen(chIncomingDataBuffer) != 0)
{
GetWindowRect(hWnd, &rect);
SetWindowPos(hWnd, NULL, rect.left, rect.top, cBitmap.bmWidth, cBitmap.bmHeight, 0);
HDC ThisDC = GetDC(hWnd);
DeleteDC(RemoteDC);
RemoteDC = CreateCompatibleDC(ThisDC);
DeleteObject(hbitmap);
hbitmap= CreateCompatibleBitmap(ThisDC, cBitmap.bmWidth, cBitmap.bmHeight);
SelectObject(RemoteDC, hbitmap);
ReleaseDC(hWnd, ThisDC);
BITMAPINFO bi;
HBITMAP hbmap;
int bisize = sizeof(BITMAPINFO);
memcpy(&bi, chIncomingDataBuffer+iEnd, bisize );
SetDIBits(RemoteDC, hbitmap, 0, cBitmap.bmHeight, chIncomingDataBuffer+iEnd+bisize, &bi, DIB_RGB_COLORS);
InvalidateRect(hWnd, NULL, false);
can anyone tell me..where I am wrong?
|
|
|
|
|
Quote: memcpy(&bi, chIncomingDataBuffer+iEnd, bisize );
for instance, what are you doing in the above line?
Veni, vidi, vici.
|
|
|
|
|
toms from newdelhi wrote: can anyone tell me..where I am wrong? Yes, the same as I told you before. You are not checking that you have read all the data from the client so you have no way of being sure that you have a valid image. You are using sizeof and lstrlen to find the length of the data, neither of which will give you a valid answer.
|
|
|
|
|
Hi all,
i am set icon on button and display the caption in front of icon.
but in XP the icon not displayed if icon and text both are using,if only icon i want to display its working fine.
i dont wahts going wrong here
please help me.
|
|
|
|
|
VCProgrammer wrote: i dont wahts going wrong here Neither do we. Please give some proper detail, including a copy of the code that is not working.
|
|
|
|
|
Is the problem XP-specific or does it act the same on other OSs?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
i am using this to set icon on button
only on xp i found this problem.
HICON hIcon = AfxGetApp()->LoadIcon(IDI_ICON1);
m_btn2.SetIcon(hIcon);
HICON icon =NULL;
HINSTANCE hInstResource = NULL;
hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(IDI_ICON2), RT_GROUP_ICON);
icon = (HICON) LoadImage(hInstResource,
MAKEINTRESOURCE(IDI_ICON2),
IMAGE_ICON,
16,
16,
LR_DEFAULTCOLOR);
m_btn3.SetIcon(icon);
on other os like Vista and Windows 7 the icon on button with button caption display properly,
but in case of XP the icon not display only the button caption is visible.
|
|
|
|
|
From where is this code being used? Do the icon handles have function-level scope?
You are not checking the return value from any of the function calls. If one of them is failing, how would you know? Check out GetLastError() .
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
i am checking GetLastError for LoadIcon and LoadImage, both are return 6 (The Handle is invalid).
i dont understand why this fails only on xp otherwise its working fine.
even if i set Button style BS_ICON ,than its also working on XP,but my requirement to display both icon and text on button.
please help me how can i resolve this.
thanks.
modified 8-Feb-13 2:01am.
|
|
|
|
|
VCProgrammer wrote: both are return 6 (The Handle is invalid). That suggests the your resource ids are also invalid. Check that all the values match up with their target resources and are correctly loaded into your final application.
|
|
|
|
|
but when i set Button style BS_ICON ,than its also working on XP.it means ids are not invalid,i think so...
i really cant get it whats going wrong here,
is there any other method to display icon on button with text.
|
|
|
|
|
VCProgrammer wrote: i really cant get it whats going wrong here, Without a lot more information I don't think we can either.
|
|
|
|
|
please sir tell me what other information you required to help me.
|
|
|
|
|
You need to show some more of the failing code and the error messages or codes that you receive. Remember, we cannot see your system and are not familiar with your program.
|
|
|
|