Pepper_31_C_interfaces
ppp_stream_parser_samsung.h
Go to the documentation of this file.
1 /**
2  * This file defines the <code>PPB_StreamParser_Samsung</code> interface.
3  */
4 
5 /* From samsung/ppp_stream_parser_samsung.idl,
6  * modified Tue Dec 17 15:46:42 2013.
7  */
8 
9 #ifndef PPAPI_C_SAMSUNG_PPP_STREAM_PARSER_SAMSUNG_H_
10 #define PPAPI_C_SAMSUNG_PPP_STREAM_PARSER_SAMSUNG_H_
11 
12 #include "ppapi/c/pp_bool.h"
13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h"
17 
18 #define PPP_STREAMPARSER_SAMSUNG_INTERFACE_0_9 "PPP_StreamParser_Samsung;0.9"
19 #define PPP_STREAMPARSER_SAMSUNG_INTERFACE \
20  PPP_STREAMPARSER_SAMSUNG_INTERFACE_0_9
21 
22 /**
23  * @file
24  */
25 
26 
27 /**
28  * @addtogroup Interfaces
29  * @{
30  */
31 /**
32  * Abstract Interface used to parse media data streams
33  */
35  /**
36  * Initialize the parser. Must be called before any data is passed to Parse().
37  * |stream_type| describe type of stream to parse (should be one of type,
38  * passed in PPB RegisterParser). |stream_id| it's a id of stream to parse.
39  */
40  PP_Bool (*Init)(PP_Instance instance, int32_t stream_id, void* user_data);
41  /**
42  * Called when a seek occurs. This flushes the current parser state and puts
43  * the parser in a state where it can receive data for the new seek point.
44  */
45  void (*Flush)(PP_Instance instance, int32_t stream_id, void* user_data);
46  /**
47  * Called when there is new data to parse. |data| contains stream to parse.
48  *
49  * Return PP_OK if the parse succeds
50  */
51  PP_Bool (*Parse)(PP_Instance instance,
52  int32_t stream_id,
53  PP_Resource data,
54  void* user_data);
55  /**
56  * Called when end of parsing that stream. Unlike the Flush, this method
57  * clears all data stored by parser, flush buffers an get ready to new Init.
58  */
59  void (*Close)(PP_Instance instance, int32_t stream_id, void* user_data);
60 };
61 
63 /**
64  * @}
65  */
66 
67 #endif /* PPAPI_C_SAMSUNG_PPP_STREAM_PARSER_SAMSUNG_H_ */
68 
PP_Bool(* Parse)(PP_Instance instance, int32_t stream_id, PP_Resource data, void *user_data)
void(* Close)(PP_Instance instance, int32_t stream_id, void *user_data)
void(* Flush)(PP_Instance instance, int32_t stream_id, void *user_data)
int32_t PP_Resource
Definition: pp_resource.h:40
int32_t PP_Instance
Definition: pp_instance.h:34
PP_Bool(* Init)(PP_Instance instance, int32_t stream_id, void *user_data)
PP_Bool
Definition: pp_bool.h:30