|
codec? avis aren't compressed
|
|
|
|
|
The Limey wrote:
avis aren't compressed
They certainly are.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
I stand corrected, some are some aren't
|
|
|
|
|
A basic uncompressed avi 320x 240 takes up roughly 10MB per second. Play around with VirtualDub.
<a TITLE="See my user info" href=http:
|
|
|
|
|
uhm, so after having understood that an avi can be compressed (:P) ... in the end I've not understood how to extrac codec information from .avi files ... is it possibile using that structure?
|
|
|
|
|
No, and it is not really possible to get codec info. The codec specifies a FourCC code that is mapped in the system to a codec. More info I do not have.
<a TITLE="See my user info" href=http:
|
|
|
|
|
I am trying to play around with automating menu creation through external XML files. I've used several of the examples found in Code Project and I'm trying to bind the menu items to the MagicLibrary menu classes.
I'm getting close...but I'm stumped by trying to invoke a method in the calling application from my menu helper class. What I have is the following
The menu helper class is created by the main application and it reads the xml file and creates all the MagicLibrary MenuCommand items..that all seems to work fine. Within my menu helper class I have hooked into the menu click event and have the following method. The method retrieves a previously found and saved MethodInfo item that matches the actual method I want to call in the main application
private void menu_Click(object sender, System.EventArgs e)
{
object[] args = {sender, (object)e};
MethodInfo mi = (MethodInfo)onclickList[ (string)mc.Tag+".Click" ];
if (null != mi)
mi.Invoke(null, args);
}
The method I'm trying to invoke in the main application looks like the following
public void menuNew_Click(object sender, System.EventArgs e)
{
//* Code to do stuff in my application based on the menu click
//* event
}
What I get is an unhandled exception
An unhandled exception of type 'System.Reflection.TargetException' occurred in mscorlib.dll
Additional information: Non-static method requires a target.
Which has me stumped. I'm obviously not doing something right but I don't know what I'm missing.
Any help would be appreciated.
Thanks
Neil Lamka
neil@meetingworks.com
|
|
|
|
|
Neil Lamka wrote:
mi.Invoke(null, args);
You need to pass the object you going to invoke the method on.
<a TITLE="See my user info" href=http:
|
|
|
|
|
Pass in the form object as the first parameter to invoke.
|
|
|
|
|
How can I set text for a cell in UNBOUND columns in DataGrid?
|
|
|
|
|
Hello,
I have come across a strange behaviour.
I typed the following code:
<br />
[DllImport("urlmon.dll",CharSet=CharSet.Auto)]<br />
public static extern uint URLDownloadToFile(<br />
IntPtr pCaller,<br />
string szURL,<br />
string szFileName,<br />
uint dwReserved,<br />
IntPtr lpfnCB);<br />
<br />
string URL="http://www.boursorama.com";<br />
URLDownloadToFile(IntPtr.Zero,URL,"c:\test.html",0,IntPtr.Zero);<br />
When I run it (using the debugger), the function doesn't seems to send back an error and the function seems actually to work but I get no local file ! I even looked at the HTTP requests and I can see the HTTP GET issued and the 200 OK response.
I don't understand and I need UrlDownloadToFile (WebClient doesn't work with the IE cache).
I'm using the 1.1 framework on Windows 2000 Professionnal.
Thanks,
R. LOPES
Just programmer.
|
|
|
|
|
GriffonRL wrote:
"c:\test.html"
Have you tried "c:\\test.html"? The double backslash is needed to escape the \, other wise you wind up with \t which is the tab character.
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
try @"c:\test.html" instead. The @ character means a string literal with no escape sequences.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Hello,
Thanks for answering but look at that:
URLDownloadToFile(IntPtr.Zero,"http://www.kimo.com.tw",@"c:\test1.htm",0,IntPtr.Zero);
<-- create the file
URLDownloadToFile(IntPtr.Zero,"http://www.yahoo.com",@"c:\test2.htm",0,IntPtr.Zero);
<-- create the file
URLDownloadToFile(IntPtr.Zero,"http://www.boursorama.com",@"c:\test3.htm",0,IntPtr.Zero); <-- doesn't create the file
Any idea ? Try by yourself.
R. LOPES
Just programmer.
|
|
|
|
|
Hello,
Thanks for answering but look at that:
URLDownloadToFile(IntPtr.Zero,"http://www.kimo.com.tw",@"c:\test1.htm",0,IntPtr.Zero);
<-- create the file
URLDownloadToFile(IntPtr.Zero,"http://www.yahoo.com",@"c:\test2.htm",0,IntPtr.Zero);
<-- create the file
URLDownloadToFile(IntPtr.Zero,"http://www.boursorama.com",@"c:\test3.htm",0,IntPtr.Zero); <-- doesn't create the file
Any idea ? Try by yourself.
R. LOPES
Just programmer.
|
|
|
|
|
Hello,
I have been playing a lot with the WebBrowser control past weeks and I successfully implemented the IDocHostUIHandler interface with it.
I'm now turning my focus to the InternetExplorer object. But I'm starting wondering if the IDocHostUIHandler interface works with this object. Until now I have got error when trying to cast the document object of the InternetExplorer object into a ICustomDoc object. The cast is invalid.
Is it possible to use the IDocHostUIHandler interface with the InternetExplorer object ? And if so, how to do it if I can't use the ICustomDoc interface to set the UI handler.
Thanks,
R. LOPES
Just programmer.
|
|
|
|
|
I was wondering what is the best way to implement a timer for my pong-type game.
|
|
|
|
|
I have a namespace with two classes in it: one class is for methods to work on the application(eg windows media encoder stuff, buttons and the like). The other class contains methods which are used by another application to remotly control this application. I want one class to call a method in the other class, and to do this it seems that i need to make the "called" class' method static. when i do this the comboboxs need an object reference. I tried making them static but i then when i ran the application, the boxes were not filled with what they should be filled with!!!
I dont know how to get round this problem!
Im sure ive made the description as clear as mud!!!
Any help would be much appreciated as i need this problem solved asap!
Thanks
Stevieb
stevb@hotmail.com
"I think im going mad,Ted!"
|
|
|
|
|
stevb wrote:
Im sure ive made the description as clear as mud!!!
yes
but FWIW you can't call static methods remotly if that's what you are trying to do.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
Hi,
I'm creating a client/server business application using .net remoting. I want this program to be dynamic and extensible, this way i dont have to adapt the program with every minor change. So i was trying to create a module/plugin like architecture. Somehow my program doesn't work fine, let me explain it in some details:
-The server has a remote singleton factory, the client uses an interface to contact it.
-The client requests its own SessionObject via the server factory, this SessionObject is defined by an interface. First problem: the interface needs to be compiled into one assembly, so i have to make a shared assembly which i dislike.
-The client then request a, serializable, object which contains references to modules inherited from MarshalByRefObject (these modules contain business logic). This is the second problem, again i need to compile the interfaces of these modules into one shared assembly, that means that i need to recompile the server and client with a reference to the interfaces.
So because of all these shared assemblies my application doesn't become very dynamic.
Any tips?
|
|
|
|
|
tarmin wrote:
Hi,
I'm creating a client/server business application using .net remoting. I want this program to be dynamic and extensible, this way i dont have to adapt the program with every minor change. So i was trying to create a module/plugin like architecture. Somehow my program doesn't work fine, let me explain it in some details:
-The server has a remote singleton factory, the client uses an interface to contact it.
-The client requests its own SessionObject via the server factory, this SessionObject is defined by an interface. First problem: the interface needs to be compiled into one assembly, so i have to make a shared assembly which i dislike.
-The client then request a, serializable, object which contains references to modules inherited from MarshalByRefObject (these modules contain business logic). This is the second problem, again i need to compile the interfaces of these modules into one shared assembly, that means that i need to recompile the server and client with a reference to the interfaces.
So because of all these shared assemblies my application doesn't become very dynamic.
If I understood correctly, basically what you have is an interface, but you don't want to enforce compile-time interface implementation, because this would lead to deployment problems.
The only solution I see* to a plugin model like that is calling the method by its name as a string (see Type.InvokeMember), using Reflection. Obviously, this leads to some relaxation in compile-time checking, but, as long as your interface is not too complex, you won't run into trouble.
[edit]By the "only solution I see" I am assuming you already have investigated the possibility of proper version management and it does not solve your problem.[/edit]
My latest article: GBVB - Converting VB.NET code to C#
|
|
|
|
|
Tarmin,
I might come across a bit simplistic etc here but I don't really see your problem. The point of interfaces are that they define an "immutable contract of service" between the client object and the server object. The idea being that so long as the interfaces stay the same the underlying implementations can change with theoretically no breakage to the system. If you need to add more functionality to the system not covered by the interface, you create a NEW interface and don't break the old one.
In this respect having an assembly which contains only interfaces is actually a good idea as it is a central place to define the contracts by which the parts of your system communicate.
Shaun: C# and .NET Evangelist to the known world.... well... the UK at least...
|
|
|
|
|
I had a nice and refreshing sleep, it made me realize that you guys are right about the concept of interfaces. Besides i found some nice tricks with reflection to make things more dynamic!
Thanks guys!
|
|
|
|
|
How can I fullfil the xml information for a enumerated type?
CODE_________________________________________________
public enum SegmentationTypes {SingleFrame = 1, FixedSize = 2, BottumUp = 3, Cumulation = 4, ShotDetection= 5, MedianIncremental = 6, Filtering = 7};
END CODE______________________________________________
When I insert the "///" I just get the summary field, and during compilin I get an error: "Missing XML comment for publicly visible type or member SegmentationTypes.SingleFrame" for every type in my enumerated type
Some suggestions?
|
|
|
|
|
You should put the individual items on a separate line then stick comments over each enumeration. You said "errors"... do you have "Treat warnings as errors" enabled? Is this something most people are doing nowadays???
Apologies for code layout...
public enum SegmentationTypes
{
SingleFrame = 1,
FixedSize = 2,
BottumUp = 3,
Cumulation = 4,
ShotDetection= 5,
MedianIncremental= 6,
Filtering= 7
};
Shaun: C# and .NET Evangelist to the known world.... well... the UK at least...
|
|
|
|
|