|
Perhaps you have to pretend to be a browser. I'd use Fiddler2 to inspect the traffic that goes back and forth between your browser and the YouTube servers when you watch a video. Try to mimic that traffic with your code. If they've built a custom flash control to play the video, that may use some proprietary technique to validate it is being played in their player, which could complicate things. Perhaps the commercial software (Flash?) just captures the resulting video (i.e., that gets played back on the screen) rather than the data sent over the internet. Sorry I can't provide you with a specific solution (only general guidance)... you may need to do some more work to figure this out yourself.
|
|
|
|
|
You are right. YouTube really has complicated things. Some software I downloaded to download files from YouTube, didn't work either.
There might be another way which I just came across. I am using the YouTube Data API, and when I was debugging (hoping to find some clue to the download link), I came across another link, that was a rstp protocol link. I was wondering if there is a way to download a file from that protocol. But I couldn't find anything on Google either.
Sorry, I am not that good with web and desktop combined.
Thanks,
Harsimran Singh
1) The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. - Ted Nelson
2) Why is it drug addicts and computer afficionados are both called users? - Clifford Stoll
3) The real danger is not that computers will begin to think like men, but that men will begin to think like computers. - Sydney J. Harris
(Computer code: 00001111 - translation: Hello! :P )
REMEMBER:
"Computers are made for us, we are not made for th
|
|
|
|
|
I think you are right. After checking with Fiddler, there is a GET method, which sends YouTube the url of the video. The url is pretty complicated and looks like it works on Ip address.
Well, how can I intercept the JSON response from YouTube to the browser with a C# desktop application? I have no clue how to do this. I came across this: http://stackoverflow.com/questions/2077265/json-in-c-sending-and-receiving-data[^], but that wasn't helpful either.
Can you please help me??
Thank you very much,
Harsimran Singh
1) The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. - Ted Nelson
2) Why is it drug addicts and computer afficionados are both called users? - Clifford Stoll
3) The real danger is not that computers will begin to think like men, but that men will begin to think like computers. - Sydney J. Harris
(Computer code: 00001111 - translation: Hello! :P )
REMEMBER:
"Computers are made for us, we are not made for th
|
|
|
|
|
could someone help me change the sound card (if installed more than one) using winmm.dll? I can not use the DirectSound API, for does not support mp3 files. Please someone help me!
|
|
|
|
|
I've never used it for audio, only MIDI which is in the same dll so I assume the principal is the same.
You use the xxxGetNumDevs function to get the number of devices installed. Each of these devices are assigned an ID from 0 to numDevs - 1.
You can call xxxGetDevCaps to get the name and other capabilities of the In or Out device using the ID.
To use the device you call xxxOpen using the ID which will give you an IntPtr which you use to identify the device for all other functions, and you specify a delegate in this function too which will be called for all events of the device (hint: watch out as callbacks may be on a different threads for different events!).
You will need to look in MMSystem.h and this MSDN page[^] to figure out all your P/Invoke signatures and structures.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Hello,
I must add the Ctrl+Z character to string at the end for my C# program to work properly.
Here is the hypotetic code:
char ctrl_z= 'what to type';
string the_string = "Text which ends with ctrl+z character" + ctrl_z;
or
string ctrl_z= "what to type";
string the_string = "Text which ends with ctrl+z character" + ctrl_z;
What to type for char and string declaration of ctrl_z , respectively.
SPIRANCA
|
|
|
|
|
char ctrl_z = (char) 26; /ravi
|
|
|
|
|
Someone 1-voted that; I have no idea why...
P.S. Maybe they wanted Unicode char ctrl_z = '\u0026' ;
|
|
|
|
|
Which is why I pay no attention to ratings like "Reputation". I try to help people (when I'm able to) because others have helped me.
/ravi
|
|
|
|
|
Well said.
It is a shame it is only possible to measure the irrelevant, such as up-votes/down-votes, and number of posts. Only by seeing how helpful someone is could you give a proper rating.
|
|
|
|
|
sometimes it is relevant for future use to reader.
Life's Like a mirror. Smile at it & it smiles back at you.- P Pilgrim
So Smile Please
|
|
|
|
|
or
char ch = (char)(0x1A);
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
To make it compilable and readable use the escape sequence in a character constant thus:
string ctrl_z = "\x1A";
char ctrl_z = '\x1A';
It's time for a new signature.
|
|
|
|
|
Hello,
I've seen a number of articles/discussions here regarding reading the region/culture info (System.Globalization) from the OS. What I haven't seen so far is how to set that information programatically via C#. If it's here, please let me know what search criteria you used or if you have an idea of how to do it, even better. I'm thinking that I will have to end up using pinvoke and the API, but wanted to hear your thoughts. I'm looking for a native C# implementation...
Thank you in advance for any and all information.
|
|
|
|
|
|
Hey Ravi,
Thanks for the information. It steered me into the "right" direction for my purpose. I'm writing a unit test and by doing:
regionInfo = new RegionInfo("US");
CultureInfo cultureInfo = new CultureInfo(0x0409);
Thread.CurrentThread.CurrentCulture = cultureInfo;
Assert.AreEqual(regionInfo.TwoLetterISORegionName, regional.GetLocaleCode(), "Locale code is: " + regional.GetLocaleCode());
NOTE: regional.GetLocaleCode() is a call to get the system region settings
I was able to have my Regional settings set to something other than "US" and the tests ran as though the system was set to the "US" regardless.
In curiosity, do you know of a way to commit those settings to the system? Or would that be more of a registry manipulation exercise? Or "C", none of the above.
Thanks again.
|
|
|
|
|
I hope you're not trying to set it globally/permanently.
|
|
|
|
|
No, I'm creating some NUnit tests and I don't want to depend on the system happening to be of a certain setting.
But, having said that, what would be your concern for the ability to set that or said another way, wouldn't there be legitimate reasons for wanting to have the ability to set the value of the region/culture (perhaps programmatic configuration for one)?
Just curious...
|
|
|
|
|
I wouldn't want an application doing it to my system.
|
|
|
|
|
glauben wrote: wouldn't there be legitimate reasons for wanting to have the ability to set the value of the region/culture
I'd have your app off the system and be looking for some way to have you shot, oh lets change all the globalisation setting to iraq or something, sound like a particularly nasty virus to me. Which is why you are having trouble locating a simple way of doing this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Really? So if an install program asks whether to install for the current user or all users, is that configuration too much? Or a browser that asks to make itself the default browser over another one already installed (ala Firefox), or another app that says, hey should I change all those default extensions so that my app runs when you double click on them, or apps that place themselves into the run once/run at start up area of the registry, is that too much?
My point being is that these are system settings and apps will change them for the benefit of the user - though many times giving the user a choice. And there are plenty of great articles on this and many other sites for utilities (like SysInternals) that change settings, again to benefit the user of the software. So when I saw "virus", I just thought that was pretty harsh.
Anyway, thanks to the people that have helped in the past and have contributed vast amounts of time and knowledge - it is much appreciated.
|
|
|
|
|
I don't have a problem with most of the changes you have mentioned, most of them won't ruin my day but setting the globalisation/culture info for the machine I would consider particular nasty, even with the option of asking the user to Ok the change. Most users do not know the implications of the culture change, all of a sudden all my dates that rely on dd/mm/yyyy now display as mm/dd/yyyy, and that is just one of the many changes it would cause.
Nope, culture info should not be able to be changed globally from anywhere but the system.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
Developing a a project in visual studio 2008, c# .net, using videolab (www.mitov.com) components.
has a component that outputs video to DSfilters and i would like to use this so windows media encoder picks it up, i have been playing around with VCam sdk http://www.e2esoft.cn/vcam/vcamsdk.asp[^]
and it works great however i enquired over 2 weeks ago about buying the software and no one has got back to me.
does anyone know of any similar software that will be seen by windows media encoder as a capture device or is there a way to do this with media encoder sdk
kenny
|
|
|
|
|
Virtual webcam can be found on the web.
For instance : ManyCam Virtual Webcam
But I don't know if I capture your question.
|
|
|
|
|
Hi,
I am a starter in developping applications with csharp smart device projects.I want to create a Form named PrincipalMenu where I have many icons that let me pass to other Forms.With the toolbox tool,I create my listView and i associated an imageList.I want now to show my icons(which are the nodes of my imagelist)when running the application and associate to anyone a code to let me pass to a form.
I write this code but it doesn't show me anything when running application:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Essaie
{
public partial class Form1 : Form
{
private const int IMG_Traveaux = 0;
private const int IMG_Stock = 1;
private const int IMG_Energie = 2;
private const int IMG_Sync = 3;
private const int IMG_Info = 4;
private const int IMG_Quitter = 5;
private ListViewItem LVI_Traveaux;
private ListViewItem LVI_Stock;
private ListViewItem LVI_Energie;
private ListViewItem LVI_Sync;
private ListViewItem LVI_Info;
private ListViewItem LVI_Quitter;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
ListView MaLV = new ListView();
MaLV.Parent = this;
MaLV.Dock = DockStyle.Fill;
MaLV.View = View.Details;
LVI_Traveaux = new ListViewItem("Travaux");
LVI_Traveaux.ImageIndex = IMG_Traveaux;
LVI_Stock = new ListViewItem("Stocks");
LVI_Stock.ImageIndex = IMG_Stock;
LVI_Energie = new ListViewItem("Energie");
LVI_Energie.ImageIndex = IMG_Energie;
LVI_Sync = new ListViewItem("Synchronisation");
LVI_Sync.ImageIndex = IMG_Sync;
LVI_Info = new ListViewItem("Informations");
LVI_Info.ImageIndex = IMG_Info;
LVI_Quitter = new ListViewItem("Quitter");
LVI_Quitter.ImageIndex = IMG_Quitter;
MaLV.Items.Add(LVI_Traveaux);
MaLV.Items.Add(LVI_Stock);
MaLV.Items.Add(LVI_Energie);
MaLV.Items.Add(LVI_Sync);
MaLV.Items.Add(LVI_Info);
MaLV.Items.Add(LVI_Quitter);
}
}
}
Can someone tells me the error and gives me the code of any node of the listview
thanks for u help
modified on Friday, April 2, 2010 11:58 AM
|
|
|
|