|
How much research have you done on this problem so far? It seems very little since you dont have specific questions. That is why I havent given you specific answers.
|
|
|
|
|
Ok fine.
I have not gone too far. I was thinking I might go in the wrong direction.
Please let me know if you need any specific information:
Here I have elaborated what I want:
I am working on a project in which I capture a video using a camera. Now that video plays fine. it will be of the same quality as captured using the camera. I have downloaded some HD video from the net. when I play that video in my application, that video doesn't look like its a HD video. its quality deteriorates somewhat. if I play the same video in any other software (Windows Media player, VLC or any other player which can encode/decode HD video), it plays fine.
Wherever I search on any forum or on any site, I'll found that codecs which uses H.264 standard can better encode/decode HD videos and plays a video with high quality.
Regards,
|
|
|
|
|
So does your application use codec?
|
|
|
|
|
I am not sure about this. I am using only DirectShow to capture and play any video file.
Regards,
|
|
|
|
|
I am using FFmpeg, that produces libraries and programs for handling multimedia data. it includes libavcodec, an audio/video codec library for transcoding multimedia files.
|
|
|
|
|
And are there any better libraries around?
|
|
|
|
|
|
Hi Eric,
I have installed this codec pack on my PC...It does not seem to make any difference....Still playing HD videos shows some blurness at the edges of the objects.
I have seen when playing the same HD video in Windows Media Player, it is quite bright and of good quality. I was wondering what could be the difference in playing a video using DirectShow in Windows Media Player and my Application. Whatelse extra they are implementing or shipping with their product. What special codec or filter is being used.?
Regards,
|
|
|
|
|
I just found that link from a 2 second google, I didnt recomend it, but just gave it as an exmple of what is out there with the implied suggestion that you look yourself.
|
|
|
|
|
Hi Eric,
I want to ask one thing if you have an idea. I have also searched and found that H.264 is the standard used for HD videos.... Now there are various codec using H.264 as the standard for encoding and decoding. One such is x264 codec which is open source and freely available. I have downloaded that codec, now will that work for my application also, if I play any HD file in my application. I mean to ask is it sufficient that a codec is installed on your PC and if you play any HD file in your application, it will encode HD automatically.?
Regards,
|
|
|
|
|
Why am I getting this error ?
Here is the GUID definition
DEFINE_GUID(GUID_DEVINTERFACE_USB_DEVICE,0xA5DCBF10L, 0x6530, 0x11D2, 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED);
// (A5DCBF10-6530-11D2-901F-00C04FB951ED)
And here is the usage
hDevInfo = SetupDiGetClassDevs(
&GUID_DEVINTERFACE_USB_DEVICE, NULL, 0, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);
And here is the compiler complaint:
…. cannot convert parameter 1 from 'const struct _GUID *' to 'struct _GUID *'
Any help will be as always appreciated
Cheers Vaclav
|
|
|
|
|
Vaclav_Sal wrote: Any help will be as always appreciated Another reminder to please put your code snippets between <pre> tags for readability, thus:
DEFINE_GUID(GUID_DEVINTERFACE_USB_DEVICE,0xA5DCBF10L, 0x6530, 0x11D2, 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED);
And the answer is that you need to cast away the const ness[^] of the definition.
Use the best guess
|
|
|
|
|
Thanks for the answer, but I just cannot select plain text, the options always
stays on code.
|
|
|
|
|
Are you using the code link above the edit box? Alternatively you can just type the HTML direct into the edit field.
Use the best guess
|
|
|
|
|
Hey, come on, this should be simple! Its a casting issue!
I think some times people learn C++ without paying any attention to the fact that it is C as well.
|
|
|
|
|
<pre lang="Thanks, next time I'll ask something more complex if stuff like this is inappropriate"></pre>
Richard - this is what happens when I post as "plain text". Aslo there is no preview.
So here is the message as code - again "Thanks, next time I'll ask something more complex if stuff like this is inappropriate"
|
|
|
|
|
You need to clear the checkbox at the bottom that says "Treat my content as plain text, not as HTML". There are lots of useful features to the edit pages on these forums, created by the CodeProject staff's hard work and dedication to making this site easy to use. It would be a good idea to spend some time getting familiar with them all.
Use the best guess
|
|
|
|
|
I am writing a pure C based win32 applications. I have drawn line. Now i want to translate that line, move the line whereved user wants to move on screen. Then again I drawn another line, I am drawing multiple lines.
I have created rectangle region for each line and trying to move the line.
When I move the 2nd line over the 1st line on screen the 1st line is getting wiped out. Because I am InvalidateRect() of the rect for the line being moved, so when that rectangle is crossing the other line then the other line is getting removed from the screen.
How can I rectify it. How can I have all the lined being on the screen and moved according to the user's wish. The code should be pure C and win32 no MFC. Please help me how can I do it. Any help is highly appreciated. Thanks Sujan
|
|
|
|
|
You should draw all the lines in the code that handles the WM_PAINT message. Each time a new line is created, you save the details in a list or similar array. Then as your paint code is called, it should iterate that list and draw each line.
Use the best guess
|
|
|
|
|
how can I implement a transform for each line. I want to pick a line by mouse and then move it anywhere on the screen and place it. drag and move.
Currently I am defining a a rect for each line and doing InvalidateRect() and moving and when this line is crossing other line , the other line is getting removed or wiped out. How can I move lines on screen without affecting other lines.
Thanks Sujan
|
|
|
|
|
I just explained what you have to do; redraw them all, not just the one that has moved. You need to invalidate the entire Window, or ensure that you check each line within the invalidated rectangle. Understanding this basic concept is key to writing Windows applications.
Use the best guess
|
|
|
|
|
Understanding this basic concept is key to writing Windows applications
very true. You had already justified it in your first reply. ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Richarsd just told you! Learn to read before learning to code.
|
|
|
|
|
That is perhaps the most ugliest way to solve the problem and has many horrible disadvantages ... IT IS OLD SCHOOL HORRIBLE DONT DO IT.
Problems you will definitely encounter:
1.) The draw process become slower and slower the more lines you have to draw
2.) As your draw process is contained inside the WM_PAINT message your can't thread it
3.) Your application becomes locked and unresponsive while in the draw process
4.) Every time you resize the window it will redraw all the line database
5.) Every time you move the window order or position it will do an entire redraw
Get an old copy of MS_WORD and open a 1MB image file if you want to see what it looks like.
Old versions of many Cad programs and Corel draw were practically unusable because they used the above technique and we have long since moved on from it.
The correct and more modern way to do this is to create a drawing thread that converts your line database onto a memory DC. That is all the thread does all the time when triggered.
The WM_PAINT message simply puts the last finished memory DC from the thread to screen.
Usually every database alteration is held so you can also undo-redo function it.
The obvious advantages is your program never suffers non responsive or semi locked behavior no matter how complex the drawing gets and the application drawing process does not flash and carry on.
Let me know if you get stuck and I will do a quick stub to show you how it works.
modified 11-Aug-13 11:09am.
|
|
|
|
|
When say the define of function memcpy, I say it.
_CRT_INSECURE_DEPRECATE_MEMORY(memcpy_s) void * __cdecl memcpy(_Out_opt_bytecapcount_(_Size) void * _Dst, _In_opt_bytecount_(_Size) const void * _Src, _In_ size_t _Size);
I say the file sal.h, it says that the macro will tell the compile what the usage about this function. but I do not know the compile will do any operation about this macro. If prompt any error when compiling?
|
|
|
|