Build problem on Windows, H264 profile and more

Discuss issues related to PS3 Media Server development (only for programmers)

Re: Build problem on Windows, H264 profile and more

Postby Rickwally » Tue Aug 28, 2012 10:40 pm

I wrote a stupid program that takes as input the url of a file and downloads it (Sending "Windows Phone" as User-Agent).

Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;

namespace Windows_Phone_Downloader
{
    class Program
    {
        private static string fileName = "test.";

        static void Main(string[] args)
        {
            if (args.Length < 1 || args[0].Trim().Length == 0)
            {
                Console.WriteLine("\nMissing file path");
                Console.WriteLine("Usage: wpd sourceFileURL [destFileExt]\n");
                return;
            }

            if (args.Length < 2 || args[1].Trim().Length == 0)
                fileName += "asf";
            else
                fileName += args[1];

            getMedia(args[0]);
        }

        private static void getMedia(string source)
        {
            WebClient wc = new WebClient();

            wc.Headers["Accept"] = "*/*";
            wc.Headers["GetContentFeatures.DLNA.ORG"] = "1";
            wc.Headers["User-Agent"] = "WindowsPhone/7.5 UPnP/1.1 TestApp/1.0";

            try
            {
                wc.DownloadFile(source, fileName);
            }
            catch (Exception e)
            {
                Console.WriteLine("\nException: " + e.Message + "\n");
                return;
            }
        }
    }
}


I made two tests:

1)
- Opened pms
- Started the Windows Phone app in the emulator so that it performs an M-SEARCH and pms recognizes WP
- From the same machine executed wpd "http://192.168.1.3:5001/get/0$2$23/test_original.ogv" to download the file
--> Result: test.asf is exactly the same corrupted file I posted before as test_phone.asf

2)
- Opened pms
- Executed wpd "http://192.168.1.3:5001/get/0$2$23/test_original.ogv" to download the file
--> Result: PMS recognizes the Renderer as Windows Phone but the transcoded file obtained is different from the one of the previous test (still corrupted though)

This should exclude a problem with the phone, I have attached the program to this post if someone else wants to make a test.
Attachments
wpd.zip
(4.29 KiB) Downloaded 94 times
Rickwally
 
Posts: 14
Joined: Mon Aug 20, 2012 11:27 pm

Previous

Return to Developers

Who is online

Users browsing this forum: No registered users and 3 guests