OSDN Git Service

stop using trunk directory in rectool
[rec10/rec10-git.git] / jTsSplitter / trunk / src / jtssplitter / data / descriptor / ARIB_Video_Compornent_Descriptor.java
1 /*
2  * jTsSplitter - java based mpeg2ts splitter.
3  * Copyright (C) 2009-2010 Yukikaze
4  */
5
6 package jtssplitter.data.descriptor;
7
8 import jtssplitter.data.descriptor.abstract_Descriptor;
9 /**
10  *
11  * @author yukikaze
12  */
13 public class ARIB_Video_Compornent_Descriptor extends jtssplitter.data.descriptor.abstract_Descriptor{
14     private int Descriptor;
15     private boolean still_picture_flag;
16     private boolean sequence_end_code_flag;
17     private int video_encode_format;
18
19     /**
20      * @return the still_picture_flag
21      */
22     public boolean isStill_picture_flag() {
23         return still_picture_flag;
24     }
25
26     /**
27      * 動画フォーマットが直後から変更されるかどうか
28      * @return the sequence_end_code_flag
29      */
30     public boolean isSequence_end_code_flag() {
31         return sequence_end_code_flag;
32     }
33
34     /**
35      * 動画のフォーマットを示す。
36      * @return the video_encode_format
37      * 0-1080p
38      * 1-1080i
39      * 2-720p
40      * 3-480p
41      * 4-480i
42      * 5-240p
43      * 6-120p
44      * 7-2160p
45      */
46     public int getVideo_encode_format() {
47         return video_encode_format;
48     }
49
50     @Override
51     public void analyzeDescriptor(int DescriptorTag, byte[] descriptor) {
52         Descriptor=DescriptorTag;
53         still_picture_flag=((descriptor[0]&0x80)>>7==1);
54         sequence_end_code_flag=((descriptor[0]&0x40)>>6==1);
55         video_encode_format=(descriptor[0]&0x3C)>>2;
56     }
57
58     @Override
59     public int getDescriptorTag() {
60         return Descriptor;
61     }
62
63     @Override
64     public void analyzeDescriptor(byte[] descriptor) {
65         Descriptor=descriptor[0]&0xFF;
66         still_picture_flag=((descriptor[2]&0x80)>>7==1);
67         sequence_end_code_flag=((descriptor[2]&0x40)>>6==1);
68         video_encode_format=(descriptor[2]&0x3C)>>2;
69     }
70
71 }