While my browser was playing the video streaming (tru flash-plugin) from mivo.tv, a "netstat -t" revealed high traffic as below:
tcp 0 0 192.168.0.29:56448 68.68.29.24.:macromedia-fcs ESTABLISHED
After googling this "macromedia-fcs" I found:
TCP & UDP Port 1935 (Macromedia-fcs)
Technical description for port 1935:
The RTMP (Real Time Messaging Protocol) service associated with the computer port 1935 is a plain protocol utilized by the Adobe Macromedia Flash application. This proprietary service allows for the streaming of data, video and audio using an active Internet connection among a Flash Server and its associated player. This port supports the three variations of the RTMP service.
The communication port 1935 along with the TCP protocol is used for the delivery of encapsulated RTMPT that traverses firewall applications using HTTPS (secured) connections. The design of this protocol was intended to provide a persistent service for the Flash technology along with other programs like Adobe LiveCycle Data Services ES.
The raw TCP RTMP protocol uses one persistent connection for allowing the implementation of real time communication and smooth delivery of multimedia contents.
The protocol running on the port 1935 achieves this quality of transmission without affecting its ability to send bigger chunks of information including the fragmentation of data.
Digging deeper to the HTML code, I found a port in Javascript like this:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" <codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="610" height="878" id="MivoTV" align="top">' <param name="wmode" value="transparent"> <param name="allowScriptAccess" value="always" /> <param name="allowFullScreen" value="true" /> <param name="SeamlessTabbing" value="false"/> <param name="movie" value="http://mivotv-static.com/swf/MivoTV.swf?r=99123"/> <param name="quality" value="high" /> <param name="scale" value="noscale" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="bgcolor" value="#ffffff" /> <param name="name" value="MivoTV" /> <embed src="http://mivotv-static.com/swf/MivoTV.swf?r=99999" quality="high" scale="noscale" bgcolor="#ffffff" width="610" height="878" name="MivoTV" align="top" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" menu="true" devicefont="false" /> <font style="white-space: pre-wrap;"><font face="inherit">But why it doesn't work if I open the URL directly and put some random number at the end [0..99999]?</font></font></p> <p>
The reverse version would have the column position reversed as well as the bit order in each bit. To do this, we need to read each row of the original image in reverse and also do bit reversal.
We have to be careful when swapping bytes above. On 32-bit computers, we can swap left-right of every 32-bit integer of columns, or on 64-bit PCs we can do 64-bit (long integer) swapping before doing the bit reverse.
For example:
n = m/(sizeof(long integer) for i=0 to n right_idx = m-1-i; swapLongInteger(image[i], image[right_idx]) Reverse8Bit(image[i]) Reverse8Bit(image[i+1]) Reverse8Bit(image[i+2]) Reverse8Bit(image[i+3]) Reverse8Bit(image[right_idx]) Reverse8Bit(image[right_idx-1]) Reverse8Bit(image[right_idx-2]) Reverse8Bit(image[right_idx-3]) i = i + sizeof(long integer) done
The call to multiple "Reverse8Bit" above can be put in multithreading/can be done using parallelism to speed up computation.
The pseudo-code is as below:
# I : list original image
# R : reversed image
for i in range(0,n):
for j in range(0,n):
R[i][j] = Reverse8Bit(I[i][n-1-j])
unsigned int v; // input bits to be reversed
unsigned int r = v; // r will be reversed bits of v; first get LSB of v
int s = sizeof(v) * CHAR_BIT - 1; // extra shift needed at end
for (v >>= 1; v; v >>= 1)
{
r <<= 1;
r |= v & 1;
s--;
}
r <<= s; // shift when v's highest bits are zero
Question:
How many degrees are there in the angle between the hour and minute hands of a clock when the time is a quarter past three?
Answer:
The stupid and quick answer would be 0 degree.
But, if we rethink again, it's not the case exactly. When the minute hand points to '15' (quarter), the hour hand has moved little bit. How many? Let's analyze!
To make a full-circle (360 degrees rotation), the hour hand has to pass 12 hours, thus for one hour, it takes 360 degrees/12 = 30 degrees. For a quarter hour = 1/4 * 30 = 7.5 degrees.