|
ahmedkhadragi wrote: I am using C#, kind of beginner
Then I am afraid you're dreaming. Write some more simple programs that lead up to this, which means you need to learn C#, DirectShow, and Direct3D, at least.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi
i want to protect my avi videos. my suggestion is encrypt it on hdd and play only with my Player, but how to do this ?
can Somebody any idea for solve this problem ?
thanks.
|
|
|
|
|
you've got two options. You can buy a commercial DRM system and loose all protection when one of the hhundreds of cracker groups eventually beat it. Or you can write your own, in which case one of the cracker groups will probabably find an easyly exploitable oversite in your code and crack it within weeks of it becoming popular enough to get any attention. Either way you loose, and once one person cracks the protection it'll be all over P2P. The only protection against this is to make your content suck so noone wants it in the first place.
If you write your own, use a standard codec interface. Unless you're google noone'll be interested in your new proprietary player.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Pretty cynical aren't we? Only it's true...
|
|
|
|
|
It's not cynicism if it's the plain and simple truth.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Easy. Don't create your video content in the first place! It's the only way to keep it secure.
What? You think I'm joking? I'm dead serious!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ok
but the best way is that encrypt it, and play it only with My Player(decrypt it and play as Stream)
but .. how to do ?
thanks
|
|
|
|
|
Do you think you're the first person to attempt this? Serisouly, you're going to spend alot of effort doing this, just so someone can crack it in, no joke, 1 hour.
You can encrpyt it all you want, but the problem is that you have to decrypt it to play it. There's the vulnerability right there. Media Player won't play from an .NET Framworkwork Stream object so you have to save the decrypted content to a file to play it. Boom, you just defeated your own copy protection.
Hypothetically, the only way around this is to implement your own Media Server in your application. This server would have to decrypt the file stored on the hard drive, then stream the decrypted content through the TCP/IP stack so Media Player can get at it.
Don't ask me for any code examples - like I said - the idea was off the cuff. I myself haven't done anything like that. It's just theory.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: Hypothetically, the only way around this is to implement your own Media Server in your application. This server would have to decrypt the file stored on the hard drive, then stream the decrypted content through the TCP/IP stack so Media Player can get at it.
I'd say that you could get round that with a TCP/IP listener that just records the decrypted stream as it passes along and reconstructs a decrypted file from it.
Protection Broken.
DRM is a game of "Anything you can encrypt I can decrypt better"
|
|
|
|
|
Colin Angus Mackay wrote: DRM is a game of "Anything you can encrypt I can decrypt better"
Yes it is! Anyway, it was just a theory. I didn't put too much into the "thought problem".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hdv212 wrote: but the best way is that encrypt it, and play it only with My Player(decrypt it and play as Stream)
The problem is much more subtle than that. When you encrypt something you you need a key to encrypt it. The key is kept private so that no one else can access the information. The problem with DRM is that you must give the key to the person who you do not trust in order that they may play the video.
The problem is not the encryption/decryption process. That technology is very secure. The problem is key management. You don't trust the person that will receive the video not to copy it to everyone, yet they are permitted to view the video. If you can view the video, the stream can be decrypted. Once in a decrypted form you can do anything you like with it.
Digital Restriction Management technology is extremely flawed and large corportations with billions of dollars to throw at the development and research of the technology can't get it right so why do you think you can? even with our help - and there are some exceptionally clever people on this website.
|
|
|
|
|
Hi,
Is there any way to share an assembly between 2 applications with out using GAC
Thanks & Regards
Sabarish
|
|
|
|
|
Sure, if put them all in one directory.
|
|
|
|
|
What i mean is that i need to put all my class libraries in a folder for ex:- c:\Libraries and my executables that use these class libraries in a folder For ex:- d:\Executables.... Is this possible
|
|
|
|
|
Hi all,
i know i am asking a lot today and some of my questions are stupid as i realized later.
any way this question is about progress bar
i want to change that color that display the block inside the progress bar.
it is by default green.
i want to make it red when the value of the progressBar is for example 50.
any help?
|
|
|
|
|
Hello,
I think you should create youre one progress bar.
Like this article shows:
http://www.codeproject.com/cs/miscctrl/ColourProgressBar.asp[^]
quiteSmart wrote: i want to make it red when the value of the progressBar is for example 50.
Based on that example, you should only have to add one more Color (LimitColor) and one more int (LimitValue) property to do the trick.
In the OnPaint method of the ColorProgressBar class you then have to change the first lines from:
Color darkColor = ControlPaint.Dark(_BarColor);
Color bgColor = Color.White;
To:
Color ActColor=_BarColor;
if(_Value>LimitColor)
{
ActColor = LimitColor;
}
Color darkColor = ControlPaint.Dark(ActColor);
Color bgColor = Color.White;
Hope to help you!
All the best,
Martin
|
|
|
|
|
How to convert a decimal type object to an integer type object.
thanks,
|
|
|
|
|
(int)yourdecimal should do the trick
|
|
|
|
|
It is not working
it is saying "cannot implecitly convert type decimal to int. An explicit conversion exists"
|
|
|
|
|
have you tried Convert.ToInt32 ?
|
|
|
|
|
Thanks that worked
but i didn't know why (int)decimal is not working.
I thought it should work.
best regards
|
|
|
|
|
decimal d = 5;
int i = (int)d;
|
|
|
|
|
quiteSmart wrote: but i didn't know why (int)decimal is not working.
Without seeing the actual line of code you are using, watch your brackets. Especially if you are doing a calculation and then putting the result into an int. You might be casting one of the operands rather than the result (which might still be considered a decimal).
Or there might be another implicit cast going on that you are missing.
|
|
|
|
|
Convert.ToInt32(decimal)
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
int i = (int)mydecimal;
Be aware that this will truncate (round down) so 1.9999 will become 1 not 2. Use Math.Round for actual rounding.
|
|
|
|