Module ImportFrom alias alias alias alias Assign NameStore Call NameLoad Str TryExcept body Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Pass Import alias Import alias Import alias Import alias Import alias identifier Import alias identifier ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias alias FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Call NameLoad Call AttributeLoad Str attr TupleLoad Str IfExp BinOpBitAnd NameLoad AttributeLoad NameLoad attr Str Str IfExp BinOpBitAnd NameLoad AttributeLoad NameLoad attr Str Str IfExp BinOpBitAnd NameLoad AttributeLoad NameLoad attr Str Str IfExp BinOpBitAnd NameLoad AttributeLoad NameLoad attr Str Str IfExp BinOpBitAnd NameLoad AttributeLoad NameLoad attr Str Str Str BinOpMod Str AttributeLoad SubscriptLoad NameLoad Index Num attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Num attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad TryExcept body If AttributeLoad NameLoad attr body Raise Call NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Raise decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str If UnaryOpNot AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Raise Call NameLoad Str If UnaryOpNot AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Expr Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Index Num attr AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Index Num attr Assign NameStore AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Index Num attr Assign AttributeStore AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num attr attr Call AttributeLoad NameLoad attr NameLoad Num Assign AttributeStore AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num attr attr Call AttributeLoad NameLoad attr NameLoad Num Assign AttributeStore AttributeLoad AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num attr attr attr Num Assign AttributeStore AttributeLoad AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num attr attr attr Num Assign AttributeStore AttributeLoad AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num attr attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num attr attr attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num keyword Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert UnaryOpNot AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str If UnaryOpNot AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Raise Call NameLoad Str If UnaryOpNot AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Raise Call NameLoad Str Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Index Num attr AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Index Num attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Expr Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Index Num attr If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call NameLoad BinOpMult Num Num AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr orelse Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert UnaryOpNot AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert UnaryOpNot AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num orelse Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad TryExcept body TryFinally body Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Str TryFinally body Assign NameStore Call AttributeLoad NameLoad attr NameLoad finalbody Expr Call AttributeLoad NameLoad attr NameLoad finalbody Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign NameStore NameLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str If AttributeLoad SubscriptLoad NameLoad Index Num attr body With AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Num attr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad SubscriptLoad NameLoad Index Num attr handlers ExceptHandler type NameLoad body Pass orelse If BoolOpAnd CompareIsNot NameLoad NameLoad CompareNotEq NameLoad AttributeLoad SubscriptLoad NameLoad Index Num attr body Raise Call NameLoad BinOpMod Str NameLoad Return Call NameLoad BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr If UnaryOpNot NameLoad body Raise Call NameLoad Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str With AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad TupleLoad NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str keyword Num orelse TryExcept body Expr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str With AttributeLoad NameLoad attr body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type NameLoad body Pass orelse If NameLoad body Expr Call AttributeLoad NameLoad attr orelse TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad BoolOpAnd AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr With AttributeLoad AttributeLoad NameLoad attr attr body Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword Str For NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr If UnaryOpNot NameLoad body Raise Call NameLoad Str Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Raise AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body With AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr TryExcept body Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str handlers ExceptHandler type NameLoad name NameStore body If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Dict Str Str Str Str Str TupleLoad AttributeLoad NameLoad attr Num TupleLoad AttributeLoad NameLoad attr Num TupleLoad AttributeLoad NameLoad attr Num TupleLoad AttributeLoad NameLoad attr Num TupleLoad AttributeLoad NameLoad attr Num FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults kwarg body If UnaryOpNot NameLoad body If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index NameLoad AttributeLoad AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num attr attr body Assign NameStore AttributeLoad NameLoad attr If NameLoad body Assign TupleStore NameStore NameStore NameLoad Assign AttributeStore NameLoad attr CompareIn NameLoad TupleLoad Str Str orelse Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num If NameLoad body Assign NameStore TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad BinOpMult BinOpMult NameLoad NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Num Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Assign AttributeStore SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num attr NameLoad Assign AttributeStore SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num orelse Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore Call NameLoad NameLoad Delete SubscriptDel NameLoad Slice Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad Str Num Num NameLoad NameLoad NameLoad NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore BoolOpOr NameLoad NameLoad TryExcept body Assign AttributeStore SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num attr SubscriptLoad Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr If UnaryOpNot CompareLtELtE Num NameLoad Num body Raise Call NameLoad Str Assign AttributeStore SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num attr Index Num attr attr attr Num Assign AttributeStore AttributeLoad AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num attr Index Num attr attr attr Num Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryExcept body Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr SubscriptLoad Dict Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str If NameLoad body Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str If NameLoad body Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str If NameLoad body Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryExcept body Assign AttributeStore NameLoad attr SubscriptLoad Dict Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str orelse If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr Num If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Expr Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num AttributeLoad NameLoad attr Num keyword Str Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr Call NameLoad keyword Num keyword NameLoad keyword Num keyword Num keyword Num keyword Num keyword NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str With AttributeLoad NameLoad attr body Assign NameStore Dict If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad Num BinOpMult Call NameLoad BinOpDiv AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str Assign AttributeStore NameLoad attr Call NameLoad keyword IfExp AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad AttributeLoad NameLoad attr attr keyword IfExp BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr IfExp BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr IfExp BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword IfExp AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad SubscriptLoad NameLoad Index Num attr BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad SubscriptLoad NameLoad Index Num attr keyword IfExp BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad SubscriptLoad NameLoad Index Num attr keyword IfExp BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad SubscriptLoad NameLoad Index Num attr keyword IfExp CompareIn AttributeLoad SubscriptLoad NameLoad Index Num attr TupleLoad Num AttributeLoad NameLoad attr NameLoad AttributeLoad SubscriptLoad NameLoad Index Num attr keyword Call NameLoad BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr If BoolOpOr CompareNotEq AttributeLoad NameLoad attr Str BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr body With AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Num keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr If BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num TupleLoad Num Num Num NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr TryExcept body Assign AttributeStore SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num attr SubscriptLoad Dict Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str If CompareEq AttributeLoad NameLoad attr Str body Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword Str Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad keyword Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Num Num orelse Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad NameLoad attr keyword Str Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Return BoolOpOr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Call NameLoad BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body TryExcept body If BoolOpOr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Call NameLoad BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Num attr BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad SubscriptLoad NameLoad Index Num attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad SubscriptLoad NameLoad Index Num attr attr Call NameLoad NameLoad If BoolOpOr CompareIn Str NameLoad CompareIn Str NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad Assign AttributeStore SubscriptLoad NameLoad Index Num attr Call NameLoad NameLoad Assign AttributeStore SubscriptLoad NameLoad Index Num attr Call NameLoad NameLoad Assign AttributeStore SubscriptLoad NameLoad Index Num attr Call NameLoad NameLoad orelse Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Call NameLoad NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Num attr keyword BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore TupleLoad Str Str Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body If UnaryOpNot CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str If CompareGt AttributeLoad NameLoad attr Num body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad AugAssignSub AttributeStore NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Num attr Return CompareLtE AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A __future__ unicode_literals print_function division absolute_import N/A str N/A type N/A N/A N/A range xrange N/A N/A N/A NameError N/A N/A N/A io N/A datetime N/A threading N/A warnings N/A ctypes ct N/A picamera.mmal mmal picamera.frames PiVideoFrame PiVideoFrameType picamera.streams BufferIO picamera.exc mmal_check PiCameraError PiCameraMMALError PiCameraValueError PiCameraRuntimeError _debug_buffer N/A N/A buf N/A N/A N/A f N/A N/A buf N/A 0 flags N/A N/A print N/A N/A join N/A flags= N/A N/A f N/A mmal MMAL_BUFFER_HEADER_FLAG_FRAME_END E _ N/A N/A f N/A mmal MMAL_BUFFER_HEADER_FLAG_KEYFRAME K _ N/A N/A f N/A mmal MMAL_BUFFER_HEADER_FLAG_CONFIG C _ N/A N/A f N/A mmal MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO M _ N/A N/A f N/A mmal MMAL_BUFFER_HEADER_FLAG_EOS X _ N/A len=%d N/A N/A buf N/A 0 length N/A _encoder_callback N/A N/A port buf N/A N/A N/A encoder N/A N/A N/A ct cast N/A N/A port N/A 0 userdata N/A N/A ct POINTER N/A ct py_object N/A 0 N/A N/A N/A encoder _callback port buf N/A N/A _encoder_callback N/A N/A mmal MMAL_PORT_BH_CB_T _encoder_callback PiEncoder N/A object N/A N/A 
    Base implementation of an MMAL encoder for use by PiCamera.

    The *parent* parameter specifies the :class:`PiCamera` instance that has
    constructed the encoder. The *camera_port* parameter provides the MMAL
    camera port that the encoder should enable for capture (this will be the
    still or video port of the camera component). The *input_port* parameter
    specifies the MMAL port that the encoder should connect to its input.
    Sometimes this will be the same as the camera port, but if other components
    are present in the pipeline (e.g. a splitter), it may be different.

    The *format* parameter specifies the format that the encoder should
    produce in its output. This is specified as a string and will be one of
    the following for image encoders:

    * ``'jpeg'``
    * ``'png'``
    * ``'gif'``
    * ``'bmp'``
    * ``'yuv'``
    * ``'rgb'``
    * ``'rgba'``
    * ``'bgr'``
    * ``'bgra'``

    And one of the following for video encoders:

    * ``'h264'``
    * ``'mjpeg'``

    The *resize* parameter is either ``None`` (indicating no resizing
    should take place), or a ``(width, height)`` tuple specifying the
    resolution that the output of the encoder should be resized to.

    Finally, the *options* parameter specifies additional keyword arguments
    that can be used to configure the encoder (e.g. bitrate for videos, or
    quality for images).

    The class has a number of attributes:

    .. attribute:: camera_port

        A pointer to the camera output port that needs to be activated and
        deactivated in order to start/stop capture. This is not necessarily the
        port that the encoder component's input port is connected to (for
        example, in the case of video-port based captures, this will be the
        camera video port behind the splitter).

    .. attribute:: encoder

        A pointer to the MMAL encoder component, or None if no encoder
        component has been created (some encoder classes don't use an actual
        encoder component, for example :class:`PiRawImageMixin`).

    .. attribute:: encoder_connection

        A pointer to the MMAL connection linking the encoder's input port to
        the camera, splitter, or resizer output port (depending on
        configuration), if any.

    .. attribute:: event

        A :class:`threading.Event` instance used to synchronize operations
        (like start, stop, and split) between the control thread and the
        callback thread.

    .. attribute:: exception

        If an exception occurs during the encoder callback, this attribute is
        used to store the exception until it can be re-raised in the control
        thread.

    .. attribute:: format

        The image or video format that the encoder is expected to produce. This
        is equal to the value of the *format* parameter.

    .. attribute:: input_port

        A pointer to the MMAL port that the encoder component's input port
        should be connected to.

    .. attribute:: output_port

        A pointer to the MMAL port of the encoder's output. In the case no
        encoder component is created, this should be the camera/component
        output port responsible for producing data. In other words, this
        attribute **must** be set on initialization.

    .. attribute:: outputs

        A mapping of ``key`` to ``(output, opened)`` tuples where ``output``
        is a file-like object, and ``opened`` is a bool indicating whether or
        not we opened the output object (and thus whether we are responsible
        for eventually closing it).

    .. attribute:: outputs_lock

        A :func:`threading.Lock` instance used to protect access to
        :attr:`outputs`.

    .. attribute:: parent

        The :class:`PiCamera` instance that created this PiEncoder instance.

    .. attribute:: pool

        A pointer to a pool of MMAL buffers.

    .. attribute:: resizer

        A pointer to the MMAL resizer component, or None if no resizer
        component has been created.

    .. attribute:: resizer_connection

        A pointer to the MMAL connection linking the resizer's input port to
        the camera or splitter's output port, if any.
     N/A encoder_type None __init__ N/A N/A self parent camera_port input_port format resize N/A options N/A N/A N/A self parent parent N/A N/A self format format N/A N/A self encoder None N/A N/A self resizer None N/A N/A self encoder_connection None N/A N/A self resizer_connection None N/A N/A self camera_port camera_port N/A N/A self input_port input_port N/A N/A self output_port None N/A N/A self pool None N/A N/A self started_capture False N/A N/A self outputs_lock N/A N/A threading Lock N/A N/A self outputs N/A N/A N/A self exception None N/A N/A self event N/A N/A threading Event N/A N/A self stopped True N/A N/A N/A N/A parent closed N/A N/A N/A PiCameraRuntimeError Camera is closed N/A resize N/A N/A N/A N/A self _create_resizer resize N/A N/A N/A self _create_encoder options N/A N/A N/A self _create_pool N/A N/A N/A self _create_connections N/A N/A N/A N/A N/A N/A self close N/A N/A _create_resizer N/A N/A self width height N/A N/A N/A 
        Creates and configures an MMAL resizer component.

        This is called when the initializer's *resize* parameter is something
        other than ``None``. The *width* and *height* parameters are passed to
        the constructed resizer. Note that this method only constructs the
        resizer - it does not connect it to the encoder. The method sets the
        :attr:`resizer` attribute to the constructed resizer component.
         N/A N/A self resizer N/A N/A N/A ct POINTER N/A mmal MMAL_COMPONENT_T N/A N/A mmal_check N/A N/A mmal mmal_component_create N/A mmal MMAL_COMPONENT_DEFAULT_RESIZER N/A self resizer prefix Failed to create resizer component N/A N/A N/A N/A N/A self resizer N/A 0 input_num N/A N/A N/A PiCameraError No input ports on resizer component N/A N/A N/A N/A N/A self resizer N/A 0 output_num N/A N/A N/A PiCameraError No output ports on resizer component N/A N/A N/A mmal mmal_format_copy N/A N/A N/A N/A N/A N/A self resizer N/A 0 input N/A 0 N/A 0 format N/A N/A N/A self input_port N/A 0 format N/A N/A mmal_check N/A N/A mmal mmal_port_format_commit N/A N/A N/A N/A self resizer N/A 0 input N/A 0 prefix Failed to set resizer input port format N/A N/A N/A mmal mmal_format_copy N/A N/A N/A N/A N/A N/A self resizer N/A 0 output N/A 0 N/A 0 format N/A N/A N/A N/A N/A N/A self resizer N/A 0 input N/A 0 N/A 0 format N/A fmt N/A N/A N/A N/A N/A N/A self resizer N/A 0 output N/A 0 N/A 0 format N/A N/A N/A N/A N/A N/A fmt N/A 0 es N/A 0 video width N/A N/A mmal VCOS_ALIGN_UP width 32 N/A N/A N/A N/A N/A N/A fmt N/A 0 es N/A 0 video height N/A N/A mmal VCOS_ALIGN_UP height 16 N/A N/A N/A N/A N/A N/A N/A fmt N/A 0 es N/A 0 video crop x 0 N/A N/A N/A N/A N/A N/A N/A fmt N/A 0 es N/A 0 video crop y 0 N/A N/A N/A N/A N/A N/A N/A fmt N/A 0 es N/A 0 video crop width width N/A N/A N/A N/A N/A N/A N/A fmt N/A 0 es N/A 0 video crop height height N/A N/A mmal_check N/A N/A mmal mmal_port_format_commit N/A N/A N/A N/A self resizer N/A 0 output N/A 0 prefix Failed to set resizer output port format N/A _create_encoder N/A N/A self N/A N/A N/A 
        Creates and configures the MMAL encoder component.

        This method only constructs the encoder; it does not connect it to the
        input port. The method sets the :attr:`encoder` attribute to the
        constructed encoder component, and the :attr:`output_port` attribute to
        the encoder's output port (or the previously constructed resizer's
        output port if one has been requested). Descendent classes extend this
        method to finalize encoder configuration.

        .. note::

            It should be noted that this method is called with the
            initializer's ``option`` keyword arguments. This base
            implementation expects no additional arguments, but descendent
            classes extend the parameter list to include options relevant to
            them.
         N/A N/A N/A self encoder N/A N/A self encoder N/A N/A N/A ct POINTER N/A mmal MMAL_COMPONENT_T N/A N/A mmal_check N/A N/A mmal mmal_component_create N/A self encoder_type N/A self encoder prefix Failed to create encoder component N/A N/A N/A N/A N/A self encoder N/A 0 input_num N/A N/A N/A PiCameraError No input ports on encoder component N/A N/A N/A N/A N/A self encoder N/A 0 output_num N/A N/A N/A PiCameraError No output ports on encoder component N/A N/A self output_port N/A N/A N/A N/A self encoder N/A 0 output N/A 0 N/A N/A self resizer N/A N/A N/A N/A mmal mmal_format_copy N/A N/A N/A N/A N/A N/A self encoder N/A 0 input N/A 0 N/A 0 format N/A N/A N/A N/A N/A N/A self resizer N/A 0 output N/A 0 N/A 0 format N/A N/A N/A N/A mmal mmal_format_copy N/A N/A N/A N/A N/A N/A self encoder N/A 0 input N/A 0 N/A 0 format N/A N/A N/A self input_port N/A 0 format N/A N/A mmal_check N/A N/A mmal mmal_port_format_commit N/A N/A N/A N/A self encoder N/A 0 input N/A 0 prefix Failed to set encoder input port format N/A N/A N/A mmal mmal_format_copy N/A N/A N/A self output_port N/A 0 format N/A N/A N/A N/A N/A N/A self encoder N/A 0 input N/A 0 N/A 0 format N/A N/A N/A self format mjpeg N/A N/A N/A N/A N/A self output_port N/A 0 buffer_size N/A max N/A 512 1024 N/A N/A N/A self output_port N/A 0 buffer_size_recommended N/A N/A N/A N/A N/A self output_port N/A 0 buffer_size N/A N/A N/A self output_port N/A 0 buffer_size_recommended N/A N/A N/A N/A self output_port N/A 0 buffer_num N/A N/A N/A self output_port N/A 0 buffer_num_recommended N/A _create_pool N/A N/A self N/A N/A N/A 
        Allocates a pool of MMAL buffers for the encoder.

        This method is expected to construct an MMAL pool of buffers for the
        :attr:`output_port`, and store the result in the :attr:`pool`
        attribute.
         N/A N/A N/A self pool N/A N/A self pool N/A N/A mmal mmal_port_pool_create N/A self output_port N/A N/A N/A self output_port N/A 0 buffer_num N/A N/A N/A self output_port N/A 0 buffer_size N/A N/A N/A self pool N/A N/A N/A PiCameraError Failed to create buffer header pool for encoder component N/A _create_connections N/A N/A self N/A N/A N/A 
        Creates all connections between MMAL components.

        This method is called to connect the encoder and the optional resizer
        to the input port provided by the camera. It sets the
        :attr:`encoder_connection` and :attr:`resizer_connection` attributes as
        required.
         N/A N/A N/A self encoder_connection N/A N/A self resizer N/A N/A N/A self resizer_connection N/A N/A N/A self parent _connect_ports N/A self input_port N/A N/A N/A N/A self resizer N/A 0 input N/A 0 N/A N/A self encoder_connection N/A N/A N/A self parent _connect_ports N/A N/A N/A N/A self resizer N/A 0 output N/A 0 N/A N/A N/A N/A self encoder N/A 0 input N/A 0 N/A N/A N/A self encoder_connection N/A N/A N/A self parent _connect_ports N/A self input_port N/A N/A N/A N/A self encoder N/A 0 input N/A 0 N/A _callback N/A N/A self port buf N/A N/A N/A 
        The encoder's main callback function.

        When the encoder is active, this method is periodically called in a
        background thread. The *port* parameter specifies the MMAL port
        providing the output (typically this is the encoder's output port, but
        in the case of unencoded captures may simply be a camera port), while
        the *buf* parameter is an MMAL buffer header pointer which can be used
        to obtain the data to write, along with meta-data about the current
        frame.

        This method *must* release the MMAL buffer header before returning
        (failure to do so will cause a lockup), and should recycle buffers if
        expecting further data (the :meth:`_callback_recycle` method can be
        called to perform the latter duty). Finally, this method must set
        :attr:`event` when the encoder has finished (and should set
        :attr:`exception` if an exception occurred during encoding).

        Developers wishing to write a custom encoder class may find it simpler
        to override the :meth:`_callback_write` method, rather than deal with
        these complexities.
         N/A N/A self stopped N/A N/A N/A N/A mmal mmal_buffer_header_release buf N/A N/A stop False N/A N/A N/A N/A N/A N/A mmal_check N/A N/A mmal mmal_buffer_header_mem_lock buf prefix Unable to lock buffer header memory N/A N/A N/A stop N/A N/A self _callback_write buf N/A N/A N/A N/A mmal mmal_buffer_header_mem_unlock buf N/A N/A N/A N/A mmal mmal_buffer_header_release buf N/A N/A N/A self _callback_recycle port buf N/A N/A N/A Exception N/A e N/A N/A stop True N/A N/A self exception e N/A stop N/A N/A N/A self stopped True N/A N/A N/A N/A self event set N/A _callback_write N/A N/A self buf key N/A N/A PiVideoFrameType frame N/A N/A 
        Writes output on behalf of the encoder callback function.

        This method is called by :meth:`_callback` to handle writing to an
        object in :attr:`outputs` identified by *key*. The *buf* parameter is
        an MMAL buffer header pointer which can be used to obtain the length of
        data available (``buf[0].length``), a pointer to the data
        (``buf[0].data``) which should typically be used with
        :func:`ctypes.string_at`, and meta-data about the contents of the
        buffer (``buf[0].flags``). The method is expected to return a boolean
        to indicate whether output is complete (``True``) or whether more data
        is expected (``False``).

        The default implementation simply writes the contents of the buffer to
        the output identified by *key*, and returns ``True`` if the buffer
        flags indicate end of stream. Image encoders will typically override
        the return value to indicate ``True`` on end of frame (as they only
        wish to output a single image). Video encoders will typically override
        this method to determine where key-frames and SPS headers occur.
         N/A N/A N/A buf N/A 0 length N/A N/A N/A self outputs_lock N/A N/A N/A N/A written N/A N/A N/A N/A N/A self outputs N/A key N/A 0 write N/A N/A ct string_at N/A N/A buf N/A 0 data N/A N/A buf N/A 0 length N/A N/A N/A KeyError N/A N/A N/A N/A N/A N/A written None N/A written N/A N/A buf N/A 0 length N/A N/A N/A PiCameraError N/A Unable to write buffer to output %s key N/A N/A bool N/A N/A N/A buf N/A 0 flags N/A mmal MMAL_BUFFER_HEADER_FLAG_EOS N/A _callback_recycle N/A N/A self port buf N/A N/A N/A 
        Recycles the buffer on behalf of the encoder callback function.

        This method is called by :meth:`_callback` when there is a buffer to
        recycle (because further output is expected). It is unlikely descendent
        classes will have a need to override this method, but if they override
        the :meth:`_callback` method they may wish to call it.
         N/A new_buf N/A N/A mmal mmal_queue_get N/A N/A N/A self pool N/A 0 queue N/A N/A new_buf N/A N/A N/A PiCameraError Unable to get a buffer to return to the encoder port N/A N/A mmal_check N/A N/A mmal mmal_port_send_buffer port new_buf prefix Unable to return a buffer to the encoder port N/A _open_output N/A N/A self output key N/A N/A PiVideoFrameType frame N/A N/A 
        Opens *output* and associates it with *key* in :attr:`outputs`.

        If *output* is a string, this method opens it as a filename and keeps
        track of the fact that the encoder was the one to open it (which
        implies that :meth:`_close_output` should eventually close it).
        Otherwise, if *output* has a ``write`` method it is assumed to be a
        file-like object and it is used verbatim. If *output* is neither a
        string, nor an object with a ``write`` method it is assumed to be a
        writeable object supporting the buffer protocol (this is wrapped in
        a :class:`BufferIO` stream to simplify writing).

        The opened output is added to the :attr:`outputs` dictionary with the
        specified *key*.
         N/A N/A self outputs_lock N/A N/A opened N/A isinstance output N/A bytes str N/A opened N/A N/A output N/A N/A io open output wb buffering 65536 N/A N/A N/A N/A N/A output write N/A N/A N/A AttributeError N/A N/A opened True N/A output N/A BufferIO output N/A N/A N/A self outputs N/A key N/A output opened N/A _close_output N/A N/A self key N/A N/A PiVideoFrameType frame N/A N/A 
        Closes the output associated with *key* in :attr:`outputs`.

        Closes the output object associated with the specified *key*, and
        removes it from the :attr:`outputs` dictionary (if we didn't open the
        object then we attempt to flush it instead).
         N/A N/A self outputs_lock N/A N/A N/A N/A N/A output opened N/A N/A N/A self outputs pop key N/A N/A N/A KeyError N/A N/A N/A N/A opened N/A N/A N/A N/A output close N/A N/A N/A N/A N/A N/A output flush N/A N/A N/A AttributeError N/A N/A N/A active N/A N/A self N/A N/A N/A 
        Returns ``True`` if the MMAL encoder exists and is enabled.
         N/A N/A bool N/A N/A self encoder N/A N/A N/A self output_port N/A 0 is_enabled N/A property start N/A N/A self output N/A N/A N/A 
        Starts the encoder object writing to the specified output.

        This method is called by the camera to start the encoder capturing
        data from the camera to the specified output. The *output* parameter
        is either a filename, or a file-like object (for image and video
        encoders), or an iterable of filenames or file-like objects (for
        multi-image encoders).
         N/A N/A N/A N/A self event clear N/A N/A self stopped False N/A N/A self exception None N/A N/A N/A self _open_output output N/A N/A N/A N/A self output_port N/A 0 userdata N/A N/A ct cast N/A N/A ct pointer N/A N/A ct py_object self N/A ct c_void_p N/A N/A N/A self parent _encoders_lock N/A N/A N/A mmal_check N/A N/A mmal mmal_port_enable N/A self output_port _encoder_callback prefix Failed to enable encoder output port N/A q N/A range N/A N/A mmal mmal_queue_length N/A N/A N/A self pool N/A 0 queue N/A N/A buf N/A N/A mmal mmal_queue_get N/A N/A N/A self pool N/A 0 queue N/A N/A buf N/A N/A N/A PiCameraRuntimeError Unable to get a required buffer from pool queue N/A N/A mmal_check N/A N/A mmal mmal_port_send_buffer N/A self output_port buf prefix Unable to send a buffer to encoder output port N/A N/A N/A N/A self parent _start_capture N/A self camera_port N/A wait N/A N/A self timeout N/A None N/A N/A 
        Waits for the encoder to finish (successfully or otherwise).

        This method is called by the owning camera object to block execution
        until the encoder has completed its task. If the *timeout* parameter
        is None, the method will block indefinitely. Otherwise, the *timeout*
        parameter specifies the (potentially fractional) number of seconds
        to block for. If the encoder finishes successfully within the timeout,
        the method returns ``True``. Otherwise, it returns ``False``.
         N/A result N/A N/A N/A self event wait timeout N/A result N/A N/A N/A N/A self stop N/A N/A self exception N/A N/A N/A self exception N/A result N/A stop N/A N/A self N/A N/A N/A 
        Stops the encoder, regardless of whether it's finished.

        This method is called by the camera to terminate the execution of the
        encoder. Typically, this is used with video to stop the recording, but
        can potentially be called in the middle of image capture to terminate
        the capture.
         N/A N/A self active N/A N/A N/A N/A self parent _encoders_lock N/A N/A N/A N/A N/A self parent _stop_capture N/A self camera_port N/A N/A N/A N/A mmal_check N/A N/A mmal mmal_port_disable N/A self output_port prefix Failed to disable encoder output port N/A N/A N/A PiCameraMMALError N/A e N/A N/A N/A N/A e status N/A mmal MMAL_EINVAL N/A N/A N/A N/A self stopped True N/A N/A N/A N/A self event set N/A N/A N/A self _close_output N/A close N/A N/A self N/A N/A N/A 
        Finalizes the encoder and deallocates all structures.

        This method is called by the camera prior to destroying the encoder (or
        more precisely, letting it go out of scope to permit the garbage
        collector to destroy it at some future time). The method destroys all
        components that the various create methods constructed and resets their
        attributes.
         N/A N/A N/A self stop N/A N/A self encoder_connection N/A N/A N/A N/A mmal mmal_connection_destroy N/A self encoder_connection N/A N/A self encoder_connection None N/A N/A self pool N/A N/A N/A N/A mmal mmal_port_pool_destroy N/A self output_port N/A self pool N/A N/A self pool None N/A N/A self resizer_connection N/A N/A N/A N/A mmal mmal_connection_destroy N/A self resizer_connection N/A N/A self encoder N/A N/A N/A N/A mmal mmal_component_destroy N/A self encoder N/A N/A self encoder None N/A N/A self resizer N/A N/A N/A N/A mmal mmal_component_destroy N/A self resizer N/A N/A self resizer None N/A N/A self output_port None N/A N/A PiRawMixin N/A PiEncoder N/A N/A 
    Mixin class for "raw" (unencoded) output.

    This mixin class overrides the initializer of :class:`PiEncoder`, along
    with :meth:`_create_resizer` and :meth:`_create_encoder` to configure the
    pipeline for unencoded output. Specifically, it disables the construction
    of an encoder, and sets the output port to the input port passed to the
    initializer, unless resizing is required (either for actual resizing, or
    for format conversion) in which case the resizer's output is used.
     N/A RAW_ENCODINGS N/A yuv rgb rgba bgr bgra N/A N/A mmal MMAL_ENCODING_I420 1.5 N/A N/A mmal MMAL_ENCODING_RGBA 3 N/A N/A mmal MMAL_ENCODING_RGBA 4 N/A N/A mmal MMAL_ENCODING_BGRA 3 N/A N/A mmal MMAL_ENCODING_BGRA 4 __init__ N/A N/A self parent camera_port input_port format resize N/A options N/A N/A N/A resize N/A N/A N/A N/A N/A parent RAW_FORMATS N/A format N/A N/A N/A N/A N/A input_port N/A 0 format N/A 0 encoding value N/A N/A resize N/A parent resolution N/A resize N/A N/A N/A width height resize N/A N/A self _strip_alpha N/A format N/A rgb bgr N/A N/A N/A width height N/A parent resolution N/A N/A self _strip_alpha False N/A width N/A N/A mmal VCOS_ALIGN_UP width 32 N/A height N/A N/A mmal VCOS_ALIGN_UP height 16 N/A resize N/A N/A resize N/A width height N/A N/A self _frame_size N/A int N/A N/A width height N/A N/A N/A self RAW_ENCODINGS N/A format N/A 1 N/A N/A N/A N/A super PiRawMixin self __init__ parent camera_port input_port format resize options N/A _create_resizer N/A N/A self width height N/A N/A N/A 
        Overridden to configure the resizer's output with the required
        encoding.
         N/A N/A N/A N/A super PiRawMixin self _create_resizer width height N/A encoding N/A N/A N/A self RAW_ENCODINGS N/A N/A self format N/A 0 N/A port N/A N/A N/A N/A self resizer N/A 0 output N/A 0 N/A N/A N/A N/A N/A port N/A 0 format N/A 0 encoding encoding N/A N/A N/A N/A N/A port N/A 0 format N/A 0 encoding_variant encoding N/A N/A mmal_check N/A N/A mmal mmal_port_format_commit port prefix Failed to set resizer output port format N/A _create_encoder N/A N/A self N/A N/A N/A 
        Overridden to skip creating an encoder. Instead, this class simply uses
        the resizer's port as the output port (if a resizer has been
        configured) or the specified input port otherwise.
         N/A N/A self resizer N/A N/A N/A self output_port N/A N/A N/A N/A self resizer N/A 0 output N/A 0 N/A N/A N/A self output_port N/A self input_port N/A _create_connections N/A N/A self N/A N/A N/A 
        Overridden to skip creating an encoder connection; only a resizer
        connection is required (if one has been configured).
         N/A N/A self resizer N/A N/A N/A self resizer_connection N/A N/A N/A self parent _connect_ports N/A self input_port N/A N/A N/A N/A self resizer N/A 0 input N/A 0 N/A active N/A N/A self N/A N/A N/A N/A bool N/A N/A N/A self output_port N/A 0 is_enabled N/A property _callback_write N/A N/A self buf key N/A N/A PiVideoFrameType frame N/A N/A 
        Overridden to strip alpha bytes when required.
         N/A N/A self _strip_alpha N/A N/A s N/A N/A ct string_at N/A N/A buf N/A 0 data N/A N/A buf N/A 0 length N/A s N/A bytearray s N/A N/A s N/A 3 4 N/A new_buf N/A N/A N/A mmal MMAL_BUFFER_HEADER_T from_buffer_copy N/A buf N/A 0 N/A N/A new_buf length N/A len s N/A N/A new_buf data N/A N/A ct pointer N/A N/A N/A ct c_uint8 from_buffer s N/A N/A N/A N/A super PiRawMixin self _callback_write N/A N/A ct pointer new_buf key N/A N/A N/A N/A N/A super PiRawMixin self _callback_write buf key N/A N/A PiVideoEncoder N/A PiEncoder N/A N/A 
    Encoder for video recording.

    This derivative of :class:`PiEncoder` configures itself for H.264 or MJPEG
    encoding.  It also introduces a :meth:`split` method which is used by
    :meth:`~PiCamera.split_recording` and :meth:`~PiCamera.record_sequence` to
    redirect future output to a new filename or object. Finally, it also
    extends :meth:`PiEncoder.start` and :meth:`PiEncoder._callback_write` to
    track video frame meta-data, and to permit recording motion data to a
    separate output object.
     N/A encoder_type N/A mmal MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER __init__ N/A N/A self parent camera_port input_port format resize N/A options N/A N/A N/A N/A N/A super PiVideoEncoder self __init__ parent camera_port input_port format resize options N/A N/A self _next_output N/A N/A N/A self frame None N/A _create_encoder N/A N/A self bitrate intra_period profile quantization quality inline_headers sei motion_output intra_refresh N/A 17000000 None high 0 0 True False None None N/A N/A 
        Extends the base :meth:`~PiEncoder._create_encoder` implementation to
        configure the video encoder for H.264 or MJPEG output.
         N/A N/A N/A N/A super PiVideoEncoder self _create_encoder N/A quality N/A quality quantization N/A N/A N/A N/A N/A N/A N/A N/A self output_port N/A 0 format N/A 0 encoding N/A N/A h264 mjpeg N/A mmal MMAL_ENCODING_H264 N/A mmal MMAL_ENCODING_MJPEG N/A N/A self format N/A N/A N/A KeyError N/A N/A N/A PiCameraValueError N/A Unsupported format %s N/A self format N/A N/A N/A 0 bitrate 25000000 N/A N/A N/A PiCameraValueError bitrate must be between 0 and 25Mbps N/A N/A N/A N/A N/A N/A self output_port N/A 0 format N/A 0 bitrate bitrate N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A self output_port N/A 0 format N/A 0 es N/A 0 video frame_rate num 0 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A self output_port N/A 0 format N/A 0 es N/A 0 video frame_rate den 1 N/A N/A mmal_check N/A N/A mmal mmal_port_format_commit N/A self output_port prefix Unable to set format on encoder output port N/A N/A N/A self format h264 N/A N/A mp N/A N/A mmal MMAL_PARAMETER_VIDEO_PROFILE_T N/A N/A mmal MMAL_PARAMETER_HEADER_T N/A mmal MMAL_PARAMETER_PROFILE N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_VIDEO_PROFILE_T N/A N/A N/A N/A N/A N/A mp profile N/A 0 profile N/A N/A baseline main high constrained N/A mmal MMAL_VIDEO_PROFILE_H264_BASELINE N/A mmal MMAL_VIDEO_PROFILE_H264_MAIN N/A mmal MMAL_VIDEO_PROFILE_H264_HIGH N/A mmal MMAL_VIDEO_PROFILE_H264_CONSTRAINED_BASELINE N/A profile N/A N/A N/A KeyError N/A N/A N/A PiCameraValueError N/A Invalid H.264 profile %s profile N/A N/A N/A N/A mp profile N/A 0 level N/A mmal MMAL_VIDEO_LEVEL_H264_4 N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set N/A self output_port N/A mp hdr prefix Unable to set encoder H.264 profile N/A inline_headers N/A N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set_boolean N/A self output_port N/A mmal MMAL_PARAMETER_VIDEO_ENCODE_INLINE_HEADER N/A mmal MMAL_TRUE prefix Unable to set inline_headers N/A sei N/A N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set_boolean N/A self output_port N/A mmal MMAL_PARAMETER_VIDEO_ENCODE_SEI_ENABLE N/A mmal MMAL_TRUE prefix Unable to set SEI N/A motion_output N/A N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set_boolean N/A self output_port N/A mmal MMAL_PARAMETER_VIDEO_ENCODE_INLINE_VECTORS N/A mmal MMAL_TRUE prefix Unable to set inline motion vectors N/A N/A intra_period None N/A N/A mp N/A N/A mmal MMAL_PARAMETER_UINT32_T N/A N/A mmal MMAL_PARAMETER_HEADER_T N/A mmal MMAL_PARAMETER_INTRAPERIOD N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_UINT32_T intra_period N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set N/A self output_port N/A mp hdr prefix Unable to set encoder intra_period N/A N/A self _intra_period intra_period N/A N/A mp N/A N/A mmal MMAL_PARAMETER_UINT32_T N/A N/A mmal MMAL_PARAMETER_HEADER_T N/A mmal MMAL_PARAMETER_INTRAPERIOD N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_UINT32_T N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_get N/A self output_port N/A mp hdr prefix Unable to get encoder intra_period N/A N/A self _intra_period N/A mp value N/A N/A intra_refresh None N/A N/A mp N/A N/A mmal MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T N/A N/A mmal MMAL_PARAMETER_HEADER_T N/A mmal MMAL_PARAMETER_VIDEO_INTRA_REFRESH N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T N/A N/A N/A mmal mmal_port_parameter_get N/A self output_port N/A mp hdr N/A N/A N/A N/A mp refresh_mode N/A N/A cyclic adaptive both cyclicrows N/A mmal MMAL_VIDEO_INTRA_REFRESH_CYCLIC N/A mmal MMAL_VIDEO_INTRA_REFRESH_ADAPTIVE N/A mmal MMAL_VIDEO_INTRA_REFRESH_BOTH N/A mmal MMAL_VIDEO_INTRA_REFRESH_CYCLIC_MROWS N/A intra_refresh N/A N/A N/A KeyError N/A N/A N/A PiCameraValueError N/A Invalid intra_refresh %s intra_refresh N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set N/A self output_port N/A mp hdr prefix Unable to set encoder intra_refresh N/A N/A N/A N/A self format mjpeg N/A N/A N/A self _intra_period 1 N/A quality N/A N/A mp N/A N/A mmal MMAL_PARAMETER_UINT32_T N/A N/A mmal MMAL_PARAMETER_HEADER_T N/A mmal MMAL_PARAMETER_VIDEO_ENCODE_INITIAL_QUANT N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_UINT32_T quality N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set N/A self output_port N/A mp hdr prefix Unable to set initial quality N/A mp N/A N/A mmal MMAL_PARAMETER_UINT32_T N/A N/A mmal MMAL_PARAMETER_HEADER_T N/A mmal MMAL_PARAMETER_VIDEO_ENCODE_MIN_QUANT N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_UINT32_T quality N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set N/A self output_port N/A mp hdr prefix Unable to set minimum quality N/A mp N/A N/A mmal MMAL_PARAMETER_UINT32_T N/A N/A mmal MMAL_PARAMETER_HEADER_T N/A mmal MMAL_PARAMETER_VIDEO_ENCODE_MAX_QUANT N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_UINT32_T quality N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set N/A self output_port N/A mp hdr prefix Unable to set maximum quality N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set_boolean N/A N/A N/A N/A self encoder N/A 0 input N/A 0 N/A mmal MMAL_PARAMETER_VIDEO_IMMUTABLE_INPUT 1 prefix Unable to set immutable flag on encoder input port N/A N/A mmal_check N/A N/A mmal mmal_component_enable N/A self encoder prefix Unable to enable video encoder component N/A start N/A N/A self output motion_output N/A None N/A N/A 
        Extended to initialize video frame meta-data tracking.
         N/A N/A self frame N/A PiVideoFrame index 0 frame_type None frame_size 0 video_size 0 split_size 0 timestamp 0 complete False N/A N/A motion_output None N/A N/A N/A N/A self _open_output motion_output N/A PiVideoFrameType motion_data N/A N/A N/A N/A super PiVideoEncoder self start output N/A stop N/A N/A self N/A N/A N/A N/A N/A N/A super PiVideoEncoder self stop N/A N/A N/A self _close_output N/A PiVideoFrameType motion_data N/A split N/A N/A self output motion_output N/A None N/A N/A 
        Called to switch the encoder's output.

        This method is called by :meth:`~PiCamera.split_recording` and
        :meth:`~PiCamera.record_sequence` to switch the encoder's
        :attr:`output` object to the *output* parameter (which can be a
        filename or a file-like object, as with :meth:`start`).
         N/A N/A self outputs_lock N/A N/A outputs N/A N/A N/A output None N/A N/A N/A outputs N/A N/A PiVideoFrameType frame output N/A N/A motion_output None N/A N/A N/A outputs N/A N/A PiVideoFrameType motion_data motion_output N/A N/A N/A N/A self _next_output append outputs N/A timeout N/A max 10.0 N/A N/A float N/A N/A self _intra_period N/A N/A self parent framerate 3.0 N/A N/A N/A N/A N/A self event wait timeout N/A N/A N/A PiCameraRuntimeError Timed out waiting for a split point N/A N/A N/A N/A self event clear N/A _callback_write N/A N/A self buf key N/A N/A PiVideoFrameType frame N/A N/A 
        Extended to implement video frame meta-data tracking, and to handle
        splitting video recording to the next output when :meth:`split` is
        called.
         N/A N/A self frame N/A PiVideoFrame index N/A N/A N/A self frame complete N/A N/A N/A self frame index 1 N/A N/A self frame index frame_type N/A N/A N/A N/A buf N/A 0 flags N/A mmal MMAL_BUFFER_HEADER_FLAG_KEYFRAME N/A PiVideoFrameType key_frame N/A N/A N/A N/A buf N/A 0 flags N/A mmal MMAL_BUFFER_HEADER_FLAG_CONFIG N/A PiVideoFrameType sps_header N/A N/A N/A N/A buf N/A 0 flags N/A mmal MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO N/A PiVideoFrameType motion_data N/A PiVideoFrameType frame frame_size N/A N/A N/A self frame complete N/A N/A buf N/A 0 length N/A N/A N/A self frame frame_size N/A N/A buf N/A 0 length video_size N/A N/A N/A N/A buf N/A 0 flags N/A mmal MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO N/A N/A self frame video_size N/A N/A N/A self frame video_size N/A N/A buf N/A 0 length split_size N/A N/A N/A N/A buf N/A 0 flags N/A mmal MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO N/A N/A self frame split_size N/A N/A N/A self frame split_size N/A N/A buf N/A 0 length timestamp N/A N/A N/A N/A buf N/A 0 pts N/A 0 N/A mmal MMAL_TIME_UNKNOWN None N/A N/A buf N/A 0 pts complete N/A bool N/A N/A N/A buf N/A 0 flags N/A mmal MMAL_BUFFER_HEADER_FLAG_FRAME_END N/A N/A N/A N/A self format h264 N/A N/A N/A buf N/A 0 flags N/A mmal MMAL_BUFFER_HEADER_FLAG_CONFIG N/A N/A N/A self outputs_lock N/A N/A N/A N/A new_outputs N/A N/A N/A self _next_output pop 0 N/A N/A N/A IndexError N/A N/A new_outputs None N/A new_outputs N/A N/A N/A new_key new_output N/A N/A new_outputs items N/A N/A N/A N/A self _close_output new_key N/A N/A N/A self _open_output new_output new_key N/A N/A new_key N/A PiVideoFrameType frame N/A N/A N/A self frame N/A PiVideoFrame index N/A N/A self frame index frame_type N/A N/A self frame frame_type frame_size N/A N/A self frame frame_size video_size N/A N/A self frame video_size split_size 0 timestamp N/A N/A self frame timestamp complete N/A N/A self frame complete N/A N/A N/A N/A self event set N/A N/A N/A N/A buf N/A 0 flags N/A mmal MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO N/A N/A key N/A PiVideoFrameType motion_data N/A N/A N/A N/A super PiVideoEncoder self _callback_write buf key N/A N/A PiCookedVideoEncoder N/A PiVideoEncoder N/A N/A 
    Video encoder for encoded recordings.

    This class is a derivative of :class:`PiVideoEncoder` and only exists to
    provide naming symmetry with the image encoder classes.
     N/A PiRawVideoEncoder N/A PiRawMixin PiVideoEncoder N/A N/A 
    Video encoder for unencoded recordings.

    This class is a derivative of :class:`PiVideoEncoder` and the
    :class:`PiRawMixin` class intended for use with
    :meth:`~PiCamera.start_recording` when it is called with an unencoded
    format.

    .. warning::

        This class creates an inheritance diamond. Take care to determine the
        MRO of super-class calls.
     _create_encoder N/A N/A self N/A N/A N/A N/A N/A N/A super PiRawVideoEncoder self _create_encoder N/A N/A self _intra_period 1 N/A N/A PiImageEncoder N/A PiEncoder N/A N/A 
    Encoder for image capture.

    This derivative of :class:`PiEncoder` extends the :meth:`_create_encoder`
    method to configure the encoder for a variety of encoded image outputs
    (JPEG, PNG, etc.).
     N/A encoder_type N/A mmal MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER _create_encoder N/A N/A self quality thumbnail bayer N/A 85 N/A 64 48 35 False N/A N/A 
        Extends the base :meth:`~PiEncoder._create_encoder` implementation to
        configure the image encoder for JPEG, PNG, etc.
         N/A N/A N/A N/A super PiImageEncoder self _create_encoder N/A N/A N/A N/A N/A N/A N/A N/A self output_port N/A 0 format N/A 0 encoding N/A N/A jpeg png gif bmp N/A mmal MMAL_ENCODING_JPEG N/A mmal MMAL_ENCODING_PNG N/A mmal MMAL_ENCODING_GIF N/A mmal MMAL_ENCODING_BMP N/A N/A self format N/A N/A N/A KeyError N/A N/A N/A PiCameraValueError N/A Unsupported format %s N/A self format N/A N/A mmal_check N/A N/A mmal mmal_port_format_commit N/A self output_port prefix Unable to set format on encoder output port N/A N/A N/A self format jpeg N/A N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set_uint32 N/A self output_port N/A mmal MMAL_PARAMETER_JPEG_Q_FACTOR quality prefix Failed to set JPEG quality N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set_boolean N/A self camera_port N/A mmal MMAL_PARAMETER_ENABLE_RAW_CAPTURE N/A int N/A bool bayer prefix Failed to set raw capture N/A N/A thumbnail None N/A N/A mp N/A N/A mmal MMAL_PARAMETER_THUMBNAIL_CONFIG_T N/A N/A mmal MMAL_PARAMETER_HEADER_T N/A mmal MMAL_PARAMETER_THUMBNAIL_CONFIGURATION N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_THUMBNAIL_CONFIG_T 0 0 0 0 N/A N/A mp N/A N/A mmal MMAL_PARAMETER_THUMBNAIL_CONFIG_T N/A N/A mmal MMAL_PARAMETER_HEADER_T N/A mmal MMAL_PARAMETER_THUMBNAIL_CONFIGURATION N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_THUMBNAIL_CONFIG_T 1 thumbnail N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set N/A N/A N/A self encoder N/A 0 control N/A mp hdr prefix Failed to set thumbnail configuration N/A N/A mmal_check N/A N/A mmal mmal_component_enable N/A self encoder prefix Unable to enable encoder component N/A N/A PiOneImageEncoder N/A PiImageEncoder N/A N/A 
    Encoder for single image capture.

    This class simply extends :meth:`~PiEncoder._callback_write` to terminate
    capture at frame end (i.e. after a single frame has been received).
     _callback_write N/A N/A self buf key N/A N/A PiVideoFrameType frame N/A N/A N/A N/A N/A N/A super PiOneImageEncoder self _callback_write buf key N/A bool N/A N/A N/A buf N/A 0 flags N/A N/A mmal MMAL_BUFFER_HEADER_FLAG_FRAME_END N/A mmal MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED N/A N/A PiMultiImageEncoder N/A PiImageEncoder N/A N/A 
    Encoder for multiple image capture.

    This class extends :class:`PiImageEncoder` to handle an iterable of outputs
    instead of a single output. The :meth:`~PiEncoder._callback_write` method
    is extended to terminate capture when the iterable is exhausted, while
    :meth:`PiEncoder._open_output` is overridden to begin iteration and rely
    on the new :meth:`_next_output` method to advance output to the next item
    in the iterable.
     _open_output N/A N/A self outputs key N/A N/A PiVideoFrameType frame N/A N/A N/A self _output_iter N/A iter outputs N/A N/A N/A self _next_output key N/A _next_output N/A N/A self key N/A N/A PiVideoFrameType frame N/A N/A 
        This method moves output to the next item from the iterable passed to
        :meth:`~PiEncoder.start`.
         N/A N/A N/A self _close_output key N/A N/A N/A N/A super PiMultiImageEncoder self _open_output N/A next N/A self _output_iter key N/A _callback_write N/A N/A self buf key N/A N/A PiVideoFrameType frame N/A N/A N/A N/A N/A N/A N/A N/A super PiMultiImageEncoder self _callback_write buf key N/A bool N/A N/A N/A buf N/A 0 flags N/A N/A mmal MMAL_BUFFER_HEADER_FLAG_FRAME_END N/A mmal MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED N/A N/A N/A N/A self _next_output key N/A False N/A N/A N/A StopIteration N/A N/A True N/A N/A PiCookedOneImageEncoder N/A PiOneImageEncoder N/A N/A 
    Encoder for "cooked" (encoded) single image output.

    This encoder extends :class:`PiOneImageEncoder` to include Exif tags in the
    output.
     N/A exif_encoding ascii _add_exif_tag N/A N/A self tag value N/A N/A N/A N/A isinstance tag str N/A N/A tag N/A N/A tag encode N/A self exif_encoding N/A N/A isinstance value str N/A N/A value N/A N/A value encode N/A self exif_encoding N/A N/A N/A isinstance value N/A datetime datetime N/A N/A value N/A N/A N/A N/A value strftime %Y:%m:%d %H:%M:%S encode N/A self exif_encoding N/A buf N/A N/A ct create_string_buffer N/A N/A N/A N/A N/A ct sizeof N/A mmal MMAL_PARAMETER_EXIF_T N/A len tag N/A len value 1 N/A mp N/A N/A ct cast buf N/A N/A ct POINTER N/A mmal MMAL_PARAMETER_EXIF_T N/A N/A N/A N/A mp N/A 0 hdr id N/A mmal MMAL_PARAMETER_EXIF N/A N/A N/A N/A mp N/A 0 hdr size N/A len buf N/A N/A N/A = tag N/A value N/A N/A data N/A tag value N/A N/A N/A mp N/A 0 keylen N/A len tag N/A N/A N/A mp N/A 0 value_offset N/A len tag N/A N/A N/A mp N/A 0 valuelen N/A len value N/A N/A data N/A N/A tag = value N/A N/A N/A ct memmove N/A N/A mp N/A 0 data data N/A len data N/A N/A mmal_check N/A N/A mmal mmal_port_parameter_set N/A self output_port N/A N/A mp N/A 0 hdr prefix N/A Failed to set Exif tag %s tag N/A start N/A N/A self output N/A N/A N/A timestamp N/A N/A N/A datetime datetime now N/A timestamp_tags N/A EXIF.DateTimeDigitized EXIF.DateTimeOriginal IFD0.DateTime N/A tag timestamp_tags N/A N/A N/A N/A self _add_exif_tag tag N/A N/A N/A N/A self parent exif_tags get tag timestamp N/A N/A tag value N/A N/A N/A N/A self parent exif_tags items N/A N/A N/A N/A tag timestamp_tags N/A N/A N/A N/A self _add_exif_tag tag value N/A N/A N/A N/A super PiCookedOneImageEncoder self start output N/A N/A PiCookedMultiImageEncoder N/A PiMultiImageEncoder N/A N/A 
    Encoder for "cooked" (encoded) multiple image output.

    This encoder descends from :class:`PiMultiImageEncoder` but includes no
    new functionality as video-port based encodes (which is all this class
    is used for) don't support Exif tag output.
     N/A N/A PiRawImageMixin N/A PiRawMixin PiImageEncoder N/A N/A 
    Mixin class for "raw" (unencoded) image capture.

    The :meth:`_callback_write` method is overridden to manually calculate when
    to terminate output.
     __init__ N/A N/A self parent camera_port input_port format resize N/A options N/A N/A N/A N/A N/A super PiRawImageMixin self __init__ parent camera_port input_port format resize options N/A N/A self _image_size 0 N/A _callback_write N/A N/A self buf key N/A N/A PiVideoFrameType frame N/A N/A 
        Overridden to manually calculate when to terminate capture (see
        comments in :meth:`__init__`).
         N/A N/A N/A self _image_size 0 N/A N/A N/A N/A N/A super PiRawImageMixin self _callback_write buf key N/A N/A self _image_size N/A N/A buf N/A 0 length N/A N/A N/A self _image_size 0 N/A start N/A N/A self output N/A N/A N/A N/A self _image_size N/A self _frame_size N/A N/A N/A N/A super PiRawImageMixin self start output N/A N/A PiRawOneImageEncoder N/A PiOneImageEncoder PiRawImageMixin N/A N/A 
    Single image encoder for unencoded capture.

    This class is a derivative of :class:`PiOneImageEncoder` and the
    :class:`PiRawImageMixin` class intended for use with
    :meth:`~PiCamera.capture` (et al) when it is called with an unencoded image
    format.

    .. warning::

        This class creates an inheritance diamond. Take care to determine the
        MRO of super-class calls.
     N/A N/A PiRawMultiImageEncoder N/A PiMultiImageEncoder PiRawImageMixin N/A N/A 
    Multiple image encoder for unencoded capture.

    This class is a derivative of :class:`PiMultiImageEncoder` and the
    :class:`PiRawImageMixin` class intended for use with
    :meth:`~PiCamera.capture_sequence` when it is called with an unencoded
    image format.

    .. warning::

        This class creates an inheritance diamond. Take care to determine the
        MRO of super-class calls.
     _next_output N/A N/A self key N/A N/A PiVideoFrameType frame N/A N/A N/A N/A N/A super PiRawMultiImageEncoder self _next_output key N/A N/A self _image_size N/A self _frame_size N/A N/A