stream

How to run a Private Content Video from Cloudfront using RTMP with Flowplayer

Steps to reproduce: set up S3 bucket set up streaming disrtibution generate cloudfront key pair download .PEM file with RSA Private key generate XML from RSA key using http://www.jensign.com/opensslkey/opensslkey.cs upload file "testUnsecure.flv", set ACL properties so that everyone can view it. Set up a webpage with following java scr...

.NET: Reading a configuration section from a stream - possible?

I have the following problem: I need to get a ConfigurationSection - object from a stream that contains a well formed app.config - file (which will has to be loaded from the assembly resource streams). Is there any way to load that from a stream? Background (to satisfy the "why would you want that" questions): I'm working on some ki...

PHP - Shortcomings of fwrite?

I am working on a file-handler class and am running into some issues with file streams. Providing functionality for operations such as append and overwrite are a simple matter of changing the mode passed to fopen. However, providing an easy way to insert, update, and delete is proving to be more challenging. Pretty much, all the probl...

.Net Read Stream Segment from a Stream

I am trying to find a way to read part of a stream. I have a stream with 40000 bytes and need to read only from position 8000 to 15000, problably something easy but I can't seem to find an easy way to get a stream segment. ...

jetpack/xpcom async input stream: detect close

I write a small Jetpack extension that starts a server using Cc["@mozilla.org/network/server-socket;1"]. I read from a connected client asynchronously using: conn.istream.asyncWait(conn, 0, 0, null); The documentation says that the callback is invoked when data arrives AND when the stream is closed: https://developer.mozilla.org/en/XPCO...

Event handler loop intersecting Stream run-loop

Hi all, I am trying to make a socket server that spews mouse move events, in Cocoa. This thread: http://stackoverflow.com/questions/3134901/mouse-tracking-daemon has info regarding the mouse event handler, which was really helpful, however, I need to stream these events out via socket. Using http://developer.apple.com/mac/library/doc...

Flexible logger class using standard streams in C++

Hi all, i would like to create a flexible logger class. I want it to be able to output data to a file or to standard output. Also, i want to use streams. The class should look something like: class Logger { private: std::ostream m_out; // or ofstream, iostream? i don't know public: void useFile( std::string fname); void useSt...

ASP.NET custom HTTPModule - how to tell when writing last block of HTML in Write method?

I have written an Http Module that hooks onto the Response.Filter property of the current request and does various replacements within the HTML before it is sent to the client. All the work is done in the Write method which is overriding Write in the base class Stream. The Write method is called multiple times for a single response - t...

CFReadStreamRef, CFWriteStreamRef and multithreadinf issue.

Hi, I had the following situtation, I'm reading and parsing some packets from the network within a separated thread (not the main thread). After this, I'm trying to put them into a CFWriteStreamRef (created using CFStreamCreateBoundPair, in order to get a CFReadStreamRef that could be able to read the bytes from the writer stream) in a ...

How to create and post activity on myspace using MyspaceID.SDK c# toolkit

Hello I am writing an app that require to post activities to friends. I am using MySpaceID.SDK C# toolkit and using OnsiteContext to create an onsite app within myspace. I have used the Activity template and have seen the tutorial for myspace JSL. On the page, it said Myspace JSL was designed to use by the offsite application and ther...

Make Clojure recognize and isolate the line in a file

Hi! I am trying to get Clojure to read a file, put the first line in a variable, and the rest in another variable. I cannot seem to find out how to do this and would love if anyone could give me a heads up, ...

FFserver: Securing with HTTP Authentication? (Apache?)

Is there some way to secure an ffserver webcam stream using Apache / HTTP Authentication? Some type of Apache proxy perhaps? Right now I have it so only machines on the LAN can view the http://webcam/stream.mjpg, but I want people from the outside to be able to access it if they provide a username / pw (HTTP Auth, which isn't built int...

Processing High-Volume Streaming Data with Twisted or using Threads, Queue in Python

Hi Everyone, I am getting at extremely fast rate, tweets from a long-lived connection to the Twitter API Streaming Server. I proceed by doing some heavy text processing and save the tweets in my database. I am using PyCurl for the connection and callback function that care of text processing and saving in the db. See below my approach ...

Replacing a Stream with a String in a C# program

Currently, I have a program that reads a file and uses an XMLTextWriter to write an XML file to disk. Shortly afterward, I read the file and parse it. I am trying to put these two programs together. I want to get rid of the writing to file step. The XMLTextWriter needs a file path or a Stream when it is constructed. Is there a way to ma...

WCF Message Contract and Streaming

I'm going boarder line crazy, I have been working with this for over a day and still have no idea why it doesn't work, I have a MessageContract that I'm using to send out a stream, but I get the following error, Type 'System.IO.FileStream' with data contract name 'FileStream:http://schemas.datacontract.org/2004/07/System.IO' i...

How to get a MemoryStream from a Stream in .NET?

I have the following constructor method which opens a MemoryStream from a file path: MemoryStream _ms; public MyClass(string filePath) { byte[] docBytes = File.ReadAllBytes(filePath); _ms = new MemoryStream(); _ms.Write(docBytes, 0, docBytes.Length); } I need to change this to accept a Stream instead of a file path. Whats...

C# GetBytes, WriteBytes and Embedded Statement Error

I have a problem. When I run my program, it comes up with an error, specifically the CS1023 error. I guess it's because I have a declaration inside a statement, but I don't know how else to write the code. Sometimes C# annoys me, because in C++ I could get away with similar things... anyway, here's the code. I would appreciate it if som...

Determine the content length of an Intent.STREAM_EXTRA (Android)

Suppose an app gets a content stream by being called with the android.intent.action.SEND filter. Also suppose the Uri and the stream is received like this: Uri contentUri = (Uri) extras.get(Intent.EXTRA_STREAM); InputStream in = getContentResolver().openInputStream(contentUri); Now, how can I determine the total length of the content ...

VB.NET - Can Directx retrieve codec IDs?

Hi StackOverflow, continuing my video converter here and I thought I should have codec information available to the users. I have Directx fully imported into my project and am getting video size, length, FPS, everything, but can I also get the video and audio stream properties? Like average bit-rate, codec name (fourcc - xvid, divx, x264...

Question about using string::swap() with temporaries

The following segment demonstrates my issue: (compilation error on GCC) stringstream ss; string s; ss << "Hello"; // This fails: // s.swap(ss.str()); // This works: ss.str().swap(s); My error: constSwap.cc:14: error: no matching function for call to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::...