int player_set_pcm_extraction_mode(player_h player, bool sync, const char *format, player_audio_pcm_extraction_cb callback, void *user_data);
/**
+ * @brief Set pcm mode spec. Samplerate, channel is needed.
+ * @since_tizen 2.4
+ * @param[in] player The handle to the media player
+ * @param[in] samplerate Samplerate
+ * @param[in] channel Channel
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_NOT_SUPPORTD Not supported
+ * @pre The player state must be #PLAYER_STATE_IDLE by player_create() or player_unprepare().
+ * @see player_set_pcm_extraction_mode()
+ */
+int player_set_pcm_spec(player_h player, int samplerate, int channel);
+/**
* @}
*/
* @retval #PLAYER_ERROR_NOT_SUPPORTD Not supported
* @pre The player state must be #PLAYER_STATE_IDLE by player_create() or player_unprepare().
* @post player_audio_pcm_extraction_cb() will be invoked.
- * @see player_unset_audio_frame_decoded_cb_ex()
*/
int player_set_pcm_extraction_mode(player_h player, bool sync, const char *format, player_audio_pcm_extraction_cb callback, void *user_data);
+/**
+ * @brief Set pcm mode spec. Samplerate, channel is needed.
+ * @since_tizen 2.4
+ * @param[in] player The handle to the media player
+ * @param[in] samplerate Samplerate
+ * @param[in] channel Channel
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_NOT_SUPPORTD Not supported
+ * @pre The player state must be #PLAYER_STATE_IDLE by player_create() or player_unprepare().
+ * @see player_set_pcm_extraction_mode()
+ */
+int player_set_pcm_spec(player_h player, int samplerate, int channel);
/**
* @}
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
-* http://www.apache.org/licenses/LICENSE-2.0
+* http://www.apache.org/licenses/LICENSE-2.0void set_pcm_spec
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
g_print(" ==> [Player_Test] player_set_audio_frame_decoded_cb_ex return: %d\n", ret);
}
+static void set_pcm_spec()
+{
+ int ret;
+
+ ret = player_set_pcm_spec(g_player[0], 44100, 2);
+ g_print("[Player_Test] set_pcm_spec return: %d\n", ret);
+}
+
static void get_stream_info()
{
int w = 0;
{
audio_frame_decoded_cb_ex();
}
+ else if(strncmp(cmd, "X4", 2) == 0)
+ {
+ set_pcm_spec();
+ }
else
{
g_print("unknown menu \n");