~ubuntu-branches/debian/sid/hipo/sid

« back to all changes in this revision

Viewing changes to taglib-sharp/TagLib/Mpeg4/Boxes/IsoHandlerBox.cs

  • Committer: Bazaar Package Importer
  • Author(s): Arthur Loiret
  • Date: 2008-04-02 15:37:34 UTC
  • mfrom: (1.1.3 upstream) (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080402153734-hnz2ia2tj3zox4z8
Tags: 0.6.1-2
* 0001-Remove-deprecated-Encoding-field-from-hipo.desktop.i.patch: Add,
  taken from Ubuntu.
* Let's hope Ubuntu maintainer Miguel Ruiz will send its patches back to
  Debian next time.
* debian/copyright: Rewrite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
namespace TagLib.Mpeg4
2
 
{
3
 
   public class IsoHandlerBox : FullBox
4
 
   {
5
 
      private ByteVector handler_type;
6
 
      private string name;
7
 
      
8
 
      public IsoHandlerBox (BoxHeader header, File file, Box handler) : base (header, file, handler)
9
 
      {
10
 
         file.Seek (DataOffset + 4);
11
 
         ByteVector box_data = file.ReadBlock (DataSize - 4);
12
 
         handler_type = box_data.Mid (0, 4);
13
 
         name = box_data.Mid (16, box_data.Find ((byte) 0, 16) - 16).ToString ();
14
 
      }
15
 
      
16
 
      public IsoHandlerBox (ByteVector handler_type, string name) : base ("hdlr", 0, 0)
17
 
      {
18
 
         this.handler_type = handler_type.Mid (0,4);
19
 
         this.name = name;
20
 
      }
21
 
      
22
 
      public override ByteVector Render ()
23
 
      {
24
 
         ByteVector output = new ByteVector (4);
25
 
         output.Add (handler_type);
26
 
         output.Add (new ByteVector (12));
27
 
         output.Add (ByteVector.FromString (name));
28
 
         output.Add (new ByteVector (2));
29
 
         return Render (output);
30
 
      }
31
 
      
32
 
      public ByteVector HandlerType {get {return handler_type;}}
33
 
      public string     Name        {get {return name;}}
34
 
   }
35
 
}