September 29, 2003

EOF Delegate

I created an EOF class, in the VideoSequence.cs file, that is created whenever the parse_picture() function encounters EOF. When the EOF class is created, any registered delegates are called. This alerts the AdaptableVideo class of the EOF.

I've implemented this way, but if EOF was derived from CodingElement or AtomicCodingElement, then making use of the existing CodingElement.Handler delegate method would make more sense. I guess I could have set the bit address to one more than the last bit, and the number of bits to zero. Ketan hasn't gotten back to me about this, so I'll ask him about it tomorrow during our phone call.

Posted by josuah at 8:54 PM UTC+00:00 | Comments (0) | TrackBack

September 28, 2003

C# AdapatableVideo

I basically finished converting the AdaptableVideo class from Java to C#. Only issue I have left with that is how to handle the EOF. I asked Ketan if he has any opinions on making double-use of the existing CodingElement delegate, or if it would be better to create a separate VideoParser delegate. I'm leaning towards the latter.

Posted by josuah at 10:49 PM UTC+00:00 | Comments (0) | TrackBack

September 25, 2003

VideoDescriptor and Delegates

I worked on the VideoDescriptor class, trying to port to C# and make use of the delegate system instead of registering subscribers. It basically works the same way. I think I may need to add a special EOF implementation to the VideoSequence C# class. I'm not sure if this can be done easily through the existing delegate handlers, or if I need to set up another delegate handler list for that.

The general subscribers concept is more flexible because you can specify multiple communication methods (i.e. multiple function callbacks) while only requiring you to register your subscriber once. I think the problem is that in C# you don't become a delegate of an object, but instead a delegate of a function call.

In Java, subscribers must conform to an interface. There is no language construct explicitly supporting the subscriber-publisher model. C# goes farther to explicitly support this model, but does so from a functional approach. Objective-C has support for both the subscriber-publisher model (through notification in Foundation) and also an object-based delegation model that follows the chain-of-responsibility design pattern.

Posted by josuah at 2:09 AM UTC+00:00 | Comments (0) | TrackBack

September 24, 2003

Remote Ketan

Ketan and I spoke this afternoon about several things. Since the PVR simulation paper we wrote was accepted to SPIE, we need to make improvements and possibly run some additional simulations to get more data. We also talked about the Integrative Paper I am writing as part of the M.S. requirement of the UNC CS Department. Ketan is also interested in setting up a SourceForge server in the DiRT lab so people working on stuff will have a central repository that can be selectively shared.

Of course we also talked about my progress with the Adaptable Video research. The plan is to come up with goals next week when we talk again, in the hope of possibly putting together a paper. I'm not entirely sure how feasible this is, but we'll see.

I read up some on how C# makes use of delegates. It's implementation of delegates is somewhat convoluted simply because the naming scheme and definition syntax doesn't exactly make things match up. Kind of the same way properties are defined like functions but treated as fields, and when being used they look like functions even though they are fields. The C# implementation of delegates is not as elegant as the Objective-C implementation. It does technically follow the delegate design pattern, but coding it does not follow a developer's natural thought processes.

Ketan also heard about the SIGCOMM paper on Low-Rate TCP-Targeted Denial of Service Attacks. The paper describes how to exploit what could be called a design flaw, or also a design win, of TCP so as to cause DoS without using a whole lot of bandwidth. Ketan thinks there might be some possible research applications of this technique, but so far nothing that is actually new or that provides extra knowledge.

Posted by josuah at 2:39 AM UTC+00:00 | Comments (0) | TrackBack

September 22, 2003

Finished C# AdaptableVideoDescriptor Class

Just finished porting (but not compiling or debugging) the C# port of the AdaptableVideoDescriptor class. I streamlined some of the code to make it easier to maintain, and I think fixed some more of those off-by-one type bugs.

Posted by josuah at 7:14 PM UTC+00:00 | Comments (0) | TrackBack

AdaptableVideoDescriptor C# Skeleton

I spent more time porting the AdaptableVideoDescriptor class over to C#. Almost done, although I do have to make sure it compiles. Since I am new to C#, I am not as confident about compile-time success based on my visual inspection, as I am with other languages. I also think I may have found some more bugs in the original implementation. I think I've got about 60%-70% of it ported to C#; the rest is empty function signatures.

Posted by josuah at 12:20 AM UTC+00:00 | Comments (0) | TrackBack

September 18, 2003

Continued AVD Porting

