Plugin: MP2Extended (3 Viewers)

FreakyJ

Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Or , I get a single one in a folder of tens or hundreds. Not sure what else I didnt like.
    Fixed in current version ;)

    I couldn't figure out how the GetSubCategoriesById() shoudl work. I mean how do you know that there are sub categories?
    I was thinking about static categories like:
    - Folder
    - Year

    Using the first one the images are sorted in their folders like on the hdd and in the second one they are listed in categories by year.
    Coudl you help me? I studied the MPExtended code but I am still clueless :D There is no property to define that a category has subcategories oO
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    First one get the categories(can think of it as folders)So it's just like browsing a folder structure. A folder can have subfolders and also pictures.

    First:
    GetPictureCategories

    When selecting a category we get the subfolders(if any) and list them at the top of a list
    GetPictureSubCategories
    and then continue filling the list with the pictures in the folder.
    GetPicturesBasicByCategory

    This is how MPExt works and it reflects the setting Share view in MP1. In MP1 one can select Share of Date. I'm not sure how MP2 sort it's pictures.

    In MPExt one can also add a filepath that is independent from the the MP defined shares.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    This is the new main branch: https://github.com/FreakyJ/MediaPortal-2/tree/FEAT_MIA_DLNA_MP2Ext_AspNet
    To compile this branch have a look here: https://forum.team-mediaportal.com/threads/asp-net-5-for-mp2.133079/

    Also you need the attached nuget packages and create a local repository: http://codurance.com/2015/05/04/creating-a-local-nuget-repository/
    You probably changed the TransCodingService, that means I need to create a new nuget package once you've committed your work. I know this is a huge pain right now, but hopefully this will be fixed soon by @MJGraf :)

    If this is too much trouble for you (what I can absolutely understand!!) Just use this branch:
    https://github.com/MrTechno/MediaPortal-2/tree/FEAT_MIA_DLNA_MP2Ext

    I think we don't have rights to push to his Repository, so just push it to my repository and I will take care of the merge.

    Hopefully all this makes sense :D The DLNA Server is broken in the current MIA Rework branch, @MrTechno is working on it ;)
     

    Attachments

    • NugetRepo.rar
      1.5 MB

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    829
    Home Country
    Denmark Denmark
    I think I will let you handle the merging then. :whistle:
    I have not looked at any of all the MIA rework stuff yet, so I think that's best.

    I made changes to MP2Ext and TranscodingService to support live tv transcoding. I'm still testing it, but I will commit to your repository when done.

    BTW do you know why the RA return from starting a timeshift is always a INetworkRA? Should it not be a ILocalFsRA when the timeshift file is used instead of RTSP?
    How else can one do impersonation if needed?
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    No :)
    This one is the right one:
    https://github.com/FreakyJ/MediaPortal-2/tree/FEAT_WifiRemoteForMP2
    This branch is the most recent one before the MIA rework. You merged this one into your MIA rework branch. So all three branches have the same functionality, they are just a evolution.
    MP2Ext -> MP2Ext + MIA -> MP2Ext + MIA + ASP.Net
    They are very compatible (at least to the ASP.Net Branch) Because the changes are minimal.

    I made changes to MP2Ext and TranscodingService to support live tv transcoding. I'm still testing it, but I will commit to your repository when done.
    That's perfect (y) So just use the Branch you were using before^^

    BTW do you know why the RA return from starting a timeshift is always a INetworkRA? Should it not be a ILocalFsRA when the timeshift file is used instead of RTSP?
    Puuh, I don't know. @morpheus_xx wrote this code...

    How else can one do impersonation if needed?
    You already used it in FFMPegParseMPEG2TSInfo.cs @ Ln 41
    Code:
    // Impersionation
            using (ServiceRegistration.Get<IImpersonationService>().CheckImpersonationFor(lfsra.CanonicalLocalResourcePath))
            {
              try
              {
                raf = File.OpenRead(lfsra.LocalFileSystemPath);
                byte[] packetBuffer = new byte[193];
                raf.Read(packetBuffer, 0, packetBuffer.Length);
                if (packetBuffer[0] == 0x47) //Sync byte (Standard MPEG2 TS)
                {
                  info.Video.TimestampType = Timestamp.None;
                  if (Logger != null) Logger.Debug("MediaAnalyzer: Successfully found MPEG2TS timestamp in transport stream: {0}", info.Video.TimestampType);
                }
                else if (packetBuffer[4] == 0x47 && packetBuffer[192] == 0x47) //Sync bytes (BluRay MPEG2 TS)
                {
                  if (packetBuffer[0] == 0x00 && packetBuffer[1] == 0x00 && packetBuffer[2] == 0x00 && packetBuffer[3] == 0x00)
                  {
                    info.Video.TimestampType = Timestamp.Zeros;
                  }
                  else
                  {
                    info.Video.TimestampType = Timestamp.Valid;
                  }
                  if (Logger != null) Logger.Debug("MediaAnalyzer: Successfully found MPEG2TS timestamp in transport stream: {0}", info.Video.TimestampType);
                }
                else
                {
                  info.Video.TimestampType = Timestamp.None;
                  if (Logger != null) Logger.Error("MediaAnalyzer: Failed to retreive MPEG2TS timestamp for resource '{0}'", info.Metadata.Source);
                }
              }
              finally
              {
                if (raf != null) raf.Close();
              }
            }
    Hope this helps :)
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I try to check this soon, but I am very busy next days (business trip)
     

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    829
    Home Country
    Denmark Denmark
    Starting a stream seems to start two transcoding processes(cache is now off). Finishing the stream from MPiV only remove one of them, is this intended?
    I investigated this now. It seems MPiV sends two RequestStream requests within 1 second of each other. The second request is coming in the middle of handling the first so it's almost impossible to handle.
     

    Users who are viewing this thread

    Top Bottom