English 中文(简体)
实施网络播放器的硕士技术
原标题:Techniques to master about implementing a network player

I have a final project abount database design this semester. And my teacher gives us many tasks for alternatives, such as Student Information Management System, Airline Reservation System and so on. However, I want to design such a player that it allows users to upload their own works and share together. Of course it also provides download service. I m a sophomore this year. I m familiar with c++ programming, but do not know much about network programming. Furthermore, I learnt T-SQL this semester and also did some works on MySQL in java(course in this semester, too). My idea is here (I have drew a picture):http://tmjfzy.blog.163.com/blog/static/66447025201242553045/ I need some advice about network programming. Could you give me some to help me realize my imagination? Thank you :-).

最佳回答

所以,你基本上 重新发明了YouTube 却有专心致志的客户吗?

Actually it s very easy to start without any clients or C++ : all you need is a server with MySQL, Apache and PHP. I recommend WAMP server if you re on Windows. FlowPlayer is a flash video player quite easy to integrate, but today using HTML5 video features should be a better idea. I believe you can have the reference Web system up and running in about 3 to 6 days. (I m also a C++ programmer and I had no problem with learning enough HTML, PHP and JavaScript to do very similar thing ).

Once you have a system up and running (possibly with limitation on video file format) you can design and implement API. From server side it s nothing more than PHP files, just returning data in your format of choice (eg. JSon, XML) instead of generating HTML. With server-side API done, you can start working on client. Registration, login, upload from file and download to file should go first. Once the client can get the video files, you can implement a player. A streaming player goes next. If you encounter problems with playing back the video files, this is good moment to break compatibility with web version and change video file format. Now that you know what playback formats are supported, you might implement converting before upload. (Conversion makes sense if you want to have all files on server in one format. Otherwise it s not really usefull: if a client can convert a video, it should be able to play it back. This means all other clients also should understand the format and be able to play it back.)

At this point you can consider rewriting the server. Or other student can be writing the server in the same time as you re busy with client. Having working Apache-PHP reference all the time makes such parallelism a breeze.

All the above requires using HTTP as underlying protocol. I think Qt has built in support. If not you can use some library (like cURL) or implement it from scratch on sockets. Eventually streaming, like RTP+RTSP, can be added for playback.

如果你觉得很冒险,你可以开始设计自己的协议, 但是这是最后一步, 在自己的客户端和自己的服务器在手动执行的 HTTP 上完美地工作之后。

问题回答

暂无回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签