stream

Value cannot be null. Parameter name: stream

Value cannot be null. Parameter name: stream Can anybody assist my code? Me.PictureBox1.Image.Save(memStream, System.Drawing.Imaging.ImageFormat.Jpeg) Dim imSource() As Byte = memStream.GetBuffer Dim imStatus As Integer = publicStream.Read(imSource, 0, streamLength - 1) imSource.GetValue(memStream.ReadByte) ...

Question about the PHP include statement

I'm looking through the Zend_View source and I see this: include 'zend.view://' . func_get_arg(0); what does the string "zend.view://" represent and how would the include statement resolve that in php? ...

Simple C++ File stream

I want to read then store the content of a file in an array, but this isn't working: #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string content,line,fname; cout<<"Execute: "; cin>>fname; cin.ignore(); cout<<endl; //Doesn't work: ifstream myfile(fname); if(!...

Java: Saving StreamResult to a file.

Hi, I am doing some data conversion(like csv) to xml with SAX then using transformer in Java. The result is in StreamResult, and I am trying to save this result to a file.xml but I can't find way to save StreamResult into file. am I doing this all wrong? ...

How to playback asx files/streams with java

Hello all, I am trying to play a asx file with Java SE. I have read a lot of documentation of frameworks and libraries but I am unable to find a solution. Is it at all possible to playback ASX files. If so, with what framework or librarie? Thanks in advance, Stefan NLD ...

istream from file_descriptor_source (boost::iostreams) or file

I need to do something like this for my program's input: stream input; if (decompressed) input.open(filepath); else { file_descriptor=_popen("decompressor "+filepath,"r"); input.open(file_descriptor); } input.read(...) ... I can see 1 solution... to use _popen in both cases and just copy the file to stdout if it's already ...

redirect file to an url for streaming

I am setting up my hi-fi to stream music from my PC. The hi-fi can see all of the files in my music folder, but I want to be able to stream across the audio I am currently playing. The hi-fi however does not have support for this. So I've found a .dll that wraps directsound and offers it streaming as a continuous mp3 file on my PC from ...

Listen to a shoutcast with Android

Hey, since quite some time I'm trying to listen to .pls files (shoutcasts). I have to say that I failed horrible. Since StreamFurious can do it it must be possible. First I tried to connect to the shoutcast via sockets (TCP and UDP) --> failed. I couldn't even receive one byte from the server. I'm at the verge of tears. I don't even ha...

Overlays using streams resizes an image in VB.Net?

Hi everyone As a follow up to this thread I found that the overlay function was working fine. However, it seems that if I use the overlay function while reading an image from a stream, that it would enlarge the picture before overlaying it. ie: overlay = New Bitmap(stream) g.DrawImage(overlay, 0, 0) Seems to enlarge the image befor...

Problem with python-proxy for mp3-streams

I am trying to make a proxy for internet-radio in mp3. It is working fine when accessing mp3-files, but not for mp3-streams. I suppose I am missing some very basic difference but could not find a hint. Best regards, wolf My test code: #!/usr/local/bin/python2.5 import urllib; import SocketServer, BaseHTTPServer import subprocess ...

How to get raw jpeg data (but no metatags / proprietary markers)

I want to get raw jpeg data - no metadata. I'm very confused looking at the jpeg "standards". How correct is my understanding of the marker "tree"? 0xFFD8 - Identifies the file as an image 0xFFE? - EXIF, JFIF, SPIFF, ICC, etc 0x???? - the length of the tag 0xFFD8 - Start of Image 0xFFE0 - should follow SOI as p...

Matroska size problem?

I have size problem – I’ve done a program in graph edit to encode video from virtual camera. I save it into Matroska and AVI (for encoding to H264 I use x264) 5 seconds of .mkv (H264) weight 2 mb while 5 seconds of .avi (H264) weight 200 kb. 5 minutes of .mkv (H264) weight 2.1 mb while 5 minutes of .avi (H264) weight 5 mb. Is it conn...

Is it possible to stream Matroska files?

So I want to broadcast .mkv file. I'm going to broadcast live video. So I need to know is it possible (anyhow) to read unfinished .mkv files? Because i know that Matroska is xml and you simply will not be able to read unfinished xml. Update: now I know - it is possible to read unfinished XML. But it does not solve the question if it is ...

Streaming local file from PHP while it's been written to by a CURL process

I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a different discussion. Here's the code: shell_exec("nohup curl --create-dirs -o {$write_path} {$source_url} > /dev/null 2> /dev/null & echo $!"); sleep(1); $read_speed = 65.5; # 65.5 kb/s download rate $handle = fopen($wri...

How to get the stream of a public Facebook fanpage in php?

Hi, I want to display my public fanpage feed onto my website via the Facebook API without requiring a login. I'm doing this require_once('../includes/classes/facebook-platform/php/facebook.php'); $fb = new Facebook($api_key, $secret); $fb->api_client->stream_get('',$app_id,'0','0','','','','','')); But I get this error Fatal er...

How to read a managed stream into a uint array directly in C#?

I have some data in a stream which is actually in the format of uint. System.IO.Stream only allows me to read the content out to a byte array, but I don't want to read the bytes and then convert them into a uint array with 1/4 the length of the byte array. I want to read it directly into the memory of the uint array so that it saves time...

Closing a stream in a thread that is already running [C#]

I have multiple downloads running in threads. I want to close the stream, say when user hits pause/stop download. How could I close the filestream of a download running in a thread? ...

Exit from while loop when stream closed?

This is a network stream problem but i simplified test case to Console input: i started a thread ehich waits 2 seconds and closes the stream reader. But after closing stream/stream reader. While loop still waits for sr.ReadLine() method. i wan't to make it exit loop automatically when closes the stream/stream reader. i tried also the th...

How to send audio stream via UDP in java?

Hi to all :) I have a problem, i have set MediaLocator to microphone input, and then created Player. I need to grab that sound from the microphone, encode it to some lower quality stream, and send it as a datagram packet via UDP. Here's the code, i found most of it online and adapted it to my app: public class AudioSender extends Thre...

Copying one std stream to another efficiently.

Ok, Here's some code that outlines what I'm trying to do. #include <sys/types.h> #include <sys/stat.h> #include <sys/fcntl.h> #include <iostream> #include <sstream> int main( int c, char *v[] ) { int fd = open( "data.out", O_RDONLY | O_NONBLOCK ); std::cout << "fd = " << fd << std::endl; char buffer[ 1024000 ]; ssize_...