473,382 Members | 1,252 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Dynamically build an MPEG,AVI

I need to put it in a specific place. Here is the old code

switch(CAMERA_TYPE_ID)

{

case "0":

case "7": // this is an image

Response.Write("<img id='RTC' SRC=" & url & ">");

Response.Write("<script>");

Response.Write("window.onload=starttime");

Response.Write("</script>");

case "1": // this is an MPEG

Response.Write("<object width='320' height='290'
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' id='mediaplayer1'>");

Response.Write("<param name='Filename'
value='http://www.xxxxx/TravInfo/rollFilm.asp?feed=13'>");

Response.Write("<param name='AutoStart' value='True'>");

Response.Write("<param name='ShowControls' value='False'>");

Response.Write("<param name='ShowStatusBar' value='False'>");

Response.Write("<param name='ShowDisplay' value='False'>");

Response.Write("<param name='AutoRewind' value='True'>");

Response.Write("<embed type='application/x-mplayer2'
pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer
/' width='320' height='290'
src='http://www.chart.state.md.us/TravInfo/rollFilm.asp?feed=13'
filename='kids.mpg' autostart='True' showcontrols='False'
showstatusbar='False' showdisplay='False' autorewind='True'>");

Response.Write("</embed>");

Response.Write("</object>");

case "2": // this is an AVI

Response.Write("<object id='o_camera_feed'
classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' align='baseline'
border='0' width='" & rsData("CAMERA_WIDTH") & "' height='" &
rsData("CAMERA_HEIGHT") & "'>");

Response.Write("<param name='controls' value='imagewindow'>");

Response.Write("<param name='console' value='master'>");

Response.Write("<embed type='audio/x-pn-realaudio-plugin'");

Response.Write("src='" & rsData("CAM_URL") & "' ");

Response.Write("align='baseline' ");

Response.Write("border='0' width='" & rsData("CAMERA_WIDTH") & "' ");

Response.Write("height='" & rsData("CAMERA_HEIGHT") & "' ");

Response.Write("name='e_camera_feed' ");

Response.Write("controls='imagewindow' ");

Response.Write("console='master'");

Response.Write("AUTOSTART='true'></embed>");

Response.Write("</object>");
--
David Fetrow
Helixpoint LLC.
http://www.helixpoint.com
da***@helixpoint.com
Nov 16 '05 #1
3 2887
Dave,

You aren't really specifying what you are trying to do, it's just a
bunch of code that has no comments and a title which doesn't help much
either. Can you give a little more insight into what you are trying to do,
and what the problem is?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"DaveF" <df*****@geodecisions.com> wrote in message
news:eK**************@TK2MSFTNGP10.phx.gbl...
I need to put it in a specific place. Here is the old code

switch(CAMERA_TYPE_ID)

{

case "0":

case "7": // this is an image

Response.Write("<img id='RTC' SRC=" & url & ">");

Response.Write("<script>");

Response.Write("window.onload=starttime");

Response.Write("</script>");

case "1": // this is an MPEG

Response.Write("<object width='320' height='290'
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' id='mediaplayer1'>");

Response.Write("<param name='Filename'
value='http://www.xxxxx/TravInfo/rollFilm.asp?feed=13'>");

Response.Write("<param name='AutoStart' value='True'>");

Response.Write("<param name='ShowControls' value='False'>");

Response.Write("<param name='ShowStatusBar' value='False'>");

Response.Write("<param name='ShowDisplay' value='False'>");

Response.Write("<param name='AutoRewind' value='True'>");

Response.Write("<embed type='application/x-mplayer2'
pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer
/' width='320' height='290'
src='http://www.chart.state.md.us/TravInfo/rollFilm.asp?feed=13'
filename='kids.mpg' autostart='True' showcontrols='False'
showstatusbar='False' showdisplay='False' autorewind='True'>");

Response.Write("</embed>");

Response.Write("</object>");

case "2": // this is an AVI

Response.Write("<object id='o_camera_feed'
classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' align='baseline'
border='0' width='" & rsData("CAMERA_WIDTH") & "' height='" &
rsData("CAMERA_HEIGHT") & "'>");

Response.Write("<param name='controls' value='imagewindow'>");

Response.Write("<param name='console' value='master'>");

Response.Write("<embed type='audio/x-pn-realaudio-plugin'");

Response.Write("src='" & rsData("CAM_URL") & "' ");

Response.Write("align='baseline' ");

Response.Write("border='0' width='" & rsData("CAMERA_WIDTH") & "' ");

Response.Write("height='" & rsData("CAMERA_HEIGHT") & "' ");

Response.Write("name='e_camera_feed' ");

Response.Write("controls='imagewindow' ");

Response.Write("console='master'");

Response.Write("AUTOSTART='true'></embed>");

Response.Write("</object>");
--
David Fetrow
Helixpoint LLC.
http://www.helixpoint.com
da***@helixpoint.com

Nov 16 '05 #2
I need to dynamically build code for something like an MPEG. Right now I use
a Literal like below. Is there a better way?

case "6": // Delaware DOT
string splitString = ds.Tables[0].Rows[0][8].ToString();
char[] sep = {','};
string[] query_stringArray = splitString.Split(sep);
htmlString = "<APPLET codebase='http://webvideoserv.state.de.us/java'
width='352' height='240' code='GTS.VideoClient.class'>";
htmlString += "<PARAM name='cabbase' value='VideoClient.cab'>";
htmlString += "<PARAM name='framerate' value='" + query_stringArray[1] +
"'>";
htmlString += "<PARAM name='jitdetect' value='false'>";
htmlString += "<PARAM name='message' value='Welcome to Delaware.Com
Webcams!'>";
htmlString += "<PARAM name='video' value='/video.jpg?server=" +
query_stringArray[0] + "'>";
htmlString += "<PARAM name='videoheight' value='240'>";
htmlString += "<PARAM name='videowidth' value='352'>";
htmlString += "<PARAM name='connecttype' value='http-cache'>";
htmlString += "<CENTER>Java must be enabled to<BR>view GTS
Video</CENTER>";
htmlString += "</APPLET>";
break;
}
Literal1.Text = htmlString;
--
David Fetrow
Helixpoint LLC.
http://www.helixpoint.com
da***@helixpoint.com
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uL**************@TK2MSFTNGP15.phx.gbl...
Dave,

You aren't really specifying what you are trying to do, it's just a
bunch of code that has no comments and a title which doesn't help much
either. Can you give a little more insight into what you are trying to do, and what the problem is?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"DaveF" <df*****@geodecisions.com> wrote in message
news:eK**************@TK2MSFTNGP10.phx.gbl...
I need to put it in a specific place. Here is the old code

switch(CAMERA_TYPE_ID)

{

case "0":

case "7": // this is an image

Response.Write("<img id='RTC' SRC=" & url & ">");

Response.Write("<script>");

Response.Write("window.onload=starttime");

Response.Write("</script>");

case "1": // this is an MPEG

Response.Write("<object width='320' height='290'
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' id='mediaplayer1'>");
Response.Write("<param name='Filename'
value='http://www.xxxxx/TravInfo/rollFilm.asp?feed=13'>");

Response.Write("<param name='AutoStart' value='True'>");

Response.Write("<param name='ShowControls' value='False'>");

Response.Write("<param name='ShowStatusBar' value='False'>");

Response.Write("<param name='ShowDisplay' value='False'>");

Response.Write("<param name='AutoRewind' value='True'>");

Response.Write("<embed type='application/x-mplayer2'
pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer /' width='320' height='290'
src='http://www.chart.state.md.us/TravInfo/rollFilm.asp?feed=13'
filename='kids.mpg' autostart='True' showcontrols='False'
showstatusbar='False' showdisplay='False' autorewind='True'>");

Response.Write("</embed>");

Response.Write("</object>");

case "2": // this is an AVI

Response.Write("<object id='o_camera_feed'
classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' align='baseline'
border='0' width='" & rsData("CAMERA_WIDTH") & "' height='" &
rsData("CAMERA_HEIGHT") & "'>");

Response.Write("<param name='controls' value='imagewindow'>");

Response.Write("<param name='console' value='master'>");

Response.Write("<embed type='audio/x-pn-realaudio-plugin'");

Response.Write("src='" & rsData("CAM_URL") & "' ");

Response.Write("align='baseline' ");

Response.Write("border='0' width='" & rsData("CAMERA_WIDTH") & "' ");

Response.Write("height='" & rsData("CAMERA_HEIGHT") & "' ");

Response.Write("name='e_camera_feed' ");

Response.Write("controls='imagewindow' ");

Response.Write("console='master'");

Response.Write("AUTOSTART='true'></embed>");

Response.Write("</object>");
--
David Fetrow
Helixpoint LLC.
http://www.helixpoint.com
da***@helixpoint.com


Nov 16 '05 #3
DaveF,

The better way would be to create a custom control which would embed
this in the page, and then embed that in your ASPX page.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"DaveF" <df*****@geodecisions.com> wrote in message
news:u5*************@TK2MSFTNGP15.phx.gbl...
I need to dynamically build code for something like an MPEG. Right now I
use
a Literal like below. Is there a better way?

case "6": // Delaware DOT
string splitString = ds.Tables[0].Rows[0][8].ToString();
char[] sep = {','};
string[] query_stringArray = splitString.Split(sep);
htmlString = "<APPLET codebase='http://webvideoserv.state.de.us/java'
width='352' height='240' code='GTS.VideoClient.class'>";
htmlString += "<PARAM name='cabbase' value='VideoClient.cab'>";
htmlString += "<PARAM name='framerate' value='" + query_stringArray[1]
+
"'>";
htmlString += "<PARAM name='jitdetect' value='false'>";
htmlString += "<PARAM name='message' value='Welcome to Delaware.Com
Webcams!'>";
htmlString += "<PARAM name='video' value='/video.jpg?server=" +
query_stringArray[0] + "'>";
htmlString += "<PARAM name='videoheight' value='240'>";
htmlString += "<PARAM name='videowidth' value='352'>";
htmlString += "<PARAM name='connecttype' value='http-cache'>";
htmlString += "<CENTER>Java must be enabled to<BR>view GTS
Video</CENTER>";
htmlString += "</APPLET>";
break;
}
Literal1.Text = htmlString;
--
David Fetrow
Helixpoint LLC.
http://www.helixpoint.com
da***@helixpoint.com
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in
message news:uL**************@TK2MSFTNGP15.phx.gbl...
Dave,

You aren't really specifying what you are trying to do, it's just a
bunch of code that has no comments and a title which doesn't help much
either. Can you give a little more insight into what you are trying to

do,
and what the problem is?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"DaveF" <df*****@geodecisions.com> wrote in message
news:eK**************@TK2MSFTNGP10.phx.gbl...
>I need to put it in a specific place. Here is the old code
>
> switch(CAMERA_TYPE_ID)
>
> {
>
> case "0":
>
> case "7": // this is an image
>
> Response.Write("<img id='RTC' SRC=" & url & ">");
>
> Response.Write("<script>");
>
> Response.Write("window.onload=starttime");
>
> Response.Write("</script>");
>
> case "1": // this is an MPEG
>
> Response.Write("<object width='320' height='290'
> classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' id='mediaplayer1'>"); >
> Response.Write("<param name='Filename'
> value='http://www.xxxxx/TravInfo/rollFilm.asp?feed=13'>");
>
> Response.Write("<param name='AutoStart' value='True'>");
>
> Response.Write("<param name='ShowControls' value='False'>");
>
> Response.Write("<param name='ShowStatusBar' value='False'>");
>
> Response.Write("<param name='ShowDisplay' value='False'>");
>
> Response.Write("<param name='AutoRewind' value='True'>");
>
> Response.Write("<embed type='application/x-mplayer2'
> pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer > /' width='320' height='290'
> src='http://www.chart.state.md.us/TravInfo/rollFilm.asp?feed=13'
> filename='kids.mpg' autostart='True' showcontrols='False'
> showstatusbar='False' showdisplay='False' autorewind='True'>");
>
> Response.Write("</embed>");
>
> Response.Write("</object>");
>
> case "2": // this is an AVI
>
> Response.Write("<object id='o_camera_feed'
> classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' align='baseline'
> border='0' width='" & rsData("CAMERA_WIDTH") & "' height='" &
> rsData("CAMERA_HEIGHT") & "'>");
>
> Response.Write("<param name='controls' value='imagewindow'>");
>
> Response.Write("<param name='console' value='master'>");
>
> Response.Write("<embed type='audio/x-pn-realaudio-plugin'");
>
> Response.Write("src='" & rsData("CAM_URL") & "' ");
>
> Response.Write("align='baseline' ");
>
> Response.Write("border='0' width='" & rsData("CAMERA_WIDTH") & "' ");
>
> Response.Write("height='" & rsData("CAMERA_HEIGHT") & "' ");
>
> Response.Write("name='e_camera_feed' ");
>
> Response.Write("controls='imagewindow' ");
>
> Response.Write("console='master'");
>
> Response.Write("AUTOSTART='true'></embed>");
>
> Response.Write("</object>");
>
>
> --
>
>
> David Fetrow
> Helixpoint LLC.
> http://www.helixpoint.com
> da***@helixpoint.com
>
>



Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Vroem | last post by:
I wanted to show an MPEG-4 video file on a web page. I'm talking about a real iso-compliant file (with the .mp4 extension.) I've been searching on how to use mime-types but it turns out that you...
0
by: Joe | last post by:
I am wondering if dot net has anything to convert MPEG file to avi file? Any suggestions in c#. I used directx 9 managed to read a MPEG... is there a way to save to avi file format?
3
by: lanky_tx | last post by:
Hi All, We have an automated build and test environment using NAnt and Nunit. Some of our assemblies are being strong named by modifying the AssemblyInfo.cs and having csc compile it. Some of...
3
by: Dean Arpajian | last post by:
Looking to find info/ libs on creating (small) video files. Basically what I'm looking for is a tutorial for constructing a short video... (nothing nasty: output from a transmission line...
1
by: Lyndon | last post by:
Hi guys, I've got a problem... I'm developing a webpage on my computer and I can't get the links to my MPEG movies to work. I want them to launch in a Windows Media Player. This is my...
0
by: SiteTamer | last post by:
I have a script that redirects to a file for downloading. Everything works fine EXCEPT: if the target of the redirect is type video/mpeg (extension .mpeg or .mpg), instead of prompting for...
7
by: Kilian A. Foth | last post by:
I just found this amazing video puzzle game written with the pygame library, which promises to be infinite fun - but I can't get it to decode any video file I own, except the game's own example...
9
by: Helen | last post by:
Hi there I wonder where I can find some C codes to write AVI file to MPEG file and write MPEG back to AVI thanks a lot!
0
by: seb | last post by:
Hi, I need to convert each frame from a movie (mpeg for example) to an array (in order to do some computation) and then back to a video format mpeg for example. Do you know of any tools ? The...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.