PDA

View Full Version : DV Playlist... another "How Difficult" Question.




hotwire132002
Apr 8, 2007, 05:10 PM
Another question from a complete XCode Newbie.

I'm trying to put together a simple program that would allow me to line up a list of DV files and play them out (via FireWire) in a loop. I have only three requirements of the program:

1) Plays out a list of DV files via FireWire, going back to the first when it hits the last.

2) Allows me to modify the list while it's playing -- i.e. if Clip 3 is playing, I can move, add or delete the other clips without affecting the playout.

3) (Most importantly) I need the program to show what time each clip will start playing.

I've seen similar programs out there, but they're either expensive (hundreds of dollars), don't feature the time display, or have a time display that doesn't work right. (Or more than one of the above).

I'm just wondering if someone could offer some insight as to how difficult something like this would be to put together... thanks in advance for any advice =)



robbieduncan
Apr 8, 2007, 05:14 PM
Not at all easy. Near impossible for a newbie programmer. You are looking at something like the Quicktime APIs for playback, multi-threading to allow the playback to happen whilst updating the UI and still reacting and possibly some custom UI components to get everything looking the way you want.

hotwire132002
Apr 8, 2007, 05:37 PM
Not at all easy. Near impossible for a newbie programmer. You are looking at something like the Quicktime APIs for playback, multi-threading to allow the playback to happen whilst updating the UI and still reacting and possibly some custom UI components to get everything looking the way you want.

Ouch.

Thanks for your help -- guess I'll leave this one to the pros.

robbieduncan
Apr 8, 2007, 05:40 PM
It's mostly the playback. Unless you can use the simplified QTKit (which I think will be too simplified for this) you have to use the full API which is notoriously difficult :(

ChrisA
Apr 9, 2007, 11:09 AM
Another question from a complete XCode Newbie.

I'm trying to put together a simple program that would allow me to line up a list of DV files and play them out (via FireWire) in a loop. I have only three requirements of the program:

1) Plays out a list of DV files via FireWire, going back to the first when it hits the last.

2) Allows me to modify the list while it's playing -- i.e. if Clip 3 is playing, I can move, add or delete the other clips without affecting the playout.

3) (Most importantly) I need the program to show what time each clip will start playing.

I've seen similar programs out there, but they're either expensive (hundreds of dollars), don't feature the time display, or have a time display that doesn't work right. (Or more than one of the above).

I'm just wondering if someone could offer some insight as to how difficult something like this would be to put together... thanks in advance for any advice =)

It's not a hard thing to do at all. A simple well defined program really. But how new are you. I suspect "very new" if you need to ask this kind of question.

What I'd suggest is taking this a little at a time. First make a program that lets a user make and maintain a list of DV files. Don't worry about playing the list, just work on the user interface.

Next learn how to send a DV file to a firewire device. It's likely so simple as opening the device and copying the DV file byte per byte. At least in Linux it's that easy.

Once you have both of these, you need to combine them. But do it in two threads, one for the GUI and one to copy the DV bytes down the wire. Don't forget about locking the data structure that two threads share. Read up on "dead lock prevention"

This means you will need to learn how to use the threads library too. Just make a "hello world" type example to prove you understand threading.

I develop software all day, for 20+ years and I'll admit to doing this too. I'll go off and write a littel program to help understand a "new to me" technology.

Just take it a little bit at a time. None of the parts are hard but you will need to learn about each of them. I always suggest to people who want to learn about programming to pick a project because that will force them to learn things. Your's is an excelent project for a new programmer that wants to learn new stuff, Just learn on e thing at a time. read man pages and use google

robbieduncan
Apr 9, 2007, 11:13 AM
My understanding is that the OP does not want to send the file to the Firewire port as data necessarily, rather send it in the format, with the control codes etc, required to "upload" it to a video camera or similar connected to the port. Basically playback mode allowing the DV stream to be re-captured by the camera. I don't think you can just send the file byte for byte and get this to work (but I could be wrong about that).

ChrisA
Apr 9, 2007, 11:22 AM
My understanding is that the OP does not want to send the file to the Firewire port as data necessarily, rather send it in the format, with the control codes etc, required to "upload" it to a video camera or similar connected to the port. Basically playback mode allowing the DV stream to be re-captured by the camera. I don't think you can just send the file byte for byte and get this to work (but I could be wrong about that).

I think you may find the a "DV File" is simply the bytes that are sent down the fire wire cable. It's just frams, one after the other.

What you are thinking of ios camera controls, "forward", "rewind" and "fast forward" and so on. Des he need to send these? He did not say so. Just wants to stream DV. If so that's easy. I think he'd need to get into the QT API if he wanted to say, stream a .mov file. That is DV codec inside a QT container. but by convention ".dv" is just bytes that came over the wire.

Either way it
's not rocket science. You just read the doc and write a small prototype program to send data down the wire. So it takes a few days to learn?

hotwire132002
Apr 9, 2007, 11:39 AM
It's not a hard thing to do at all. A simple well defined program really. But how new are you. I suspect "very new" if you need to ask this kind of question.


I am indeed completely new to OS X programming -- I used to program in QBASIC (and BASIC on the Apple II) in the days of DOS, but that's about it.

I think before I go out and try to write this myself, I'll be getting in touch with a couple of the companies who have software that does close to what I need. I found one program that does almost exactly what I need; except that the "Start Time" indicator for each clip gets thrown out of whack when it's in repeat mode. The program costs a couple hundred dollars; but as the old saying goes, time is money -- it's probably more cost-effective for me to use that program (if that bug gets fixed) than try to learn XCode so I can write my own.

hotwire132002
Apr 9, 2007, 11:45 AM
Whoops, Sorry, double post.