ó
î Xc           @   s   d  Z  d d l m Z m Z d d l m Z d d d     YZ d e j f d     YZ e j d e  e j	 d d	  e j	 d d
  e j
 d d  d S(   s   0.1i˙˙˙˙(   t   Imaget	   ImageFile(   t   i8t	   BitStreamc           B   s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c         C   s   | |  _  d |  _ d |  _ d  S(   Ni    (   t   fpt   bitst	   bitbuffer(   t   selfR   (    (    s7   /usr/lib/python2.7/dist-packages/PIL/MpegImagePlugin.pyt   __init__   s    		c         C   s   t  |  j j d   S(   Ni   (   R   R   t   read(   R   (    (    s7   /usr/lib/python2.7/dist-packages/PIL/MpegImagePlugin.pyt   next    s    c         C   s~   x] |  j  | k  r_ |  j   } | d k  r9 d |  _  q n  |  j d >| |  _ |  j  d 7_  q W|  j |  j  | ?d | >d @S(   Ni    i   i   (   R   R
   R   (   R   R   t   c(    (    s7   /usr/lib/python2.7/dist-packages/PIL/MpegImagePlugin.pyt   peek#   s    	c         C   s_   xH |  j  | k  rJ |  j d >t |  j j d   |  _ |  j  d 7_  q W|  j  | |  _  d  S(   Ni   i   (   R   R   R   R   R	   (   R   R   (    (    s7   /usr/lib/python2.7/dist-packages/PIL/MpegImagePlugin.pyt   skip-   s    &c         C   s#   |  j  |  } |  j | |  _ | S(   N(   R   R   (   R   R   t   v(    (    s7   /usr/lib/python2.7/dist-packages/PIL/MpegImagePlugin.pyR	   3   s    (   t   __name__t
   __module__R   R
   R   R   R	   (    (    (    s7   /usr/lib/python2.7/dist-packages/PIL/MpegImagePlugin.pyR      s
   			
	t   MpegImageFilec           B   s   e  Z d  Z d  Z d   Z RS(   t   MPEGc         C   sa   t  |  j  } | j d  d k r3 t d   n  d |  _ | j d  | j d  f |  _ d  S(   Ni    ił  s   not an MPEG filet   RGBi   (   R   R   R	   t   SyntaxErrort   modet   size(   R   t   s(    (    s7   /usr/lib/python2.7/dist-packages/PIL/MpegImagePlugin.pyt   _openB   s
    	(   R   R   t   formatt   format_descriptionR   (    (    (    s7   /usr/lib/python2.7/dist-packages/PIL/MpegImagePlugin.pyR   =   s   R   s   .mpgs   .mpegs
   video/mpegN(    (   t   __version__t   PILR    R   t   PIL._binaryR   R   R   t   register_opent   register_extensiont   register_mime(    (    (    s7   /usr/lib/python2.7/dist-packages/PIL/MpegImagePlugin.pyt   <module>   s   $