Pepper_37_C_interfaces
ppp_stream_parser_samsung.h
Go to the documentation of this file.
1 /* Copyright (c) 2015 Samsung Electronics. All rights reserved.
2  */
3 
4 /* From samsung/ppp_stream_parser_samsung.idl,
5  * modified Thu Mar 12 10:00:01 2015.
6  */
7 
8 #ifndef PPAPI_C_SAMSUNG_PPP_STREAM_PARSER_SAMSUNG_H_
9 #define PPAPI_C_SAMSUNG_PPP_STREAM_PARSER_SAMSUNG_H_
10 
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_resource.h"
15 #include "ppapi/c/pp_stdint.h"
16 
17 #define PPP_STREAMPARSER_SAMSUNG_INTERFACE_0_9 "PPP_StreamParser_Samsung;0.9"
18 #define PPP_STREAMPARSER_SAMSUNG_INTERFACE \
19  PPP_STREAMPARSER_SAMSUNG_INTERFACE_0_9
20 
21 /**
22  * @file
23  * This file defines the <code>PPB_StreamParser_Samsung</code> interface.
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