473,321 Members | 1,667 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,321 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 2885
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.