3G applications-RTSP Streaming Media Playback on Windows Mobile and Symbian platforms

Source: Internet
Author: User
After a period of effort, the 3G mobile app Streaming Media Player project is coming to an end. Think back to the ups and downs of the entire process! A total of two platform applications have been developed. The first is the Windows Mobile platform, which has more resources than Symbian.
Let's talk about the implementation idea. We just started to consider using DirectShow. After verification, we failed to achieve the expected goal (poor level, don't understand DirectShow). Then we studied tcpmp and sought to develop an RTSP stream plug-in, add the MPEG4 plug-in! After a while, I found that tcpmp was too good to understand! (No comments, no documents). When the building is about to jump, I decided to change it to a more primitive implementation method,
The procedure is as follows:
1. Read network data.
2. Send it to the decoder for decoding.
3. Convert the format.
4. Display and draw.
First, the mobile platform has a lot of wince and open-source things that can be taken for use. Many examples, but most of them, are playing local files. Here are two examples for beginners.
A MPEG4 decoding example provided by saean software studio is very good for you to study. It uses its own decoder, which can play for 15 minutes and use its own write screen and yuvtorgb.
Another example is the use of FFMPEG and SDL. You can refer to his method of using FFMPEG. I have the FFMPEG code on the mobile platform and the Code on the Internet! The specific download location is not mentioned. There are many download points in the search for ffmpeg4mobile in Google.
With the above two examples, let's get started with our own things. First, the RTSP reads the network stream, which is also available on the East China Network and can be used directly. I use the open source live55, but I need to port it. Efficiency is acceptable! With network data, decoding is required. The decoding module can use FFMPEG, but the efficiency is not high. Therefore, we should consider using XviD. The Xvid decoder is efficient and open-source. With the network data and decoder, the rest are minor issues. the decoder outputs the yuv420 and needs to convert it to RGB. In this step, there are many websites that cannot be found. I just can't think of it! Finally, refer to the draw part of the first example!
Figure:

 

Another example of the Symbian platform is provided! The network is very good. There are examples for reference!
First, it is a MPEG4 decoding example Symbian platform provided by saean software studio. However, it cannot be debugged and can only be run on a real machine. Sorry. However, you can refer to the draw section!
Another example is mobiflv, which mainly plays FLV files and uses FFMPEG to partially decode them. The conversion of yuv2bgr can be used in this example.
The Symbian platform has an openc plug-in. After installation, programs written in C can be easily transplanted. This is a good thing!
After the openc plug-in is installed, it is the same as mobile. First, RTSP reads network streams. I use a simple RTSP stream, but I need to port it. Efficiency is acceptable! With network data, decoding is required. The decoding module can use FFMPEG, but the efficiency is not high. Therefore, we should consider using XviD. The efficiency of XviD is good,
It is also open-source. For the Symbian display, refer to mobiflv. the decoder outputs yuv420, which needs to be converted to BGR.
Figure:

 


 

The above code is available on the Internet, but it also has my sweat! Email sizhiguo512 · 163. com
Notes:
1. Full Screen mode of mobile platform
If (g_ffullscreen)
{
// To get info full screen mode, first hide all of the shell parts.
Dwstate = (shfs_hidetaskbar | shfs_hidestarticon | shfs_hidesipbutton );
Shfullscreen (getsafehwnd (), dwstate );
# Ifdef pocketpc2003_ui_model
If (hmenu! = NULL)
{
: Showwindow (hmenu, sw_hide );
}
# Endif
// Next resize the main window to be the size of the screen.
Setrect (& rc, 0, 0, getsystemmetrics (sm_cxscreen), getsystemmetrics (sm_cyscreen ));
Movewindow (RC. Left, RC. Top, RC. right-rc.left, RC. bottom-rc.top, true );
}
Else
{
Rect rcmenubar = {0 };

// To get into normal mode, first show all of the shell parts.
Dwstate = (shfs_showtaskbar | shfs_showstarticon );
Shfullscreen (getsafehwnd (), dwstate );
# Ifdef pocketpc2003_ui_model
If (hmenu! = NULL)
{
: Showwindow (hmenu, sw_show );
}
# Endif
// Then resize the main window to be the size of the work area.
Systemparametersinfo (spi_getworkarea, 0, & rc, false );
# Ifdef pocketpc2003_ui_model
// Getwindowrect (hwnd, & rcmenubar );
# Endif
Movewindow (RC. Left, RC. Top, RC. right-rc.left, RC. bottom-rc.top-26, true );
}
2. Add/epoc32/include/stdapis to the include part of the MPs file on the Symbian platform.
3. Add capability networkservices to the MPs file on the Symbian Platform
4. Self-Signed Symbian platform:
/Symbian/9.2/s60_3rd_fp1/epoc32/tools> makekeys-cert-Password-len 2048-dname "cn = test user ou = development or = Company CO = Fi em = test@company.com" mykey. key mycert. CER
/Symbian/9.2/s60_3rd_fp1/epoc32/tools> signsis name. sis name. sisx mycert. Cer mykey. Key Password

Original article: http://sizhiguo512.blog.163.com/blog/static/61107489200941210827912/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.