Network TV full compiler
(For 9CBS only, if you need to contact the author)
Not long ago, I wrote a network TV program. Many netizens saw the source code after seeing, but because I had a problem with the BCB6 packaged program, there is no way to rewrite a full-compiled program. The original code is as follows:
Explanation: 1) The original program's television program and the source of radio programs, for respect for the original official website, will not give it here;
2) The full-compiler is different from the original procedure, mainly from the database, and most of the program is from the database, including upgrades and programs, and the form design and component combination have a big gap. When I solve the BCB6 packaging problem, I will provide the source code for the upgradeable network TV, but it is not guaranteed to provide all;
3) The following prefix Please note: FRM (Form), WMP (Media Player Components, for ActiveX Components), RAD (RealPlayer Components, ActiveX Components), RGP (Single Selected Packet Box);
4) The full-compiler is only 700K, and it is needed to contact the author. Of course, you can completely select a better program in accordance with the original code below.
/ / -------------------------------------------------------------------------------------------- -------------------
#include
#pragma HDRSTOP
#include "chtv.h"
/ / -------------------------------------------------------------------------------------------- -------------------
#pragma package (smart_init)
#pragma link "ReaRaudioBjects_ocx"
#pragma link "WMPLIB_OCX"
#pragma resource "* .dfm"
TFRMCHTV * frmchtv;
/ / -------------------------------------------------------------------------------------------- -------------------
__fastcall tfrmchtv :: Tfrmchtv (Tcomponent * Owner)
: TFORM (OWNER)
{
}
/ / -------------------------------------------------------------------------------------------- -------------------
Void __fastcall tfrmchtv :: frmchtvcreate (TOBJECT * SENDER)
{
WMPCHTV-> show ();
Radchtv-> hide ();
}
/ / -------------------------------------------------------------------------------------------- -------------------
// radio group event, TV column
Void __fastcall tfrmchtv :: RGPTVClick (Tobject * Sender)
{
String TVType, Tvadress;
Switch (RGPTV-> ItemIndex)
{
Case 0: TVTYPE = "MMS"; // Play Type
Tvadress = "mms ..."; // URL
Break;
Case 1: TVTYPE = "MMS";
Tvadress = "MMS ...";
Break;
......
DEFAULT: BREAK;
}
WMPCHTV-> Close (); // Close the original play content
Radchtv-> dostop (); // Close the original play content
IF (TVType == "RTSP") // Play with RealPlayer
{
WMPCHTV-> HIDE ();
Radchtv-> show ();
RADCHTV-> Source = tvadress; // Specify playback file
RADCHTV-> DOPLAY (); // Play the file
}
Else // Play with MediaPlayer
{
Radchtv-> hide ();
WMPCHTV-> show ();
Wmpchtv-> URL = tvadress; // Specify and open the playback file
}
}
/ / -------------------------------------------------------------------------------------------- -------------------
// radio column
Void __fastcall tfrmchtv :: RGPRADIOCLICK (TOBJECT * SENDER)
{
String TVType, Tvadress;
Switch (RGPRADIO-> ItemIndex)
{
Case 0: TVTYPE = "RTSP";
TVRESS = "RTSP ...";
Break;
Case 1: TVTYPE = "RTSP";
TVRESS = "RTSP ...";
Break;
......
DEFAULT: BREAK;
}
WMPCHTV-> Close ();
RADCHTV-> DOSTOP ();
IF (TVType == "RTSP")
{
WMPCHTV-> HIDE ();
Radchtv-> show ();
Radchtv-> Source = tvadress;
Radchtv-> DOPLAY ();
}
Else
{
Radchtv-> hide ();
WMPCHTV-> show ();
WMPCHTV-> URL = tvadress;
}
}
/ / -------------------------------------------------------------------------------------------- -------------------