I did some more work porting the AdaptableVideoDescriptor class over to C#. I may or may not have found some bugs in the Java code; it's hard to say since it's been so long since I worked on it, but a first look at the logic would seem to indicate they were bugs. Little things like off-by-one errors.

Associating properties, which are basically getters and setters for fields, with fields in a C# class tends to make things look a little cluttered. This is because the C# coding style is to place those property definitions right beneath the field definition. So it's not very easy to separate fields from properties, and then it only makes sense to place any non-simple getters and setters in the same area of the file, further disorganizing things to the eye.

Posted by josuah at 3:49 AM UTC+00:00 | Comments (0) | TrackBack

September 17, 2003

Little Progress

I've done a little bit more to convert the AdaptableVideoDescriptor class from Java to C#, but not much. Things are very busy for me everyday, and all those lectures don't help. Anyway, there are differences in the C# implementation of the MPEG-2 parsing classes, so that's also something I need to deal with. That and learning C#.

Posted by josuah at 1:17 AM UTC+00:00 | Comments (0) | TrackBack

September 15, 2003

C# in a Nutshell

I started working some more on porting the Adaptable Video code from Java to C#, but it was just too difficult trying to find the information I needed on MSDN. So I went to Barnes & Noble and got a copy of C# in a Nutshell. The copy I got is the 1st Edition, for version 1 of the .NET framework. The 2nd edition came out last month and covers version 1.1 of the framework, but it doesn't make much difference for what I'm doing.

Posted by josuah at 1:13 AM UTC+00:00 | Comments (0) | TrackBack

September 9, 2003

SimpleMPEGParser Compiles

Ketan got back to me and informed me that I should use the BitStream class, and not the PushbackInputBitStream. So I'm using that and now everything compiles successfully. I am able to execute the SimpleMPEGParser.exe program and it outputs the video information.

It still outputs warnings about unnecessary use of the new keyword. However, this class variable modifier is actually necessary to hide the same variable in the superclass, so I think maybe the DotGNU C# compiler is just confused. If I remove the new keywords, then it correctly complains about not hiding the superclass variables. But it doesn't realize this is happening if the keyword is left in. ???

Posted by josuah at 1:36 AM UTC+00:00 | Comments (0) | TrackBack

September 7, 2003

Learning C#

I've started the Adaptable Video port from Java to C#. I found the C# Language Specification which is where I'm learning the language. Microsoft needs to work on their navigation system for the specification; the reader is required to click too many times to progress through the specification without direct links to the previous, next, and enclosing sections.

I am having trouble finding specific things that I'm looking for in the specification because there is no index. You also can't search only the specification because the MSDN search tool applies to the entire library. So although I've read about the readonly and internal keywords, I have no idea how they differ from const and private.

Posted by josuah at 10:30 PM UTC+00:00 | Comments (0) | TrackBack

C# Compile-Time Errors

I started putting together a Makefile for the C# code Ketan sent to me, but I was having trouble getting it to work the way I wanted. So instead, I put together a C# Ant XML file, and that is working quite well. I can see the attraction of Apache Ant more clearly now, as I've never used an Ant-based build system before.

So I tried building the SimpleMPEGParser program included with the MPEG2Event code, but I ran into a few errors that seem to be related to some conflict between the BitStream and PushbackInputBitStream classes. They appear to define the same class in the same namespace. I've emailed Ketan about this problem.

I haven't yet started porting over my Adaptable Video Java classes to C#, but that is the next thing I have to do for this.

Posted by josuah at 8:56 PM UTC+00:00 | Comments (0) | TrackBack

September 5, 2003

MPEG2Event

Ketan just emailed me the C# code for the MPEG-2 parser. So I will start porting over the Java code I wrote for COMP 249.

Posted by josuah at 8:41 PM UTC+00:00 | Comments (0) | TrackBack

September 1, 2003

Hello World!

Well, I got the Hello World example for DotGNU to work. The README in the pnet/samples directory pointed me to the pnetlib/samples directory, where I ran make and then was able to execute programs using ilrun.sh. So hopefully I won't have to boot up into Windows or install and use Visual C# to continue the adaptable video project. Ketan will be sending me his new code sometime this week.

Posted by josuah at 6:12 PM UTC+00:00 | Comments (0) | TrackBack

Mono Troubles

I tried installing Mono the other day, and it doesn't install as nicely as DotGNU. The installation procedure isn't as clean. Maybe if I can figure out the correct dependencies it requires, I'll try it again. In the meantime, I'll just try figuring out why Hello World is failing under DotGNU.

Posted by josuah at 4:57 AM UTC+00:00 | Comments (0) | TrackBack

July 2013
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Search