stream

Is it possible to add que points in a live dvr f4v stream?

Is it possible to add que points in a live dvr f4v stream? ...

How to inspect XML streams from the debugger in Visual Studio 2003

Hi All, I've got to edit an XSLT stylesheet, but I'm flying blind because the XML input only exists fleetingly in a bunch of streams. I can debug into the code, but can't figure out how to get the contents of the streams out into text I can look at (and run through the XSLT manually while I'm editing them). The code is part of a big ol...

Reading from a stream not knowing how much to expect [c#]

How can I read from a stream when I don't know in advance how much data will come in? Right now I just picked a number on a high side (as in code below), but there's no guarantee I won't get more than that. So I read a byte at a time in a loop, resizing array each time? Sounds like too much resizing to be done :-/ TcpClient tcpclnt = n...

Ensure streamreader doesn't hang waiting for data

The code below reads everything there is to read from tcp client stream, and on the next iteration it will just sit there on the Read() (i'm assuming waiting for data). How can I ensure it doesn't and just returns when there's nothing there to read? Do I have to set low timeout, and respond to an exception when it fails out? Or there's a...

How would std::ostringstream convert to bool?

I stumbled across this code. std::ostringstream str; /// (some usage) assert( ! str ); What does ostringstream signify when used in a bool context? Is this possibly an incorrect usage that happens to compile and run? ...

HttpWebRequest & Native GZip Compression

When requesting a page with Gzip compression I am getting a lot of the following errors: System.IO.InvalidDataException: The CRC in GZip footer does not match the CRC calculated from the decompressed data I am using native GZipStream to decompress and am looking at addressing this. With that in mind is there a work around for...

How should I do an ISerializable Stream (or near enough)

I have a web service accessed via SOAP. I'd really like one of the methods to return a Stream. What are my options? My thoughts right now amount to implement Stream and stuff all the data in a string. Is there a type that does this already? If possible (and I don't think it is) I'd love to actually tunnel the stream through SOAP so tha...

What is the best way to Stream Audio on a website

I am updating a website for a radio station and they would like to be able stream previously broadcast sports games on the site. Most games are 2 - 3 hours long so the files are really large. What would be the best way to offer these games so users can listen to them without having to download the file? ...

Salting a C# MD5 ComputeHash on a stream

I can't see any way to salt a MD5.ComputeHash(Stream). Am I missing some way of injecting bytes into the HashAlgorithm? I tried performing a ComputeHash(byte[]) before performing the stream compute, but, unsurprisingly, it had no effect. Any ideas (apart from modifying the file)? Thanks for your time. addendum Just to be a little mor...

Why am i getting Stream as System.IO.UnmanagedMemoryStream?

Hi I have a part of code like this Assembly myAssembly = Assembly.GetExecutingAssembly(); string[] names = myAssembly.GetManifestResourceNames(); foreach (string file in names) { if (file.EndsWith(".dtd")) { // attach to stream to the resource in the manifest ...

Is this the correct way to overload the left-stream operator? (C++)

This function declaration gives me errors: ostream& operator<<(ostream& os, hand& obj); The errors are: error C2143: syntax error : missing ';' before '&' error C4430: missing type specifier error C2065: 'os' : undeclared identifier error C2065: 'obj' : undeclared identifier error C2275: 'hand' : illegal use of this type as an expres...

help with inluxis flv streaming (flash)

hello guys, me again.. this time i'm building a flv player via rtmp, my server is influxis (.com).. i builted a few months ago a video player that streams trought http.. but that player don´t work via rtmp.. so.. i'm wondering if anybody has or known where can i get a sample fla file, in order to recognize elements and AS. i just nee...

ASP.NET stream content from memory and not from file

The users have requested the option to "download" a csv file representation of GridView contents. Does anyone know how to do this without saving the file to the server but rather just streaming it to the user from memory? Thanks ...

How to copy one Stream to a byte array with the smallest C# code?

Until now I am counting 12 LoCs. Could you make it smaller? using (Stream fileStream = File.OpenRead(fileName)) { using (BinaryReader binaryReader = new BinaryReader(fileStream)) { using (MemoryStream memoryStream = new MemoryStream()) { byte[] buffer = new byte[256]; int count; ...

PHP Zip 3 small text files and force download

My website writes 3 small text files based on users information and then presents these 3 files as links that they must "right click" and save to their desktop. I would like to keep that, but also somehow offer a way to zip these 3 small files up and force download. And I don't want to save the zip file on the server either. Can this ...

Java writeObject Vs. writeUTF

What is faster? out.writeObject(someString) or out.writeUTF(someString) ...

Estimating stream capacity

How many uncompressed PCM 64kbps streams can I fit in a wireless 802.11b connection 5.5 Mb/s when CWmin = 16? I assume that one packet contains 30 bytes + IP+UDP+RTP headers (20+8+12 bytes). ...

.NET Xslt Transformation, is this really streamed?

Hi. I have an XML that I need remove empty elements from, I am trying to avoid using DOM and trying to do this as streams. I have this code, but I am not entirely sure how correct and optimized this is. StringBuilder xslt = new StringBuilder(); xslt.Append(@"<?xml version=""1.0"" encoding=""UTF-8""?>"); xslt.Append(@"<xsl:stylesheet ver...

PHP fseek() equivalent for variables?

Hi, What I need is an equivalent for PHP's fseek() function. The function works on files, but I have a variable that contains binary data and I want to work on it. I know I could use substr(), but that would be lame - it's used for strings, not for binary data. Also, creating a file and then using fseek() is not what I am looking for ei...

Send sound or stream sound over lan

I was wondering if there was a way to stream sound over a LAN. Can I have a client app connect to a server app and then receive a stream of sound from it. I'm sure it can be done, just not sure where to even start. Any suggestions? I was looking to do this with c#. I am not asking anyone to write it for me, just some on ideas or tricks ...