Forums Register Login

Converting data source

+Pie Number of slices to send: Send
Hi all,

I need to send a video to a remote computer through the internet. I am using RTPSockets for this transmition. But I need to convert the data source to an array of bytes. Is there a way to do it? But even if I convert it I am not sure this will work.
So if any one has some code that could send a live stream to a remote computer thought the internet place forward it to me

Thanks lot
+Pie Number of slices to send: Send
there is some package called javazoom which is used to upload the files u can upload it to any where from server
just search in net i was sending some sample code
****************************code***********************


<html>
<%@ page language="java" import="javazoom.upload.*,java.util.*" %>
<%@ page errorPage="ExceptionHandler.jsp" %>
<jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
<jsp:setProperty name="upBean" property="folderstore" value="D:/uploads" />
</jsp:useBean>
<head>
<title>Samples : Simple Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<ul><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<%
if (MultipartFormDataRequest.isMultipartFormData(request))
{
// Uses MultipartFormDataRequest to parse the HTTP request.
MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
String todo = mrequest.getParameter("todo");
if ( (todo != null) && (todo.equalsIgnoreCase("upload")) )
{
Hashtable files = mrequest.getFiles();
if ( (files != null) || (!files.isEmpty()) )
{
UploadFile file = (UploadFile) files.get("uploadfile");
out.println("<li>Form field : uploadfile"+"<BR> Uploaded file : "+file.getFileName()+" ("+file.getFileSize()+" bytes)"+"<BR> Content Type : "+file.getContentType());
// Uses the bean now to store specified by jsp:setProperty at the top.
upBean.store(mrequest, "uploadfile");
}
else
{
out.println("<li>No uploaded files");
}
}
else out.println("<BR> todo="+todo);
}
%>
</font></ul>
<form method="post" action="SimpleUpload.jsp" name="upform" enctype="multipart/form-data">
<table width="60%" border="0" cellspacing="1" cellpadding="1" align="center">
<tr>
<td align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Select
a file to upload :</b></font></td>
</tr>
<tr>
<td align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="file" name="uploadfile" size="50">
</font></td>
</tr>
<tr>
<td align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="hidden" name="todo" value="upload">
<input type="submit" name="Submit" value="Upload">
<input type="reset" name="Reset" value="Cancel">
</font></td>
</tr>
</table>
<br>
<br>
<table width="90%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td bgcolor="#666666">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td bgcolor="#FFFFFF"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#0000FF"> Needed
HTML tags :</font></b></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"> <<b>form</b>
<b>method</b>="<b><font color="#FF0000">post</font></b>"
<b>action</b>="<b><font color="#FF0000">SimpleUpload.jsp</font></b>"
name="upload" <b>enctype</b>="<b><font color="#FF0000">multipart/form-data</font></b>"></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"> <<b>input</b>
<b>type</b>="<b><font color="#FF0000">file</font></b>"
<b>name</b>="<font color="#FF0000"><b>uploadfile</b></font>"
size="50"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<p> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><font size="-1" face="Courier New, Courier, mono">Copyright
© <a href="http://www.javazoom.net" target="_blank">JavaZOOM</a> 1999-2002</font></p>
</form>
</body>
</html>
***********************************************************
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1408 times.
Similar Threads
problem with including jsapi library; sending SMS to server
Internal packet routing
[RFC] URL Fetch service
Sending video streams to a remote computer
I am sending my UDP but can not receive
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:24:55.